# Playwright Regression Testing

> Automated regression testing strategy and best practices using Playwright with TypeScript. Use when asked to plan, organize, select, execute, or optimize regression test suites for web applications. Covers change-based and risk-based test selection, test tagging and prioritization, parallel execution, sharding, CI/CD pipeline integration with GitHub Actions, flaky test management, suite health mo…

- **Type:** Skill
- **Install:** `agentstack add skill-fugazi-test-automation-skills-agents-playwright-regression-testing`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [fugazi](https://agentstack.voostack.com/s/fugazi)
- **Installs:** 0
- **Category:** [Developer Tools](https://agentstack.voostack.com/c/developer-tools)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [fugazi](https://github.com/fugazi)
- **Source:** https://github.com/fugazi/test-automation-skills-agents/tree/main/skills/playwright-regression-testing

## Install

```sh
agentstack add skill-fugazi-test-automation-skills-agents-playwright-regression-testing
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Playwright Regression Testing (TypeScript)

Strategy and best practices for automated regression testing of web applications using Playwright with TypeScript.

> **Activation:** This skill is triggered when working with regression test strategy, test suite selection, test prioritization, CI/CD pipeline testing, flaky test management, test sharding, or optimizing test execution for web applications using Playwright.

## When to Use This Skill

- **Plan regression suites** with risk-based and change-based test selection
- **Organize tests** into tiers (smoke, sanity, selective, full regression)
- **Optimize execution** with parallelization, sharding, and time-budget strategies
- **Integrate with CI/CD** using GitHub Actions pipelines
- **Manage flaky tests** with quarantine, retry policies, and root cause tracking
- **Monitor suite health** with execution time, flake rate, and detection metrics
- **Select tests after changes** using git diff analysis and impact mapping

## Prerequisites

| Requirement    | Details                                  |
| -------------- | ---------------------------------------- |
| Node.js        | v18+ recommended                         |
| Playwright     | `@playwright/test` package               |
| TypeScript     | `typescript` configured in project       |
| Browsers       | Installed via `npx playwright install`   |
| Git            | Required for change-based test selection |
| GitHub Actions | Recommended CI/CD platform               |

---

## Quick Reference

### Tier Model

```
Tier 0 — Smoke       ( Common shortcuts and "good enough" excuses that erode test quality — and the reality behind each.

| Rationalization                                    | Reality                                                                                                 |
| -------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
| "Run all tests every time"                         | Change-based test selection reduces CI time 60-80%. Run the full suite nightly, not every commit.       |
| "Flaky tests are normal"                           | Flaky tests erode trust in the entire suite. Quarantine, investigate, and fix them.                     |
| "Regression testing is just re-running everything" | Strategic selection (risk-based, change-based) catches more defects in less time than brute-force runs. |
| "Test sharding is premature optimization"          | Parallel sharding cuts CI time linearly with workers. Start with 4 shards from day one.                 |
| "Smoke tests cover regression"                     | Smoke tests verify health; regression tests verify behavior. They serve different purposes.             |
| "Tagging tests is busywork"                        | Tags enable selective execution, prioritization, and suite analysis. Untagged suites are unmanageable.  |

---

## References

| Document                                                   | Content                                                                                                                                                                      |
| ---------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Regression Strategy](./references/regression-strategy.md) | Tier definitions, test selection (change-based, risk-based, historical, time-budget), directory layout, tagging, naming conventions, Playwright best practices, example test |
| [CI/CD Integration](./references/ci-cd-integration.md)     | GitHub Actions tiered pipeline, sharding, merge reports, Playwright config, performance optimization, CLI reference                                                          |
| [Flaky Management](./references/flaky-management.md)       | Retry policies, quarantine strategies, detection checklist, suite health metrics, troubleshooting                                                                            |

---

## Verification

After completing this skill's workflow, confirm:

- [ ] **Regression suite covers critical paths** — All priority-1 user flows have regression tests
- [ ] **Smoke test subset identified** — Tagged `@smoke` tests run in under 2 minutes
- [ ] **No test duplication** — Each scenario tested exactly once at the appropriate level
- [ ] **Test isolation verified** — Running tests in random order produces same results as sequential
- [ ] **Flaky test baseline established** — All tests pass 5/5 consecutive runs
- [ ] **CI pipeline configured** — GitHub Actions workflow runs regression on schedule
- [ ] **Allure or HTML report generated** — Test results available in human-readable format

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [fugazi](https://github.com/fugazi)
- **Source:** [fugazi/test-automation-skills-agents](https://github.com/fugazi/test-automation-skills-agents)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-fugazi-test-automation-skills-agents-playwright-regression-testing
- Seller: https://agentstack.voostack.com/s/fugazi
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
