Skip to main content

Time Travel

Overview​

Time Travel lets you watch a test run live and investigate a recorded attempt afterwards.

  • Replay the DOM and inspect the page at each recorded test step in the GUI or a static CI report.
  • Optionally capture network requests, responses and their bodies alongside the DOM.

Getting Started​

You need to install the latest versions of testplane and html-reporter (stable support was introduced in testplane@8.29.2 and html-reporter@10.18.0):

npm i -D testplane@latest html-reporter@latest

This is sufficient for the snapshot player and browser streaming to appear in GUI mode during test runs. You can launch the GUI with the standard command:

npx html-reporter gui

To enable Time Travel in CI, you need to set the timeTravel option in the Testplane config:

export = {
/* ... */
timeTravel: "on", // You can also specify "retries-only" or "last-failed-run"
};

You can learn more about these options in the configuration reference.

Using Time Travel​

After activating Time Travel in all supported browsers, a player window will appear before the test starts. During test execution, the browser's activity will be streamed into this player.

After the test run is complete, you can replay the recorded snapshots and navigate through time. Hovering over a specific step will show the browser's state at that exact moment.

To debug the layout, you can use the browser's DevTools. All selectors and attributes are preserved without changes.

Configuring Time Travel​

Currently, all snapshot recording management is done through the timeTravel option in the Testplane config. Complete information can be found in the configuration reference.

Also note that html-reporter automatically sets the necessary settings in GUI mode. If for some reason this doesn't work for you, it can be disabled in the settings panel — in this case, your project's config will be used without modifications:

Debug network requests​

info

Recorded network requests can currently be inspected only through the CLI. Support in Testplane UI is planned for a future release.

Network recording requires Chromium, Testplane 9.6.0+ and the html-reporter plugin 12.0.0+. Add network: true to your Time Travel mode:

export = {
timeTravel: { mode: "last-failed-run", network: true },
};

Sensitive data​

  • Reports and live CLI sessions mask sensitive headers such as Authorization, Cookie and X-API-Key, leaving the first five characters visible. To customize masking in reports, see secretConfigFilter.
  • URLs, including query parameters, and request and response bodies are stored unmasked.

Inspect a recording​

These commands require Testplane CLI 0.3.0 or later. Use the request ID returned by network-list (1 below).

# List HTTP 4xx/5xx responses and network failures
npx @testplane/cli network-list --snapshot-file ./snapshot.zip --errors
# Show request and response headers, status and timings
npx @testplane/cli network-inspect 1 --snapshot-file ./snapshot.zip
# Read the response body
npx @testplane/cli network-body 1 --snapshot-file ./snapshot.zip
Example output of network-inspect 1
POST https://example.com/api/orders
Resource type: fetch
Duration: 42.50 ms

Request headers:
content-type: application/json
Body: captured. Run `network-body 1 --request` with the same source options to read it.

Response: 422 Unprocessable Content
content-type: application/json
Body: captured. Run `network-body 1` with the same source options to read it.

For a report, replace --snapshot-file ./snapshot.zip with --report ./html-report --name "Checkout submits an order" --browser chrome --attempt 0. Use network-body --request for the request body or --output <path> to save binary data.

info

In a live Chromium CLI session, omit the report options. Run network-list --errors, then pass a request ID to network-inspect or network-body.

How much disk space does a recording use?​

HTML Reporter writes one compressed ZIP per saved attempt under html-report/snapshots/. Here are practical measurements:

Recorded trafficRequestsUnique bodiesZIP size
Three small tests with text or JSON responses3–5 per attempt1–3 per attempt3.3–7.0 KiB per attempt
One page with scripts, images and fonts83701.68 MiB

In the larger recording, compressed bodies accounted for 1.55 MiB and DOM events for 84 KiB. Identical bodies are stored once per ZIP.