home / skills / jeremylongshore / claude-code-plugins-plus-skills / e2e-test-framework

This skill generates end-to-end tests for web apps using Playwright, Cypress, or Selenium to validate multi-step user workflows.

npx playbooks add skill jeremylongshore/claude-code-plugins-plus-skills --skill e2e-test-framework

Review the files below or copy the command above to add this skill to your agents.

Files (4)
SKILL.md
3.3 KB
---
name: generating-end-to-end-tests
description: |
  This skill enables Claude to generate end-to-end (E2E) tests for web applications. It leverages Playwright, Cypress, or Selenium to automate browser interactions and validate user workflows. Use this skill when the user requests to "create E2E tests", "generate end-to-end tests", or asks for help with "browser-based testing". The skill is particularly useful for testing user registration, login flows, shopping cart functionality, and other multi-step processes within a web application. It supports cross-browser testing and can be used to verify the responsiveness of web applications on different devices.
---

## Overview

This skill automates the creation of end-to-end tests, which simulate real user interactions with a web application. By generating tests using Playwright, Cypress, or Selenium, Claude ensures comprehensive coverage of critical user workflows.

## How It Works

1. **Identify User Workflow**: Claude analyzes the user's request to determine the specific user workflow to be tested (e.g., user registration, product checkout).
2. **Generate Test Script**: Based on the identified workflow, Claude generates a test script using Playwright, Cypress, or Selenium. The script includes steps to navigate the web application, interact with elements, and assert expected outcomes.
3. **Configure Test Environment**: Claude configures the test environment, including browser selection (Chrome, Firefox, Safari, Edge) and any necessary dependencies.

## When to Use This Skill

This skill activates when you need to:
- Create end-to-end tests for a specific user flow (e.g., "create e2e tests for user login").
- Generate browser-based tests for a web application.
- Automate testing of multi-step processes in a web application (e.g., "generate end-to-end tests for adding an item to a shopping cart and completing the checkout process").

## Examples

### Example 1: Testing User Registration

User request: "Create E2E tests for the user registration workflow on my website."

The skill will:
1. Generate a Playwright script that automates the user registration process, including filling out the registration form, submitting it, and verifying the successful registration message.
2. Configure the test to run in Chrome and Firefox.

### Example 2: Testing Shopping Cart Functionality

User request: "Generate end-to-end tests for adding an item to a shopping cart and completing the checkout process."

The skill will:
1. Create a Cypress script that simulates adding a product to the shopping cart, navigating to the checkout page, entering shipping and payment information, and submitting the order.
2. Include assertions to verify that the correct product is added to the cart, the order total is accurate, and the order confirmation page is displayed.

## Best Practices

- **Specificity**: Provide clear and specific instructions regarding the user workflow to be tested.
- **Framework Choice**: If you have a preference for Playwright, Cypress, or Selenium, specify it in your request. Otherwise, Playwright will be used by default.
- **Environment Details**: Specify any relevant environment details, such as the target browser and the URL of the web application.

## Integration

This skill can be used in conjunction with other plugins to set up the web application, deploy it to a testing environment, and report test results.

Overview

This skill automates generation of end-to-end (E2E) tests for web applications using Playwright, Cypress, or Selenium. It creates browser-driven scripts that simulate real user interactions and validate multi-step workflows like registration, login, checkout, and responsive behaviors. The goal is fast, repeatable test coverage across browsers and devices.

How this skill works

First, the skill parses your request to identify the target user workflow and required assertions. It then generates a test script in the chosen framework (Playwright, Cypress, or Selenium) that navigates pages, interacts with UI elements, and checks expected outcomes. Finally, it includes configuration for browsers, devices, and any necessary test environment settings so the tests can run locally or in CI.

When to use it

  • When you need automated browser-based tests for user flows (e.g., registration, login, checkout).
  • When you want cross-browser verification across Chrome, Firefox, Safari, or Edge.
  • When validating multi-step processes (add to cart, apply coupon, complete purchase).
  • When you need responsive checks on different device sizes or mobile emulation.
  • When preparing tests to run in CI pipelines or before releases.

Best practices

  • Describe the workflow steps clearly: pages, form fields, buttons, and expected results.
  • Specify preferred framework (Playwright/Cypress/Selenium) and target browsers to avoid defaults.
  • Provide environment details: base URL, auth credentials (test accounts), and any feature flags.
  • Keep tests focused: one user scenario per test to simplify debugging and maintenance.
  • Use stable selectors (data-* attributes) to reduce flakiness from UI changes.

Example use cases

  • Generate Playwright tests for user registration that fill forms, verify email confirmation, and assert dashboard access.
  • Create Cypress scripts to test adding items to cart, applying a coupon, and completing checkout with assertions on totals.
  • Produce Selenium tests for a login flow and multi-page navigation in legacy apps where Selenium is required.
  • Generate cross-browser tests to validate responsive layout and key interactions on mobile and desktop breakpoints.
  • Create CI-ready test configuration to run E2E suites on merge or nightly schedules.

FAQ

Which framework is used by default?

Playwright is used by default unless you specify Cypress or Selenium.

Can the tests run in CI or only locally?

Generated tests include configuration suitable for local runs and can be adapted to CI (GitHub Actions, GitLab CI, etc.).