0
0
Testing Fundamentalstesting~5 mins

Test coverage metrics in Testing Fundamentals - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is test coverage in software testing?
Test coverage measures how much of the software's code or features are tested by the test cases. It helps find untested parts.
Click to reveal answer
beginner
Name two common types of test coverage metrics.
Two common types are code coverage (which checks how much code is tested) and requirement coverage (which checks how many requirements are tested).
Click to reveal answer
intermediate
What does statement coverage measure?
Statement coverage measures the percentage of executable statements in the code that have been run by tests.
Click to reveal answer
intermediate
Why is 100% test coverage not always enough?
Because tests might run code but not check if it works correctly. Also, some bugs happen in combinations or unexpected inputs not covered by tests.
Click to reveal answer
intermediate
What is branch coverage and why is it important?
Branch coverage measures if every possible branch (like if-else branches) in the code has been tested. It helps find missing tests for decision points.
Click to reveal answer
Which test coverage metric measures the percentage of code lines executed by tests?
ARequirement coverage
BStatement coverage
CBranch coverage
DPath coverage
What does requirement coverage focus on?
ATesting all functions
BTesting all code branches
CTesting all user requirements
DTesting all variables
Why might 100% code coverage still miss bugs?
ABecause code coverage only measures requirements
BBecause code coverage tools are inaccurate
CBecause tests run too slowly
DBecause tests might not check outputs or logic correctness
Branch coverage ensures testing of:
AAll decision paths like if-else
BAll user stories
CAll code statements
DAll database queries
Which metric helps identify untested requirements?
ARequirement coverage
BCode coverage
CBranch coverage
DStatement coverage
Explain what test coverage metrics are and why they matter in software testing.
Think about how much of the software is tested.
You got /3 concepts.
    Describe the difference between statement coverage and branch coverage.
    One counts lines, the other counts decision points.
    You got /3 concepts.