Prerequisites
- A TestDino account with a project created
- A TestDino API key (Generate API Keys)
- An Azure DevOps project with pipelines enabled
- 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 secret pipeline variable so it is available to your pipeline without exposing it in logs or config files.- Open your Azure DevOps pipeline
- Click Edit on the pipeline
- Click Variables
- Click New variable
- Set the name to
TESTDINO_TOKEN - Paste your TestDino API key as the value
- Check Keep this value secret
- Save the pipeline
Basic Pipeline Config
For a simple setup without sharding, run your tests withTESTDINO_TOKEN mapped into the script. Results stream to TestDino during the run, so no separate upload step is needed.
azure-pipelines.yml: Basic pipeline
azure-pipelines.yml: Basic pipeline
azure-pipelines.yml
Sharded Test Runs
For larger test suites, the Azure DevOps matrix strategy splits tests across multiple jobs. Each shard streams its own results, and TestDino groups them into one run when they share aci-run-id.
How it works
- Azure DevOps runs Playwright across 4 shards using a matrix strategy
- 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
azure-pipelines.yml: Sharded pipeline
azure-pipelines.yml: Sharded pipeline
azure-pipelines.yml
Info
Every shard passes the same
--ci-run-id "$(Build.BuildId)", so TestDino merges them into a single run. The env block maps the secret variable into each shard’s script.Key details in the sharded config
Set the
ciRunId reporter option in playwright.config to $(Build.BuildId) if you prefer running npx playwright test directly instead of npx tdpw test.
Pipeline execution
After the pipeline runs, Azure DevOps shows all shard jobs in the pipeline view. 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/playwrightis in yourplaywright.configreporterarray andTESTDINO_TOKENis mapped into the script via theenvblock - Results stream during the run, so no separate upload step is required
TESTDINO_TOKEN not available in script
TESTDINO_TOKEN not available in script
- Secret variables in Azure DevOps are not automatically available as environment variables. You must map them explicitly using the
envblock in the script step - Verify the variable name matches exactly:
TESTDINO_TOKEN: $(TESTDINO_TOKEN)
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
Azure DevOps Extension
View test runs inside Azure DevOps