CS FundamentalsHardInfosys · Cognizant
Assertion (A): A suite with 100% branch coverage can still miss a defect where a required check was never coded. Reason (R): White-box coverage is measured against the code that exists, so it cannot reveal missing functionality.
- A. A is true but R is false
- B. A is false but R is true
- C. Both A and R are true, but R does not explain A
- D. Both A and R are true and R explains A
Correct answer: D. Both A and R are true and R explains A
Errors of omission leave no branch to cover, so structural coverage cannot expose them; black-box tests derived from requirements can. R is exactly why A holds.
Practise more Software Engineering, Git and Cloud Basics questionsSoftware Engineering, Git and Cloud Basics: notes and key points
More Software Engineering, Git and Cloud Basics questions
- How many of these are static testing activities: (1) a peer code review, (2) running a linter such as ESLint, (3) executing unit tests…
- Assertion (A): A Fagan inspection is more formal than a walkthrough. Reason (R): An inspection is led by a trained moderator, follows…
- An integer quantity field accepts 1 to 100. The discount is 0% for 1-10, 10% for 11-50 and 20% for 51-100. Using two-value boundary value…
- A mutant changes if (x > 10 && x < 20) to if (x >= 10 && x < 20). Which single test input kills (distinguishes) this mutant?
- After a change to functions f1, f3 and f5, a team wants the smallest regression subset that exercises all three. Tests cover: T1 {f1, f2}…
- What is the minimum number of tests that gives 100% statement coverage of this fragment? python if a > 0: if b > 0: X() else: Y() else: Z()