e2e-testing-patterns

Implements end-to-end test automation patterns for Playwright and Cypress test suites.

Updated Jun 12, 2026
Ready to run
npx skills add https://github.com/bilacchi/agents-skills --skill e2e-testing-patterns-bilacchi
💬 Prompt for ChatGPT / Claude Chat▼
Please help me install this Agent Skill.
Skill: e2e-testing-patterns
Source: https://github.com/bilacchi/agents-skills/tree/main/skills/e2e-testing-patterns
Command: npx skills add https://github.com/bilacchi/agents-skills --skill e2e-testing-patterns-bilacchi

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? End-to-end tests are often flaky, slow, and hard to maintain, causing teams to lose trust in their test suites and miss regressions before users hit them. ## Core Features & Use Cases - Framework Patterns: Provides ready-to-use Playwright and Cypress configurations, page object models, custom commands, and fixture-based test data management. - Reliability Techniques: Covers waiting strategies, network mocking and interception, visual regression testing, accessibility checks with axe-core, and parallel sharding for CI pipelines. - Use Case: When your checkout flow test fails intermittently in CI, use this Skill to replace fixed timeouts with condition-based waits, add trace capture on retry, and isolate test data with fixtures. ## Quick Start Use the e2e-testing-patterns skill to help me write a stable Playwright test for the login flow with proper waiting and cleanup.

Frequently Asked Questions about e2e-testing-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write reliable end-to-end tests with Playwright?▼

Use the Page Object Model to encapsulate page logic, prefer role-based and data-testid selectors over CSS classes, and rely on auto-waiting assertions instead of fixed timeouts. Enable trace capture on first retry to debug failures in CI.

Playwright vs Cypress for end-to-end testing?▼

Playwright offers built-in parallelization, multi-browser projects including WebKit, and network interception via page.route. Cypress provides custom commands and cy.intercept for API mocking with a time-travel debugging UI. Both support fixtures and test data management.

Why are my E2E tests flaky and how do I fix them?▼

Flakiness usually comes from fixed timeouts, shared test data, and brittle selectors. Replace waitForTimeout with condition-based waits like waitForResponse or expect assertions, create and destroy test data per test, and use data-testid attributes.

How do I mock API responses in Playwright tests?▼

Use page.route to intercept requests matching a URL pattern, then fulfill with a custom status, headers, and JSON body. You can also modify outgoing requests before continuing them, which is useful for simulating errors or third-party services like Stripe.

When should I not use end-to-end tests?▼

Avoid E2E tests for unit-level logic, API contract validation, and exhaustive edge cases, since they are slow and expensive to maintain. Reserve them for critical user journeys, and do not run them when the environment cannot support stable UI automation.