0
0
Testing Fundamentalstesting~5 mins

Path coverage in Testing Fundamentals - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
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?
AEvery possible path through the program is executed
BEvery variable is initialized
CEvery function is called once
DEvery user input is validated
Which is a limitation of path coverage?
AIt ignores decision points
BIt tests only one path
CIt can be impossible to test all paths in complex programs
DIt only tests syntax errors
Path coverage is more thorough than which of these?
ACode formatting
BSyntax checking
CMemory profiling
DStatement coverage
In an if-else statement, how many paths are there?
AOne
BTwo
CThree
DFour
Which testing technique focuses on decision outcomes?
APath coverage
BLoad testing
CUsability testing
DSyntax checking
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.