Merging Shard Reports
How do I merge TestRelic reports from parallel Playwright shards or Appium/WDIO workers into one file?
When running tests in parallel — Playwright shards or Appium/WDIO multi-worker runs — each shard or worker generates its own TestRelic report. Merge these into a single comprehensive report for a complete timeline, aggregated summary statistics, and one file to analyze or upload.
How do I merge reports?
I have TestRelic shard reports in ./test-results/ named shard-1.json, shard-2.json,
shard-3.json, and shard-4.json.
Show me the CLI command to merge them into ./test-results/merged-analytics.json
using npx testrelic-playwright merge.Write a GitHub Actions workflow that:
1. Runs Playwright tests across 4 shards in a matrix strategy
2. Uploads each shard's analytics-timeline.json as an artifact
3. In a separate merge job (needs: test), downloads all artifacts and runs:
npx testrelic-playwright merge <all four shard files> -o merged-analytics.json
4. Uploads the merged report as an artifact
Show me the complete workflow YAML.What does the merged report look like?
{
"schemaVersion": "1.0.0",
"testRunId": "original-run-id",
"startedAt": "2026-02-07T10:00:00.000Z",
"completedAt": "2026-02-07T10:15:00.000Z",
"totalDuration": 900000,
"summary": { "total": 100, "passed": 95, "failed": 3, "flaky": 2, "skipped": 0 },
"ci": { "...": "CI metadata from the first shard" },
"timeline": [ "...combined, sorted chronologically..." ]
}- Timeline — all entries combined and sorted chronologically by
visitedAt - Summary — test counts aggregated across shards/workers
- Duration —
totalDurationreflects wall-clock elapsed time (latestcompletedAtminus earlieststartedAt) - Test Run ID / CI metadata — taken from the first shard; configure a consistent
testRunIdacross shards for a single identity
Appium / WDIO worker merge
When running WDIO with maxInstances > 1, each worker writes its own JSON report — merge them the same way with testrelic-appium:
npx testrelic-appium merge \
./test-results/report-worker-1.json \
./test-results/report-worker-2.json \
-o ./test-results/merged.jsonSee the Appium Package Overview for the Appium-specific merge API.
Next steps
Was this page helpful?