The tests outlined below are the black box and acceptance test cases for the Coffee Maker Example. The CoffeeMaker is a command line interface application that will server as the software of a Coffee Maker. User Stories and Use Cases.
To run the CoffeeMaker example, run the Main class. The Main class provides the command line interface functionality that is used for testing of the back end software. Later a new class will be written that interfaces with the actual CoffeeMaker hardware, based on the functionality of the Main class.
Test ID |
Description |
Expected Results |
Actual Results |
checkOptions1* |
Precondition: Run CoffeeMaker
Enter: 0
|
Program Exits |
|
checkOptions2 |
Precondition: Run CoffeeMaker
Enter: 1 |
Add Recipe Functionality |
|
checkOptions3 |
Precondition: Run CoffeeMaker
Enter: 2 |
Delete Recipe Functionality |
|
checkOptions4 |
Precondition: Run CoffeeMaker
Enter: 3 |
Edit Recipe Functionality |
|
checkOptions5 |
Precondition: Run CoffeeMaker
Enter: 4 |
Add Inventory Functionality |
|
checkOptions6 |
Precondition: Run CoffeeMaker
Enter: 5 |
Inventory Displays |
|
checkOptions7 |
Precondition: Run CoffeeMaker
Enter: 6 |
Make Coffee Functionality |
|
addRecipe1* |
Precondition: Run CoffeeMaker
Enter: 1
Name: Coffee
Price: 50
Coffee: 3
Milk: 1
Sugar: 1
Chocolate: 0
|
Coffee successfully added.
Return to main menu |
|
addRecipe2 |
Precondition: Run CoffeeMaker
Enter: 1
Name: Coffee
Price: 50
Coffee: 3
Milk: 1
Sugar: 1
Chocolate: 0
|
Coffee could not be added.
Return to main menu |
|
addRecipe3 |
Precondition: Run CoffeeMaker
Enter: 1
Name: Mocha
Price: -50
|
Mocha could not be added. Price can not be negative.
Return to main menu |
|
addRecipe4 |
Precondition: Run CoffeeMaker
Enter: 1
Name: Mocha
Price: 60
Coffee: -3
|
Mocha could not be added. Units of coffee can not be negative.
Return to main menu |
|
addRecipe5 |
Precondition: Run CoffeeMaker
Enter: 1
Name: Mocha
Price: 60
Coffee: 3
Milk: -2
|
Mocha could not be added. Units of milk can not be negative.
Return to main menu |
|
addRecipe6 |
Precondition: Run CoffeeMaker
Enter: 1
Name: Mocha
Price: 60
Coffee: 3
Milk: 2
Sugar: -2
|
Mocha could not be added. Units of sugar can not be negative.
Return to main menu |
|
addRecipe7 |
Precondition: Run CoffeeMaker
Enter: 1
Name: Mocha
Price: 60
Coffee: 3
Milk: 2
Sugar: 2
Chocolate: -3
|
Mocha could not be added. Units of chocolate can not be negative.
Return to main menu |
|
addRecipe8 |
Precondition: Run CoffeeMaker
Enter: 1
Name: Mocha
Price: a
|
Please input an integer.
Return to main menu |
|
addRecipe9 |
Precondition: Run CoffeeMaker
Enter: 1
Name: Mocha
Price: 60
Coffee: a
|
Please input an integer..
Return to main menu |
|
addRecipe10 |
Precondition: Run CoffeeMaker
Enter: 1
Name: Mocha
Price: 60
Coffee: 3
Milk: a
|
Please input an integer.
Return to main menu |
|
addRecipe11 |
Precondition: Run CoffeeMaker
Enter: 1
Name: Mocha
Price: 60
Coffee: 3
Milk: 2
Sugar: a
|
Please input an integer.
Return to main menu |
|
addRecipe12 |
Precondition: Run CoffeeMaker
Enter: 1
Name: Mocha
Price: 60
Coffee: 3
Milk: 2
Sugar: 2
Chocolate: a
|
Please input an integer.
Return to main menu |
|
addRecipe13 |
Precondition: Run CoffeeMaker
Enter: 1
Name: Mocha
Price: 60
Coffee: 3
Milk: 2
Sugar: 2
Chocolate: 3
|
Coffee successfully added.
Return to main menu |
|
addRecipe14 |
Precondition: Run CoffeeMaker
Enter: 1
Name: Latte
Price: 60
Coffee: 3
Milk: 3
Sugar: 2
Chocolate: 0
|
Coffee successfully added.
Return to main menu |
|
addRecipe15 |
Precondition: Run CoffeeMaker
Enter: 1
Name: Hot Chocolate
Price: 60
Coffee: 0
Milk: 2
Sugar: 2
Chocolate: 3
|
Coffee could not be added.
Return to main menu |
|
deleteRecipe1* |
Precondition: addRecipe1 has run successfully
Enter: 2
Enter: 3
|
Successfully deleted
Return to main menu
|
|
deleteRecipe2 |
Precondition: Run CoffeeMaker
Enter: 2 |
There are no recipes to delete
Return to main menu |
|
editRecipe1* |
Precondition: addRecipe1 has run successfully
Enter: 3
Enter: 3
Name: Coffee
Price: 50
Coffee: 3
Milk: 1
Sugar: 1
Chocolate: 0
|
Coffee successfully added.
Return to main menu |
|
editRecipe2 |
Precondition: addRecipe1 has run successfully
Enter: 3
Enter: 3
Name: Coffee
Price: 50
Coffee: 3
Milk: 1
Sugar: 1
Chocolate: 0
|
Coffee could not be added.
Return to main menu |
|
editRecipe3 |
Precondition: addRecipe1 has run successfully
Enter: 3
Enter: 3
Name: Mocha
Price: -50
|
Mocha could not be added. Price can not be negative.
Return to main menu |
|
editRecipe4 |
Precondition: addRecipe1 has run successfully
Enter: 3
Enter: 3
Name: Mocha
Price: 60
Coffee: -3 |
Mocha could not be added. Units of coffee can not be negative.
Return to main menu |
|
editRecipe5 |
Precondition: addRecipe1 has run successfully
Enter: 3
Enter: 3
Name: Mocha
Price: 60
Coffee: 3
Milk: -2
|
Mocha could not be added. Units of milk can not be negative.
Return to main menu |
|
editRecipe6 |
Precondition: addRecipe1 has run successfully
Enter: 3
Enter: 3
Name: Mocha
Price: 60
Coffee: 3
Milk: 2
Sugar: -2
|
Mocha could not be added. Units of sugar can not be negative.
Return to main menu |
|
editRecipe7 |
Precondition: addRecipe1 has run successfully
Enter: 3
Enter: 3
Name: Mocha
Price: 60
Coffee: 3
Milk: 2
Sugar: 2
Chocolate: -3
|
Mocha could not be added. Units of chocolate can not be negative.
Return to main menu |
|
editRecipe8 |
Precondition: addRecipe1 has run successfully
Enter: 3
Enter: 3
Name: Mocha
Price: a
|
Please input an integer.
Return to main menu |
|
editRecipe9 |
Precondition: Run CoffeeMaker
Enter: 1
Name: Mocha
Price: 60
Coffee: a
|
Please input an integer.
Return to main menu |
|
editRecipe10 |
Precondition: Run CoffeeMaker
Enter: 1
Name: Mocha
Price: 60
Coffee: 3
Milk: a
|
Please input an integer.
Return to main menu |
|
editRecipe11 |
Precondition: addRecipe1 has run successfully
Enter: 3
Enter: 3
Name: Mocha
Price: 60
Coffee: 3
Milk: 2
Sugar: a
|
Please input an integer.
Return to main menu |
|
editRecipe12 |
Precondition: addRecipe1 has run successfully
Enter: 3
Enter: 3
Name: Mocha
Price: 60
Coffee: 3
Milk: 2
Sugar: 2
Chocolate: a
|
Please input an integer.
Return to main menu |
|
addInventory1* |
Precondition: Run CoffeeMaker
Enter: 4
Coffee: 5
Milk: 3
Sugar: 7
Chocolate: 2
|
Inventory successfully added
Return to main menu
|
|
addInventory2 |
Precondition: Run CoffeeMaker
Enter: 4
Coffee: -1 |
Cannot add inventory. Units of coffee can not be negative
Return to main menu |
|
addInventory3 |
Precondition: Run CoffeeMaker
Enter: 4
Coffee: 5
Milk: -1 |
Cannot add inventory. Units of milk can not be negative
Return to main menu |
|
addInventory4 |
Precondition: Run CoffeeMaker
Enter: 4
Coffee: 5
Milk: 3
Sugar: -1 |
Cannot add inventory. Units of sugar can not be negative
Return to main menu |
|
addInventory5 |
Precondition: Run CoffeeMaker
Enter: 4
Coffee: 5
Milk: 3
Sugar: 7
Chocolate: -1 |
Cannot add inventory. Units of chocolate can not be negative
Return to main menu |
|
addInventory6 |
Precondition: Run CoffeeMaker
Enter: 4
Coffee: a |
Please input an integer.
Return to main menu |
|
addInventory7 |
Precondition: Run CoffeeMaker
Enter: 4
Coffee: 5
Milk: a |
Please input an integer.
Return to main menu |
|
addInventory8 |
Precondition: Run CoffeeMaker
Enter: 4
Coffee: 5
Milk: 3
Sugar: a |
Please input an integer.
Return to main menu |
|
addInventory9 |
Precondition: Run CoffeeMaker
Enter: 4
Coffee: 5
Milk: 3
Sugar: 7
Chocolate:a |
Please input an integer.
Return to main menu |
|
checkInventory* |
Precondition:Run CoffeeMaker
Enter: 5 |
Coffee: 15
Milk: 15
Sugar: 15
Chocolate: 15 |
|
purchaseBeverage1* |
Precondition: addRecipe1 has successfully run
Enter: 6
Coffee Recipe: 3
Amount: 60
|
Your change is 10.
Return to main menu
|
|
purchaseBeverage2 |
Precondition: addRecipe1 has successfully run
Enter: 6
Coffee Recipe: 3
Amount: 40
Enter: 5
|
Your change is 40
Return to main menu
Coffee: 15
Milk: 15
Sugar: 15
Chocolate: 15
|
|
purcahse Beverage3 |
Precondition: Run CoffeeMaker
Enter: 1
Name: Coffee
Price: 50
Coffee: 16
Milk: 2
Sugar: 3
Chocolate: 5
Enter: 6
Coffee Recipe: 3
Amount: 50 |
Your change is 50
Return to main menu
|
|