You are testing a computerized gas pump that allows users to pay using credit cards. Four types of cards are accepted:
- Visa
- Mastercard
- Discover and
- American Express
The pump will reject any other type of card.
- If given an accepted credit card, the pump validates the card.
- If the card is valid, the pump is turned on and the customer is told to begin pumping gas.
- The pump remains on until the transaction ends. The transaction ends when one of the following events occurs:
- Pump handle is returned to pump
- Amount reaches transaction limit for card
- No gas is pumped within two minutes of validation of card
- Emergency shut-off switch is thrown by the station attendant
Assume that a test is consists of a triple set of values.
- card type,
- card validity,
- transaction ending
Design the minimum number of tests needed to cover all the equivalence partitions for each card brand, including both valid and invalid cards of each accepted type, along with covering each equivalence partition for transaction endings.
How many tests do you need?
- 4 Tests
- 5 Tests
- 9 Tests
- 17 Tests
The correct answer given was 9 Tests
My Question is : What is the reason behind the answer?
My assumption is
- 4 Tests for valid Visa, Mastercard, Discover and American Express.
- 4 Tests for invalid Visa, Mastercard, Discover and American Express.
- 1 Test for any other type of card
- Transaction ending events (Pump handle is returned to pump, Amount reaches transaction limit for card, No gas is pumped within two minutes of validation of card, Emergency shut-off switch is thrown by the station attendant) will be tested with the above 9 Test Cases.
Is my assumption correct? or is there any other school of thought that should be exercised when it comes to questions like this?
Thanks
PS : Those who are interested can read the original question here : http://m.softwaretestinggenius.com/?page=details&url=istqb-advanced-level-test-analyst-and-technical-test-analyst-exam-sample-paper-q-111-to-120