CS FundamentalsHardInfosys · ISTQB-style
In which situation does a suite with 100% decision (branch) coverage still NOT achieve 100% multiple-condition coverage?
- A. When every decision contains only one simple condition
- B. When the code has no decisions at all
- C. When a decision combines two or more conditions, since branch coverage needs only one true and one false outcome per decision
- D. When the code contains a loop
Correct answer: C. When a decision combines two or more conditions, since branch coverage needs only one true and one false outcome per decision
Multiple-condition coverage needs every combination of the conditions within a decision (2^n), while branch coverage needs just the two outcomes. With single-condition decisions the two criteria coincide.
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
- You append line L1 to a tracked file f.txt, run git add f.txt, and then append line L2. Which statement about the three diff commands is…
- main has commits A-B-C-D. feature was created at B and has commits E-F. How many commits do git log main..feature and git log…
- On main (…-C-D) you run git merge feature, where feature has E-F-G, creating merge commit M. Its first parent is D and its second is G…
- On main with tip D (history A-B-C-D) you accidentally run git reset --hard HEAD~2. Which command brings the branch back to D, assuming…
- A merge commit M on main brought in a feature that turns out to be broken. Running git revert M fails. Why, and what is the fix?
- feature has commits X, then Y, then Z (oldest to newest). On main you run git cherry-pick X..Z. Which commits are applied?