E2E Test Generation

VerifiedCaution

Coordinates E2E test creation and verification by exploring the live app, generating a test plan, producing Playwright tests, then running and fixing them until all pass. Useful for automatically validating end-to-end scenarios on an already implemented feature.

Sby Skills Guide Bot
TestingIntermediate
2/28/2026
Claude Code
#e2e-testing#playwright#test-generation#test-automation#agent-orchestration

Recommended for

Automated summary

This skill orchestrates a chain of Playwright agents to explore a running app, write a test plan, generate E2E tests, then run and heal them until they pass.

Strengths

  • Plan → generate → run-and-heal pipeline with verification at each stage
  • Explicitly separates test issues from app bugs, marking the latter as test.fixme() with a written rationale
  • Tests are produced from a real browser execution, so they match the actual UI
  • Adds a review pass for conventions (no "should" in names, step functions, locator robustness)

Limitations

  • Assumes the app is already running locally and the docker compose E2E infrastructure is up
  • Tightly coupled to a specific stack (Playwright, Chakra UI, agentic-e2e-tests/ paths, port 5570)
  • Depends on specialized subagents (playwright-test-planner, generator, healer, test-reviewer) being installed
  • The Output section of the document is truncated, so the final summary format is only partly specified
When to use it

Use it once a feature is implemented and the app runs locally, to quickly produce and validate Playwright E2E coverage.

When not to use it

Avoid it if the app cannot be started locally, if the Playwright subagents are unavailable, or for unit and integration tests.

Security analysis

Caution
Quality score85/100

The skill is a legitimate E2E workflow using local browser testing, Docker, and subagents. It does not contain destructive or exfiltration behavior, but it relies on powerful execution paths and file-modifying agents without declared tool restrictions, so it warrants caution rather than a safe rating.

Findings
  • •Orchestrates subagents via Task tool without declared allowed-tools or explicit permission boundaries
  • •Requires docker compose and a live local app, and instructs agents to generate/modify test files and potentially mark tests as fixme
  • •No secrets exfiltration, destructive commands, or obfuscated payloads present
How this analysis is made

Examples

Feature file
/e2e specs/scenarios/scenario-editor.feature
Scenario description
Generate and verify E2E tests for the login flow: a valid user signs in and lands on the dashboard.
Re-verify after change
Run the E2E workflow for the scenario-editor feature again and heal any failing Playwright tests.

name: e2e description: "Generate and verify E2E tests for a feature. Explores live app, creates test plan, generates tests, runs and fixes until passing." user-invocable: true argument-hint: "[feature-file-path or scenario description]"

E2E Test Generation Workflow

You coordinate E2E test creation and verification. You invoke specialized agents in sequence and verify the outcome.

Prerequisites

Before running this workflow:

  1. The app must be running locally (make dev or equivalent)
  2. E2E infrastructure must be up (cd agentic-e2e-tests && docker compose up -d)
  3. The feature should already be implemented and reviewed

Input

You receive either:

  • A feature file path (e.g., specs/scenarios/scenario-editor.feature)
  • A scenario description to verify

Extract the @e2e tagged scenarios from the feature file if provided.

Workflow

1. Explore and Plan

Invoke the playwright-test-planner agent via Task tool:

Task(subagent_type: "playwright-test-planner", prompt: """
Explore the live app at http://localhost:5570 and create a test plan for:

<scenarios>
[List the @e2e scenarios from the feature file]
</scenarios>

Focus on:
- Discovering the actual UI elements and navigation
- Creating step-by-step test plans that match the scenarios
- Documenting expected outcomes

Save the plan to: agentic-e2e-tests/plans/[feature-name].plan.md
""")

Verify: Plan file exists and covers all scenarios.

2. Generate Tests

Invoke the playwright-test-generator agent via Task tool:

Task(subagent_type: "playwright-test-generator", prompt: """
Generate Playwright tests from the test plan:

<plan-file>agentic-e2e-tests/plans/[feature-name].plan.md</plan-file>

For each scenario in the plan:
1. Set up the page using generator_setup_page
2. Execute each step in the browser
3. Generate the test code from the execution log
4. Save to: agentic-e2e-tests/tests/[feature-name]/[scenario-name].spec.ts

Follow the project conventions in agentic-e2e-tests/README.md:
- Use step functions from steps.ts (Given/When/Then naming)
- Handle Chakra UI duplicates with .last()
- No "should" in test names
""")

Verify: Test files exist for each scenario.

3. Run and Heal

Invoke the playwright-test-healer agent via Task tool:

Task(subagent_type: "playwright-test-healer", prompt: """
Run and fix the generated E2E tests:

1. Run all tests in agentic-e2e-tests/tests/[feature-name]/
2. For any failures, diagnose the root cause:

   **Test Issue** (healer fixes):
   - Wrong selector (element changed)
   - Timing issue (race condition)
   - Incorrect assertion syntax
   - Missing wait or setup step

   **App Bug** (needs code fix):
   - Feature doesn't work as specified
   - Expected element/behavior missing
   - Error thrown during user flow
   - Data not saved/displayed correctly

3. For test issues: fix and re-run
4. For app bugs: mark as test.fixme() with detailed explanation:
   - What the spec expects
   - What the app actually does
   - Why this is an app bug, not a test issue

Continue until all tests pass or are marked fixme with clear rationale.
""")

Verify:

  • All tests pass → continue to review
  • Tests marked fixme → examine rationale to determine if app bug or inconclusive

4. Review Tests (Optional)

If tests required significant healing, invoke test-reviewer:

Task(subagent_type: "test-reviewer", prompt: """
Review the E2E tests in agentic-e2e-tests/tests/[feature-name]/

Focus on:
- Naming conventions (no "should")
- Proper pyramid placement (these should be E2E, not integration)
- Step function quality
- Locator robustness
""")

Output

Return a summary to the orchestrator with clear status:

If All Tests Pass

## E2E Verification Complete ✓

**Feature:** [feature name]
**Scenarios Tested:** [count]
**Status:** ALL PASSING

### Tests Generated
- [test-file-1.spec.ts] - passing
- [test-file-2.spec.ts] - passing

### Coverage
- [scenario 1] ✓ covered
- [scenario 2] ✓ covered

If Tests Fail Due to App Bugs

## E2E Verification Failed - App Bug Detected

**Feature:** [feature name]
**Status:** NEEDS CODE FIX

### Failing Scenarios
- **Scenario:** [scenario name]
  **Expected:** [what the spec says should happen]
  **Actual:** [what the app actually does]
  **Evidence:** [screenshot path or error details]

### Recommendation
The implementation does not match the spec. Send back to /code with:
- Scenario: [scenario name]
- Expected behavior: [from spec]
- Actual behavior: [observed]
- Fix needed: [specific change required]

If Tests Marked as Fixme (Inconclusive)

## E2E Verification Partial

**Feature:** [feature name]
**Status:** NEEDS REVIEW

### Tests with Issues
- [test-file.spec.ts] - marked fixme
  **Reason:** [why it couldn't be determined if app or test is wrong]

### Recommendation
Manual review needed to determine if this is an app bug or test issue.

Boundaries

You coordinate, you don't write tests directly:

  • playwright-test-planner explores and plans
  • playwright-test-generator generates tests
  • playwright-test-healer fixes failures
  • test-reviewer checks quality

You verify outcomes and report status.

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/e2e-test-generation-mm5t895w/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/e2e-test-generation-mm5t895w' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/e2e-test-generation-mm5t895w/download' --output '.skill-downloads/e2e-test-generation-mm5t895w/SKILL.md.part' && mv '.skill-downloads/e2e-test-generation-mm5t895w/SKILL.md.part' '.skill-downloads/e2e-test-generation-mm5t895w/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

Original excerpt: Prerequisites

Before running this workflow:

  1. The app must be running locally (make dev or equivalent)
  2. E2E infrastructure must be up (cd agentic-e2e-tests && docker compose up -d)
  3. The feature should already be implemented and reviewed

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/e2e-test-generation-mm5t895w/SKILL.md' && test -s '.skill-downloads/e2e-test-generation-mm5t895w/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/e2e' && cp -R '.skill-downloads/e2e-test-generation-mm5t895w' '.claude/skills/e2e'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/e2e-test-generation-mm5t895w'

openskills read 'e2e-test-generation-mm5t895w'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/e2e-test-generation-mm5t895w/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills