# E2E Test Writer: Stable Playwright Tests, No Flakes

> Write and debug resilient Playwright E2E tests for critical user journeys with automated flake checking.

E2E Test Writer: Stable Playwright Tests, No Flakes is a free AI agent skill on Agensi by Ignasi, in Testing & Debugging. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [Ignasi](https://www.agensi.io/creators/ignasi)
- Category: [Testing & Debugging](https://www.agensi.io/skills/testing-debugging)
- Version: 1.0
- Last updated: 2026-12-03
- Security: scan passed (2026-11-23); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/e2e-test-writer-stable-playwright-tests-no-flakes
- Tags: testing, playwright, typescript, qa-automation, ci-cd

## About this skill

Manual QA is slow and flaky UI tests cause more friction than they solve. This skill delivers stable Playwright end-to-end tests that focus on real user outcomes using resilient, role-based locators.

### What it does
- **Critical journey mapping** identifies and ranks business-critical flows like auth, checkout, and CRUD operations by risk.
- **Resilient locators** prioritizes role-based and label-based selection over fragile CSS or XPath selectors.
- **Efficient authentication** implements storage state setup to log in once and reuse sessions across the entire suite.
- **Network mocking** handles third-party dependencies like payment gateways and maps via `page.route` to prevent external failures.
- **Flake prevention** runs new tests repeatedly under load to identify race conditions and timing issues before they hit CI.

### How it works
1. **Analysis** of routes and components to build a journey coverage table.
2. **Infrastructure setup** of the Playwright configuration including base URLs, web servers, and retry logic.
3. **Test authoring** using web-first assertions and independent fixtures for unique test data.
4. **Validation** through local execution, visual regression checks, and accessibility audits.

### Frameworks & tools
TypeScript, Playwright, axe-core/playwright, and GitHub Actions. Supported application stacks include React, Vue, Next.js, Nuxt, Svelte, Rails, and Django.

### Why this beats prompting it yourself
Generic prompts often produce fragile tests that rely on `waitForTimeout` or brittle CSS selectors. This skill enforces strict role-based locator priorities and automated flake-checking cycles that standard LLM outputs ignore.

### Use cases
- **Regression testing** for core e-commerce checkout and payment flows.
- **CI/CD integration** to block broken builds with sharded test runs.
- **Flaky test remediation** by analyzing traces and fixing race conditions.
- **Accessibility auditing** to catch WCAG violations during functional testing.

### Known limitations
Focuses on Chromium for speed; mobile Safari/Chrome are only added for key flows. Third-party mocks are restricted to specific external services like payments or email.

## Requires

- Playwright
- Node.js

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the E2E Test Writer: Stable Playwright Tests, No Flakes skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### What specific deliverables are included with the e2e test writer skill?

This skill generates complete Playwright test files (.spec.ts), configuration files, and reusable fixtures. It also provides a journey coverage report and ready-to-use GitHub Actions workflows for CI/CD integration.

### How does this skill prevent the flaky tests common with other AI-generated code?

Unlike basic prompts, this skill uses a "flake-checking" cycle that runs tests multiple times under simulated load to identify race conditions. It also enforces a strict role-based locator strategy to ensure tests don't break when you change your CSS or layout.

### Is my tech stack compatible with this skill?

The skill is designed for TypeScript-based Playwright environments. While it excels with modern frameworks like React and Next.js, it can generate tests for any web application regardless of the backend, provided it is accessible via a URL.

### Can this skill handle complex authentication flows like MFA or persistent sessions?

Yes, the skill includes built-in support for Playwright's `storageState`. It generates the necessary logic to log in once, save the session, and reuse that authentication state across all test files to significantly reduce execution time.

### Does the e2e test writer support accessibility (a11y) testing?

Yes, the skill uses the `axe-core/playwright` library to automatically inject accessibility checks into your functional tests, helping you catch WCAG violations as part of your standard QA process.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
