How to Write Effective Test Cases
Focuslogic Tech Academy
Software Testing Mentor
Learn the structure of a good test case with practical examples beginners can apply immediately.

A test case is a set of conditions under which a tester determines whether an application is working correctly. Writing clear, repeatable test cases is one of the first skills every software tester must master — and it's exactly what interviewers check for in a QA interview.
Why Good Test Cases Matter
A well-written test case lets anyone on your team reproduce the same steps and reach the same conclusion. That consistency is what separates professional testing from random clicking. Good test cases also become documentation: they describe how the application is expected to behave.
If a new team member can run your test case without asking you a single question, you've written a good one.
The Standard Test Case Fields
Every test case you write — whether in Excel, Jira, or a dedicated tool — should contain these core fields:
- Test Case ID — a unique identifier (e.g. TC_LOGIN_001).
- Title — a short, descriptive name of what is being tested.
- Preconditions — what must be true before the test runs (e.g. user account exists).
- Test Steps — numbered, clear actions to perform.
- Expected Result — what should happen after the steps.
- Actual Result — filled in during execution.
- Status — Pass, Fail, or Blocked.
A Practical Example
Let's write a test case for a simple login screen where a user enters an email and password and clicks Sign In.
- Open the application login page.
- Enter a valid registered email (e.g. student@example.com).
- Enter the correct password for that account.
- Click the 'Sign In' button.
Expected Result: The user is redirected to the dashboard and a welcome message with their name appears.
Notice the steps are written so anyone could follow them — no assumptions about what 'login normally' means.
Positive vs Negative Test Cases
Beginners often write only positive cases — testing the happy path where everything works. Strong testers also write negative cases that check how the system handles invalid input.
- Positive: valid email + valid password → login succeeds.
- Negative: valid email + wrong password → error message shown.
- Negative: empty email field → validation error, login blocked.
- Negative: SQL injection string in email → sanitized, no breach.
Common Mistakes to Avoid
- Vague steps like 'login normally' — always be explicit.
- Combining multiple checks in one case — one test case, one assertion.
- Skipping preconditions — the test becomes impossible to reproduce.
- Writing expected results as 'should work' — describe the exact behavior.
One test case should verify one expected outcome. If you find yourself writing 'and also check...', split it into a second case.
Next Steps
Pick any application you use daily — a login page, a search bar, a contact form — and write 5 test cases for it using the fields above. That small exercise is how real testing skill is built. When you're ready, take our free skill assessment to see how your QA aptitude stacks up.

