Retext
ChatGPTAI AssistantFor QA Engineers

ChatGPT Prompts for QA Engineers

QA engineers need help turning requirements into test cases, writing clear bug reports, and building or fixing automated tests for web and API flows. These ChatGPT prompts start from that: fill in your situation once and reuse it. The worked example below is a testing task, one of the most common for qa engineers.

Installs as a snippet — type ;qa-chatgpt to paste this prompt anywhere on your Mac.
Prompt Template
I'm a qa engineer and need help with [task, e.g. test case writing].

What I have:
- [the material involved: code, draft, notes or data]

What a good result looks like:
- [the outcome and its format]

Ask me one clarifying question if something important is missing, then give the result.

About my work
- Feature and acceptance criteria: [e.g. checkout with saved cards, paste the ticket]
- Test tools: [e.g. Playwright with TypeScript, Postman, pytest]
- Environments and data: [e.g. staging, test accounts with and without saved cards]

Context
- Reference material: [paste it below, or attach the file]

How to use this prompt

  1. 1

    Open ChatGPT

    Start a new chat in ChatGPT and paste the prompt.

  2. 2

    Give it context

    Upload or paste the material the prompt works on below the instructions.

  3. 3

    Review and iterate

    Reply in the same chat to refine, and quote the part you want changed.

  4. 4

    Save what you repeat

    Preferences you want in every chat (tone, audience, format) belong in ChatGPT's custom instructions. For a prompt you reuse with fixed files, a custom GPT or project works too.

Working in ChatGPT

  • •Custom instructions apply to every chat, so keep task-specific rules in the prompt, not there.
  • •If the reply drifts from the format, paste the format line again and ask it to redo only that part.
  • •Start a new chat for unrelated work so earlier messages don't color the answer.

Example task: Testing

What you give it

Language and framework: JavaScript with Vitest

export function slugify(text) {
  return text.toLowerCase().trim().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "");
}

What it should do: turn a title into a URL slug with single hyphens and no leading or trailing hyphens.
Edge cases: punctuation, extra spaces, symbols only.

What a good answer looks like (shortened)

import { describe, it, expect } from "vitest";
import { slugify } from "./slugify";

describe("slugify", () => {
  it("lowercases and joins words with hyphens", () => {
    expect(slugify("Hello World")).toBe("hello-world");
  });

  it("collapses punctuation runs into one hyphen", () => {
    expect(slugify("Rock & Roll!!")).toBe("rock-roll");
  });

  it("strips leading and trailing hyphens", () => {
    expect(slugify("  --Draft--  ")).toBe("draft");
  });

  it("returns an empty string for symbols only", () => {
    expect(slugify("!!!")).toBe("");
  });
});

Not tested: accented letters are dropped, so "Café" becomes "caf". Confirm whether that is acceptable before I add a test.

Tips for better results

  • •Paste the acceptance criteria word for word and ask for test cases mapped to each criterion. Gaps in the mapping usually reveal gaps in the requirements.
  • •Upload or paste the material the prompt works on below the instructions.
  • •Check this before you use the output: check that generated tests actually assert on outcomes and use selectors that exist in your app, since a test that never fails gives false confidence.

Check before you use it: Check that generated tests actually assert on outcomes and use selectors that exist in your app, since a test that never fails gives false confidence.

Get the free prompt pack

Our best coding prompts in one Markdown file, delivered by email. The templates here stay free either way — the pack just saves you the copying.

Variations

Task

Testing: Replace the first line with: Write tests for the code below.

Integration tests

Replace Coverage I want with: Test [module] together with a real [database or HTTP layer], and include setup and teardown.

Second task

Change the task line to: [Bug reports].

Save it as a Retext snippet

Retext is a free text expander for Mac. Save this prompt once, then type ;qa-chatgpt in any app (ChatGPT, Claude, your editor, a browser tab) and the full prompt is pasted in.

  1. Click Add to Retext. The prompt installs as a snippet with the trigger ;qa-chatgpt.
  2. Change the trigger in Retext if you prefer a different one.
  3. Type the trigger wherever you want the prompt, then fill in the brackets.

Frequently asked questions

Can AI write automated tests that do not break constantly?

It can, if you tell it to use stable selectors like test IDs or roles and avoid fixed waits. Paste a working test from your suite so it follows your existing patterns.

Should this go in custom instructions?

No. Custom instructions apply to every chat. Keep this prompt for the task and paste it (or expand it with a Retext snippet) when you need it.

Can I make this a custom GPT?

Yes, if you run it often with the same files. Put the prompt in the GPT's instructions and upload the reference files once.

How do I reuse this prompt without copying it every time?

Click Add to Retext to save it as a snippet. Then type ;qa-chatgpt in any Mac app, including your AI tool, and the full prompt is pasted in.

Related Templates

Get the free prompt pack

Our best coding prompts in one Markdown file, delivered by email. The templates here stay free either way — the pack just saves you the copying.