Question: Writing Test Cases Using JUnit Description: Learning objectives: Create unit tests and fix defects. Use JUnit for unit-level testing to confirm defects are fixed. Use

Writing Test Cases Using JUnit Description: Learning objectives:  Create unit tests and fix defects. Use JUnit for unit-level testing to confirm defects are fixed.  Use EclEmma to measure the coverage of Unit Testing. Tasks:  Eclipse requires Java to be installed on your machine. o Recommended Java Version 8 (1.7.0 and above required). o Software installed on local computer:  Import the CoffeeMaker Junit project in Eclipse.  Write test cases for the classes Inventory, Recipe, RecipeBook. Make sure to achieve 100% coverage.  There are 5 defects in the project source files, you're required to find, fix and submit any five (5) defects in project CoffeeMaker: o For each defect: explain in 1-2 sentences of why it was a defect and what you did to fix it.  Format:  Screenshot of failed unit test (caused by defect)  Screenshot of code which caused the defect (with defect shown)  Screenshot of code after being fixed  Screenshot of same unit test passing o Hint: code coverage does not mean that you tested all of the possible cases, it just means that you tested at least one case per method  Example of what is considered a defect: o Unreachable code o Wrong/unexpected outputs or results that do not match the comments of the method o Code that does not handle edge cases (such as index out of bounds) o Anything else that you think is a defect (along with a valid argument is provided explaining why it is a defect)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

It seems like you are looking for guidance on writing test cases using JUnit for the CoffeeMaker pro... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!