Q:

Good Border Testing

If let say I created an input text that should only accept either any decimal between 1 to 100, How should I test it?
IMHO, I will test in this flow :
"0", "1","50","100", "101", "0.9", "100.1", "A"
Is these enough? Are there a structured flow how to test this kind of border testing? (any good article?) Should I also test "1+1"?
What if the question changed to "to accept any integer between 1 to 100", is this series of testing enough? Does the series of input need to be different from testing a decimal? 
"0", "1","50", "50.5" "100", "101", "0.9", "100.1", "A"

A:

For #1, you're on the right track and I think you may even have too many cases that are in equivalent classes.  Typically, if you have a lower bound L and an upper bound U, it's sufficient to test that L and U are valid and that L - e and L + e are invalid (where e is the smallest or reasonably small increment to get out of the boundary).  If you want to add an extra value for sanity, then testing for something between L and U works as well.  Some will say that choosing a random value between L and U works as well, but I prefer my tests to be deterministic.  
So in the example above, L is 1 and U is 100.  Since it's a decimal value, the value of e is tricky since e can theoretically be infitessimally small.  There it's good to choose something reasonable that's informed by your customer scenario. For example, if it's a dollar amount, choosing 0.01 would be a good choice.  In this case, that would leave us with "1", "100", "0.99", and "100.01".  
Since your text box can also accept letters, then it makes sense here to also test for non-numerical data like you've done above with "A".  An alternative approach to ease the testing burden is to design your customer experience to only allow valid values.  In the integer case, one way to do this would be to use a combo box that only has integral values between 1 and 100.  
For #2, the scenario does change a bit.  L is 1 and U is 100, but e is now 1 because the only valid values are integer values.  If you want to test that decimal values throw errors, that's a different class of cases and isn't related to the boundaries.  So "50.5" and "A" would be sufficient for error conditions.  Or if you want to round decimals you can test that as well.

