In the pack: ChatGPT, Claude & Gemini Prompts for Coding and Developers
Audit a Test Suite for Tests That Can't Fail
Prompt
Language and framework: {{LANGUAGE}} / {{TEST_FRAMEWORK}}
The tests: {{TESTS}}
The code they test: {{CODE}}
Do this:
1. Flag weak tests: no assertions, assertions only on "not null" or "no exception", asserting what a mock returned, snapshot tests nobody reads, or expected values copied from the code's own output without independent reasoning.
2. Mentally mutate the code: for the five most important lines, describe a plausible bug (flip a comparison, drop a condition, off-by-one, swap arguments, return early) and state which test, if any, would catch it.
3. Find important behaviors with no test at all.
4. Find brittle tests: tests that would break on a harmless refactor because they check implementation details, depend on order, sleep, or share state.
5. Give a prioritized fix list, with rewritten versions of the three weakest tests.
Quote each test by name. Base the mutation analysis on the code shown; if a mutation tool exists for my language (for example mutmut, Stryker or PIT), suggest running it to confirm.
Customize this prompt
Fill in the variables below to personalize this prompt:
Model Settings
Recommended Models
Temperature
Max Tokens
Additional Notes
About this prompt
“Audit a Test Suite for Tests That Can't Fail” is a free prompt for ChatGPT in the Coding & Software category, 189 words long, added to The Prompt Index on October 28, 2026 by The Prompt Index. Copy it with the button above, paste it into ChatGPT or any other AI chat assistant, and send it.
It has 4 placeholders to fill in first:
{{LANGUAGE}}, {{TEST_FRAMEWORK}}, {{TESTS}}, {{CODE}}.
Use the “Customize this prompt” fields to personalise it before you copy.
Recommended models: ChatGPT, Claude, Gemini.
0 upvotes, sent to an AI tool 0 times, viewed 41 times.
Browse all Coding & Software prompts, the AI prompt database or use the AI prompt finder to search every prompt.