riot test
riot test is the workspace entrypoint for test execution.
The default form runs every discovered test suite:
riot testThat is the command you should be able to rely on in every Riot workspace.
Narrowing what runs
Section titled “Narrowing what runs”riot test accepts both package-level filtering and query-style narrowing.
Run only one package:
riot test -p stdPass a query string:
riot test archiveThe command help also calls out the package:suite shape when you want to target one suite more
precisely.
This matters because once a workspace has more than a handful of test binaries, “run everything” stops being the only useful loop.
JSON output
Section titled “JSON output”If the tests need to feed automation, use JSON mode:
riot test --jsonThat emits JSONL events instead of human summaries. This is the mode you want for:
- CI integrations
- editor integrations
- local tooling that should react to events instead of scraping terminal text
Verbose mode
Section titled “Verbose mode”When a suite captures useful stdout or stderr, increase verbosity:
riot test -vriot test -vvVerbose mode is useful when a failure is obvious in the suite output but not in the condensed default summary.
How the output is structured
Section titled “How the output is structured”In human mode, Riot prints:
- a suite header
- each test result
- a per-suite summary
- a final workspace summary
Property tests are identified separately from plain unit tests, and successful property tests report
their example count instead of only ok.
What counts as “one suite”
Section titled “What counts as “one suite””Riot does not think in terms of loose test files. It thinks in terms of test binaries. Each binary is one suite with:
- a package name
- a suite name
- a list of exported test cases
That model is why test execution stays coherent across the workspace instead of devolving into ad hoc file discovery.
The practical loop
Section titled “The practical loop”In day-to-day work:
- use
riot checkwhile editing - use
riot testwhen behavior matters - use
riot test -p <pkg>when the workspace is large - use
riot test --jsonwhen the caller is another program