![]() ![]() CVV numbers that are correct, incorrect, an invalid length, and blank.Ī card might have an unreadable strip or be damaged.Expiration dates that are valid, expired, not expired but incorrect, and blank.Credit card numbers that are valid, invalid, an invalid length, and blank.We should test a few areas:įrom swiping and manual entry, the system should correctly handle: Tests that check if the system works with valid input are called positive tests, and tests that check if the system gives the correct behavior for invalid input are called negative tests. ![]() We need to also make sure the system rejects invalid cards and gracefully handles cases when things go wrong. It won’t be enough to see if the system takes a valid credit card and processes a payment. It would give us a good idea that the basic logic works, but we might miss off-by-one errors if we’re not careful about the edges of the ranges.Īt a minimum we should test all these inputs at the boundaries of our ranges: So is testing any 5 numbers in our 5 ranges enough? This technique of identifying ranges is called equivalence partitioning. To our method, all the numbers between 21 and 900 are effectively equivalent. Identifying these ranges is useful because testing only the five numbers -1, 0, 10, 50, and 901 would be more effective than testing hundreds of numbers between 21 and 900. Having 50 pies left over might be a normal disappointing day, but something’s seriously wrong if we have a billion unsold pies, right? Let’s say the most pies we can bake in a day is 900, so we’ll treat anything over 900 as invalid input. We should also ask the interviewer if there’s an upper bound on the input. Specifically, we care about these ranges of the number of pies left over: This'll help us choose which inputs to test. For this method, different ranges of inputs lead to different behavior. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |