Skip to main content

Overview

TestDriver writes a JSON result file for each test case after it finishes. These files have full metadata about the test run. This includes the SDK version, the runner version, infrastructure details, interaction statistics, and links to recordings. TestDriver writes the result files to:
For example, a test file tests/login.test.mjs with a test named "should log in" produces:
TestDriver makes the test names safe for the file system. It changes special characters to underscores. It cuts the names to 200 characters.

Enabling

You do not need configuration. The TestDriver Vitest reporter plugin writes the JSON files automatically each time the tests run.

JSON Schema

Each result file is organized into logical groups:

versions

test

urls

replay

The replay object contains the recording replay URL and derived embed links. The gifUrl and embedUrl are generated automatically from the replay URL. The replay.markdown field produces a clickable GIF badge you can paste directly into PR comments, README files, or issue descriptions:

date

team

infrastructure

realtime

interactions

Example Output

Using Result Files in CI

Result files are useful for extracting test metadata in CI pipelines without parsing log output.

GitHub Actions Example

Use fromJSON to parse a result file into a GitHub Actions expression you can reference in subsequent steps:
You can also load all results into a matrix or iterate over them:

Reading Results Programmatically