Skip to main content
What you’ll learn
  • How to upload Playwright results from GitLab CI/CD to TestDino
  • How to configure sharded test runs with merged reporting
Set up a GitLab CI/CD 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

  1. Go to your GitLab project
  2. Open Settings → CI/CD
  3. Expand the Variables section
  4. Click Add variable
  5. Set the key to TESTDINO_TOKEN
  6. Paste your TestDino API key as the value
  7. Check Mask variable to hide it from job logs
  8. Save the variable
WarningNever commit your API key directly in pipeline files. Always use CI/CD variables. Masked variables are hidden from job output.

Basic Pipeline Config

For a simple setup without sharding, add the upload step after your Playwright tests.
.gitlab-ci.yml
TipThe artifacts: when: always ensures test results are saved even if tests fail.

Upload Options

Sharded Test Runs

For larger test suites, GitLab CI/CD parallel keyword splits tests across multiple jobs. Each shard produces a blob report that gets merged before uploading to TestDino.

How it works

  1. GitLab CI/CD runs Playwright across 4 parallel shards
  2. Each shard saves its blob report as a job artifact
  3. A separate merge-report job collects all blob reports, merges them into a single report.json, and uploads to TestDino
  4. The merge job runs even if some shards fail (when: always)

Full sharded config

.gitlab-ci.yml

Key details

Pipeline execution

After the pipeline runs, GitLab shows all shard jobs and the merge stage in the pipeline view. GitLab pipeline view showing 4 parallel playwright shard jobs in the test stage and a passing merge-report job in the report 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 Runs dashboard showing uploaded results from GitLab CI pipeline with pass/fail counts and AI Insights

Rerun Failed Tests

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

Troubleshooting

Ensure artifacts: when: always is set on the test job so blob reports are saved on failure. The merge-report job must use when: always to run regardless of shard outcomes.
Verify your playwright.config.js includes both HTML and JSON reporters with HTML listed first. For sharded runs, ensure blob reports are listed in the test job artifacts: paths.
Confirm the variable is set in Settings → CI/CD → Variables. If the variable is marked Protected, it is only available on protected branches.

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

GitLab Integration

MR comments and merge request sync