Skip to content
e2e-test-design logo

E2E Test Design Skill

e2e-test-design

Design E2E tests following user-story-driven patterns with verification checkpoints. Use when creating end-to-end tests, validating complete user journeys, or designing Playwright/Cypress test patterns.

SKILL.md

Full skill instructions

E2E Test Design Skill

Design end-to-end tests that validate complete user journeys.

When to Use

  • Creating E2E tests for new features
  • Designing regression tests for critical paths
  • Building automated user flow validation
  • Documenting expected user behavior

E2E Test Specification Template

# E2E Test: [Test Name]

## User Story

As a [user type]
I want to [action]
So that [benefit]

## Test Steps

1. Navigate to [URL]
2. Take screenshot of initial state
3. **Verify** [element/​condition] is present
4. [Action] - Click/​Enter/​Select
5. Take screenshot of [state]
6. **Verify** [expected result]
7. [Continue steps...]

## Success Criteria

- [ ] [Criterion 1]
- [ ] [Criterion 2]
- [ ] [Criterion 3]

Design Workflow

Step 1: Define User Story

Start with the user's perspective:

## User Story

As a registered user
I want to reset my password
So that I can regain access to my account

Step 2: Map the User Journey

Identify each step the user takes:

  1. User navigates to login page
  2. User clicks "Forgot Password"
  3. User enters email
  4. User submits form
  5. User receives confirmation message
  6. User checks email (out of scope for E2E)

Step 3: Add Verification Points

Mark critical checkpoints with Verify:

## Test Steps

1. Navigate to /​login
2. Take screenshot of login page
3. **Verify** "Forgot Password" link is visible
4. Click "Forgot Password" link
5. **Verify** password reset form appears
6. Enter email: "[email protected]"
7. Take screenshot of filled form
8. Click "Send Reset Link" button
9. **Verify** success message appears
10. Take screenshot of confirmation

Step 4: Define Success Criteria

Clear pass/​fail conditions:

## Success Criteria

- [ ] Forgot password link is accessible
- [ ] Form accepts valid email
- [ ] Success message displayed after submission
- [ ] No error states encountered
- [ ] 3 screenshots captured

Step 5: Add Structured Output

Define the expected result format:

{
  "test_name": "Password Reset Flow",
  "status": "passed|failed",
  "screenshots": [
    "screenshots/​01_login_page.png",
    "screenshots/​02_filled_form.png",
    "screenshots/​03_confirmation.png"
  ],
  "error": null
}

Common E2E Test Patterns

Authentication Flow

# E2E Test: User Login

## User Story
As a user, I want to log in so I can access my account.

## Test Steps
1. Navigate to /​login
2. **Verify** login form is visible
3. Enter username
4. Enter password
5. Click "Login" button
6. **Verify** redirected to /​dashboard
7. **Verify** user name displayed in header

Form Submission

# E2E Test: Contact Form

## User Story
As a visitor, I want to submit a contact form.

## Test Steps
1. Navigate to /​contact
2. **Verify** form has all required fields
3. Fill name, email, message
4. Click "Submit"
5. **Verify** success message appears
6. **Verify** form is reset

Error Handling

# E2E Test: Invalid Login

## User Story
As a user, I want to see clear errors for invalid credentials.

## Test Steps
1. Navigate to /​login
2. Enter invalid credentials
3. Click "Login"
4. **Verify** error message appears
5. **Verify** still on login page
6. **Verify** password field is cleared

Security Boundary

# E2E Test: SQL Injection Protection

## User Story
As a user, I should be protected from injection attacks.

## Test Steps
1. Navigate to search page
2. Enter: "'; DROP TABLE users; --"
3. Click search
4. **Verify** error or sanitized response
5. **Verify** no database damage

Screenshot Best Practices

  1. Capture at key states: Initial, after action, final
  2. Name descriptively: 01_initial_state.png, 02_after_click.png
  3. Organize by test: screenshots/​test-name/
  4. Keep for debugging: Screenshots help diagnose failures

E2E Test Output Format

For automation and resolution:

{
  "test_name": "User Login",
  "status": "passed",
  "screenshots": [
    "screenshots/​user-login/​01_login_page.png",
    "screenshots/​user-login/​02_dashboard.png"
  ],
  "error": null,
  "duration_ms": 3450
}

For failures:

{
  "test_name": "User Login",
  "status": "failed",
  "screenshots": [
    "screenshots/​user-login/​01_login_page.png"
  ],
  "error": "Step 6 failed: Expected redirect to /​dashboard, got /​error",
  "failed_step": 6,
  "duration_ms": 2100
}

Memory References

  • @e2e-test-patterns.md - Full E2E pattern documentation
  • @closed-loop-anatomy.md - Using E2E in feedback loops
  • @validation-commands.md - Integrating E2E into validation stack

Version History

  • v1.0.0 (2025-12-26): Initial release

Last Updated

Date: 2025-12-26 Model: claude-opus-4-5-20251101

More Security skills

supabase logo
Security

supabase

Handles the full Supabase workflow from schema changes to deployment, with built-in security guardrails that catch common traps like RLS...

2.7K 308.9K
View

Comprehensive guides and best practices for Neon Serverless Postgres, covering setup, connection methods, authentication, and platform APIs.

98 216.2K
View

Guide for setting up and using Firebase Authentication. Use this skill when the user's app requires user sign-in, user management, or secure data access using auth rules.

462 163.8K
View

A skill to evaluate how secure Firestore security rules are. Use this when Firestore security rules are updated to ensure that the generated rules are extremely secure and robust.

462 127.7K
View

Official skill for integrating Firebase AI Logic (Gemini API) into web applications. Covers setup, multimodal inference, structured output, and security.

462 125.1K
View

Complete Better Auth server and client setup with database adapters, session management, plugins, and security configuration.

222 118.2K
View

Deploy and manage projects on Vercel using token-based authentication. Use when working with Vercel CLI using access tokens rather than interactive login — e.g. "deploy to vercel", "set up vercel", "add environment variables to vercel".

31.9K 116.1K
View
cloudflare logo
Security

cloudflare

Complete Cloudflare platform integration with decision trees for compute, storage, AI, networking, security, and infrastructure-as-code.

3K 110.7K
View

Run Azure compliance and security audits with azqr plus Key Vault expiration checks. Covers best-practice assessment, resource review, policy/compliance validation, and security posture checks. WHEN: compliance scan, security audit, BEFORE running azqr (compliance cli tool), Azure best practices, Key Vault expiration check, expired certificates, expiring secrets, orphaned resources, compliance assessment.

253 103K
View
gws-gmail logo
Security

gws-gmail

Send, read, and manage Gmail messages, drafts, labels, and account settings.

31.2K 78.9K
View

Comprehensive website auditing across 230+ rules in 21 categories including SEO, performance, security, and accessibility.

94 72.3K
View
gws-shared logo
Security

gws-shared

Shared authentication, CLI syntax, and output formatting patterns for gws Google Workspace commands.

31.2K 63.4K
View

Security AI tools

StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
GeoSpy logo
Security

GeoSpy

GeoSpy: Pricing, Features, FAQs, and Alternatives for AI Teams

Free
View

Detect AI-generated voices to protect against audio fraud.

Paid
View

Ensure Your Content's Originality with AI Plagiarism Checker

Freemium
View
Img Upscaler logo
Security

Img Upscaler

Upscale images by 400% without quality loss

Freemium
View
AICheatCheck logo
Security

AICheatCheck

Accurately Detect AI-Generated Content with TheChecker.AI

Free
View
D
Security

Detect GPT

Chrome extension that detects and flags AI-generated content

Free
View