319,165 views
25 votes
25 votes
Given a numeric positive integer field with a maximum theoretical value of 100, which values would you use to verify that it works correctly?

User Initialxy
by
2.7k points

1 Answer

22 votes
22 votes

Answer:

To verify that a numeric positive integer field with a maximum theoretical value of 100 works correctly, you can use a variety of test cases. Some possible test cases include:

The minimum possible value: 0

The maximum possible value: 100

A value near the minimum: 1

A value near the maximum: 99

A value in the middle of the range: 50

A prime number within the range: 67

A composite number within the range: 36

An odd number within the range: 73

An even number within the range: 72

A value that is not a number (e.g. "abc", "1.2", etc.): this is not a valid test case, as the field is for numeric positive integers only.

It is generally a good idea to test the boundaries and edges of the expected input range, as well as some values within the range, to ensure that the field is functioning correctly.

Step-by-step explanation:

User Pratik Bhajankar
by
3.1k points