Back to the README · Performance optimisations
Each item links to the instructions, examples and limitations for that feature.
- Turn tests into narrated videos.
--videoproduces a video with test titles, action captions, results, a moving cursor and a camera that follows the action. Each test also gets a clip. - Make demos from the same tests.
--demokeeps the page and narration without test names or results. Failed tests are omitted. - Write your own narration. Add
narrate()calls to explain the flow. They do nothing during normal runs, and tests without them still get automatic action captions. - Use a local or custom voice. Use your system's voice, install Kokoro, or supply a voice function. Generated speech is cached between runs.
- Get useful locator failures. See which part of a locator stopped matching, whether a hidden element matches, and similar elements as locators to copy.
- Check the setup with doctor. Check Node, duplicate installations, configs, test discovery, browsers, libraries and display availability.
--jsonexposes the checks to scripts. - Keep agent output small. Automatically detect supported coding agents, suppress passing-test noise and print each failure once with a rerun command.
- Read a structured test summary. Get outcomes, counts, failure locations, errors, attachment paths and rerun commands in
test-results/summary.json. - Run affected tests when you save. Use
--watchdirectly in the terminal, including tests affected by changes to imports, and change filters or rerun failures interactively. - Give each project its own server. Start only the servers needed by the selected projects and stop them when the run finishes.
- Set options on individual tests. Put
usedirectly on a test ordescribeblock instead of adding a group for one test's options. - Remove stale snapshots. Prune unused files after a complete passing run, with safeguards for skipped tests, filters and other platforms.
- Accept snapshots without another run. Update baselines from the last run's actual files, including results copied from CI.
- See discouraged APIs in your editor. Deprecated type annotations flag legacy methods while keeping them working.
- Migrate old calls with a codemod. Preview selector-to-locator changes, apply them with
--write, and list cases requiring manual changes.--keep-firstpreserves first-match behaviour. - Run TypeScript on Bun. Run TypeScript configs and tests with
bunx --bun playwright test. - Handle test APIs without CORS headers. Disable Chromium's same-origin enforcement and mixed-content blocking for that test environment with
webSecurity: false.