E2E Testing Patterns

Software development skill, available on Zeplik

E2E Testing Patterns is a ready-to-run software development skill on Zeplik. Not for test strategy (use testing-strategy) or Playwright (use playwright-testing). Ask in plain language and Zeplik applies the skill's method for you inside the conversation, on whichever AI model you prefer.

The E2E Testing Patterns skill loads automatically when your request matches it, or you can invoke it directly by typing /e2e-testing-patterns in any chat. It works with attachments, connectors, and any model that supports the task, so you get the same expert method every time without setting anything up.

What the E2E Testing Patterns skill can do

Try these prompts on Zeplik

Pick a prompt to open it in the Zeplik app. If you are not signed in yet, your prompt is waiting for you the moment you do.

How the E2E Testing Patterns skill works

/e2e-testing-patterns

Build reliable, fast, and maintainable end-to-end test suites that provide confidence to ship code quickly and catch regressions before users do. Ask the user to paste failing tests, config files, or the flows they want covered; deliver test code, configs, and page objects as chat artifacts.

When to Use This Skill

  • Implementing end-to-end test automation
  • Debugging flaky or unreliable tests
  • Testing critical user workflows
  • Setting up CI/CD test pipelines
  • Testing across multiple browsers
  • Validating accessibility requirements
  • Testing responsive designs
  • Establishing E2E testing standards

For where E2E fits in an overall testing plan, use testing-strategy. For deep Playwright-specific tooling, use playwright-testing. For test-first development workflow, use test-driven-development.

Core Concepts

1. E2E Testing Fundamentals

What to Test with E2E:

  • Critical user journeys (login, checkout, signup)
  • Complex interactions (drag-and-drop, multi-step forms)
  • Cross-browser compatibility
  • Real API integration
  • Authentication flows

What NOT to Test with E2E:

  • Unit-level logic (use unit tests)
  • API contracts (use integration tests)
  • Edge cases (too slow)
  • Internal implementation details

2. Test Philosophy

The Testing Pyramid:

        /\
       /E2E\         <- Few, focused on critical paths
      /-----\
     /Integr \       <- More, test component interactions
    /---------\
   /Unit Tests \     <- Many, fast, isolated
  /-------------\

Best Practices:

  • Test user behavior, not implementation
  • Keep tests independent
  • Make tests deterministic
  • Optimize for speed
  • Use data-testid, not CSS selectors

Detailed patterns and worked examples

Detailed pattern documentation (Playwright config and page objects, fixtures, waiting strategies, network mocking, Cypress custom commands and intercepts, visual regression, sharding, accessibility testing) lives in references/details.md in this skill's directory. Read that file when the navigation tier above is insufficient.

Best Practices

  1. Use Data Attributes: data-testid or data-cy for stable selectors
  2. Avoid Brittle Selectors: Don't rely on CSS classes or DOM structure
  3. Test User Behavior: Click, type, see - not implementation details
  4. Keep Tests Independent: Each test should run in isolation
  5. Clean Up Test Data: Create and destroy test data in each test
  6. Use Page Objects: Encapsulate page logic
  7. Meaningful Assertions: Check actual user-visible behavior
  8. Optimize for Speed: Mock when possible, parallel execution
// Bad selectors
cy.get(".btn.btn-primary.submit-button").click();
cy.get("div > form > div:nth-child(2) > input").type("text");

// Good selectors
cy.getByRole("button", { name: "Submit" }).click();
cy.getByLabel("Email address").type("[email protected]");
cy.get('[data-testid="email-input"]').type("[email protected]");

Common Pitfalls

  • Flaky Tests: Use proper waits, not fixed timeouts
  • Slow Tests: Mock external APIs, use parallel execution
  • Over-Testing: Don't test every edge case with E2E
  • Coupled Tests: Tests should not depend on each other
  • Poor Selectors: Avoid CSS classes and nth-child
  • No Cleanup: Clean up test data after each test
  • Testing Implementation: Test user behavior, not internals

Debugging Failing Tests

// Playwright debugging
// 1. Run in headed mode
npx playwright test --headed

// 2. Run in debug mode
npx playwright test --debug

// 3. Use trace viewer
await page.screenshot({ path: 'screenshot.png' });
await page.video()?.saveAs('video.webm');

// 4. Add test.step for better reporting
test('checkout flow', async ({ page }) => {
    await test.step('Add item to cart', async () => {
        await page.goto('/products');
        await page.getByRole('button', { name: 'Add to Cart' }).click();
    });

    await test.step('Proceed to checkout', async () => {
        await page.goto('/cart');
        await page.getByRole('button', { name: 'Checkout' }).click();
    });
});

// 5. Inspect page state
await page.pause();  // Pauses execution, opens inspector

Usage

When the user shares a flaky test, a suite to review, or a flow to cover, diagnose against the pitfalls above (waits, selectors, coupling, cleanup) and deliver corrected test code, page objects, fixtures, or configs as complete artifacts they can drop into their repo. Consult references/details.md for the full pattern library when writing non-trivial suites. Keep E2E coverage focused on critical user journeys; push edge cases down the pyramid. Defer to testing-strategy for what-to-test planning, playwright-testing for Playwright-specific depth, and test-driven-development for TDD workflow.

/e2e-testing-patterns $ARGUMENTS

How to use the E2E Testing Patterns skill

  1. Sign in to Zeplik

    Create a free Zeplik account or sign in. New accounts start with free credits, so you can try the E2E Testing Patterns skill right away.

  2. Describe your software development task

    Ask in plain language, or type /e2e-testing-patterns to invoke the skill directly. Zeplik recognizes the E2E Testing Patterns skill and applies its method.

  3. Review and refine the result

    Zeplik returns a clear, structured answer. Ask follow-ups in the same chat to refine it or take the next step.

Source and credit

Author
wshobson
License
MIT

Adapted from the open-source wshobson/agents project and tuned to run natively on Zeplik. View source on GitHub.

Frequently asked questions

What is the E2E Testing Patterns skill?
E2E Testing Patterns is a ready-to-run software development skill on Zeplik. Not for test strategy (use testing-strategy) or Playwright (use playwright-testing). Ask in plain language and Zeplik applies the skill's method for you inside the conversation, on whichever AI model you prefer.
How do I use E2E Testing Patterns on Zeplik?
Sign in to Zeplik and ask in plain language, or type /e2e-testing-patterns in any chat to invoke it directly. The skill applies its method and returns a result you can refine in the same conversation.
Which AI model does the E2E Testing Patterns skill use?
Any model you choose. Zeplik works across every model in one chat, so the E2E Testing Patterns skill runs on your preferred model for the task.
Where does the E2E Testing Patterns skill come from?
The E2E Testing Patterns skill is adapted from the open-source wshobson/agents project (MIT) and tuned to run natively on Zeplik. The original source is linked on this page.
How much does the E2E Testing Patterns skill cost?
Using the skill is free to start. You only spend Zeplik credits when the assistant runs, and new accounts begin with free credits.

Related software development skills

More on Zeplik

Try E2E Testing Patterns on Zeplik

Every model, one chat. Bring the E2E Testing Patterns skill into your next conversation and let the assistant do the work.

Browse all skills
E2E Testing Patterns - Software development skill for Zeplik AI | Zeplik Chat