Which of the following modules will require the most test cases to ensure path coverage?
A.
Cyclomatic Complexity: 8, LOC: 100
B.
Cyclomatic Complexity: 10, LOC: 500
C.
Cyclomatic Complexity: 12, LOC: 100
D.
Cyclomatic Complexity: 20, LOC: 400
The Answer Is:
D
This question includes an explanation.
Explanation:
Path coverage is strongly related to the number of independent paths through a module. Cyclomatic complexity measures the number of linearly independent paths in the control structure of software. A higher cyclomatic complexity generally means more decision logic, more independent paths, and more test cases needed to achieve path coverage. Lines of code may indicate module size, but LOC alone does not determine the number of paths. For example, a large module with simple sequential logic may require fewer path tests than a smaller module with many decisions. Among the listed options, the module with cyclomatic complexity 20 has the greatest number of independent paths. Therefore, it will require the most test cases for path coverage, making D correct.
================
CSQE PDF/Engine
Printable Format
Value of Money
100% Pass Assurance
Verified Answers
Researched by Industry Experts
Based on Real Exams Scenarios
100% Real Questions
Get 65% Discount on All Products,
Use Coupon: "ac4s65"