Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

International Marketing And Export Management

Authors: Gerald Albaum , Alexander Josiassen , Edwin Duerr

8th Edition

1292016922, 978-1292016924

More Books

Students also viewed these Programming questions

Question

please dont use chat gpt 1 8 4 .

Answered: 1 week ago