Code Coverage#643
Conversation
…tring so that nothing is removed from the coverage results if it is not Phase 3-4.
…ed line coverage checking if not for unitTests.
# Conflicts: # src/main/java/edu/byu/cs/autograder/test/TestGrader.java # src/main/java/edu/byu/cs/autograder/test/TestHelper.java
…e files showing if they have good coverage or not
…nd remove phase 6 partial credit
19mdavenport
left a comment
There was a problem hiding this comment.
I don't know if my feedback is wanted, but I noticed a couple of things that may be helpful.
In addition to the other two comments on lines, I noticed in several places you added the coverage config stuff to the "penalty" section in the config. I understand you may not want to add a whole new config endpoint, request, and other things, but do the code coverage settings qualify as penalties?
| if (coveragePercent > extraCreditPercent) { | ||
| return 1.05F; | ||
| } |
There was a problem hiding this comment.
Might you want the extra credit to be configurable from the frontend as well, rather than hardcoding it?
There was a problem hiding this comment.
extraCreditPercent is configurable! If it can't grab it from the dao though it defaults to 90%
There was a problem hiding this comment.
Oh wait did you mean the score?
I'll take your feedback! I figured they could qualify as penalties because if they don't reach a certain coverage their score is penalized :) |
Overview
Resolves #398. NOTE: this PR should not be merged until all other instruction has been updated and we are ready to start grading students on this requirement.
This PR changes how unit tests are graded, rather than counting numbers of tests, it evaluates the coverage on an area of source code that is relevant to the phase. The formula for grading is (student coverage / expected coverage). The idea is that unit tests are now graded on quality not quantity.
Details
Testing
Dependencies
The softwareconstruction repository with the instruction should be changed at the same time this goes into effect.
Future Work
Dr. Wilkerson has stated that we still may want to scan the code for bogus test assertions.
Additional Notes
Big shout out to @ZakkeryDaRebel for taking responsibility over this for a short while and @19mdavenport for writing the code that actually collects the coverage.