Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

CPIT 4 5 5 _ Lab Assignment 1 : Unit Testing with JUnit Objective: This lab assignment aims to help you apply Test - Driven

CPIT455_Lab Assignment 1: Unit Testing with JUnit
Objective:
This lab assignment aims to help you apply Test-Driven Development (TDD) practically,
implement unit testing principles using JUnit testing framework, Test Suites,
Parameterized Testing, and running tests efficiently.
Task:
1. Create two classes. Choose entities and create 2 Java classes. (avoid using the
examples from lab such as Calculator, Person, Shape)
2. In each class write one method related to the chosen entity. Only write the method
header. DO NOT write the code for the methods.
3. Follow TDD steps by writing the tests before the code. For each method, write at
least four test cases using manual testing principles. Consider various conditions,
inputs, and edge cases.
4. Create a two different test class to verify the functionality of each methods.
5. Translate your manual test cases in step 3 into JUnit test methods using
parameterized testing to test different input values effectively.
6. Organize your test classes into a Test Suite to group related tests and manage them
efficiently.
7. Write a Java class to run all your JUnit test methods from a single-entry point. Use
proper methods to create a simple report about the performance of your written
tests (All tests must be failed in this point since you did not write the code for the
methods). Take a screenshot of the output.
8. Write the code of the methods from step 2.
9. Re-run the main test class in step 7. You should have some tests that will pass
successfully. Take a screenshot of the output.
Submission:
PDF file: Include brief description of your chosen classes and the methods, manual
test cases, and screenshots from step 7 and 9.
The classes:
o 2 java classes
o 4 test classes
NOTE: DO NOT upload your work as zip file.
Please attach each file individually

Step by Step Solution

There are 3 Steps involved in it

Step: 1

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

Expert Oracle Database Architecture

Authors: Thomas Kyte, Darl Kuhn

3rd Edition

1430262990, 9781430262992

More Books

Students also viewed these Databases questions

Question

1. What are the peculiarities of viruses ?

Answered: 1 week ago

Question

Describe the menstrual cycle in a woman.

Answered: 1 week ago