Skip to content

Latest commit

 

History

History
66 lines (42 loc) · 2.4 KB

time-travel.mdx

File metadata and controls

66 lines (42 loc) · 2.4 KB

import Admonition from "@theme/Admonition";

Time Travel (Preview)

Overview

The Time Travel mode is a new Testplane UI tool that allows you to observe test execution in real-time, as well as record and replay the test's progress.

  • Time Travel records snapshots of the DOM tree, not screenshots or videos, but the actual DOM structure
  • The average snapshot size is about 200KB thanks to compression and an incremental recording algorithm
  • The entire functionality is available both within the GUI and in a static report generated from any CI

Getting Started

Please note that the Time Travel feature is currently in Preview. For production use, we recommend waiting for the stable version.
  1. Install a fresh versions of testplane and html-reporter:

  2. Enable snapshot recording in the Testplane config:

    export = {
        /* ... */
        record: "on", // You can also use "last-failed-run", "retries-only", "off"
    };
  3. Run the tests and activate Time Travel in the UI settings:

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, snapshot recording is controlled via the record option in the Testplane config. It supports the following values:

  • "on" - snapshots will be recorded for every test run
  • "last-failed-run" - snapshots will be saved only for the last failed run
  • "retries-only" - snapshots will be recorded only for the retries
  • "off" - snapshots are completely disabled
In the near future, network request debugging and full-screen mode will soon be available.