You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(report)!: count interrupted tests apart from failures (tester-army#713)
* fix(report)!: count interrupted tests apart from failures
* fix(report): tell a failed test from its last failed attempt, whatever the cut retry left
A forced interrupt (a second Ctrl-C, or a CI cancel that sends SIGINT and then SIGTERM) still writes `junit.xml` and `summary.md`. The runner used to abandon them along with every other reporter, which left the previous run's files beside the new `report.json`. Custom reporters are still abandoned on force.
Breaking: an interrupted test is no longer counted as failed. `report.json` gains `run.summary.interrupted`, and `run.summary.failed` counts only failed and timed-out tests. `run.summary.skipped` now counts only selected tests, so `passed + failed + interrupted + flaky + skipped` equals `selected`; the tests a filter left out are `discovered - selected`. The `list` reporter prints `3 interrupted` in its own column, `summary.md` shows them with ⏹️ and gives them no failure block or page, and `junit.xml` writes each one as a `<skipped>` whose message starts `interrupted:`. A test that failed and whose retry an interrupt cut short stays failed, and its failure is the one reported. A `--repeat-each` run the interrupt stopped is listed as interrupted, not as a flake. The telemetry event gains `tests_interrupted`. In `@e2e-dev/github`, a test that was interrupted and then passed on a `--last-failed` rerun shows as passed, not flaky.
Copy file name to clipboardExpand all lines: docs/reference/cli.mdx
+16-3Lines changed: 16 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -479,8 +479,8 @@ bunx e2e run --reporter list,junit
479
479
| --- | --- |
480
480
|`list`| Terminal progress, failures with code frames, and a run summary. On a TTY, live progress includes the current agent step, model turns, tool calls, and reasoning excerpts. Untrusted fields are capped at 8 KiB and stripped of control characters. |
481
481
|`json`| The report document to stdout and nothing else there, so `e2e run --reporter json \| jq` works. Same document as `<output>/report.json`, described by `schema/report-v1.schema.json` in the package. The shape changes only with the `schemaVersion` field (`report-1` today). Cannot be combined with `list`. |
482
-
|`junit`|`junit.xml` beside the report. One `<testsuite>` per file, one `<testcase>` per test-target pair named `title > path [target]`. A test-class error is a `<failure>`, any other an `<error>`, a skip a `<skipped>` with its reason. Run-level errors form a `run` suite. |
483
-
|`markdown`|`summary.md` beside the report with counts, cost, errors, and failure details. Failed and flaky tests also get a page under `failures/` there, with steps, model turns, and the screen at failure. Exploration runs show findings. [`@e2e-dev/github`](/github) uses this summary for pull request comments. |
482
+
|`junit`|`junit.xml` beside the report. One `<testsuite>` per file, one `<testcase>` per test-target pair named `title > path [target]`. A test-class error is a `<failure>`, any other an `<error>`, a skip a `<skipped>` with its reason. An interrupted test reached no verdict, so it is a `<skipped>` whose message starts `interrupted:`. Run-level errors form a `run` suite. |
483
+
|`markdown`|`summary.md` beside the report with counts, cost, errors, and failure details. Failed and flaky tests also get a page under `failures/` there, with steps, model turns, and the screen at failure. Interrupted tests are counted on their own and get no page. Exploration runs show findings. [`@e2e-dev/github`](/github) uses this summary for pull request comments. |
484
484
485
485
Every run that gets to its tests writes `report.json` under the [output directory](/reference/config#output)
486
486
(`.e2e` by default) whatever the reporters are, and the reporters' files
@@ -490,6 +490,16 @@ fails to start, an interrupt) writes none of them and leaves the previous
490
490
run's files in place; its errors are on the terminal and in the exit code. A `junit.xml` or `summary.md` that could not be written is a
491
491
line on stderr, never a run error.
492
492
493
+
`run.summary` in the report counts the results. `discovered` is every
494
+
test-target pair the runner collected and `selected` the ones this run
495
+
chose; the selection's left-out pairs are in `results` as `selected: false`
496
+
but in no other count. `passed`, `failed` (timed out included),
497
+
`interrupted`, `flaky`, and `skipped` count the selected results and add up
498
+
to `selected`. `interrupted` is a test the run stopped before its verdict
499
+
(a signal, `--max-failures`, or a run-level error such as
500
+
`MODEL_UNAVAILABLE`), never a failure. `executed` is the selected
501
+
results that ran at least one attempt.
502
+
493
503
With `--ai-trace`, the run also writes `<output>/ai-trace.json`: one entry per
494
504
model round trip with the exact prompt, tool definitions, response, usage,
495
505
and provider metadata. Observations in it are already redacted. Inline image
@@ -510,7 +520,10 @@ Signals escalate.
510
520
any test starts (during collection, an engine's `prepare`, or app
511
521
startup) writes no report and leaves the previous one in place.
512
522
2. A second signal forces. Workers dispose their engines at once and are
513
-
killed when the cleanup budget is spent. The report is still written.
523
+
killed when the cleanup budget is spent. The report is still written,
524
+
and so are `junit.xml` and `summary.md` when the `junit` and
525
+
`markdown` reporters are on; a custom reporter's
526
+
`onRunFinished` is abandoned.
514
527
3. A third signal exits on the spot, after killing the process groups of every
515
528
app command the run started. A process attached through
Copy file name to clipboardExpand all lines: docs/reference/reporters.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -171,7 +171,7 @@ prints. All reporters run concurrently, each with a one-minute deadline.
171
171
A timeout, exception, or invalid return value is reported on stderr without
172
172
changing the run's status, exit code, or report.
173
173
174
-
One Ctrl-C still lets reporters finish. A second Ctrl-C stops waiting for them.
174
+
One Ctrl-C still lets reporters finish. A second Ctrl-C stops waiting for them, except the built-in `junit` and `markdown`, which still write their files so none of the previous run's is left beside the new report.
175
175
176
176
The second argument is an `AbortSignal` that aborts when the budget runs out
177
177
or the run is forced to stop. Hand it to every request and timer, or an
|`attempts_total`, `tests_retried`| How many attempts the run made across tests and serial groups, and how many of them needed more than one |
124
124
|`targets`, `platforms`, `engines`| How many targets, on which platforms, and with which engines and versions, as your config declares them: `web`, `ios`, `[email protected]`, or your own engine's name and version. A name that is not a plain token of letters, digits, dots, dashes, and underscores is reported as `other`|
0 commit comments