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.
Free QA career tools, no account needed
Instant and private, everything runs in your browser. Try them before you sign up.
QA Resume Checker
Instant 0-100 score on automation keywords, impact, and ATS formatting.
QA Cover Letter Generator
A tailored 3-paragraph QA cover letter from your resume and a job post.
QA Application Tracker
Drag-and-drop kanban to track every QA application from Applied to Offer.
QA Take-Home Test Generator
A realistic take-home assignment with a scenario, tasks, and a rubric.
QA LinkedIn Headline Generator
A recruiter-searchable headline, About section, and skills list.
QA STAR Story Builder
Structure a QA behavioral answer with the STAR method and instant checks.
QA Bug Report Generator
Build a clean, reproducible bug report for Markdown, Jira, or plain text.
Boundary Value Analysis Generator
Generate boundary value and equivalence partitioning test cases from a range.
QA Metrics Calculator
Calculate DRE, defect leakage, defect density, and pass rate with interpretation.
QA Test Plan Generator
Build a structured test plan (scope, approach, criteria, risks) in Markdown.
QA Salary Calculator
Estimate QA, SDET, and automation tester pay by level, market, and skills.
QA Offer Evaluator
See total comp, a counter range, and a ready-to-send negotiation message.
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 interviewCurious how it works first? See the QA mock interview