Re-run Only Failed Tests
How to setup failed tests re-run on GitLab
When a workflow fails in GitLab CI/CD you have the option to re-run the failed jobs. However, an additional setup is required for properly configuring Playwright for rerunning only the failed tests. See Re-run Only Failed Tests guide for details.

Playwright Sharding
If you're using Playwright Sharding for running your tests in parallel, use currents cache command to store the last run results and simplify re-run workflows.
Example workflows are available in our GitLab repositories:
reruns-pwc.yml - re-run only failed tests on GitLab CI using 3 parallel runners and Playwright Shards + Currents
pwccommandreruns-reporter.yml - re-run only failed tests on GitLab CI using 3 parallel runners and Playwright Shards + Currents reporter in
playwright.config.ts
Currents Orchestration
In case you're using Orchestration Setup for running your Playwright tests in parallel, use currents api command to fetch the results of the last run from the API.
An example workflow is available in our GitLab demo repository
rerun-or8n.yml - rerun only failed tests on GitLab CI/CD with Currents Orchestration
Last updated
Was this helpful?