Tests & QA21 categories
Write the failing case first
A bug you are about to fix.
Shortregressiontdd
Write the failing test for this bug first. Nothing else yet, no fix.
Making it yours
- Paste your own material where the prompt asks for it. Everything above that line is instruction, not content.
- Delete any rule that does not apply to you. A shorter prompt that fits beats a thorough one that does not.
- If the answer comes back vague, add a line saying what you do not want. Constraints work better than encouragement.
Failing and flaky tests. Diagnosing a red run, stabilising a flake, and locking a fixed bug in with a regression test.
Related prompts
Make this flaky test deterministicA test that passes locally and fails in CI roughly one run in ten.Write a regression test from a bug reportA bug is fixed and you want it to stay fixed.Diagnose why this test is failingA red test where the failure output does not point anywhere obvious.Why is this flaky?A test that fails once every twenty runs.Regression test from this bugA bug you have just fixed and never want back.Diagnose this failing testA red test with an unhelpful failure output.
Keep this one
Phrasery saves prompts with a right-click and puts them back the same way. Add this to your own library in one click.
Add to your browser โ free