fix(report)!: count interrupted tests apart from failures
Interrupted tests were counted as failed in every output. Ctrl-C at 4s on the testbed printed 3 failed, summary.md said đ´ e2e: 3 failed with 3 failure pages, and report.json had summary.failed: 3, all 3 of them interrupted. The report wire format freezes with the first stable release, so the count has to land now.
report.json:run.summarygainsinterrupted.failedcounts failed and timed out only (packages/e2e/src/report/build.ts,computeSummary). Schema, both fixtures, and a schema test change with it.run.summary.skippedcounted the tests the selection left out (--grep todo:skipped: 62while the list said7 passed (7)). It now counts selected results only, sopassed + failed + interrupted + flaky + skipped = selected, and the left-out tests arediscovered - selected.statusBucketinpackages/e2e/src/report/format.tshas aninterruptedbucket, so every reporter counts it on its own:list:3 interruptedin yellow inTest FilesandTestsand on the file line. Interrupted tests are left out ofFailed Tests.markdown: the âšī¸ glyph, no failure block and no page underfailures/. The headline is âšī¸ when the run was interrupted with no real failure, and đ´ otherwise.junit:<skipped message="interrupted: ...">, not<error>. JUnit has no interrupted outcome, and the test reached no verdict.@e2e-dev/github: the--last-failedfold countsinterrupted. A test that was interrupted and then passed reads as passed, not flaky. A test that failed and whose rerun was interrupted stays failed.- Telemetry gains
tests_interrupted.
- Forced interrupt (two SIGINTs, which is what a GitHub Actions cancel sends as SIGINT then SIGTERM):
runReportersabandoned every reporter, including the built-injunitandmarkdown. That left the previous run'ssummary.mdandjunit.xml, possibly green, beside the newreport.json. Those two are no longer abandoned on force; the timeout still bounds them. Custom reporters are still abandoned (packages/e2e/src/run/runner.ts,FILE_REPORTERS). - A test that failed and whose retry an interrupt cut short stays
failed(runWithRetriesinpackages/e2e/src/run/retry.ts), and every reporter tells the failed attempt, not the interrupted one. A serial group member keeps the verdict of the attempt before the interrupted retry (packages/e2e/src/run/serial.ts). --repeat-each: a repeat the interrupt stopped or never started is listed as interrupted, not as a flake (packages/e2e/src/report/repeats.ts).- The markdown headline shows âšī¸ whenever it lists an interrupted test with no failure, so a passing
--last-failedrerun that carries a never-finished test does not read green. - Exit codes are unchanged: 130 for an interrupt, 1 for
--max-failures. - Docs:
reference/cli.mdx(summary counts, junit and markdown rows, signals),reference/reporters.mdx,ci.mdx,github.mdx,telemetry.mdx, andskills/e2e/references/running.md.
Verified
Ran it locally: yes
- Testbed, built CLI,
e2e run --workers 8 --reporter list,markdown,junit, sent SIGINT after 4s. Also--workers 64with SIGINT after 3s,--config e2e.stress.config.ts --max-failures 2 --workers 4,--grep todo, and a forced run: a greentests/smoke.e2e.tsrun first, then the full run with two SIGINTs 20ms apart. Each was run on origin/main and on this branch.
SIGINT at 4s, --workers 8:
| main | this branch | |
|---|---|---|
| list | Tests 4 failed | 48 passed | 19 skipped (71) | Tests 3 interrupted | 51 passed | 17 skipped (71) |
report.json summary | failed: 4, all 4 results interrupted | failed: 0, interrupted: 3 |
summary.md | ### đ´ e2e: 4 failed, 48 passed, 19 skipped | ### âšī¸ e2e: 3 interrupted, 51 passed, 17 skipped |
failures/ | 4 pages | none |
junit.xml | failures="0" errors="4" skipped="19" | failures="0" errors="0" skipped="20", each <skipped message="interrupted: run interrupted in phase body"/> |
--max-failures 2 --workers 4 on the stress suite (2 real failures, 3 cut short):
| main | this branch | |
|---|---|---|
| list | Tests 5 failed | 4 passed | 6 skipped (15) | Tests 2 failed | 3 interrupted | 4 passed | 6 skipped (15) |
summary.md | ### đ´ e2e: 5 failed, 4 passed, 6 skipped, 5 pages | ### đ´ e2e: 2 failed, 3 interrupted, 4 passed, 6 skipped, 2 pages |
| exit | 1 | 1 |
--grep todo:
| main | this branch | |
|---|---|---|
report.json summary | selected: 7, passed: 7, skipped: 62 | selected: 7, passed: 7, skipped: 0 (discovered 69) |
Forced interrupt after a green run:
| main | this branch | |
|---|---|---|
| stderr | reporter "markdown" abandoned: the run was forced to stop, same for junit | nothing |
summary.md | stale: ### đĸ e2e: 3 passed, 1 skipped | fresh: ### âšī¸ e2e: 3 interrupted, 51 passed, 17 skipped |
junit.xml | stale: tests="4" | fresh: tests="71" |
Branch list output from the SIGINT run:
interrupted: stopping the running test and tearing down (interrupt again to force)
⯠web tests/controls.e2e.ts (15 tests | 1 interrupted | 11 skipped) 2.69s
à controls > enabled state arrives late and every read agrees (interrupted) 180ms
â controls > check and uncheck move checked state, and one radio checks at a time [run interrupted before execution]
...
Test Files 3 interrupted | 11 passed (14)
Tests 3 interrupted | 51 passed | 17 skipped (71)
Failed first attempt, retry interrupted (--retries 1, SIGINT at 5s, a scratch test not committed): branch reports failed: 1, interrupted: 0, ### đ´ e2e: 1 failed with the first attempt fails block, junit <failure message="first attempt fails" type="ERROR">, exit 130.
New integration test a forced interrupt still writes the junit and markdown files (runner-lifecycle.test.ts) fails with the runner fix reverted: expected '### đĸ e2e: 3 passed\n'.