Skip to main content
Buildkite auto-detects a .buildkite/pipeline.yml in your repository. This guide covers a basic run and a parallel sharded setup that streams results to TestDino during the run.

Prerequisites

  • A TestDino account with a project created
  • A TestDino API key (Generate API Keys)
  • A Buildkite pipeline connected to your repository, with an agent in a cluster
  • A Playwright test project (or clone the TestDino Example Repository to get started)
  • @testdino/playwright installed and configured in playwright.config.ts|js|mjs:
playwright.config.ts

Set Up Your API Key

Store your TestDino API key as a Buildkite cluster secret so it reaches the job without being written into .buildkite/pipeline.yml.
  1. In Buildkite, go to Agents
  2. Open Clusters and select the cluster your pipeline runs on
  3. Open Secrets, then click New Secret
  4. Set the Key to TESTDINO_TOKEN
  5. Paste your TestDino API key into the value
  6. Save the secret
The secrets plugin reads the secret at runtime and exposes it as an environment variable. Buildkite redacts secret values from build logs automatically.

Basic Pipeline Config

For a simple setup without sharding, run your tests with TESTDINO_TOKEN injected. Results stream to TestDino during the run, so no separate upload step is needed.
.buildkite/pipeline.yml
TipThe secrets plugin injects TESTDINO_TOKEN and the docker plugin forwards it into the container with propagate-environment. Results stream live even when tests fail, so failures land on the dashboard without a separate upload step.

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

How it works

  1. parallelism: 4 fans the step out into 4 Buildkite jobs
  2. Each shard runs Playwright with --shard=<n>/<total> from its parallel-job index
  3. Each shard streams its results to TestDino during the run
  4. Every shard sets the same TESTDINO_CI_RUN_ID so TestDino merges them into a single run
  5. No merge or upload step runs after the shards finish

Full sharded config

.buildkite/pipeline.yml

Key details

Set the ciRunId reporter option in playwright.config to process.env.TESTDINO_CI_RUN_ID if you prefer to pass it through the config instead of relying on the environment variable.

Pipeline execution

After the build starts, Buildkite shows each shard as a separate job under the step. Each shard streams its results, and TestDino merges them into one run as they complete.

Results in TestDino

The test run appears in your TestDino dashboard with full failure details, flaky detection, and trend data as tests complete.

Troubleshooting

Confirm @testdino/playwright is in your playwright.config reporter array and TESTDINO_TOKEN is injected. The docker plugin must list TESTDINO_TOKEN under environment so the value reaches the container. Results stream during the run, so no separate upload step is required.
Confirm every shard sets the same TESTDINO_CI_RUN_ID. If the id resolves to an empty value, check the $$ prefix: without it Buildkite interpolates BUILDKITE_BUILD_NUMBER at upload time, before the value exists.
Open Agents → Clusters → your cluster → Secrets and confirm a secret with the exact key TESTDINO_TOKEN exists. The secrets plugin variables map is ENV_VAR: "SecretKey", and secret keys are case-sensitive.

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