Modern QA2026Common Pitfalls with Claude Code — tiles
Log inJoin
68 / 87 · 02 AI-Augmented Test Design · Claude Code Workflow: Spec-to-Suite← prev⊞ allnext →☰ Read as one page

10.6Common Pitfalls with Claude Code

Pitfall 1: Letting Claude Weaken Assertions

# BAD: Claude changes 403 to 200 to make the test pass
# This hides a real authorization bug

# GOOD: instruct Claude explicitly
claude "If a test expects 403 but gets 200, that is an APPLICATION BUG.
Report it but do not change the assertion."

Pitfall 2: Not Specifying the Test Framework

Claude defaults to the most common framework for the language. If you use vitest instead of jest, or pytest-asyncio instead of plain pytest, specify it.

Pitfall 3: Generating Everything in One Prompt

Very long prompts degrade output quality. Break large generation tasks into focused prompts of 20-30 tests each.

Pitfall 4: Forgetting to Commit Between Steps

Claude Code edits files in place. If Step 3 goes wrong and corrupts the file, you lose Steps 1-2. Commit (or at least stash) between major steps.