Virtual Vending Machine Test Cases
a) Click on appropriate coin denomination button. For example if you click on a quarter, then it should deposit a quarter.
b) For every quarter that is deposited, the display amount should increase by quarter.(25, 50, 75 etc..)
c) In the same way, if you select a 1 $ should need a dollar.
d) If you click on any dispense button on the machine with out depositing sufficient funds, then nothing should happen.
e) But with enough funds, the dispense button is clicked, then the particular item should dispense that item.
f) If you deposit more money that required for a particular item, then after dispensing that item, the remaining amount will be returned.
g) If you insert a $ bill and click on coin return, the exact change should be returned.
- Normally the vending machine should have the following options.
- A dispens button
- A button with “coin return”
- A dispenser
- Dispenser for coin return
- A coin slotter
- A bill slotter
The above are the possible test cases for a vending machine. And apart from the above, there can be many test cases but it is upto the project requirement that how many test cases you want.