Test Runner
Riot’s test story has four layers:
Std.Testfor example-based suites and shared test-binary structurePropanefor property-based testing with generators and shrinkingStd.Test.Snapshotandriot snapshotsfor artifact reviewStd.Benchandriot benchfor performance verification
The important thing is that these layers line up. You do not have to leave the Riot test runner just to get property tests, snapshot workflows, or benchmarks.
The mental model
Section titled “The mental model”At the package level, you normally write test binaries that export:
- regular
Std.Test.casetests Propane.propertytests- fixture-backed tests
- snapshot-backed tests
through Std.Test.Cli.main.
At the workspace level, riot test finds those binaries, builds what it needs, and runs them through
one consistent loop.
That means you can think about testing in two scopes:
- inside one suite binary
- across the whole workspace
Both should still feel like one system.
Start here
Section titled “Start here”If you are new to Riot’s test stack, read these in order:
- riot test
- Writing Tests with Std.Test
- Property Testing with Propane
- Configuring Tests
- Std.Test.Snapshot
- Std.Bench
What good Riot suites look like
Section titled “What good Riot suites look like”Good Riot suites tend to have these properties:
- examples are written as direct
Std.Test.casetests - invariants are written as
Propane.propertytests - fixtures are shared through
Std.Test.FixtureRunner - output-heavy surfaces use snapshots deliberately
- benchmarks live next to the package when performance is part of the contract
That progression is healthy. It means the package is becoming better specified without forcing you to adopt every testing feature at once.
Core loops in this section
Section titled “Core loops in this section”Suite-driven testing.
Use Std.Test to define cases, assertions, fixtures, contexts, and the shared CLI contract.Property testing with Propane.
Use Propane when you need generation and shrinking rather than hand-authored examples.Snapshot review.
Use Std.Test.Snapshot and riot snapshots to review evolving text and structured outputs.Benchmarking.
Use Std.Bench and riot bench when performance behavior is part of the contract.