Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Per-test JSON result files with metadata, versions, and infrastructure details
.claude/skills/testdriverai-testdriver-test-results-json/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-02 | ✗→✓ | ▲ Improved | 46% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 45% | 0% |
| case-01 | ✗→✓ | ▲ Improved | 133% | 0% |
| case-04 | ✗→✓ | ▲ Improved | 103% | 0% |
| case-05 | ✗→✓ | ▲ Improved | 54% | 0% |
<!-- Generated from test-results-json.mdx. DO NOT EDIT. -->
TestDriver automatically writes a JSON result file for each test case after it finishes. These files contain comprehensive metadata about the test run, including SDK and runner versions, infrastructure details, interaction statistics, and links to recordings.
Result files are written to:
.testdriver/results/<testFile>/<testName>.jsonFor example, a test file tests/login.test.mjs with a test named "should log in" produces:
.testdriver/results/tests/login.test.mjs/should_log_in.json<Note> Test names are sanitized for filesystem use — special characters are replaced with underscores and names are truncated to 200 characters. </Note>
No configuration is required. The JSON files are written automatically by the TestDriver Vitest reporter plugin whenever tests run.
Each result file is organized into logical groups:
versions| Field | Type | Description | |---|---|---| | versions.sdk | string \| null | TestDriver SDK version (e.g. "7.8.0") | | versions.vitest | string \| null | Vitest version used to run the test | | versions.api | string \| null | TestDriver API server version | | versions.runnerBefore | string \| null | Runner version at sandbox start | | versions.runnerAfter | string \| null | Runner version after auto-update | | versions.runnerWasUpdated | boolean | Whether the runner was auto-updated during provisioning |
test| Field | Type | Description | |---|---|---| | test.file | string \| null | Relative path to the test file | | test.name | string \| null | Name of the test case | | test.suite | string \| null | Name of the parent describe block | | test.passed | boolean | Whether the test passed | | test.caseId | string \| null | Database ID for this test case | | test.runId | string \| null | Database ID for the overall test run | | test.error | string \| null | Error message if the test failed | | test.errorStack | string \| null | Error stack trace if the test failed |
urls| Field | Type | Description | |---|---|---| | urls.api | string \| null | API root URL used for this test | | urls.console | string \| null | TestDriver console base URL | | urls.vnc | string \| null | VNC URL for the sandbox | | urls.testRun | string \| null | Direct link to this test case in the console |
replayThe replay object contains the recording replay URL and derived embed links. The gifUrl and embedUrl are generated automatically from the replay URL.
| Field | Type | Description | |---|---|---| | replay.url | string \| null | Recording replay URL | | replay.gifUrl | string \| null | Animated GIF thumbnail of the recording | | replay.embedUrl | string \| null | Embeddable replay URL (appends &embed=true) | | replay.markdown | string \| null | Ready-to-use Markdown embed with GIF linking to the replay |
The replay.markdown field produces a clickable GIF badge you can paste directly into PR comments, README files, or issue descriptions:
markdown[](https://console.testdriver.ai/replay/abc123?share=xyz)
date| Field | Type | Description | |---|---|---| | date | string | ISO 8601 timestamp when the test finished |
team| Field | Type | Description | |---|---|---| | team.id | string \| null | Team ID from the sandbox | | team.sessionId | string \| null | SDK session ID |
infrastructure| Field | Type | Description | |---|---|---| | infrastructure.sandboxId | string \| null | Sandbox instance ID | | infrastructure.instanceId | string \| null | Instance ID | | infrastructure.os | string \| null | Operating system of the sandbox ("linux" or "windows") | | infrastructure.amiId | string \| null | AWS AMI ID used for provisioning | | infrastructure.e2bTemplateId | string \| null | E2B template ID used for provisioning | | infrastructure.imageVersion | string \| null | Sandbox image version |
realtime| Field | Type | Description | |---|---|---| | realtime.channel | string \| null | Ably channel name used for communication | | realtime.messageCount | number | Number of messages published to the realtime channel |
interactions| Field | Type | Description | |---|---|---| | interactions.total | number | Total number of interactions recorded | | interactions.cached | number | Number of interactions served from cache | | interactions.byType | object | Breakdown of interactions by type (e.g. find, click, assert) |
json{ "sdkVersion": "7.8.0", "vitestVersion": "4.0.0", "apiVersion": "1.45.0", "runnerVersionBefore": "2.1.0", "runnerVersionAfter": "2.1.1", "wasUpdated": true, "apiUrl": "https://api.testdriver.ai", "consoleUrl": "https://console.testdriver.ai", "testRunLink": "https://console.testdriver.ai/runs/abc123/def456", "dashcamUrl": "https://app.dashcam.io/replay/abc123", "vncUrl": "wss://sandbox-123.testdriver.ai/vnc", "date": "2025-01-15T14:30:00.000Z", "team": { "id": "team_abc123", "sessionId": "sess_xyz789" }, "infrastructure": { "sandboxId": "sandbox-123", "instanceId": "i-abc123", "os": "linux", "amiId": "ami-0abc123", "e2bTemplateId": null, "imageVersion": "v2.1.0" }, "realtime": { "channel": "sandbox:sandbox-123", "messageCount": 42 }, "interactions": { "total": 15, "cached": 3, "byType": { "find": 8, "click": 5, "assert": 2 } } }
Result files are useful for extracting test metadata in CI pipelines without parsing log output.
Use fromJSON to parse a result file into a GitHub Actions expression you can reference in subsequent steps:
yaml- name: Run tests run: npx vitest run tests/login.test.mjs - name: Parse result id: result run: | # Read the first JSON result file FILE=$(find .testdriver/results -name '*.json' | head -n 1) echo "json=$(cat "$FILE")" >> "$GITHUB_OUTPUT" - name: Comment on PR if: fromJSON(steps.result.outputs.json).test.passed == false uses: actions/github-script@v7 with: script: | const result = ${{ steps.result.outputs.json }}; await github.rest.issues.createComment({ owner: context.repo.owner, repo: context.repo.repo, issue_number: context.issue.number, body: [ `❌ **${result.test.name}** failed`, ``, `Error: ${result.test.error}`, ``, result.replay.markdown, ``, `[View full recording](${result.urls.testRun})` ].join('\n') });
You can also load all results into a matrix or iterate over them:
yaml- name: Run tests run: npx vitest run tests/*.test.mjs - name: Collect results id: results run: | # Merge all result files into a JSON array echo "json=$(find .testdriver/results -name '*.json' -exec cat {} + | jq -s '.')" >> "$GITHUB_OUTPUT" - name: Summary run: | echo '## Test Results' >> $GITHUB_STEP_SUMMARY RESULTS='${{ steps.results.outputs.json }}' echo "$RESULTS" | jq -r '.[] | "| \(.test.name) | \(if .test.passed then "✅" else "❌" end) | \(.urls.testRun) |"' >> $GITHUB_STEP_SUMMARY
javascriptimport fs from "fs"; import path from "path"; const resultsDir = ".testdriver/results"; function readResults(dir) { const results = []; for (const testDir of fs.readdirSync(dir, { recursive: true })) { const fullPath = path.join(dir, testDir); if (fullPath.endsWith(".json") && fs.statSync(fullPath).isFile()) { results.push(JSON.parse(fs.readFileSync(fullPath, "utf-8"))); } } return results; } const results = readResults(resultsDir); const passed = results.filter(r => r.test.passed); const failed = results.filter(r => !r.test.passed); console.log(`${passed.length} passed, ${failed.length} failed`); for (const r of failed) { console.log(` FAIL: ${r.test.name} — ${r.test.error}`); console.log(` Recording: ${r.urls.testRun}`); console.log(` Embed: ${r.replay.markdown}`); }
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-02 | fail→pass | 17,272 | 10,486 | -39% | 1 | 1 | 0% | 3,346 | 4,883 | +46% | 0 | 0 | — |
case-03 | fail→pass | 15,515 | 7,027 | -55% | 1 | 1 | 0% | 2,636 | 3,810 | +45% | 0 | 0 | — |
case-01 | fail→pass | 11,615 | 24,383 | +110% | 1 | 1 | 0% | 2,093 | 4,875 | +133% | 0 | 0 | — |
case-04 | fail→pass | 10,383 | 4,374 | -58% | 1 | 1 | 0% | 1,682 | 3,419 | +103% | 0 | 0 | — |
case-05 | fail→pass | 11,549 | 2,780 | -76% | 1 | 1 | 0% | 1,992 | 3,069 | +54% | 0 | 0 | — |
case-06 | fail→pass | 11,645 | 3,868 | -67% | 1 | 1 | 0% | 1,882 | 3,257 | +73% | 0 | 0 | — |
case-07 | pass→pass | 11,277 | 2,627 | -77% | 1 | 1 | 0% | 1,793 | 3,033 | +69% | 0 | 0 | — |
case-08 | fail→pass | 8,750 | 1,957 | -78% | 1 | 1 | 0% | 1,436 | 2,855 | +99% | 0 | 0 | — |
case-09 | fail→pass | 6,678 | 1,798 | -73% | 1 | 1 | 0% | 923 | 2,796 | +203% | 0 | 0 | — |
case-10 | fail→pass | 7,256 | 1,686 | -77% | 1 | 1 | 0% | 1,198 | 2,765 | +131% | 0 | 0 | — |
case-11 | fail→pass | 6,488 | 1,882 | -71% | 1 | 1 | 0% | 1,082 | 2,819 | +161% | 0 | 0 | — |
case-12 | fail→pass | 10,476 | 4,729 | -55% | 1 | 1 | 0% | 1,939 | 3,440 | +77% | 0 | 0 | — |
case-13 | fail→pass | 10,462 | 2,096 | -80% | 1 | 1 | 0% | 1,812 | 2,775 | +53% | 0 | 0 | — |
case-14 | fail→pass | 12,450 | 3,024 | -76% | 1 | 1 | 0% | 1,845 | 2,949 | +60% | 0 | 0 | — |
case-15 | fail→pass | 8,620 | 1,241 | -86% | 1 | 1 | 0% | 1,344 | 2,696 | +101% | 0 | 0 | — |
case-21 | pass→pass | 5,659 | 5,663 | +0% | 1 | 1 | 0% | 1,051 | 3,569 | +240% | 0 | 0 | — |
case-16 | fail→pass | 12,169 | 5,485 | -55% | 1 | 1 | 0% | 2,113 | 3,539 | +67% | 0 | 0 | — |
case-17 | fail→pass | 5,437 | 2,277 | -58% | 1 | 1 | 0% | 984 | 2,800 | +185% | 0 | 0 | — |
case-18 | fail→pass | 7,574 | 2,424 | -68% | 1 | 1 | 0% | 1,471 | 2,854 | +94% | 0 | 0 | — |
case-19 | fail→pass | 12,217 | 2,206 | -82% | 1 | 1 | 0% | 2,041 | 2,906 | +42% | 0 | 0 | — |
case-20 | pass→pass | 5,300 | 7,312 | +38% | 1 | 1 | 0% | 972 | 3,573 | +268% | 0 | 0 | — |
case-22 | pass→pass | 5,300 | 5,846 | +10% | 1 | 1 | 0% | 664 | 3,397 | +412% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +82 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.