I have a software requirement like "User shall be give a warning if value entered is >100" The requirement does not speak anything about the higher value. So obviously it is an open boundary condition. So how shall we conduct testing with invalid condition? What is the higher value I can consider for testing?
There is difference between Boundary Testing and Equivalence partitioning. With Equivalence, 101 will suffice. For Boundary, you'll need to know (or best guess) the data type. For example, if it is an INT, you can test a value larger than an INT supports. Normally, in this case the number would 'wrap around' to the negative end.
If requirements coverage is your testing goal then any number >100 will do, such as 101. If you wish to be more thorough, then a list of commonly mishandled values such as this one can be a useful starting point.
If the value is a floating point or double type then I would suggest the following list of test values:
- At & Over Limit: 100, 100.0000000000001 (number of zeros depending on the resolution of your float type at 100) & 101
- Under Limit: 99.999999999999 (number of nines depending on the resolution of your float type at 100), 99, 0.0 (always worth checking), -99, -100, -101
- Special numbers that the developer may have got wrong, e.g.: 256, 32769, 65536, MAXINT+1, MAXLONG+1
- Bad Floating Point Numbers: +INF, -INF, NAN, SNAN - the question arises what is the code supposed to do in these cases.