CS FundamentalsHardAccenture · Capgemini · ISTQB-style
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 analysis (each boundary and its nearest neighbour across it), how many distinct test values are needed?
- A. 6
- B. 8
- C. 12
- D. 4
Correct answer: B. 8
The partition edges give 0 | 1, 10 | 11, 50 | 51 and 100 | 101: eight distinct values, including the invalid 0 and 101. Taking only the six valid edges misses the invalid neighbours; 12 is the three-value count without merging.
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
- 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()
- A function contains if x > 5: A() followed later by if x < 3: B(), and x is not changed between them. How many entry-to-exit paths are…
- A tester has no reliable way to know the correct output for a complex scientific simulation, so she checks that doubling every input mass…
- In which situation does a suite with 100% decision (branch) coverage still NOT achieve 100% multiple-condition coverage?