.harness/ in your repository or inline in the Harness UI. This guide covers a 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 Harness CI project with a Git connector to your repository
- 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 Harness secret so the pipeline reads it by reference instead of holding the value in YAML.- In Harness, open Project Settings (or Organization Settings to share it across projects)
- Go to Secrets
- Click New Secret, then Text
- Set the Secret Name to
TESTDINO_TOKEN - Paste your TestDino API key into the value
- Save the secret
<+secrets.getValue("TESTDINO_TOKEN")>. Harness masks secret values in build logs.
Basic Pipeline Config
For a simple setup without sharding, run your tests in oneRun step with TESTDINO_TOKEN set. Results stream to TestDino during the run, so no separate upload step is needed.
Replace <ORG_ID>, <PROJECT_ID>, <GIT_CONNECTOR_ID>, and <YOUR_REPO> with your Harness values. This example targets Harness Cloud runners; self-hosted (Docker or Kubernetes) runners use the same step with a different platform and runtime.
.harness/playwright.yaml: Basic pipeline
.harness/playwright.yaml: Basic pipeline
.harness/playwright.yaml
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
- A
Runstep installs dependencies once, then a secondRunstep usesstrategy.parallelismto fan out into shards - Each shard runs Playwright with
--shard=<n>/<total>from its iteration index - Each shard streams its results to TestDino during the run
- Every shard sets the same
TESTDINO_CI_RUN_IDso TestDino merges them into a single run - No merge or upload step runs after the shards finish
Full sharded config
Replace<ORG_ID>, <PROJECT_ID>, <GIT_CONNECTOR_ID>, and <YOUR_REPO> with your Harness values. This example targets Harness Cloud runners; self-hosted (Docker or Kubernetes) runners use the same steps with a different platform and runtime.
.harness/playwright.yaml: Sharded pipeline
.harness/playwright.yaml: Sharded pipeline
.harness/playwright.yaml
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 pipeline starts, Harness shows the parallel shards under theplaywright shard 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
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 resolves in the step’s envVariables. Results stream during the run, so no separate upload step is required.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
TestDino MCP
Access test results and fix issues with AI agents