Scenario Run

demo scenario testing

Scenario Run

Recordings of cade scenario run — Cade’s built-in way to test a table’s rules without touching hardware. A scenario feeds a sequence of events into the same engine that runs the real table, then checks the resulting score and state against what you expected.

A passing run

Here a scenario drives a target-then-bonus sequence and both expectations pass:

cade — scenario playground loading…
Loading the cade engine…
results
Press “run scenario” to execute the test against the table.

Catching a bug

The same scenario against a table with a broken rule — the run reports the failure and shows the state expectation that didn’t hold:

cade — scenario playground loading…
Loading the cade engine…
results
Press “run scenario” to execute the test against the table.

Run it yourself

Scenarios run from the command line against any table:

# Run one scenario against a table
cade scenario run scenarios/target_lights_bonus.cade.test --scoring-config mytable.cade

# Run every scenario in a directory
cade scenario run scenarios/ --recursive

# Machine-readable output, or stop on the first failure
cade scenario run scenarios/ --format json
cade scenario run scenarios/ --fail-on-error

For how to write scenarios, the expectation forms, and using them in CI, see Testing & Scenarios.