Skip to main content
What you’ll learn
  • How to upload Playwright results from Azure DevOps pipelines to TestDino
  • How to configure sharded test runs with merged reporting
  • How to set up the TESTDINO_TOKEN as a secret pipeline variable
Set up an Azure DevOps pipeline to upload Playwright test results to TestDino and view aggregated analytics, failure analysis, and flaky test detection on your dashboard. This guide covers a basic pipeline, sharded pipeline for parallel test execution across multiple shards, and merged reporting.

Prerequisites

Before setting up, ensure you have:
playwright.config.js

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, add the upload step after your Playwright tests.
azure-pipelines.yml
Tip The condition: always() ensures the upload runs even if tests fail. The env block maps the secret variable to an environment variable accessible in the script.

Upload Options

Sharded Test Runs

For larger test suites, Azure DevOps matrix strategy splits tests across multiple jobs. Each shard produces a blob report that gets merged before uploading to TestDino.

How it works

  1. Azure DevOps runs Playwright across 4 shards using a matrix strategy
  2. Each shard publishes its blob report as a pipeline artifact
  3. A separate MergeAndUpload stage downloads all blob reports, merges them into a single report.json, and uploads to TestDino
  4. The merge stage runs even if some shards fail (condition: always())

Full sharded config

azure-pipelines.yml
Info The MergeAndUpload stage uses dependsOn: Test with condition: always() so it runs even when some shards fail. The upload step also checks if the merged report exists before attempting the upload, avoiding unnecessary errors.

Key details in the sharded config

Pipeline execution

After the pipeline runs, Azure DevOps shows all shard jobs and the merge stage in the pipeline view. Azure DevOps pipeline execution view showing 4 Playwright shard jobs and MergeAndUpload stage

Results in TestDino

Once uploaded, the test run appears in your TestDino dashboard with full failure details, flaky detection, and trend data. TestDino test run screen showing uploaded results from Azure DevOps pipeline with pass/fail counts and failure details

Rerun Failed Tests

Cache test metadata to enable selective reruns:
Rerun only failed tests on the next run:
For advanced rerun strategies, caching patterns, and CI optimization techniques, see CI Optimization.

Troubleshooting

  • Add condition: always() to the upload step so it runs regardless of test exit code
  • For sharded runs, ensure the MergeAndUpload stage has condition: always() and dependsOn: Test
  • Verify your playwright.config.ts outputs to playwright-report/ (default location)
  • For sharded runs, ensure all shards publish blob-report as a pipeline artifact and the merge step writes to playwright-report/
  • 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)
  • Ensure each shard uses PublishPipelineArtifact with condition: always() to publish even on failure
  • The DownloadPipelineArtifact step uses pattern blob-report-*/*. Verify artifact names match this pattern.
  • Check that blob-report directory exists after running Playwright (configure reporter: [['blob']] in playwright.config.ts)

Next Steps

CI Optimization

Reduce CI time with smart reruns

Branch Mapping

Map branches to environments for organized test runs

Integrations

Connect Slack, Jira, Linear, Asana, and more

Azure DevOps Extension

View test runs inside Azure DevOps