资源预览内容
第1页 / 共31页
第2页 / 共31页
第3页 / 共31页
第4页 / 共31页
第5页 / 共31页
第6页 / 共31页
第7页 / 共31页
第8页 / 共31页
第9页 / 共31页
第10页 / 共31页
亲,该文档总共31页,到这儿已超出免费预览范围,如果喜欢就下载吧!
资源描述
Coffee MakerThe 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. 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 DescriptionExpected Results Actual Results checkOptions1Precondition: Run CoffeeMaker Enter: Menu option 0, Exit Program Exits checkOptions2Precondition: Run CoffeeMaker Enter在: Menu option 1, Add a recipe Add Recipe FunctionalitycheckOptions3Precondition: Run CoffeeMaker Enter: Menu option 2, Delete a recipe Delete Recipe Functionality checkOptions4Precondition: Run CoffeeMaker Enter: Menu option 3, Edit a recipe Edit Recipe Functionality checkOptions5Precondition: Run CoffeeMaker Enter: Menu option 4, Add inventoryAdd Inventory Functionality checkOptions6Precondition: Run CoffeeMaker Enter: Menu option 5, Check inventoryInventory Displays checkOptions7Precondition: Run CoffeeMaker Enter: Menu option 6, Make coffeeMake Coffee Functionality addRecipe1Precondition(前期条件): Run CoffeeMaker Enter: Menu option 1, Add a recipe Name: CoffeePrice: 50Coffee: 3Milk: 1Sugar: 1Chocolate: 0Return to main menu. Coffee successfully added.addRecipe2Precondition: Run CoffeeMaker Enter: Menu option 1, Add a recipe Name: Mocha Price: -50Return to main menu. Mocha could not be added. Price can not be negative. addRecipe3Precondition: Run CoffeeMakerEnter: Menu option 1, “Add a recipe”Name: Coffee Price: 50Coffee: 3Milk: -1Suger: 1Chocolate: 1Return to main menu.咖啡不能被增加,因为牛奶为负数。addRecipe4Precondition: Run CoffeeMakerEnter: Menu option 1, “Add a recipe”Name: Coffee Price: 50Coffee: 3Milk: 1Suger: -1Chocolate: 1Return to main menu.咖啡不能被增加,因为糖为-1份。addRecipe5Precondition: Run CoffeeMakerEnter: Menu option 1, “Add a recipe”Name: Coffee Price: 50Coffee: 3Milk: 1Suger: 1Chocolate: -1Return to main menu.咖啡不能被增加,因为巧克力为-1份。addRecipe6Precondition: Run CoffeeMakerEnter: Menu option 1, “Add a recipe”Name: MochaPrice: 50Mocha: 3Milk: 1Suger: 1Chocolate: 0Return to main menu.Mocha不能被增加,因为Mocha与Coffee名字不相同,其他条件一样。addRecipe7Precondition: Run CoffeeMakerEnter: Menu option 1, “Add a recipe”Name: CoffeePrice: 50Mocha: 3Milk: 1Suger: 1Chocolate: 0Return to main menu.Coffee不能被增加,因为上面的名字是Coffee,下面的份数是Mocha(名字不匹配)。addRecipe8Precondition: Run CoffeeMakerEnter: Menu option 1, “Add a recipe”Name: MochaPrice: 50Coffee: 3Milk: 1Suger: 1Chocolate: 0Return to main menu.Mocha不能被增加,因为上面的名字是Mocha,下面的份数是Coffee(名字不匹配)。addRecipe9Precondition: Run CoffeeMakerEnter: Menu option 1, “Add a recipe”Name: CoffeePrice: 0Coffee: 3Milk: 1Suger: 1Chocolate: 1Return to main menu.Coffee不能被增加。因为价格它的价格为零,而它的份数为3,并加牛奶、糖、巧克力各一份。addRecipe10Precondition: Run CoffeeMakerEnter: Menu option 1, “Add a recipe”Name: CoffeePrice: 50Coffee: 3.5Milk: 1Suger: 1Chocolate: 1Return to main menu.Coffee不能被增加。因为Coffee的份数不为整数。addRecipe11Precondition: Run CoffeeMakerEnter: Menu option 1, “Add a recipe”Name: CoffeePrice: 50Coffee: 0Milk: 1Suger: 1Chocolate: 1Return to main menu.Coffee不能被增加。因为Coffee的份数为零。addRecipe12Precondition: Run CoffeeMakerEnter: Menu option 1, “Add a recipe”Name: CoffeePrice: 50Coffee: -3Milk: 1Suger: 1Chocolate: 1Return to main menu.Coffee不能被增加。因为Coffee的份数为负数。addRecipe13Precondition: Run CoffeeMakerEnter: Menu option 1, “Add a recipe”Name: CoffeePrice: 50Coffee: 3Milk: 100Suger: 1Chocolate: 1Return to main menuCoffee不能被增加。因为牛奶加得太多,超过了CoffeeMaker的容量。addRecipe14Precondition: Run CoffeeMakerEnter: Menu option 1, “Add a recipe”Name: CoffeePrice: 50Coffee: 3Milk: 1Suger: 100Chocolate: 1Return to main menuCoffee不能被增加。因为糖加得太多,超过了CoffeeMaker的容量。addRecipe15Precondition: Run CoffeeMakerEnter: Menu option 1, “Add a recipe”Name: CoffeePrice: 50Coffee: 3Milk: 1Suger: 1Chocolate: 100Return to main menuCoffee不能被增加。因为巧克力加得太多,超过了CoffeeMaker的容量。addRecipe16Precondition: Run CoffeeMakerEnter: Menu option 1, “Add a recipe”Name: CoffeePrice: 50Coffee: 3Milk: 100Suger: 100Chocolate: 100Return to main menuCoffee不能被增加。因为牛奶、糖、巧克力加得太多,超过了CoffeeMaker的容量。addRecipe17Precondition: Run CoffeeMakerEnter: Menu option 1, “Add a recipe”Name: CoffeePrice: 50Coffee: 3Milk: 1Suger: 1Chocolate: 1Haeln
收藏 下载该资源
网站客服QQ:2055934822
金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号