Simple Coffee Vending Machine Test Cases
Overview
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.
Machine Components
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
- Motor
- Microcontroller
- 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.
Use cases
The main actors of the system:
- Customer
- Machine operator
Test cases
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.
Related Links
ATM Test cases
https://www.testingdocs.com/atm-test-cases-automated-teller-machine/