Skip to content

Console & exit codes

The console reporter is what you see in your terminal when you run tales test. It is human-readable, ANSI-coloured by default, and designed for both interactive debugging and CI log scanning.

Immediately on startup, before any scenario runs, Tales writes a single line to stderr summarising the load:

tales: loaded 12 scenarios from 5 files; timeout=disabled

This is the line to grep for “did Tales actually find my tests” and “did I forget —timeout”.

While the runner is in flight, scenario start / end events stream on stderr:

▶ Create blog post
▶ Use keyword
✔ Use keyword (231ms)
✔ Create blog post (842ms)

Silence this with --no-progress if your CI swallows stderr.

With --verbose, Tales adds a heartbeat every 30 seconds listing scenarios still running:

heartbeat (30s): 2 scenarios still in flight
- Create blog post (running for 32.1s)
- SQL preconditions (running for 28.7s)

After the suite finishes, the full report goes to stdout:

Scenario Create blog post (e2e/pass/blog.tales) PASS in 842ms
✔ create_user POST /users 201 312ms
✔ create_post POST /blog/posts 201 418ms
✔ delete_user DELETE /users/abc 204 112ms (teardown)
Summary: scenarios 12 passed / 0 failed / 0 skipped, steps 47 passed / 0 failed
Duration: 1.24s

Failed steps include a diagnostic block pointing at the JSON path that mismatched, with want vs got side by side.

FlagEffect
--no-colorStrip ANSI colour codes. Use this when piping to a file or CI log that does not strip them itself.
--no-progressDisable scenario start / end progress events on stderr.
--verboseAdd a 30s heartbeat listing in-flight scenarios.

If --timeout fires before the suite completes, Tales prints the list of in-flight scenarios so you know exactly what stalled:

tales: global --timeout (5m) exceeded
in-flight at deadline:
- Create blog post (running for 5m0s)

The exit code is 1 in this case (treated as a failure).

CLI exit codes are part of the public contract. CI pipelines can rely on them.

CodeMeaning
0All scenarios passed (skipped also counts as ok).
1At least one scenario failed.
2Parse or validation error.
3Runtime or reporting fatal error.

The console reporter is always on. To also emit structured outputs for CI dashboards, add one or more of:

See CI integration for end-to-end recipes.