Run tests
Replay recorded tests from the web, from the terminal or in CI, and find out why one failed.
Run from the web
Running from the web needs the studio running on your machine. Start it with verifaied test studio and leave it running. See Start the studio.
- Run on a test's page, or on its row, runs that one test. A browser window opens on your machine so you can watch, and the flow on the web marks each step as it passes.
- Run all runs every recorded test on the page. A folder's Run runs the tests in that folder. Both queue the tests as a batch and run them without a window.
- While a test is running, its Run button becomes Stop. Stop runs at the top of the page ends the whole batch: the runs in progress and the ones still queued. A stopped run counts as failed, and its video is not kept.
Runs and recordings take turns, oldest first, so a second click waits behind the first and shows as Queued. A batch can run several tests at once when the repository's Tests run at once setting is above 1 and the environment has room for them. See Repository settings and Run several tests at once.
With no studio connected, the Run buttons show you the command to run in a terminal instead.
Run from the terminal
Choose exactly one of three forms. One test, by name:
verifaied test run "Settings/API tokens"
Every test in a folder:
verifaied test run --folder "Settings"
Every recorded test:
verifaied test run --all
| Option | What it does |
|---|---|
--retries N | Runs a failed test again, up to N more times, each from a fresh reset. The last attempt is the result. Use it for a slow or busy machine, not for a flow that is wrong. |
--parallel N | Runs up to N tests at once, from 1 to 8. Works with --all and --folder only, and is limited by what the environment can keep apart. |
--video fast|watch|off | How the video is paced for this run. |
--env NAME | Which environment to run against. Without it you get the default one. |
Environments, variables and secrets explains environments and running several at once. Replay videos explains the paces.
The exit code is 0 when everything passed. With --all or --folder it is the worst result of the run, so a script or a CI job can gate on it.
To see what is recorded and how each test last went:
verifaied test list
Read a failed run
- Open the test. Its page lists its runs on this branch.
- Click a run. The flow shows how that run went: the steps that passed, then the step that failed, marked in red with its error message inside it. The steps after it are dimmed.
- Watch the video beside the flow to see the page at that moment.
- Click Open trace to open the run in Playwright's trace viewer.
When a failure cannot be tied to one step, the message is shown above the flow and no step is marked.
Run in CI
There is no ready-made workflow for browser tests. Add two commands to a job of your own:
verifaied test sync verifaied test run --all --retries 1
verifaied test syncmakes verifAIed match the test files in the checkout.verifaied test run --all --retries 1runs every test and fails the job when one fails. Use--folderto run a part.
The job needs:
VERIFAIED_API_TOKENset to an API token. CI has no browser to log in with.- Node and
@playwright/testinstalled in the repository. - Your app running at the environment's
base_urlbefore the tests start.
Good to know
- If the environment has a
resetcommand, it runs before each test, so every test starts from the same state. If the reset fails, the run stops. See Reset state. - A test's pre-steps replay before it on every run.
- Every run keeps a video, a trace and the code the browser reached. How many runs are kept per test depends on your plan. See Plans and limits.
- Suite tests are not run from here. Your own runner runs them. See Existing Playwright suites.