Skip to main content
Ask AI

Unified Test Reports (Browser + API)

Unified Test Report Example

Unified test reports combine browser navigation analytics and API test results in a single JSON file. When you write tests that use both page and request fixtures, TestRelic captures both navigation timelines and test outcomes together.

What does a unified report contain?

When you run unified tests with TestRelic, the same JSON report captures:

  • Navigation Timeline — Every URL visited, navigation type, duration, and network statistics
  • Test Results — Pass/fail/flaky/skipped status for every test, regardless of whether it used page, request, or both
  • Failure Diagnostics — Error messages and source code snippets for any failing test
  • CI Metadata — Auto-detected CI provider details
  • Run Metadata — Test run ID, timestamps, and overall duration

What does the unified report schema look like?

Unified reports use the same top-level structure as all TestRelic reports:

{
"schemaVersion": "1.0.0",
"testRunId": "797128f5-c86d-466c-8d6d-8ec62dfc70b6",
"startedAt": "2026-02-07T10:41:28.759Z",
"completedAt": "2026-02-07T10:41:36.794Z",
"totalDuration": 8035,
"summary": {
"total": 8,
"passed": 7,
"failed": 1,
"flaky": 0,
"skipped": 0
},
"ci": {
"provider": "github-actions",
"buildId": "12345678",
"commitSha": "abc123def456",
"branch": "main"
},
"timeline": [...]
}

Each entry in the timeline array captures a page navigation (if the test used page) along with the test results associated with it:

{
"url": "https://en.wikipedia.org/wiki/Main_Page",
"navigationType": "goto",
"visitedAt": "2026-02-07T10:41:29.844Z",
"duration": 890,
"specFile": "tests/unified/wikipedia-api.spec.ts",
"domContentLoadedAt": "2026-02-07T10:41:30.200Z",
"networkStats": {
"totalRequests": 40,
"failedRequests": 0,
"totalBytes": 1289736,
"byType": {
"document": 1,
"script": 9,
"stylesheet": 2,
"image": 27,
"font": 2,
"xhr": 0,
"other": 0
}
},
"tests": [
{
"title": "tests/unified/wikipedia-api.spec.ts > search Wikipedia and validate API data",
"status": "passed",
"duration": 3456,
"failure": null
}
]
}
Report Structure

Top-level fields and timeline examples are covered in this guide. For browser-only reports, see Browser reports. For all reporter options, see Playwright Configuration or Appium Configuration.

What does each test result contain in a unified report?

FieldTypeDescription
titlestringFull test title including file and suite
statusstringResult: passed, failed, flaky, or skipped
durationnumberTotal test execution time in milliseconds (includes both API and browser time)
failureobject | nullError details if the test failed; null otherwise

What does a failure in a unified test look like?

{
"failure": {
"message": "expect(received).toHaveText(expected)\n\nExpected: \"Leanne Graham\"\nReceived: \"\"",
"snippet": {
"file": "tests/unified/user-validation.spec.ts",
"line": 18,
"lines": [
" const user = await apiResponse.json();",
" await page.goto(`https://example.com/users/${user.id}`);",
">>> await expect(page.locator('.user-name')).toHaveText(user.name);",
"});"
]
},
"stack": "Error: expect(received).toHaveText(expected)..."
}
}

How do I analyze unified reports?

AI Prompt — Analyze a unified report
Read my TestRelic unified report at test-results/analytics-timeline.json and:
1. Print the test summary (total, passed, failed, flaky, skipped)
2. List all page navigations with the tests that ran on each page
3. Find any failed tests across both browser and API tests
4. Show the 5 slowest page navigations
Write a Node.js script using fs.readFileSync.

AI Prompt — jq queries for a unified report
Write jq commands for my TestRelic unified report (test-results/analytics-timeline.json) to:
1. Print the summary
2. List all navigations with their associated test titles
3. Find all failed tests
4. Count how many tests ran on each unique URL

Where do I go next?

Loading chart…
Was this page helpful?
Last updated on by Srivishnu Ayyagari