A unit-test suite covers 70% of a module's code. During testing, the…

2014

A unit-test suite covers 70% of a module's code. During testing, the probability of success is 0.95. Under the coverage-weighted estimate used in this question, what is the tightest upper bound on the module's reliability?

Answer: B. At most 0.665ConceptIn a coverage-weighted reliability estimate, only the fraction of code exercised by the test suite contributes tested evidence. If coverage is c and…

  1. A.

    0.665 to 0.95

  2. B.

    At most 0.665

  3. C.

    At most 0.95

  4. D.

    At least 0.665

Attempted by 161 students.

Show answer & explanation

Correct answer: B

Concept

In a coverage-weighted reliability estimate, only the fraction of code exercised by the test suite contributes tested evidence.

If coverage is c and the observed success probability is p, the demonstrated bound in this simplified model is obtained from coverage × success probability.

Application

  1. Convert the coverage to a decimal: c = 70/100 = 0.70.

  2. Use the observed success probability: p = 0.95.

  3. Multiply the two quantities: c × p = 0.70 × 0.95 = 0.665.

  4. Therefore, under this model, the reliability estimate cannot exceed 0.665.

Cross-check

The value 0.665 is 66.5%. It is lower than 95% because only 70% of the code supplied tested evidence: 95% × 70% = 66.5%.

Result

Thus, the applicable bound is at most 0.665.

Explore the full course: Isro

Loading lesson…