Recall & Review
beginner
What is path coverage in software testing?
Path coverage is a testing technique that ensures every possible route or path through a program's control flow is executed at least once during testing.
Click to reveal answer
beginner
Why is path coverage important?
Path coverage helps find errors in complex decision logic by testing all possible paths, reducing the chance of hidden bugs.
Click to reveal answer
intermediate
How does path coverage differ from statement coverage?
Statement coverage tests if each line of code runs at least once, while path coverage tests all possible paths through the code, including different decision outcomes.
Click to reveal answer
intermediate
What is a challenge when using path coverage?
The number of paths can grow very large with many decisions, making full path coverage hard or impossible to achieve in practice.
Click to reveal answer
beginner
Give an example of a simple program path.
For example, in an if-else statement, there are two paths: one where the if condition is true and one where it is false. Path coverage means testing both.
Click to reveal answer
What does path coverage ensure in testing?
✗ Incorrect
Path coverage means testing all possible routes through the program's control flow.
Which is a limitation of path coverage?
✗ Incorrect
Because the number of paths grows quickly, full path coverage can be impractical.
Path coverage is more thorough than which of these?
✗ Incorrect
Path coverage tests all paths, while statement coverage only ensures each line runs once.
In an if-else statement, how many paths are there?
✗ Incorrect
There are two paths: one where the if condition is true, and one where it is false.
Which testing technique focuses on decision outcomes?
✗ Incorrect
Path coverage tests all decision outcomes by covering all paths.
Explain path coverage and why it is useful in software testing.
Think about how many ways a program can run depending on decisions.
You got /4 concepts.
Describe a challenge testers face when trying to achieve full path coverage.
Consider what happens when many if-else or loops combine.
You got /4 concepts.