What Is Test Case?
A test case is a documented set of preconditions, inputs, execution steps, and expected results designed to verify that a specific feature or behavior of the application works correctly.
Free to start · 7-day trial on paid plans
In Depth
A well-structured test case includes a unique ID, title, preconditions (system state before execution), test steps (clear, numbered actions), expected results for each step, actual results (filled in during execution), and pass/fail status. Good test cases are atomic (testing one thing), independent (not relying on other test case outcomes), and repeatable (producing the same result every time).
Test case writing is a skill that separates junior from senior testers. Junior testers tend to write vague steps like "verify the page works." Senior testers write precise, actionable steps: "Enter 'test@example.com' in the email field, click Submit, verify the confirmation banner displays within 3 seconds." Precision makes test cases executable by anyone on the team and automatable by SDETs.
Modern teams balance formal test cases with lighter approaches like checklists and exploratory charters. For stable, critical flows (checkout, authentication), formal test cases provide consistency. For rapidly evolving features, lighter documentation avoids maintenance overhead that makes test cases go stale.
Why Interviewers Ask About This
Writing effective test cases is a core QA competency. Interviewers may ask you to write a test case on the spot to evaluate your attention to detail, coverage thinking, and communication clarity.
Example Scenario
Test Case: Login with valid credentials. Precondition: User account exists with email test@example.com. Steps: 1) Navigate to /login, 2) Enter "test@example.com" in email field, 3) Enter valid password, 4) Click "Sign In." Expected result: User is redirected to /dashboard and sees a welcome message.
Interview Tip
If asked to write test cases on the spot, start with the happy path and then systematically cover negative cases, edge cases, and boundary values. This shows structured thinking.
Related Terms
Explore related glossary terms to deepen your understanding.
Related Resources
Dive deeper with these related interview prep pages.
Ready to Ace Your QA Interview?
Practice explaining test case and other key concepts with our AI interviewer.
Join 1,200+ QA engineers already practicing with AssertHired.
Start Your Free QA InterviewFree to start · 7-day trial on paid plans