generate-e2e-test
Automated end-to-end test generation using Playwright. Converts user workflows into functional test specs by interactively executing actions and following project conventions.
Introduction
The generate-e2e-test skill is a comprehensive engineering automation tool designed to bridge the gap between user-defined workflows and robust test coverage. It functions as an intelligent assistant that takes a high-level feature description or user story and translates it into production-ready Playwright test code. By leveraging Playwright MCP tools, the agent executes the workflow step-by-step within the browser, capturing state, selectors, and interaction sequences in real-time before finalizing the test implementation.
This skill is intended for software engineers and QA professionals who need to maintain high test velocity without the manual overhead of writing boilerplate code. It is particularly effective for automating regression suites, converting manual testing workflows into persistent automated assets, and ensuring consistent application of testing patterns across diverse project domains like authentication, dashboard management, and complex client-side features.
-
Interactively executes user workflows using Playwright browser tools for accurate state capture and element identification.
-
Automatically extracts stable selectors, favoring accessibility-based strategies (role, aria-label) over fragile CSS.
-
Reviews project-specific testing conventions, fixtures, and utility functions from TESTING.md and e2e-utils to ensure generated code follows established architecture.
-
Validates generated tests immediately by executing them within the environment to debug selectors, timing issues, or assertion failures before final submission.
-
Supports structured test organization by placing specifications in appropriate subdirectories based on feature areas (e.g., admin, auth, workouts).
-
Always start by navigating to the target URL and utilizing browser_snapshot to map the application state.
-
Prioritize helper methods found in tests/e2e/utils/test-helpers.ts to maintain consistency with existing project patterns.
-
Use robust waiting strategies, including waitForElementWithRetry, rather than static delays to prevent flakiness.
-
When encountering complex forms, use browser_fill_form for efficiency, and always verify outcomes with assertions or toast message checks.
-
Keep track of session state and authentication requirements early; if authentication helpers exist, integrate them into the test setup phase.
Repository Stats
- Stars
- 0
- Forks
- 0
- Open Issues
- 0
- Language
- Shell
- Default Branch
- main
- Sync Status
- Idle
- Last Synced
- May 3, 2026, 04:09 PM