問題文
A pharmacy chain deployed with 78% coverage. Two weeks later a refill discount turns out to be wrong for negative quantities, a case the tests never supplied even though the lines involved counted as covered. The team lead asks what the percentage was supposed to prove. What is the accurate framing?
選択肢
- It proves that 78% of the application's use cases behave exactly as the business specified them, so the remaining work is limited to the last few paths through the class.
- It is the minimum required to deploy, and it excludes calls to the debug method and the test classes themselves, which is why the reported figure understated the real situation and the negative-quantity path appeared to be covered.
- It is the minimum required to deploy and one indication of test effectiveness, not a guarantee of it; the guidance is to exercise every use case, positive and negative, bulk and single, with assertions that prove the behavior.
- It is the minimum required to deploy, and the correct response is to raise the percentage to 100 by adding tests that call every method once, because full coverage means every branch ran once.