Write My Paper Button

WhatsApp Widget

Write My Paper Button

WhatsApp Widget

Project 5. You will write a report with the following sections where you will compare and contrast the test cases created by each GenAI system with respect to: 1. Did they achieve complete code and data coverage?

Project 5

Students will be given a specification document and a working Java program. They will download the program to Eclipse where they will be expected to unit test it. Unit test will be done by implementing JUnit tests. The deliverables will include a report on unit test to include the JUnit source code of test cases. See below if you want to use Python.

You can use the help of a GenAI system if you wish but ne sure to validate the test cases to ensure 100% code and data coverage.

Start by reviewing Project5-Instructions.docx

I also created a video using a Rectangle class and Junit Tests. Here is the link (really long URL): https://cdnapisec.kaltura.com/p/1971581/sp/197158100/embedIframeJs/uiconf_id/30406302/partner_id/1971581?iframeembed=true&playerId=kaltura_player&entry_id=1_7p8dd1lh&flashvars[streamerType]=auto&flashvars[localizationCode]=en&flashvars[leadWithHTML5]=true&flashvars[sideBarContainer.plugin]=true&flashvars[sideBarContainer.position]=left&flashvars[sideBarContainer.clickToClose]=true&flashvars[chapters.plugin]=true&flashvars[chapters.layout]=vertical&flashvars[chapters.thumbnailRotator]=false&flashvars[streamSelector.plugin]=true&flashvars[EmbedPlayer.SpinnerTarget]=videoHolder&flashvars[dualScreen.plugin]=true&flashvars[Kaltura.addCrossoriginToIframe]=true&&wid=1_1sfhzsjp

Note: Project-Junit-Tutorial.mp4 talks about pulling in MyStringUtils.java but in fact for this project you will be pulling in and writing tests for StringUtils.java

Grading Criteria

Project 5: Unit Test

  1. (15 points). Report contains a thorough, clear, and complete description of how unit test was approached and key criteria for successful unit test. All questions are answered thoroughly and completely.
  2. (25 points) Report includes a complete or close to complete list of needed unit test cases for 100% code coverage, that cover the specification and source code and the test cases are described clearly, correctly, and completely along with expected and actual results.
  3. (25 points) Report includes a complete or close to complete list of needed unit test cases to meet adequate data coverage, that cover the specification and source code and the test cases are described clearly, correctly, and completely along with expected and actual results.
  4. (15 points) Report includes a complete or close to complete list of defects, that should be found by unit test and was found by running the tests. The defects are explained well and completely. Each defect correctly indicates which JUnit test found the defect.
  5. (20 points) JUnit test cases are well written (syntax-error free) and test what was intended. The test methods names are meaningful and each test has a brief description what the test is testing. All test methods are in a single java file

If you want to use a generative AI tool (i.e., chatPT) to help with the development of the unit test cases, then I want you to use two different ones, and create a report for each project. You can also use Python, but you have to do one extra step and that is to covert the java source to Python (which should not be too difficult – you can use a GenAI tool to help with this effort). Then instead of using Junit 5 you use Python unittest.

Project 5.

You will write a report with the following sections where you will compare and contrast the test cases created by each GenAI system with respect to:

1. Did they achieve complete code and data coverage?

2. Which test cases were omitted?

3. Where there any test cases generated that didn’t make sense for the code being tested?

4. How many faults were found by each? Which faults if any were missed?

5. Did you have to add test cases that the system missed?

6. Was it able to generate the test cases from the code alone, or did you have to supply the system with additional information?

You may also use GenAI/LLM tools for Project 6.

You will submit the following report along with the .java source files and the data file.

 

 

More Instructions:

 

I fully expect that students will be using one or more GenAI or Agentic AI tools to create the unit tests. Therefore, you must list in section 1.1 of the report template which GenAI/Agentic AI tool(s) you employed, and include the prompts, and any subsequent modification to prompts you had to give the system. NOTE: you must ensure you have 100% code and data coverage, so ensure the AI system generated all unit tests accordingly.

I would also suggest that your team inspect the code to ensure all your unit tests cover all code and data paths. Code inspection will also reveal all of the bugs.