Modern QA2026Common Mistakes in Test Case Writing
Log inJoin
1 / 10 · Book 11 · Anatomy of a Test Case · drill: interview Q&A⊞ allnext →Get the book →

1.4Common Mistakes in Test Case Writing

Common Mistake #1: Vague Steps

"Log in to the app" — Which user? Which environment? What credentials? A new team member cannot execute this.

Fix: "Navigate to https://staging.example.com/login. Enter email: test@example.com. Enter password: Test123!. Click the 'Sign In' button."

Common Mistake #2: Missing Preconditions

The test assumes a database state nobody sets up. Testing that a discount code works — but the code was created in staging last month and deleted since.

Fix: State every precondition explicitly. Link to setup scripts or describe creation steps.

Common Mistake #3: Compound Assertions

Checking five things in one test case makes failure ambiguous. If the test fails, which of the five was the problem?

Fix: One test case = one verification point. Separate cases can share preconditions.

Common Mistake #4: Platform Assumptions

"Click the button" — on mobile there is no click, there is a tap. "Right-click to open context menu" — does not work on touch devices.

Fix: Specify the platform, or write platform-specific variants.

Common Mistake #5: Missing Negative Cases

Only testing the happy path. You wrote "Verify login succeeds" but never wrote "Verify login fails with empty password."

Fix: For every positive test, ask: what should happen when the user does this wrong?