feat: support merging reports and coverage when using test sharding#1054
Merged
feat: support merging reports and coverage when using test sharding#1054
Conversation
Deploying rstest with
|
| Latest commit: |
d77a541
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://5b6f792c.rstest.pages.dev |
| Branch Preview URL: | https://merge-reports.rstest.pages.dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Users can now shard tests across CI machines and merge all results into a single report with
rstest merge-reports, including combined coverage.Background
When tests are split across multiple CI machines using
--shard, each shard produces isolated test reports and coverage data with no way to combine them into a unified result.Implementation
blobbuilt-in reporter that serializes test results, durations, snapshots, console logs, and errors to JSON files (.rstest-reports/blob-{index}-{count}.json)rstest merge-reports [path]CLI command that loads blob files, replays results through configured reporters, merges coverage data via istanbul, and optionally cleans up with--cleanupShard Workflow
blobreporter to generate blob report files:.rstest-reports/directories into a single location, then merge:By default, blob reports are read from
.rstest-reports/in the project root. You can specify a custom path:The merge command will:
default,junit) with the merged dataUse
--cleanupto remove the blob reports directory after merging:Related Links
close #1044
Checklist