Code coverage

Instructions

The required software is already installed on attu.cs.washington.edu, if you prefer to do the exercise there.

  1. Team up in groups of size 2.

  2. Assign yourself to the correct (In class-Coverage) group on Canvas. (If you are in a Canvas group of size 1, you can still submit).

  3. Clone https://bitbucket.org/rjust/coverage and read its README.md file and ASSIGNMENT.md file.

  4. Upload the deliverables to Canvas. Please list all group members in the deliverable.

Deliverables

  1. A plain-text file (or PDF) with your answers to the four questions in ASSIGNMENT.md. Please list all group members.
    • Please name your submission as coverage_written_group<group_number>.pdf, where is your group number shown on Canvas. E.g. coverage_written_group1.pdf.
  2. An archive (zip) of your git repository (compressed .git folder), which contains the four tagged commits for your developed test suites.
    • Please name your submission as coverage_code_group<group_number>.zip, where is your group number shown on Canvas. E.g. coverage_code_group1.zip.

Notes

Java Version Verification

If you decide to run on your own machine, please make sure your Java version is below 22. You may run the following command to check your current Java version:

java -version

If you are uing attu for this excercise, you do not need to worry about it as it uses JDK 21.

Commiting Your Changes

You should commit your changes as to tag them properly, but please do not push them! Unless you managed to fork the repo or updated your project source to your own repo, pushs will be directed to the original version.

Helpful Tips

Running Triangle tests from the terminal

Run these commands from the Triangle root directory, which contains the build.gradle build file.

  1. Run ./gradlew test to run the tests and compute coverage results.

  2. View the coverage report.

Tagging Commits on Git

You can tag a specific git commit by running the following commands.

First, check the hash of the commit you would like to tag:

git log --oneline

You should see something like:

410df50 SC
2a24703 (origin/master, origin/HEAD) Update: `@Ignore` -> `@Disabled`
4ab15e6 Update: `@Ignore` -> `@Disabled`
32cbbad Ensure Jacoco test reports are generated on attu@
3b64ac3 Ensure project runs on Java versions up to 21
c8d0e30 Remove mentions of ant

Then, copy the commit hash you would like to tag, and add a tag to it by running:

git tag <tag_name> <commit_hash>

For example,

git tag SC 410df50

Zipping Your Project for Submission

Please zip the entire project for submission. To do that, run the following command from the parent directory of the project root:

zip -r coverage_code_group<group_number>.zip coverage 

Where <group_number> is your group’s number in Canvas.