Principle:Cypress io Cypress CI Result Processing
| Knowledge Sources | |
|---|---|
| Domains | CI_CD, Testing |
| Last Updated | 2026-02-12 00:00 GMT |
Overview
A result aggregation and exit code mechanism that collects test outcomes from all executed specs, generates machine-readable reports (JUnit XML), and exits with an appropriate status code for CI pipeline integration.
Description
CI result processing is the final stage of headless test execution. It aggregates results from all spec files, computes summary statistics (total tests, passed, failed, pending), generates optional reports in machine-readable formats (JUnit XML for CI dashboards), and exits the process with a status code that CI tools can interpret.
The exit code is critical for CI integration: 0 means all tests passed, a positive number indicates the number of failures, and 112 indicates a network error during parallel recording.
Usage
Use this principle when integrating Cypress results with CI pipeline status gates, when configuring JUnit reporters for CI dashboards, or when handling exit codes in pipeline scripts.
Theoretical Basis
Result Processing Pipeline:
Spec results (per-file) → Aggregation → Summary stats
→ Reporter.results() → { stats, reporter, tests }
→ Optional: JUnit XML generation
→ Optional: Telemetry span with exitCode attribute
→ process.exit(code)
Exit Code Semantics:
0 = All tests passed
1-N = N test failures
112 = Network error in parallel mode