Retext
AiderCopilotFor QA Engineers

Aider 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 Aider 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-aider 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
- Files involved: [list the files, or reference them in the chat]
- How I build and test: [e.g. npm test]

How to use this prompt

  1. 1

    Open Aider

    Start aider in your repository and paste the prompt at the aider prompt.

  2. 2

    Give it context

    Add the files it should edit with /add before you send the prompt. Aider only edits files you have added.

  3. 3

    Review and iterate

    Aider commits each change to git, so review with git diff and use /undo if a change is wrong.

Working in Aider

  • •Only /add the files that need changes. Extra files cost context and invite unrelated edits.
  • •Because every change is a git commit, you can keep requests small and roll back cheaply.
  • •Paste test output or error messages directly; aider works well in a fix, run, paste-error loop.

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.
  • •Add the files it should edit with /add before you send the prompt. Aider only edits files you have added.
  • •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-aider 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-aider.
  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.

Why didn't aider change the file I meant?

Aider edits only files added to the chat. Run /add with that file, then resend the prompt.

How do I undo a bad edit?

Use /undo in aider to revert its last commit, or use git as usual, since each change is committed.

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

Click Add to Retext to save it as a snippet. Then type ;qa-aider 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.