Homework Assignment #4 — Unit Testing

In this assignment, students will practice mutiple aspects involved in unit testing, including (1) how to think through test cases for a given application and (2) how to implement unit test cases for a given program/project.

NOTE: this homework webpage will give you a high-level introduction of HW4. Detailed HW4 instructions will be emailed to every single student through emails. Shortly after HW4 is open, every student will get a link for a GitHub repository via email: this repo will list all the detailed instructions and materials for HW4. The subject of the email is: [CS4278-HW4-G{i}]Your HW4 Instruction Link. Here i can be 1, 2, or 3.

Important logistics for HW4:

This homework is based on Java JUnit 5. You are expected to work on it in Eclipse for Java (the version does not matter). If you don't have Eclipse on your computer, you can download a version from the official website (you can also just Google "eclipse download"): https://www.eclipse.org/downloads/packages/ . The regular Eclipse IDE for Java Developers will suffice. Please choose the one that is suitable for your own computer (x86 or Arm64).

High-Level Task Intro for HW4

Here we introduce the high level design of HW4:

You will work on two tasks in HW4: Task 1 - MarsRoverAPI (recommended time: 20min); Task 2 - BowlingScoreKeeper (recommended time: 60min). You are required to record your screen when you work on both tasks, and then submit all the files as guided in the GitHub link.

IMPORTANT: Recommened Work Flow for HW4

  1. Read through this webpage to have a high-level idea about HW4.
  2. Make sure you have Eclipse installed on your computer.
  3. Go to the GitHub repository sent to you via email.
  4. Scan through the instructions in the GitHub repo first to have an idea about what you will see and what you will submit in HW4.
  5. Feel free to practice how to do screen recordings on your computer following the instructions.
  6. Go to Task2-BowlingScoreKeeper, make sure you understand how Bowling scoring works before you start recording.
  7. Then please start recording, and work on the two tasks (you MUST work on Task 1 first, then Task 2). You are expected to TRY YOUR BEST for two tasks (i.e., "this is all I can do to provide the highest quality of unit test cases, thus I will stop here").
  8. After you finish both tasks, stop recording and finish the final survey. Make sure you submitted all files to the Box.

Grading

Since HW4 is purposed to practice unit testing but also different exercise strategies, your baheviors will be used to adjust the future design of this homework. Thus, for your contribution, we will be generous on grading for HW4: We expect the majority of students to provide decent unit test cases. We will only give penalty when "absolute low quality" happens. For example, while the majority of students can provide at least N test cases, you put down way less test case or something that is irrelavent to the homework, then we will cut off your points accordingly. Otherwise we prefer giving full credits to our students.

Overall, Task 1 has 10 points in total and Task 2 has 20 points in total. The video recording is 10 points. The final survey is 5 points.

We apply extra credits (1 point directly added to your final grade of this course) to the top 10% of the students in each group, to encourage students to TRY YOUR BEST in unit testing.

FAQ

In this section, we list some potential questions students might have for HW4:

  1. Question: It says the recommended time for Task 1 is 20min, 60min for Task2. What if I take longer time than that?

    Answer: It is not the end of world if you take longer than the recommended time. It is just based on empirical data, the recommended time is suffcient for students to finish the tasks. As long as you finish the two tasks in continuous time block, you should be fine. Just remember that if you took too long, your screen recording will be way too large and you will have problems submitting your video.

  2. Question: When I submit my files to Box, I accidentally forgot to include something in the zip file, can I resubmit my files to Box?

    Answer: Sure. But Box will not allow you to remove the old version, so you just need to add "_FINAL" to your new file name and let us know this is the final version.