End-to-end (E2E) testing validates complete user workflows from the UI through all backend systems, ensuring the entire application stack works together correctly from a user's perspective. E2E tests simulate real user interactions with browsers, handling authentication, navigation, form submissions, and validating results.
When to Use
Testing critical user journeys (signup, checkout, login)
Validating multi-step workflows
Testing across different browsers and devices
Regression testing for UI changes
Verifying frontend-backend integration
Testing with real user interactions (clicks, typing, scrolling)
Smoke testing deployments
Quick Start
Minimal working example:
// tests/e2e/checkout.spec.ts
import { test, expect, Page } from "@playwright/test";
test.describe("E-commerce Checkout Flow", () => {
let page: Page;
test.beforeEach(async ({ page: p }) => {
page = p;
await page.goto("/");
});
test("complete checkout flow as guest user", async () => {
// 1. Browse and add product to cart
await page.click("text=Shop Now");
await page.click('[data-testid="product-1"]');
await expect(page.locator("h1")).toContainText("Product Name");
await page.click('button:has-text("Add to Cart")');
await expect(page.locator(".cart-count")).toHaveText("1");
// 2. Go to cart and proceed to checkout
await page.click('[data-testid="cart-icon"]');
await expect(page.locator(".cart-item")).toHaveCount(1);
await page.click("text=Proceed to Checkout");
// ... (see reference guides for full implementation)
Reference Guides
Detailed implementations in the references/ directory:
Guide
Contents
Playwright E2E Tests
Playwright E2E Tests
Cypress E2E Tests
Cypress E2E Tests
Selenium with Python (pytest)
Selenium with Python (pytest)
Page Object Model Pattern
Page Object Model Pattern
Best Practices
✅ DO
Use data-testid attributes for stable selectors
Implement Page Object Model for maintainability
Test critical user journeys thoroughly
Run tests in multiple browsers (cross-browser testing)
Use explicit waits instead of sleep/timeouts
Clean up test data after each test
Take screenshots on failures
Parallelize test execution where possible
❌ DON'T
Use brittle CSS selectors (like nth-child)
Test every possible UI combination (focus on critical paths)
Share state between tests
Use fixed delays (sleep/timeout)
Ignore flaky tests
Run E2E tests for unit-level testing
Test third-party UI components in detail
Skip mobile/responsive testing
Converted and distributed by TomeVault — claim your Tome and manage your conversions.
1---2name: aj-geddes-useful-ai-prompts-e2e-testing-automation3description: E2E Testing Automation4---56# E2E Testing Automation78## Table of Contents910- [Overview](#overview)11- [When to Use](#when-to-use)12- [Quick Start](#quick-start)13- [Reference Guides](#reference-guides)14- [Best Practices](#best-practices)1516## Overview1718End-to-end (E2E) testing validates complete user workflows from the UI through all backend systems, ensuring the entire application stack works together correctly from a user's perspective. E2E tests simulate real user interactions with browsers, handling authentication, navigation, form submissions, and validating results.1920## When to Use2122- Testing critical user journeys (signup, checkout, login)23- Validating multi-step workflows24- Testing across different browsers and devices25- Regression testing for UI changes26- Verifying frontend-backend integration27- Testing with real user interactions (clicks, typing, scrolling)28- Smoke testing deployments2930## Quick Start3132Minimal working example:3334```typescript35// tests/e2e/checkout.spec.ts36import { test, expect, Page } from "@playwright/test";3738test.describe("E-commerce Checkout Flow", () => {39 let page: Page;4041 test.beforeEach(async ({ page: p }) => {42 page = p;43 await page.goto("/");44 });4546 test("complete checkout flow as guest user", async () => {47 // 1. Browse and add product to cart48 await page.click("text=Shop Now");49 await page.click('[data-testid="product-1"]');50 await expect(page.locator("h1")).toContainText("Product Name");5152 await page.click('button:has-text("Add to Cart")');53 await expect(page.locator(".cart-count")).toHaveText("1");5455 // 2. Go to cart and proceed to checkout56 await page.click('[data-testid="cart-icon"]');57 await expect(page.locator(".cart-item")).toHaveCount(1);58 await page.click("text=Proceed to Checkout");5960// ... (see reference guides for full implementation)61```6263## Reference Guides6465Detailed implementations in the `references/` directory:6667| Guide | Contents |68|---|---|69| [Playwright E2E Tests](references/playwright-e2e-tests.md) | Playwright E2E Tests |70| [Cypress E2E Tests](references/cypress-e2e-tests.md) | Cypress E2E Tests |71| [Selenium with Python (pytest)](references/selenium-with-python-pytest.md) | Selenium with Python (pytest) |72| [Page Object Model Pattern](references/page-object-model-pattern.md) | Page Object Model Pattern |7374## Best Practices7576### ✅ DO7778- Use data-testid attributes for stable selectors79- Implement Page Object Model for maintainability80- Test critical user journeys thoroughly81- Run tests in multiple browsers (cross-browser testing)82- Use explicit waits instead of sleep/timeouts83- Clean up test data after each test84- Take screenshots on failures85- Parallelize test execution where possible8687### ❌ DON'T8889- Use brittle CSS selectors (like nth-child)90- Test every possible UI combination (focus on critical paths)91- Share state between tests92- Use fixed delays (sleep/timeout)93- Ignore flaky tests94- Run E2E tests for unit-level testing95- Test third-party UI components in detail96- Skip mobile/responsive testing9798---99> Converted and distributed by [TomeVault](https://tomevault.io/claim/aj-geddes) — claim your Tome and manage your conversions.100<!-- tomevault:4.0:skill_md:2026-04-11 -->
Run npx skillmds@latest add tomevault-io/aj-geddes-useful-ai-prompts-e2e-testing-automation in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
E2E Testing Automation It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. Independent scanners report: SkillSpector: PASS, Skill Scanner: PASS. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
tomevault-io (@tomevault-io) published this skill. Their other Agent Skills are listed on their SkillMD profile.