Skip to main content

Claude Prompt to Set Up an End-to-End Test Automation Framework

Set up a production E2E framework with page objects, fixtures, auth helpers, parallel runs, and GitHub Actions CI for web apps.

Vul de plaatshouders in

Edit the values, then copy your finished prompt.

Jouw Prompt
prompt.txt

                                

What this prompt does

This prompt scaffolds a complete end-to-end testing framework rather than a single test. You specify [e2e_tool], the [app_type], and the [framework] it is built with, and the AI produces a page-object-model project structure: a base page class with shared helpers, fixtures and factory data, [test_count] example tests covering your [critical_flows], auth helpers for [auth_method], parallel runs across [parallel_count] workers, GitHub Actions CI, and HTML reporting.

The structure works because it front-loads the architecture decisions that usually get skipped. By demanding the page object pattern, a base class, and fixtures up front, the prompt produces a layout the team can extend instead of a pile of brittle scripts. The variables for [critical_flows] and [auth_method] make the examples concrete to your app, and the CI plus parallel-worker requirements mean the output is wired into a pipeline, not just runnable locally.

When to use it

  • You are launching a [app_type] and want E2E coverage before the first incident, not after.
  • You need a page-object structure that scales as the app grows.
  • You want login, CRUD, and other [critical_flows] protected against silent breakage.
  • You are standing up GitHub Actions CI for browser tests with caching.
  • You need parallel execution tuned to [parallel_count] workers.
  • You want screenshots and video captured automatically on failure.

Example output

You get a full project skeleton: a pages/ directory of page objects, a base page class, fixtures, [test_count] example specs for your [critical_flows], auth helper commands, a [e2e_tool] config with [parallel_count] workers, a GitHub Actions workflow with caching, plus package.json scripts and a team README. Failure artifacts (screenshots, video) are configured out of the box.

Pro tips

  • List your real [critical_flows] precisely — vague flows produce vague tests; name the exact screens and actions.
  • Match [auth_method] to how your app actually logs in, since auth helpers are reused by nearly every test.
  • Keep [parallel_count] aligned to your CI runner's cores; over-provisioning workers causes flaky, resource-starved runs.
  • Treat the generated specs as scaffolding — selectors will need adjusting to your real DOM.
  • Set [environments] to match your deploy stages so config switching works locally and in CI.
  • Start with a small [test_count] to validate the structure, then expand once the base class and fixtures are stable.

Frequently Asked Questions

Does this work with Cypress instead of Playwright?
Yes. Set `[e2e_tool]` to Cypress and the prompt will produce a Cypress-flavoured page object structure, fixtures, and CI config. The patterns are similar across tools, though helper APIs and config files differ between Playwright and Cypress.
Will the example tests pass against my real app immediately?
No. The selectors and flow steps are educated guesses based on `[critical_flows]`. You will need to align them with your actual DOM and routes. The value is the structure and CI wiring, which save the most setup time.
How do I handle authentication in the tests?
The prompt generates custom helpers for your `[auth_method]`, such as JWT with cookie sessions. Describe your real auth flow accurately so the helper logs in once and reuses the session across tests instead of re-authenticating each spec.
Can it set up parallel runs in CI?
Yes. It configures `[parallel_count]` workers and a GitHub Actions workflow with caching. Set the worker count to match your runner's available cores, since too many parallel browsers on a small runner cause resource contention and flaky failures.
Engr Mejba Ahmed

Need this built for real?

Engr Mejba Ahmed

AI Developer · Software Engineer

I'm Mejba — I design and ship production AI systems, automations, and full-stack apps. If you want this turned into a working solution for your team, let's talk.

Meer in Testing & QA Automation Prompts

Engr Mejba Ahmed

Engr Mejba Ahmed

Claude Code Expert · Online

👋

Hey there!

Quick Actions

WhatsApp Instant reply

Chat on WhatsApp

+880 1723 741224 · Instant reply

Popular Questions

Engr Mejba Ahmed is connected
Engr Mejba Ahmed is typing...
Engr Mejba Ahmed avatar

✉ Want me to follow up? Drop your email

Engr Mejba Ahmed avatar

📞 Connect Directly

Choose how you'd like to reach me

WhatsApp

+880 1723 741224

Email

[email protected]

✓ Details sent! I'll get back to you shortly.

Powered by OpenAI

335+

Blog Posts

25

AI Courses

63

Projects

Services & Expertise

Pricing & Process

Learning & Resources

Connect & Support