E2E Testing Automation Table of Contents - Overview - When to Use - Quick Start - Reference Guides - Best Practices Overview 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 dev…

, '').replace(',', ''))\n assert 500 \u003c= price \u003c= 1000\n\n def test_pagination(self, driver):\n \"\"\"Test navigating through search result pages.\"\"\"\n driver.get('http://localhost:3000/search?q=electronics')\n\n wait = WebDriverWait(driver, 10)\n\n # Get first page results\n first_page_results = driver.find_elements(By.CLASS_NAME, 'search-result')\n first_result_title = first_page_results[0].find_element(\n By.CLASS_NAME, 'product-title'\n ).text\n\n # Click next page\n next_button = driver.find_element(By.CSS_SELECTOR, '[aria-label=\"Next page\"]')\n next_button.click()\n\n # Wait for new results\n wait.until(EC.staleness_of(first_page_results[0]))\n\n # Verify on page 2\n assert 'page=2' in driver.current_url\n\n second_page_results = driver.find_elements(By.CLASS_NAME, 'search-result')\n second_result_title = second_page_results[0].find_element(\n By.CLASS_NAME, 'product-title'\n ).text\n\n # Results should be different\n assert first_result_title != second_result_title\n\n def test_empty_search_results(self, driver):\n \"\"\"Test handling of searches with no results.\"\"\"\n driver.get('http://localhost:3000')\n\n search_box = driver.find_element(By.NAME, 'search')\n search_box.send_keys('xyznonexistentproduct123')\n search_box.send_keys(Keys.RETURN)\n\n wait = WebDriverWait(driver, 10)\n no_results = wait.until(\n EC.presence_of_element_located((By.CLASS_NAME, 'no-results'))\n )\n\n assert 'no results found' in no_results.text.lower()\n assert len(driver.find_elements(By.CLASS_NAME, 'search-result')) == 0\n```\n","content_type":"text/markdown; charset=utf-8","language":"markdown","size":4577,"content_sha256":"7afd80a7671b38fc578d9d4a40718a70ef3431ff81a333d619a2f4a9168e38df"},{"filename":"scripts/scaffold-tests.sh","content":"#!/bin/bash\n# scaffold-tests.sh - Generate test file scaffolding\n# Usage: ./scaffold-tests.sh \u003csource_file> [--framework jest|pytest|mocha]\n\nset -euo pipefail\n\nSOURCE_FILE=\"${{1:?Usage: $0 \u003csource_file> [--framework jest|pytest|mocha]}}\"\nFRAMEWORK=\"${{2:-jest}}\"\n\necho \"Scaffolding tests for: $SOURCE_FILE (framework: $FRAMEWORK)\"\n\n# TODO: Implement test scaffolding logic\n# - Parse source file for exported functions/classes\n# - Generate test stubs for each export\n# - Include setup/teardown boilerplate\n# - Add common assertion patterns\n\necho \"Test scaffolding complete.\"\n","content_type":"application/x-sh; charset=utf-8","language":"bash","size":574,"content_sha256":"34e38c648eb211166f15b2e655e6620d403fef157fb3b40a81643bfe21a2c543"},{"filename":"templates/test-template.js","content":"// Test Template\n// TODO: Customize for your testing framework and project\n\ndescribe('ModuleName', () => {\n // Setup\n beforeEach(() => {\n // TODO: Add test setup\n });\n\n afterEach(() => {\n // TODO: Add cleanup\n });\n\n describe('functionName', () => {\n it('should handle the happy path', () => {\n // TODO: Add assertion\n });\n\n it('should handle edge cases', () => {\n // TODO: Add edge case tests\n });\n\n it('should handle errors gracefully', () => {\n // TODO: Add error handling tests\n });\n });\n});\n","content_type":"text/javascript; charset=utf-8","language":"javascript","size":541,"content_sha256":"b515bc4dd35d9510563df2689c1ade36a69a2d1792a2d17a43b92ed8b9a4b750"}],"content_json":{"type":"doc","content":[{"type":"heading","attrs":{"level":1},"content":[{"text":"E2E Testing Automation","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Table of Contents","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Overview","type":"text","marks":[{"type":"link","attrs":{"href":"#overview","title":null}}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"When to Use","type":"text","marks":[{"type":"link","attrs":{"href":"#when-to-use","title":null}}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Quick Start","type":"text","marks":[{"type":"link","attrs":{"href":"#quick-start","title":null}}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Reference Guides","type":"text","marks":[{"type":"link","attrs":{"href":"#reference-guides","title":null}}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Best Practices","type":"text","marks":[{"type":"link","attrs":{"href":"#best-practices","title":null}}]}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Overview","type":"text"}]},{"type":"paragraph","content":[{"text":"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.","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"When to Use","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Testing critical user journeys (signup, checkout, login)","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Validating multi-step workflows","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Testing across different browsers and devices","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Regression testing for UI changes","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Verifying frontend-backend integration","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Testing with real user interactions (clicks, typing, scrolling)","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Smoke testing deployments","type":"text"}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Quick Start","type":"text"}]},{"type":"paragraph","content":[{"text":"Minimal working example:","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"typescript"},"content":[{"text":"// tests/e2e/checkout.spec.ts\nimport { test, expect, Page } from \"@playwright/test\";\n\ntest.describe(\"E-commerce Checkout Flow\", () => {\n let page: Page;\n\n test.beforeEach(async ({ page: p }) => {\n page = p;\n await page.goto(\"/\");\n });\n\n test(\"complete checkout flow as guest user\", async () => {\n // 1. Browse and add product to cart\n await page.click(\"text=Shop Now\");\n await page.click('[data-testid=\"product-1\"]');\n await expect(page.locator(\"h1\")).toContainText(\"Product Name\");\n\n await page.click('button:has-text(\"Add to Cart\")');\n await expect(page.locator(\".cart-count\")).toHaveText(\"1\");\n\n // 2. Go to cart and proceed to checkout\n await page.click('[data-testid=\"cart-icon\"]');\n await expect(page.locator(\".cart-item\")).toHaveCount(1);\n await page.click(\"text=Proceed to Checkout\");\n\n// ... (see reference guides for full implementation)","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Reference Guides","type":"text"}]},{"type":"paragraph","content":[{"text":"Detailed implementations in the ","type":"text"},{"text":"references/","type":"text","marks":[{"type":"code_inline"}]},{"text":" directory:","type":"text"}]},{"type":"table","attrs":{"layout":null},"content":[{"type":"tr","content":[{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Guide","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Contents","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Playwright E2E Tests","type":"text","marks":[{"type":"link","attrs":{"href":"references/playwright-e2e-tests.md","title":null}}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Playwright E2E Tests","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Cypress E2E Tests","type":"text","marks":[{"type":"link","attrs":{"href":"references/cypress-e2e-tests.md","title":null}}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Cypress E2E Tests","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Selenium with Python (pytest)","type":"text","marks":[{"type":"link","attrs":{"href":"references/selenium-with-python-pytest.md","title":null}}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Selenium with Python (pytest)","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Page Object Model Pattern","type":"text","marks":[{"type":"link","attrs":{"href":"references/page-object-model-pattern.md","title":null}}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Page Object Model Pattern","type":"text"}]}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Best Practices","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"✅ DO","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Use data-testid attributes for stable selectors","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Implement Page Object Model for maintainability","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Test critical user journeys thoroughly","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Run tests in multiple browsers (cross-browser testing)","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Use explicit waits instead of sleep/timeouts","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Clean up test data after each test","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Take screenshots on failures","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Parallelize test execution where possible","type":"text"}]}]}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"❌ DON'T","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Use brittle CSS selectors (like nth-child)","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Test every possible UI combination (focus on critical paths)","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Share state between tests","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Use fixed delays (sleep/timeout)","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Ignore flaky tests","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Run E2E tests for unit-level testing","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Test third-party UI components in detail","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Skip mobile/responsive testing","type":"text"}]}]}]}]},"metadata":{"date":"2026-11-02","name":"e2e-testing-automation","author":"@skillopedia","source":{"stars":375,"repo_name":"useful-ai-prompts","origin_url":"https://github.com/aj-geddes/useful-ai-prompts/blob/HEAD/skills/e2e-testing-automation/SKILL.md","repo_owner":"aj-geddes","body_sha256":"4ed4a42498faaf8e33e1c6fbc62a7e857a3f18e37b3e9710a172e1365181a910","cluster_key":"4ac32efcd3df815e498722e2a50fa08c9a84d6eb3c6c3aa4b033446879817618","clean_bundle":{"format":"clean-skill-bundle-v1","source":"aj-geddes/useful-ai-prompts/skills/e2e-testing-automation/SKILL.md","text_bytes":14062,"source_commit":"3f5182cfd739fc113f4af5244a1cf342ad7f7911","skills_sh_rank":16208,"attachment_count":6,"text_attachments":6,"attachment_storage":"skill_attachments","binary_attachments":0},"cluster_size":1,"skill_md_path":"skills/e2e-testing-automation/SKILL.md","import_metadata":{"date":"2026-11-02","author":"@skillopedia","version":"v1","category":"testing-qa","category_label":"Testing"},"exact_dupes_collapsed_into_this":0},"version":"v1","category":"testing-qa","import_tag":"skills-sh-top20k-2026-11","description":"Build end-to-end automated tests that simulate real user interactions across the full application stack. Use for E2E test, Selenium, Cypress, Playwright, browser automation, and user journey testing.\n"}},"renderedAt":1793676399356}

E2E Testing Automation Table of Contents - Overview - When to Use - Quick Start - Reference Guides - Best Practices Overview 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 dev…