Prerequisites
- A TestDino account with a project created
- A TestDino API key (Generate API Keys)
- Jenkins instance with pipeline support
- A Playwright test project (or clone the TestDino Example Repository to get started)
@testdino/playwrightinstalled and configured inplaywright.config.ts|js|mjs:
playwright.config.ts
Set Up Your API Key
Store your TestDino API key as a Jenkins credential so it is available to your pipeline without exposing it in logs or config files.- Open Jenkins
- Go to Manage Jenkins → Credentials
- Open the store where you want to add the secret
- Click Add Credentials
- Set Kind to
Secret text - Paste your TestDino API key into Secret
- Set the ID to
TESTDINO_TOKEN - Click Save
Basic Pipeline Config
For a simple setup without sharding, run your tests with theTESTDINO_TOKEN credential in scope. Results stream to TestDino during the run, so no separate upload stage is needed.
Jenkinsfile: Basic pipeline
Jenkinsfile: Basic pipeline
Jenkinsfile
Sharded Test Runs
For larger test suites, Jenkins parallel stages split tests across multiple shards. Each shard streams its own results, and TestDino groups them into one run when they share aci-run-id.
How it works
- Jenkins runs Playwright across 4 shards using parallel stages
- Each shard streams its results to TestDino during the run
- Every shard passes the same
--ci-run-idso TestDino merges them into a single run - No merge or upload stage runs after the shards finish
Full sharded config
Jenkinsfile: Sharded pipeline
Jenkinsfile: Sharded pipeline
Jenkinsfile
Key details
Set the
ciRunId reporter option in playwright.config to $BUILD_TAG if you prefer running npx playwright test directly instead of npx tdpw test.
Pipeline execution
After the pipeline runs, Jenkins shows each stage in the pipeline graph with pass, fail, or unstable status. Each shard streams its results, and TestDino merges them into one run.
Results in TestDino
The test run appears in your TestDino dashboard with full failure details, flaky detection, and trend data as tests complete.
Troubleshooting
Results not appearing on the dashboard
Results not appearing on the dashboard
Confirm
@testdino/playwright is in your playwright.config reporter array and the TESTDINO_TOKEN credential is mapped in the environment block. Results stream during the run, so no separate upload stage is required.TESTDINO_TOKEN not available in pipeline
TESTDINO_TOKEN not available in pipeline
Confirm the credential is set in Manage Jenkins → Credentials with the ID
TESTDINO_TOKEN. Use credentials('TESTDINO_TOKEN') in the environment block to map it to an environment variable.Related
CI Optimization
Reduce CI time with smart reruns
Environment Mapping
Route test results to Dev, Staging, or Production by branch
Integrations
Connect Slack, Jira, Linear, Asana, and more
TestDino MCP
Access test results and fix issues with AI agents