fix(runner): preserve failures when tests skip

Merged
MA
2mo ago
+319-25
  • expect.soft(1).toBe(2); test.skip('feature disabled') drops the assertion failure and exits 0. A failed attempt followed by a skip on retry also disappears from the CLI summary. Related to #688.
  • Keep soft failures in the skipped attempt's secondaryErrors and show the original failure under Skipped After Failure, including retries and serial members. Exclude engine cleanup diagnostics that arrived after the skip.
  • Add failOnSkippedFailure: true to make these runs exit 1. The default stays false to preserve the documented skip behavior under the stability policy. Tests retain their skipped status and reason; clean skips and successful retries are unaffected.
export default {
  targets,
  failOnSkippedFailure: true,
};

Verified

Ran it locally: yes

  • Ran the real CLI with a lifecycle-only engine in a standalone project, first with published e2e@0.15.1, then with this branch's packed npm package: E2E_TELEMETRY_DISABLED=1 node node_modules/e2e/dist/cli/bin.js run. No browser, app server, or model credentials.
  • The regression cases also failed against main at 28b09f3 before the fix.
Scenariomainthis branch
Soft failure, then skipFailure absent; exit 0Failure retained and printed; exit 0 by default, 1 with the option
Failed attempt, then skipped retryOriginal error hidden in the CLIOriginal error printed; exit 1 with the option
Clean skip with an engine cleanup errorSkipped; exit 0Skipped; exit 0, including with the option

The packed fix prints:

Skipped After Failure 1
SKIP  |headless| tests/skip.e2e.ts > soft failure followed by skip
ASSERTION_FAILED: 1 soft assertion failed
1. known regression: expected 1 to be 2
Warnings  1 skipped after failure

With the option enabled, report.json records run status failed, exit code 1, test status skipped, and reason feature disabled.

The app-backed testbed and benchmark suites were not run; verification stayed headless and service-free.