Playwright - GitLab CI/CD
Running Playwright test in parallel using GitLab CI/CD
Last updated
Was this helpful?
Running Playwright test in parallel using GitLab CI/CD
Last updated
Was this helpful?
The example file creates a GitLab CI pipeline with 3 workers using 3 :
Additional resources:
The results are being reported to Currents for more efficient troubleshooting, and monitoring test suite flakiness and performance.
Currents will collect the following information:
console output
screenshots
videos
trace files
timing
outcomes
flaky tests
error details
tags for more convenient management of the tests
Example workflows are available in our GitLab repositories:
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
Create an account at and grab the Project ID and Record Key.
Add CURRENTS_RECORD_KEY
as (make sure it's not protected)
Playwright Features on Currents:
Integration Documentation:
CI Build ID Guide:
Take a look at the example merge request:
When is enabled, Currents will post a Merge Commit note with run results:
In addition, Currents will post an for every Playwright project configured. For example:
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 guide for details.
If you're using for running your tests in parallel, use command to store the last run results and simplify re-run workflows.
- re-run only failed tests on GitLab CI using 3 parallel runners and Playwright Shards + Currents pwc
command
- re-run only failed tests on GitLab CI using 3 parallel runners and Playwright Shards + Currents reporter in playwright.config.ts
See the on the flags.
See the on the flags.
- rerun only failed tests on GitLab CI/CD with Currents Orchestration
Obtain an API key (see API Keys) and Record Key from Currents Dashboard and set accordingly