views:

10

answers:

0

Hi All

I'd be interested in people's thoughts on what assumptions are reasonable when deciding on equivalence partions for black box test inputs.

To keep things simple, let's say we have a command line app, and it can do five tasks. Upon running the app, the user selects which task he wants to perform by entering 1,2,3,4 or 5. Once the task has been selected, he is prompted for further input, depending on what the task is.

Let's say all tasks involve the user at some point inputing an integer. Clearly, we need equivalence classes here for valid and invalid input. Is it reasonable to assume that the same code will handle the integer input in all cases? If so, one would only need to test these equivalence classes in one of the 5 cases. However, if the coder had implemented duplicate code to do the integer input handling, we'd only be testing in of the five places we need to. Some code coverage analysis would highlight this further down the line.

However, we could be more pessimistic, and decide to make 5 pairs of equivalence partitions, one pair for each initial option. This would be safer, but might be overkill at a stage when trying to limit the number of test cases required is the name of the game.

What would you think is reasonable? Thanks Henry