CircleCI
Running Playwright Tests in Parallel on CircleCI and Currents
Run Playwright tests in parallel on CircleCI using the native Playwright Sharding to split the tests between multiple containers. Parallelizing the test will help in decreasing the overall run duration.
Currents collects the results of distributed parallel CircleCI builds for more efficient troubleshooting. Each container will receive a unique set of tests to run so that your tests will run faster and you can receive faster feedback from your browser test suite.
Create multiple containers that will run your tests in parallel by setting the desired amount of containers with the parallelism key in the .circleci/config.yml file.
Please refer to the example repository demonstrating how to set up CircleCI for running Playwright tests in parallel using Currents service.
Create an organization at https://app.currents.dev
Create a new project
Grab
CURRENTS_RECORD_KEYRecord Key andCURRENTS_PROJECT_IDStore
CURRENTS_RECORD_KEY: https://circleci.com/docs/guides/security/contexts/
The job can use a CircleCI OIDC token instead of a stored Record Key, with @currents/playwright 2.8.0 or later. See Record from CI with an OIDC token instead of a record key.
The config below assumes the repository already reports to Currents locally, as set up in Quick Start, so npm install installs @playwright/test and @currents/playwright from package.json.
The example config file:
runs 3 containers with Playwright tests in parallel
Note: the
Run testsstep above is ready to run once thecurrentscontext definesCURRENTS_RECORD_KEYandCURRENTS_PROJECT_ID(from app.currents.dev); you can append otherpwcflags as needed.
Last updated
Was this helpful?