Simple Coffee Vending Machine Test Cases
This tutorial outlines sample test cases for a simple coffee vending machine. Coffee machine can provide many features for the customer. We will stick to a basic machine in this example.
Let’s look into some of the important Coffee machine components to understand the system better. A better understanding of the system under test yields effective test cases.
- Machine Body
- Smart card reader
- Water heating Unit
- Container , etc
The Coffee Vending Machine controller is a Finite State Machine(FSM). Let’s assume the machine is capable of making two coffee recipes by default:
- Cappuccino( Strong /Regular)
- Espresso (Strong /Regular)
However, the machine operator can add new coffee recipes to the machine. A coffee recipe consists of recipe name, coffee powder units in table spoons, milk in ml, super in table spoons, and recipe price in dollars.
The main actors of the system:
- Machine operator
The main intended purpose of the coffee machine for the customer is to make coffee.
Functional Test Cases
Verify that when user deposits money and select the coffee recipe in the menu, the machine should dispense the selected coffee drink to the customer.
Verify that coffee is not dispensed, when the customer does not enter enough money. The money should be returned to the customer.
Verify that upon insufficient inventory, the machine should display an error message to the customer.
Verify that invalid coins are ejected out to the customer.
GUI Test Cases
Verify the Display Menu options for Cappuccino and Espresso.
Verify that the buttons are working properly.
ATM Test cases