155k views
2 votes
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?
A. 0, 1000, 2000, 3000, 4000
B. 1000, 2001, 4000, 4001, 6000
C. 123, 2345, 3456, 4567, 5678
D. 666, 999, 2222, 5555, 6666

2 Answers

4 votes

Final answer:

The best set of test inputs to ensure equivalence partition coverage is Option B (1000, 2001, 4000, 4001, 6000), as it tests boundaries and values just above the boundaries for each feedback range.

Step-by-step explanation:

The best set of test inputs to achieve equivalence partition coverage in this scenario would be those that include values both within each range and at the boundaries between ranges. The purpose of equivalence partitioning is to divide input data into valid and invalid partitions and then test each partition with values that are representative of that class. In this case, the partitions are defined by the number of steps and the associated feedback. Since boundaries often contain defects, inputs that test these boundaries are important.

Considering the given options for providing feedback based on the number of steps:

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!

The best set of test inputs would be Option B: 1000, 2001, 4000, 4001, 6000. This set includes values right at the boundary of each partition as well as just above, ensuring that the boundary conditions and the behavior just inside the upper bound of each partition is tested.

User Mergesort
by
7.9k points
3 votes

Final answer:

The set of test inputs that achieves the best equivalence partition coverage for the fitness app would be Option B (1000, 2001, 4000, 4001, 6000), which tests the boundaries and just beyond for each partition.

Step-by-step explanation:

The student is inquiring about which set of test inputs would provide the best equivalence partition coverage for a fitness app's feedback system based on the number of steps counted. In testing, equivalence partitioning is a method that divides input data into partitions of equivalent data from which test cases can be derived. For the given feedback system, the partitions are defined by the range of steps that trigger different feedback messages. Therefore, the best set of test inputs would include values that are just within each partition and also on the boundaries between partitions.

The different feedback messages are triggered at the following step counts:

  • Up to 1000 steps: Couch Potato!
  • Above 1000 and up to 2000 steps: Lazy Bones!
  • Above 2000 and up to 4000 steps: Getting There!
  • Above 4000 and up to 6000 steps: Not Bad!
  • Above 6000 steps: Way to Go!

Considering the need to test boundary cases and values within partitions, the set of inputs from Option B (1000, 2001, 4000, 4001, 6000) appears to offer the best coverage. It tests both the lower and upper boundaries of each partition as well as values just beyond these boundaries.

User Porkbutts
by
7.6k points