-
Notifications
You must be signed in to change notification settings - Fork 1
Merging Parallel Reports
When a test suite is large, it is often faster to split it across several CI runners that each execute a subset of the tests in parallel. Kronikol can then combine each runner's output into a single combined TestRunReport.html — with the same information as if every test had run together in one process (including one merged Component Diagram across all runners' traffic, internal-flow popups, and flame charts).
This works in two steps:
- Each test runner produces an enriched, mergeable
TestRunReport.json. - A final job runs
kronikol mergeover all the JSON files to produce the combined HTML report.
Enable GenerateMergeableData in your report configuration:
new ReportConfigurationOptions
{
GenerateMergeableData = true,
// ...your other options
}Each runner's TestRunReport.json is then enriched with everything needed to rebuild a full report later:
- Features, scenarios, steps, results, durations and errors
- Per-scenario sequence/activity diagram source
- The run's component-diagram relationships
- Precomputed internal-flow segment data and whole-test-flow fragments
- CI metadata (commit, branch, run link)
The mergeable file is larger than the standard report because it embeds the precomputed diagram/flame payloads. It is only produced when the data format is JSON (the default).
Upload each runner's TestRunReport.json as a build artifact (see CI Artifact Upload). Give each runner's artifact a distinct name/path so they don't overwrite one another.
Install the CLI tool (a standard .NET global/local tool):
dotnet tool install --global Kronikol.ToolThen, in a job that runs after all the test runners have finished and their artifacts have been downloaded into one folder:
kronikol merge ./artifacts -o TestRunReport.html -t "Nightly Build"| Argument | Description |
|---|---|
<inputs...> |
One or more files, directories (searched recursively for *.json), or glob patterns. Schema files (*.schema.json) are ignored. |
-o, --output
|
Output HTML path. Default: TestRunReport.html. |
-t, --title
|
Report title. Default: Test Run Report. |
-h, --help
|
Show usage. |
- Features are grouped by name, so a feature split across runners is recombined; its scenarios are unioned (deduplicated by scenario id).
- Component relationships are re-aggregated across runners (call counts and test counts sum; method sets are unioned), producing one merged Component Diagram.
- Internal-flow popups and whole-test-flow fragments are unioned across runners.
- Times use the earliest start and latest end across all runners.
- CI metadata is taken from the first runner that captured it (runners in the same workflow share repository, branch and commit).
jobs:
test:
strategy:
matrix:
shard: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
# Run this shard's subset of the tests (split however you like).
- run: dotnet test --filter "Shard=${{ matrix.shard }}"
env:
# Ensure your ReportConfigurationOptions sets GenerateMergeableData = true.
KRONIKOL_SHARD: ${{ matrix.shard }}
- uses: actions/upload-artifact@v4
with:
name: report-shard-${{ matrix.shard }}
path: '**/Reports/TestRunReport.json'
merge:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/setup-dotnet@v4
- run: dotnet tool install --global Kronikol.Tool
- uses: actions/download-artifact@v4
with:
path: ./artifacts # all report-shard-* artifacts land here
- run: kronikol merge ./artifacts -o TestRunReport.html -t "Combined Test Run"
- uses: actions/upload-artifact@v4
with:
name: combined-report
path: TestRunReport.htmlIf you'd rather merge from your own code instead of the CLI:
using Kronikol.Reports.Merge;
// One-liner: read JSON files, merge, render combined HTML.
MergeableReportRenderer.MergeFilesToHtml(
new[] { "artifacts/runner1/TestRunReport.json", "artifacts/runner2/TestRunReport.json" },
"TestRunReport.html",
title: "Combined Test Run");
// Or step-by-step for full control:
var reports = files.Select(MergeableReportReader.ReadFile).ToList();
var merged = MergeableReportMerger.Merge(reports);
MergeableReportRenderer.Render(merged, "TestRunReport.html");- Inline step-parameter highlighting and step doc-strings are not yet carried through the mergeable data format. Step text, status, durations, substeps and attachments are preserved.
-
GenerateMergeableDataonly applies to the JSON data format.
Getting Started
Common Tasks
Integration Guides
- Integration xUnit3
- Integration xUnit2
- Integration NUnit
- Integration MSTest
- Integration TUnit
- Integration BDDfy xUnit3
- Integration LightBDD xUnit2
- Integration LightBDD xUnit3
- Integration LightBDD TUnit
- Integration ReqNRoll xUnit2
- Integration ReqNRoll xUnit3
- Integration ReqNRoll TUnit
Extensions
- Integration AtlasDataApi Extension
- Integration BigQuery Extension
- Integration Bigtable Extension
- Integration BlobStorage Extension
- Integration ClickHouse Extension
- Integration CloudStorage Extension
- Integration CosmosDB Extension
- Integration Dapper Extension
- Integration DynamoDB Extension
- Integration EF Core Relational Extension
- Integration Elasticsearch Extension
- Integration EventBridge Extension
- Integration EventHubs Extension
- Integration Grpc Extension
- Integration Kafka Extension
- Integration MassTransit Extension
- Integration MongoDB Extension
- Integration MySqlConnector Extension
- Integration Npgsql Extension
- Integration Oracle Extension
- Integration PubSub Extension
- Integration Redis Extension
- Integration S3 Extension
- Integration ServiceBus Extension
- Integration SNS Extension
- Integration Spanner Extension
- Integration SqlClient Extension
- Integration Sqlite Extension
- Integration SQS Extension
- Integration StorageQueues Extension
- Integration OpenTelemetry Extension
- Integration DispatchProxy Extension
- Integration MediatR Extension
- Integration PlantUML IKVM
Configuration
- Tracking Dependencies
- Tracking Custom Dependencies
- HTTP Tracking Setup
- Report Configuration
- Diagram Customisation
- Phase-Aware Tracking
- Content Formatting
- PlantUML Server Configuration
Features
- Generated Reports
- Search Syntax
- Component Diagrams
- PlantUML Browser Rendering
- Inline SVG Rendering
- Internal Flow Tracking
- Tags and Attributes
- Excluding Requests
- Excluded Headers
- Multi-Host Test Architectures
- Event-Driven Architecture Testing
- Service Bus Tracking Patterns
- Background Thread Correlation
- Parallel-Safe Background Correlation
- Event & Message Tracking
- Assertion Tracking
- Step Tracking
- Tabular Attributes
- Large Response and Diagram Handling
- Diagnostics and Debugging
- CI Summary Integration
- CI Artifact Upload
- Merging Parallel Reports
Reference