Skip to content

docs: explain how to combine coverage from parallel Cypress Cloud runs - #1006

Merged
jennifer-shehane merged 1 commit into
masterfrom
docs/853-parallel-coverage
Oct 27, 2026
Merged

jennifer-shehane merged 1 commit into
masterfrom
docs/853-parallel-coverage

Conversation

@jennifer-shehane

@jennifer-shehane jennifer-shehane commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

Additional details

When specs run in parallel across several machines, for example with Cypress Cloud's --record --parallel, each machine writes its own .nyc_output/out.json and builds a report from only that file (lib/task.ts). Neither the plugin nor Cypress Cloud combines those files. The README only hinted at this through external example apps, so anyone running in parallel just saw partial coverage and had no clear next step.

This PR adds a Parallel runs and Cypress Cloud section to README.md, just before "TypeScript users". It covers:

  • The pattern: each machine uploads its out.json as a CI artifact under a unique name. A final job downloads them all into .nyc_output and runs npx nyc report, which merges every JSON file in that folder.
  • A GitHub Actions example with three parallel containers.
  • Absolute paths: the report job needs the same source code at the same path as the test machines.
  • Thresholds: keep checkCoverage off on the test machines and run nyc report --check-coverage in the report job. Otherwise each machine checks only its share of the coverage and can fail.
  • Backend coverage is already in each machine's file, so it ends up in the combined report.
  • A link to cypress-example-conduit-app, which does the same thing on a different CI provider.

This is a docs-only change. There are no code or runtime changes.

Steps to test

  1. Read the new section in README.md.
  2. To check the merge yourself, put two partial out.json files with different names (for example out-1.json and out-2.json) in one folder. Run npx nyc report --temp-dir <folder> --reporter=text-summary and you should get the combined coverage. When I tried this, each file alone showed 50% function coverage and the merged folder showed 100%.
  3. npm run build, npm test and npm run format:check all pass. The new links in npm run check:markdown resolve: the Cloud parallelization docs page and the #enforce-coverage-thresholds and #instrument-backend-code anchors.

The GitHub Actions example itself hasn't been run end to end, since that needs a Cypress Cloud record key. Please take a close look at the actions/download-artifact settings (pattern and merge-multiple).

How has the user experience changed?

No change. The plugin behaves the same. The README now documents how to get combined coverage from parallel runs.


Generated by Claude Code


Note

Low Risk
README-only documentation with no code or runtime behavior changes.

Overview
Adds a Parallel runs and Cypress Cloud section to README.md (before TypeScript users) that explains why parallel cypress run --record --parallel jobs each produce partial coverage and how to merge them in CI.

The doc describes uploading each machine’s .nyc_output/out.json as a uniquely named artifact, then a follow-up job that downloads all JSON files into .nyc_output and runs npx nyc report to merge them. It includes a three-container GitHub Actions example (upload-artifact / download-artifact with merge-multiple), plus notes on absolute paths, moving checkCoverage enforcement to the report job, backend coverage in merged output, and a link to cypress-example-conduit-app.

Docs-only; no plugin or runtime changes.

Reviewed by Cursor Bugbot for commit 5c4acca. Bugbot is set up for automated code reviews on this repo. Configure here.

Each machine in a parallel run writes its own .nyc_output/out.json, and
neither the plugin nor Cypress Cloud combines them. Document the CI
pattern: upload each machine's file as an artifact under a unique name,
then run `nyc report` over all of them in a final job. Includes a
GitHub Actions example and notes on absolute source paths and coverage
thresholds.

Closes #853

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WUv8r1p9MrmJVuBc9LqSv6
@jennifer-shehane
jennifer-shehane merged commit d751a5b into master Oct 27, 2026
30 of 31 checks passed
@jennifer-shehane
jennifer-shehane deleted the docs/853-parallel-coverage branch October 27, 2026 19:56
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 4.1.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for Cypress Cloud

2 participants