poly test command group covers the full testing lifecycle.
poly test run
Trigger a test run against the current branch. Runs all tests by default.
Examples:
--json, the CLI never polls: it prints the triggered run and exits, and next_command gives the poly test show command to check on it. Run that command until test_run.status is no longer pending or in_progress.
When
--dont-poll is used, the CLI prints the run ID and a poly test show command to retrieve results:
--json output shape:
--dry-run --json, the shape is different — no run is triggered:
--push on --json output--push --json adds a "push": {"success": true, "message": "..."} key to the output before the run is triggered. If the push fails, that key is printed alone (with "success": false and an "error" key) and the command exits non-zero without triggering a run.poly test list
List past test runs for the current project and branch.
Examples:
--json output shape:
poly test show
Inspect a completed test run or drill into a single test case.
Examples:
poly test show <run_id> prints a summary of the run (status, counts, timestamps) followed by a table of all individual test results.
poly test show <run_id> <test_case_id> drills into a single test — showing assertion results, any function call failures, and the full conversation transcript turn-by-turn.
--json output shape (run-level, no test_case_id):
--json output shape (with test_case_id):
Test run statuses
The CLI handles the full set of Agent Studio test run and test case statuses:
After a run completes,
poly test run prints a summary of failures (assertion reasons, function call failures, and conversation IDs) and exits with a non-zero status code when any test failed or errored.
For the test_suite/ file format, assertions, and worked examples, see the tests reference.
Related pages
- Testing — how
poly test runfits alongsidepoly validateandpoly chatin the development loop

