Example result: Write an end-to-end test for a user journey
AI-generated example · E2E Test
Prompt at a glance
Category
Text & chat
Works with
Claude · ChatGPT · Claude Code
Length
85 words
Fields to fill
TOOL, STEPS, PASTE OR DESCRIBE
Last updated

Write an end-to-end test for a user journey

This prompt writes an end-to-end test for a full user journey, such as sign up to first project. It uses role and label selectors and real waits instead of sleeps, so the test does not break every time the design changes.

text-code-playwright-e2e-test — claude — 85 words

Act as a QA automation engineer using [TOOL, e.g. Playwright with TypeScript].

User journey to test: [STEPS, e.g. sign up, verify email, create first project]
App URL: [e.g. http://localhost:3000]
Useful selectors or page code: [PASTE OR DESCRIBE]

Write a reliable end-to-end test. Use role and label selectors, not CSS classes. Wait for real conditions, never fixed sleeps. Set up and clean up test data. Add clear step names so a failure is easy to read, and explain how to run it headed and in CI.

Selectors like getByRole and getByLabel survive design changes. CSS class selectors break often.

How to use this prompt

From copy to answer in four steps

  1. 1

    Open Claude and start a new chat.

  2. 2

    Paste the prompt.

  3. 3

    Replace each [BRACKETED] field with your real details and paste in your own text where asked.

  4. 4

    Reply with follow-ups such as "make it shorter" or "make it sound more like me".

FAQ

About this prompt

Which AI tools work with this prompt?

It is written for Claude, ChatGPT and Claude Code. Paste it into your preferred tool and adjust the wording if the result is off.

What do I need to fill in?

Replace these fields before you send it: TOOL, STEPS, PASTE OR DESCRIBE. Each field shows an example in the prompt.

Should I paste private information into the prompt?

Only what the task needs. Remove names, contact details and other sensitive data before pasting a resume or document into any AI tool.

Keep exploring

More chat & writing prompts

See all 424 chat & writing prompts →