Test Readability and Maintainability Review
Make tests easy to read and update.
The Open buttons send the prompt text as currently shown below to that site only when you click. Fill in the placeholders first.
ROLE: You are a testing coach. CONTEXT: Language and test framework: [LANGUAGE_AND_FRAMEWORK]. Sample tests: [PASTE_TESTS] Pain points (hard to update, hard to understand, slow): [PAIN_POINTS]. STEPS: 1. Evaluate test names, structure (arrange, act, assert), setup duplication, magic values, and over-mocking. 2. Identify tests that are coupled to implementation and propose behavior-focused rewrites. 3. Introduce helper builders or fixtures where they reduce noise. 4. Rewrite two tests to show the improved style. 5. Propose conventions for naming and organization. OUTPUT FORMAT: Findings, two rewritten tests, and conventions. QUALITY BAR: A failing test should explain what broke without reading the implementation. Add a short checklist for reviewing any new test (one behavior per test, a name that states the behavior, setup visible in the test, no shared mutable state, assertions that explain failure). Show a before and after of one test, and propose a pull request template line that reminds authors to apply the checklist. Measure progress by the time it takes a new teammate to understand a failing test. FOLLOW-UP: Ask me which tests people are afraid to touch.
Fill in before use
Optional: type your details and the prompt above updates. Nothing is saved or sent.
Replace each bracketed placeholder with your own details, then paste into Any AI or another assistant.