228k views
2 votes
In this unit, you learned that test generators can be very helpful when trying to determine if a code runs properly or fails in some situations. For example, let’s say that you were writing a program where the user would input their test grades and the program would tell them their average. What kinds of data would a test generator want to test for that program to be sure that it would work in all situations?

1 Answer

4 votes

Answer:

Using boundary value analysis and assuming the valid range of test scores is [0 - 100],

  • min value, min value + 1
  • -1 and 0
  • A Nominal value between (0, 100)
  • 100 and 101
  • max value - 1, max value

In Boundary value analysis, we test the transition points where the program's behavior is expected to change. These transition points are the boundaries of valid and invalid partitions.

Min and max value are the smallest and largest possible values that you can store in your data type being used. This varies depending on the data type, so without knowing which you are using (and which language), I can't be more specific.

User Oliver Keyes
by
8.5k points