Reference no: EM133673708
Task: Equivalence class testing using JUnit
Overview
In 3.2P task you have done boundary value analysis for the date increment/decrement problem to validate if a correct next (or previous) date is generated for a given initial date. In this task, you will need to do the same but create test cases using equivalence class test strategies which may include logically grouping the variables into several meaningful classes. You will need to use JUnit to write test cases. Prepare an equivalence class test case for any of Deakin's webpages (can include unit site, OnTrack or any other sitting within Deakin) testing implementation is not required for this part.
Submission details
Use the instructions on the following page to carry out this task's steps.
For this task you will need to reuse the existing project task3_2P.zip which has DateUtil.java file where DateUtil class represents date information consisting of 3 variables day, month and year. The value range of day: 1<=Day<=31, month: 1<=Month<=12, and year: 1700<=Year<=2024. DateUtil class has member functions to increment or decrement 1 day from the given day. You need to create test cases from equivalence classes and implement them in JUnit.
Submit a pdf combining below items
A screenshot of your Eclipse IDE's (i) JUnit tab which shows test statistics including Runs, Errors and Failures and (ii) Eclipse console which shows outputs.
Your program's source code for tests (DateUtilTest.java).
Equivalence class test case prepared for any of Deakin's internal website pages with justification why this kind of testing is suitable.
A screenshot of your GitHub page where your latest project folder is pushed.
You want to focus on the following key ideas, and make sure you can explain them in relation to your program.
Equivalence class testing
Unit test case creation using JUnit.
Instructions
For this task you will need to
Download task3_1P.zip Java project and unzip it in a common folder (say, java_projects) which you will be using to store all the weekly projects.
Import the project (as a maven project) in Eclipse IDE. Once imported, you can rename the project to task3_2C by rightclick on project folder in Eclipse > Refactor > Rename.
Follow the steps mentioned in 3.1P to understand DateUtil.java and its test file.
Design equivalence classes for 3 variables day, month and year where days can be divided into 4 classes D1: day between 1 to 28, D2: 29, D3:30 and D4: 31. Month can be divided into equivalence classes of months having 30 days, 31 days and month of February. Years can be divided into years with or without a leap year.
There are 2 test failures that you need to correct by providing your name and id in the first 2 test cases.
Run the test, take screenshot of test statistic.
Upload your folder to your GitHub account and take a screenshot.
Your Task
Your task is to:
Design equivalence classes for the boundary conditions of DateUtil for 3 variables day, month and year. Use 3.1P as a base project.
You need to program test cases according to the equivalence classes you designed.