Unit testing isolates a routine and stands in for its dependencies. integration runs the whole call map for real, a function together with the functions it calls and the triggers its writes fire, and measures coverage across that map. Every routine in the schema becomes an integration test, including ones that call nothing, so one run is a complete suite for the schema. Team edition.
unitautogen integration --schema public --out integration_tests --html integration.html --json integration.json
<out>/integration/<schema>/, under functions/, triggers/ and views/<out>/integration/--out defaults to integration_tests/The older behaviour, where routines that call nothing were handed to the unit tests instead, is available with TG_INTEGRATION_ROOTS_ONLY=1. It then lists them in _integration_skipped.json.
--schema a,b and --like pat--out DIR, --html PATH, --json PATH--no-report skip the CI bundle--no-coverage and --include-extensionIt needs a Team licence or above. Without one it reports NOT LICENSED, runs nothing and exits with code 5. See Prerequisites for where the licence file goes. On Supabase, run unitautogen --supabase integration --schema public, which writes to supabase/tests/seccover/integration/.
The --html file is the Integration Testing Report. It has the same four summary cards as the unit report, measured across the whole call map, and one row per routine. Callers show their real callees, and leaves show an empty callee set.
| Report element | What it shows |
|---|---|
| Summary cards | Line and branch coverage, test counts and autonomy, line-weighted over the whole call map the tests drove. |
| One row per routine | For a caller, its tests call it directly, and every function it calls and every trigger its writes fire runs for real underneath it. A leaf routine is covered as its own node. |
| Standalone | A routine that calls nothing and fires no triggered write. It is still tested here, with an empty callee set. |
| Lines, line %, branch % | Line-weighted over the call map the root's tests drove. A line counts only if the root's call reached it. |
| Click a root | The call map in real call order, the write footprint per test across the whole map, and the stitched annotated source of every function in it. |
Every function and trigger here ran for real, so the stitched source shows the callee's and the trigger's coverage too. A line that is uncovered here is one the root's inputs never drove through the whole chain.
Each routine gets a full set of tests, not one. Valid inputs, boundaries and one test per branch, all driven through the real call map. In the run above iz17_root has 9 tests and iz18_root has 7.