You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a developer using Vitest in CI with a matrix strategy (e.g., linux/macos/windows, or node 20/22), I want to merge test reports from multiple platform runs into a single report, so that I can get a unified view of test results across all environments.
Currently --merge-reports only supports merging sharded runs — where test files are split across shards with no overlap. When the same tests are run on multiple platforms (a common CI pattern), merging those blob reports produces duplicate unlabeled entries with no way to tell which result came from which platform.
Playwright supports this via their merge-reports + tag config, and it's a frequently needed workflow.
Use explicit tags to distinguish blobs from different environments. The blob reporter would accept a tag option that gets stored in the blob metadata and injected into each test's tags array during merge. This builds on Vitest's existing tag infrastructure (filtering, reporter display).
Auto-detect platform (process.platform, process.arch) and inject as tags without explicit config. Simpler for users but less flexible — doesn't cover non-OS dimensions like Node version or custom environments.
Playwright's approach: automatic ID deconfliction (salt duplicate IDs) + separate explicit tag config for labeling. We could start with the simpler combined approach (tag = deconflict + label) and add automatic deconfliction later if needed.
Clear and concise description of the problem
Draft plan with Claude
As a developer using Vitest in CI with a matrix strategy (e.g., linux/macos/windows, or node 20/22), I want to merge test reports from multiple platform runs into a single report, so that I can get a unified view of test results across all environments.
Currently
--merge-reportsonly supports merging sharded runs — where test files are split across shards with no overlap. When the same tests are run on multiple platforms (a common CI pattern), merging those blob reports produces duplicate unlabeled entries with no way to tell which result came from which platform.Playwright supports this via their
merge-reports+tagconfig, and it's a frequently needed workflow.Suggested solution
Note
Reworked solution is in #9967
Use explicit tags to distinguish blobs from different environments. The blob reporter would accept a
tagoption that gets stored in the blob metadata and injected into each test'stagsarray during merge. This builds on Vitest's existing tag infrastructure (filtering, reporter display).Blob reporter config:
Merge behavior:
tagsarray (e.g.,["linux", ...])Example CI workflow:
Alternative
process.platform,process.arch) and inject as tags without explicit config. Simpler for users but less flexible — doesn't cover non-OS dimensions like Node version or custom environments.tagconfig for labeling. We could start with the simpler combined approach (tag = deconflict + label) and add automatic deconfliction later if needed.Additional context
No response
Validations