21. A fitness app measures the number of steps that are walked each day and provides feedback to encourage the user to keep fit.
The feedback for different numbers of steps should be:
Up to 1000 - Couch Potato!
Above 1000, up to 2000 - Lazy Bones!
Above 2000, up to 4000 - Getting There!
Above 4000, up to 6000 - Not Bad!
Above 6000 - Way to Go!
Which of the following sets of test inputs would achieve the BEST equivalence partition coverage?
Explanation / Rationale
The following valid equivalence partitions can be identified:
1. Up to 1000 - Couch Potato!
2. Above 1000, up to 2000 - Lazy Bones!
3. Above 2000, up to 4000 - Getting There!
4. Above 4000, up to 6000 - Not Bad!
5. Above 6000 - Way to Go!
The sets of test inputs therefore cover the following partitions:
a) Is not correct. 0 (1), 1000 (1), 2000 (2), 3000 (3), 4000 (3) – 3 partitions (out of 5)
b) Is not correct. 1000 (1), 2001 (3), 4000 (3), 4001 (4), 6000 (4) – 3 partitions (out of 5)
c) Is not correct. 123 (1), 2345 (3), 3456 (3), 4567 (4), 5678 (4) – 3 partitions (out of 5)
d) Is correct. 666 (1), 999 (1), 2222 (3), 5555 (4), 6666 (5) – 4 partitions (out of 5)