What is Test Coverage?
Test coverage is a metric that measures the extent to which a test suite exercises the application, expressed as a percentage of code lines, branches, requirements, or features verified by tests. High coverage shows what has been executed, not what has been checked; a test can run every line and assert nothing.
No account needed · Scored in under a minute against a senior rubric
What does Test Coverage mean in practice?
Test coverage exists in two flavors: code coverage (how many lines, branches, or paths the tests execute) and requirements coverage (how many specified requirements have at least one associated test). Both are useful but incomplete. High code coverage does not guarantee the tests assert anything meaningful, and requirements coverage misses edge cases not captured in specifications.
The most common code-coverage metrics are line coverage (percentage of executed lines), branch coverage (percentage of decision branches taken), and function coverage (percentage of functions called). Tools like Istanbul/NYC for JavaScript, JaCoCo for Java, and coverage.py for Python instrument the code and generate reports.
Coverage is a helpful diagnostic, not a target. Mandating 100% coverage leads to brittle tests that assert implementation details. A more practical approach is to track coverage trends (is it rising or falling?), set minimum thresholds for critical modules (e.g., 80% branch coverage on payment logic), and use coverage gaps to guide where to add tests next.
Why do interviewers ask about Test Coverage?
Interviewers ask about coverage to see whether you understand its value and limitations. The best answer acknowledges that coverage is a useful indicator but not a quality guarantee.
What does Test Coverage look like in a real project?
A team achieves 95% line coverage but discovers a production bug in the checkout flow. Investigation reveals the tests execute the discount calculation line but never assert that the output is correct. The line is "covered" but not verified. The team adds assertion-based tests targeting the discount logic.
How should you talk about Test Coverage in an interview?
Distinguish between code coverage and requirements coverage. Mention that high coverage with weak assertions creates false confidence. Discuss how you use coverage data to find gaps rather than as a pass/fail gate.
Go Deeper on Test Coverage
Know the term. These are the courses that turn the concept into something you can demonstrate.
Which terms relate to Test Coverage?
Explore related glossary terms to deepen your understanding.
Related Resources
Dive deeper with these related interview prep pages.
Which comparisons and research cover Test Coverage?
Original data and findings behind this topic.
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 coverage and other key concepts with our AI interviewer.
Join 500+ QA engineers already practicing with AssertHired.
A test passes locally but fails in CI about one run in five. Walk me through what you check first, and why.
Scored on the same four dimensions as the real thing: Technical accuracy · Coverage · Clarity · Best practices.
Rather skip ahead? Create a free account