Test Run Status
Test run status reflects execution completion, not assertion results. A run is Completed even if every test failed its metrics, as long as the tests executed.
Status values
RunStatus (tasks/enums.py):
| Status | Meaning |
|---|---|
Queued | Created, waiting for a worker to pick it up. |
Progress | Currently executing. |
Completed | All tests executed (execution_errors == 0), regardless of pass/fail. |
Partial | Some tests executed, some couldn’t (0 < execution_errors < total_tests). |
Failed | No tests in the run, or all tests errored (execution_errors == total_tests). |
Cancelled | Execution was cancelled. |
Queued, Progress, and Cancelled are set by the execution lifecycle. Completed, Partial, and Failed are the terminal states computed from results.
Determination logic
When execution finishes, the collect_results task runs TestRunProcessor (tasks/execution/result_processor.py), which aggregates stored test results and calls determine_overall_status:
The same call returns the email status used in the run-summary notification:
| Outcome | Run status | Email status |
|---|---|---|
| All executed, none failed | Completed | success |
| All executed, some failed | Completed | failed |
| Some couldn’t execute | Partial | partial |
| No tests, or all errored | Failed | failed |
Execution errors
An execution error means a test couldn’t run — an endpoint/HTTP or connection failure, a code error, or missing/empty metrics (status Error). Tests that ran but failed their assertions (is_successful: false) are not execution errors; they count as failed tests in a Completed run.
Statistics
Per-test pass/fail/error counts come from the stored test result status, not from re-parsing test_metrics. get_test_statistics (result_processor.py) joins TestResult.status and buckets each via the TEST_RESULT_STATUS_* mappings in app/constants.py. See Test Result Status for how that status is set and why it is the source of truth.
Related documentation
Implementation files
| File | Purpose |
|---|---|
tasks/execution/result_processor.py | Status determination and statistics |
tasks/enums.py | RunStatus enum |
app/constants.py | Status category mappings |
notifications/email/templates/test_execution_summary.html.jinja2 | Email template |