What you’ll learn
- How to stream Playwright results from Bitbucket Pipelines to TestDino
- How to group sharded test runs into a single run
- How to store the TESTDINO_TOKEN as a secured repository variable
bitbucket-pipelines.yml file in the root of your repository. This guide covers a basic run and a parallel sharded setup that streams results to TestDino during the run.
Prerequisites
Before setting up, ensure you have:- A TestDino account with a project created
- A TestDino API key (Generate API Keys)
- A Bitbucket repository 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 secured repository variable so it is available to your pipeline without exposing it inbitbucket-pipelines.yml.
- Open your repository in Bitbucket
- Go to Repository settings
- Under Pipelines, click Repository variables
- Click Add variable
- Set Name to
TESTDINO_TOKEN - Paste your TestDino API key into Value
- Tick Secured so the value is masked in logs
- Click Add
Basic Pipeline Config
For a simple setup without sharding, run your tests withTESTDINO_TOKEN set. Results stream to TestDino during the run, so no separate upload step is needed.
bitbucket-pipelines.yml — Basic pipeline
bitbucket-pipelines.yml — Basic pipeline
bitbucket-pipelines.yml
Sharded Test Runs
For large test suites, run shards in parallel. Each shard streams its own results, and TestDino groups them into one run when they share aci-run-id.
How it works
- Each shard runs Playwright with
--shard=<n>/<total>in its own Bitbucket step - 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 step runs after the shards finish
Full sharded config
bitbucket-pipelines.yml — Sharded pipeline
bitbucket-pipelines.yml — Sharded pipeline
bitbucket-pipelines.yml
Key details
Set the
ciRunId reporter option in playwright.config to $BITBUCKET_BUILD_NUMBER if you prefer running npx playwright test directly instead of npx tdpw test.
Pipeline execution
After the pipeline runs, Bitbucket shows each shard step 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/playwright is in your playwright.config reporter array and TESTDINO_TOKEN is available to the step. Results stream during the run, so no separate upload step is required.TESTDINO_TOKEN not available in the pipeline
TESTDINO_TOKEN not available in the pipeline
Open Repository settings → Pipelines → Repository variables and confirm a variable named exactly
TESTDINO_TOKEN exists and is marked Secured. Variable names are case-sensitive.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
TestDino MCP
Access test results and fix issues with AI agents