CS FundamentalsHardProduct-company placement · ISTQB-style
How many of these statements about coverage criteria are correct? 1. 100% branch coverage guarantees 100% statement coverage. 2. 100% condition coverage guarantees 100% branch coverage. 3. MC/DC subsumes branch (decision) coverage. 4. All-uses data-flow coverage subsumes all-defs coverage. 5. 100% path coverage is practical for any program containing loops.
- A. 2
- B. 4
- C. 5
- D. 3
Correct answer: D. 3
1, 3 and 4 are correct. Condition coverage can make every condition true and false while the decision always comes out the same, and a loop can create unboundedly many paths, so 2 and 5 are false.
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
- In Java, the non-short-circuit operator | evaluates both sides. For if ((a > 0) | (b > 0)) { X(); } else { Y(); } the tests (a = 1, b =…
- With short-circuit evaluation, how many distinct evaluation patterns (which conditions are evaluated and their values) can the decision (A…
- A loop can execute between 0 and 10 times (n = 10). Following Beizer's guidelines for simple-loop testing, which set of iteration counts…
- A function is a straight sequence of three independent if-else statements, with no loops. What are (total entry-to-exit paths, cyclomatic…
- How many definition-use (def-use) pairs does variable x have in this fragment (a p-use in a condition counts as a use)? python x =…
- For the function below, the tests (age = 30, member = True) and (age = 10, member = False) already give 100% statement and branch…