Playwright - Jenkins
Running Playwright tests in parallel with Jenkins and Currents Dashboard
Here's an example of Jenkins pipeline that is running Playwright tests in parallel on 2 workers.
The pipeline will be running 2 workers, based on mcr.microsoft.com/playwright:v1.34.0-jammy
Docker image. Those workers will run all the tests in parallel.
The steps are:
Use
mcr.microsoft.com/playwright:v1.34.0-jammy
as the base imageInstall the necessary dependencies:
playwright
and@currents/playwright
Populate the environment variable
CURRENTS_RECORD_KEY
using Jenkins Credentials Store. Learn more about Record KeyPopulate the environment variable
CURRENTS_PROJECT_ID
using Jenkins Credentials Store.Run Playwright tests on 2 workers, using CI Build ID for "connecting" the workers to the same parallel run. See CI Build ID.
Here's the full Jenkins pipeline configuration file:
Last updated