> ## Documentation Index
> Fetch the complete documentation index at: https://docs.testdino.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Playwright CI Optimization with TestDino

> Reduce CI time with caching, selective reruns, and parallelization.

<Callout icon="book-open" color="#3B82F6">
  **What you'll learn**

  * How to cache test results and rerun only failed tests
  * How to reduce CI time by 40-60%
  * The other ways to optimize CI: streaming, branch mapping, status checks, badges
</Callout>

TestDino optimizes Playwright test execution in CI pipelines by caching test results and enabling selective reruns. Several strategies cut CI time and cost: selective reruns, real-time feedback, branch mapping, and merge gating.

## Quick Reference

| Strategy                                                           | Description                                                              |
| :----------------------------------------------------------------- | :----------------------------------------------------------------------- |
| [Rerun Only Failed Tests](/guides/rerun-failed-playwright-tests)   | Cache results and rerun only failed tests. Reduces CI time by 40-60%.    |
| [Real-Time Streaming](/guides/playwright-real-time-test-streaming) | See results on the dashboard as each test finishes, before the run ends. |
| [Branch Environment Mapping](/guides/environment-mapping)          | Map branches to environments so trends and failures stay comparable.     |
| [GitHub Status Checks](/guides/github-status-checks)               | Block merges until tests meet your quality gates.                        |
| [Test Health Badges](/guides/test-health-badges)                   | Show live pass rate and flakiness in your README.                        |

## The Problem

Running full test suites on every commit increases time and cost:

* **Long feedback loops:** full suites take 10-30+ minutes, delaying developer feedback
* **High CI costs:** CI minutes accumulate quickly across teams and branches
* **Slow deployments:** waiting for full test runs slows release velocity
* **Flaky test noise:** re-running everything amplifies flaky test impact and blocks merges

## How TestDino Extends Playwright

Playwright `@playwright/test@1.50+` includes native `--last-failed` support. TestDino adds:

* **Cross-runner caching:** results persist across different CI runners
* **Shard awareness:** works with parallelized test execution
* **Workflow-level persistence:** cache survives job restarts
* **Branch/commit tracking:** results tied to specific code changes

## Related

<CardGroup cols={2}>
  <Card title="Rerun Failed Tests" icon="rotate-right" href="/guides/rerun-failed-playwright-tests">
    Cache results and rerun only what failed in CI
  </Card>

  <Card title="Real-Time Streaming" icon="tower-broadcast" href="/guides/playwright-real-time-test-streaming">
    Watch results land on the dashboard as tests finish
  </Card>

  <Card title="Branch Environment Mapping" icon="map" href="/guides/environment-mapping">
    Map branches to environments for comparable trends
  </Card>

  <Card title="GitHub Status Checks" icon="circle-check" href="/guides/github-status-checks">
    Block merges until tests meet quality gates
  </Card>
</CardGroup>
