In the context of software testing, which of the following statements is/are…

2019

In the context of software testing, which of the following statements is/are NOT correct?

P: A minimal test set that achieves 100% path coverage will also achieve 100% statement coverage.

Q: A minimal test set that achieves 100% path coverage will generally detect more faults than one that achieves 100% statement coverage.

R: A minimal test set that achieves 100% statement coverage will generally detect more faults than one that achieves 100% branch coverage.

  1. A.

    R only

  2. B.

    Q only

  3. C.

    P and Q only

  4. D.

    Q and R only

Attempted by 148 students.

Show answer & explanation

Correct answer: A

Final answer: Only statement R is NOT correct.

  • P: A minimal test set that achieves 100% path coverage will also achieve 100% statement coverage because executing every path necessarily executes all statements on those paths. Therefore P is correct.

  • Q: Path coverage is a stronger criterion than statement coverage and exercises combinations of branches and conditions. A minimal test set achieving 100% path coverage will generally detect at least as many faults and often more faults than one that only achieves 100% statement coverage. Therefore Q is correct.

  • R: Statement coverage is weaker than branch coverage. Achieving 100% statement coverage can still miss untested branch outcomes and control-flow behaviors that branch coverage would exercise. Thus the claim that a minimal test set with 100% statement coverage will generally detect more faults than one with 100% branch coverage is false. Therefore R is NOT correct.

Conclusion: Only R is incorrect; P and Q are correct statements.

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Mppsc Assistant Professor