Examples
This page provides complete, valid CTRF report examples to illustrate how the specification is applied in practice.
Minimal Report
A minimal CTRF report includes only the required properties. This is the simplest valid report structure.
{
"reportFormat": "CTRF",
"specVersion": "0.1.0",
"results": {
"tool": {
"name": "jest"
},
"summary": {
"tests": 3,
"passed": 1,
"failed": 1,
"pending": 0,
"skipped": 1,
"other": 0,
"start": 1706644023000,
"stop": 1706644043000
},
"tests": [
{
"name": "User should be able to login",
"status": "passed",
"duration": 1200
},
{
"name": "User profile information should be correct",
"status": "failed",
"duration": 800
},
{
"name": "User should be able to logout",
"status": "skipped",
"duration": 0
}
]
}
}
Key Points:
reportFormatandspecVersionidentify this as a CTRF reporttool.nameis the only required tool property- All summary count fields are required
- Each test requires
name,status, andduration
Comprehensive Report
A comprehensive report includes optional properties for richer context and analysis capabilities.
{
"reportFormat": "CTRF",
"specVersion": "0.1.0",
"reportId": "9d2c6a10-3f7a-4e22-9a8f-1a2b3c4d5e6f",
"runId": "run-2026-08-15-e2e",
"results": {
"tool": {
"name": "playwright",
"version": "1.27.0"
},
"summary": {
"tests": 3,
"passed": 1,
"failed": 1,
"pending": 0,
"skipped": 1,
"other": 0,
"suites": 2,
"start": 1706644023000,
"stop": 1706644043000
},
"environment": {
"osPlatform": "darwin",
"osRelease": "22.1.0",
"osVersion": "Darwin Kernel Version 22.1.0",
"buildName": "main-build-1234",
"buildNumber": 1234,
"shardId": "shard-1-of-4"
},
"tests": [
{
"testId": "authentication/user-can-login",
"executionId": "2cf7e0b4-ea0c-4ef4-a18a-b9d6f6f0e100",
"name": "User should be able to login",
"status": "passed",
"duration": 1200,
"start": 1679812091000,
"stop": 1679812092200,
"suite": ["Authentication"],
"rawStatus": "passed",
"tags": ["UI", "Auth", "Critical"],
"labels": {
"priority": "P1",
"severity": 2,
"automated": true,
"owners": ["qa", "platform"],
"category": ["ui", "authentication"]
},
"type": "e2e",
"filePath": "/tests/auth/login.test.js",
"retries": 0,
"flaky": false,
"browser": "Chrome 98",
"extra": {
"acme.performance": {
"responseTime": "200ms"
}
}
},
{
"testId": "user-data/profile-information-is-correct",
"executionId": "2cf7e0b4-ea0c-4ef4-a18a-b9d6f6f0e101",
"name": "User profile information should be correct",
"status": "failed",
"duration": 800,
"start": 1679812093000,
"stop": 1679812093800,
"suite": ["User Data"],
"message": "Profile information mismatch",
"trace": "Error at /tests/user/profile.test.js:45",
"rawStatus": "failed",
"tags": ["API", "Non-Critical"],
"labels": {
"priority": "P2",
"severity": 3,
"automated": true
},
"type": "integration",
"filePath": "/tests/user/profile.test.js",
"retries": 0,
"flaky": false,
"browser": "Safari 14",
"attachments": [
{
"attachmentId": "72d531af-9d77-4f3b-bf67-0d8ec26c2001",
"name": "failure-screenshot.png",
"contentType": "image/png",
"path": "/artifacts/profile-failure.png"
}
],
"extra": {
"acme.test-management": {
"relatedIssue": "USER-123"
}
}
},
{
"testId": "authentication/user-can-logout",
"executionId": "2cf7e0b4-ea0c-4ef4-a18a-b9d6f6f0e102",
"name": "User should be able to logout",
"status": "skipped",
"duration": 0,
"start": 1679812094000,
"stop": 1679812094000,
"suite": ["Authentication"],
"tags": ["UI", "Auth"],
"labels": {
"priority": "P3",
"severity": 1,
"automated": true
},
"type": "e2e",
"filePath": "/tests/auth/logout.test.js",
"flaky": false,
"retries": 0,
"browser": "Firefox 92"
}
]
}
}
Additional Properties Shown:
reportIdidentifies this document, whilerunIdconnects related shard documentstool.version- Framework version informationsummary.suites- Suite count trackingenvironment- Execution context details, including the producingshardId- Test-level:
testId,executionId,suite,tags,labels,type,filePath,browser,retries,flaky attachmentIdidentifies a particular attachment referencemessageandtracefor failure details- namespaced
extrakeys for tool-specific custom data without collisions
Report with Retry Attempts
This example demonstrates how to capture retry information when tests are re-executed.
{
"reportFormat": "CTRF",
"specVersion": "0.1.0",
"results": {
"tool": {
"name": "cypress"
},
"summary": {
"tests": 1,
"passed": 1,
"failed": 0,
"pending": 0,
"skipped": 0,
"other": 0,
"start": 1706644023000,
"stop": 1706644043000
},
"tests": [
{
"testId": "network/request-eventually-succeeds",
"executionId": "2cf7e0b4-ea0c-4ef4-a18a-b9d6f6f0e200",
"name": "Flaky network request should eventually succeed",
"status": "passed",
"duration": 1300,
"retries": 2,
"flaky": true,
"retryAttempts": [
{
"attempt": 1,
"attemptId": "48c3f90b-95a9-4c13-a42f-0888bb0b1001",
"status": "failed",
"duration": 1000,
"message": "Network timeout",
"trace": "Error: Request timed out after 1000ms"
},
{
"attempt": 2,
"attemptId": "48c3f90b-95a9-4c13-a42f-0888bb0b1002",
"status": "failed",
"duration": 1200,
"message": "Network timeout",
"trace": "Error: Request timed out after 1000ms"
}
]
}
]
}
}
Key Points:
retries: 2indicates two retry attempts occurredflaky: truebecause the test failed before eventually passingretryAttemptscontains the initial attempt and earlier retries, but not the final passing attempt represented by the test object- Attempt numbers begin at 1 and are contiguous; the final attempt number is
retries + 1
Additional Examples
For more examples including edge cases, advanced features, and specific use cases, visit the CTRF examples repository on GitHub.
Related Documentation
- Root Object - Top-level structure
- Results Object - Results container
- Test Object - Individual test properties
- Report Immutability - Lifecycle rules for emitted and derived reports
- Extra Object - Namespaced custom extension data