Skip to main content

Overview

Common Test Report Format (CTRF) is a standardized JSON-based interchange format for representing test execution results across tools, languages, and platforms. CTRF enables consistent reporting, aggregation, and analysis of test outcomes.

info

For the normative, formal specification including design principles, terminology, and complete field definitions, see the CTRF Specification on GitHub.

Core Components​

The specification is organized into the following main components:

ComponentDescription
Root ObjectThe top-level structure containing format identification, versioning, and all report data.
Results ObjectThe core component encapsulating data for a single test run.
Tool ObjectIdentifies the testing tool, framework, or system that produced the results.
Summary ObjectAggregated statistics and timing data for the test run.
Test ObjectDetailed information about individual test case execution and outcomes.
Status ValuesThe allowed values indicating test outcomes.
Environment ObjectExecution context including build, commit, and system information.

Lifecycle, Extension & Analysis​

ComponentDescription
Report ImmutabilityLifecycle rules for emitted reports and documents created through post-processing.
Insights ObjectDerived metrics computed across multiple runs for trend analysis.
Metrics ReferenceDefinitions for standard metrics used in CTRF insights.
Baseline ObjectReference to a previous report for comparison analysis.
Extra ObjectExtensibility mechanism for custom metadata.

Identity at a Glance​

CTRF uses separate identifiers because a document, logical run, test case, and individual execution are not the same thing.

FieldIdentifiesExpected stability
reportIdOne emitted CTRF documentPreserved only when retransmitting the same unchanged document
runIdOne logical test runShared by every document or shard in that run
testIdOne logical test caseStable across runs within the producer's documented scope
executionIdOne execution of a test case within a runUnique for that execution
attemptIdOne previous attempt within an executionUnique within the execution
attachmentIdOne attachment referenceUnique within its containing test or attempt
shardIdOne partition of a distributed runUnique among documents sharing a runId

All identity fields are optional. Producers should add the identifiers needed for correlation in their workflow.

Examples​

Practical examples demonstrating the CTRF specification:

Key Design Principles​

  • Layered Identity - Documents, logical runs, tests, executions, attempts, attachments, and shards have distinct identity scopes
  • Immutable Reports - Once emitted, reports are fixed snapshots; post-processing produces a new document
  • Machine-First - Optimized for machine processing while remaining human-readable
  • Flat Test Structure - Tests are a flat collection with metadata for grouping, not nested hierarchies
  • Strict Core, Namespaced Extensibility - Unknown fields are prohibited outside extra, and extension keys should be namespaced to avoid collisions
  • Tool Agnostic - Works with any language, framework, or CI/CD system