A database in your company can hold records. Each record has 5 slots for qualifiers that further describe the record.
You have been tasked with testing an application that can change (but not add) qualifiers that apply to a record, according to the following set of criteria:
- The qualifiers fall within three main categories: Category 1, Category 2 and Category 3
- Category 1 qualifiers can only be of type “A”, and cannot change
- Category 2 qualifiers can either be of type “B”, “C” or blank
- Category 3 qualifiers can either be of type “D”, “E”, “F” or blank
- A record must have a Type A qualifier
- A record must have either a “B” or a “C” qualifier, but never both
- A record can have either a “D”, an “E” or an “F”. These ones are optional.
- There cannot be two qualifier slots with duplicate qualifiers
- If a type “A” qualifier tries to change to anything else, the application returns “ERROR”
- If any qualifier tries to change to a type that already exists in the record, the application returns “ERROR”
- If any Category of qualifier tries to change to a qualifier in another category, the application returns “ERROR” (i.e.: can’t turn a “B” into an “F”, even if there’s not an “F” in use)
- If any qualifier tries to change to its own type already (i.e.: no change will be done), the application returns “OK”
- If any qualifier tries to change to another valid type, and the type isn’t already in use, the application returns “OK”
For the purposes of this exercise you can assume that if you get an “OK” that the transition was successful, and that if you get an “ERROR” that the qualifiers should still be in the same state. You don’t need to do another test to check and make sure it was actually done.
What records would you need set up first? What tests would you perform? How would you get complete coverage in the fewest number of tests? Tell us how in the comments below. GO!