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
Step: 1
It seems like you are looking for guidance on writing test cases using JUnit for the CoffeeMaker pro...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started