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.665 — ConceptIn a coverage-weighted reliability estimate, only the fraction of code exercised by the test suite contributes tested evidence. If coverage is c and…
- A.
0.665 to 0.95
- B.
At most 0.665
- C.
At most 0.95
- D.
At least 0.665
Attempted by 160 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
Convert the coverage to a decimal: c = 70/100 = 0.70.
Use the observed success probability: p = 0.95.
Multiply the two quantities: c × p = 0.70 × 0.95 = 0.665.
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.