Skip to main content
Set up an Azure DevOps pipeline that streams Playwright test results to TestDino during the run and view aggregated analytics, failure analysis, and flaky test detection on your dashboard.

Prerequisites

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.
  1. Open your Azure DevOps pipeline
  2. Click Edit on the pipeline
  3. Click Variables
  4. Click New variable
  5. Set the name to TESTDINO_TOKEN
  6. Paste your TestDino API key as the value
  7. Check Keep this value secret
  8. Save the pipeline
Warning Never commit your API key directly in pipeline files. Always use secret variables. Secret variables are not exposed in pipeline logs.

Basic Pipeline Config

For a simple setup without sharding, run your tests with TESTDINO_TOKEN mapped into the script. Results stream to TestDino during the run, so no separate upload step is needed.
azure-pipelines.yml
Tip The env block maps the secret variable to an environment variable @testdino/playwright reads. Results stream live even when tests fail, so failures land on the dashboard without a condition: always() upload step.

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 a ci-run-id.

How it works

  1. Azure DevOps runs Playwright across 4 shards using a matrix strategy
  2. Each shard streams its results to TestDino during the run
  3. Every shard passes the same --ci-run-id so TestDino merges them into a single run
  4. No merge or upload stage runs after the shards finish

Full sharded config

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. Azure DevOps pipeline execution view showing 4 Playwright shard jobs streaming results to TestDino

Results in TestDino

The test run appears in your TestDino dashboard with full failure details, flaky detection, and trend data as tests complete. TestDino test run screen showing streamed results from Azure DevOps pipeline with pass/fail counts and failure details

Troubleshooting

  • Confirm @testdino/playwright is in your playwright.config reporter array and TESTDINO_TOKEN is mapped into the script via the env block
  • Results stream during the run, so no separate upload step is required
  • Pass the same --ci-run-id "$(Build.BuildId)" (or ciRunId reporter option) to every shard
  • Different values create one run per shard
  • Secret variables in Azure DevOps are not automatically available as environment variables. You must map them explicitly using the env block in the script step
  • Verify the variable name matches exactly: TESTDINO_TOKEN: $(TESTDINO_TOKEN)

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