New Java autograder
Posted on 2024-07-23 by Matt West
Jonatan Schroeder has implemented a new Java autograder for PrairieLearn. While courses will always be able to use custom autograders, this provides a robust and secure reference implementation that courses can use directly, or as the basis for their own code.
To test out the new autograder, try the demo/autograder/java/square and demo/autograder/java/helloWorld questions in the example course.
The autograder is based on JUnit 5 tests, and supports individual JUnit 3/4/5 test classes, as well as the use of question-level or course-level Java libraries.
The new autograder is included by default in the
grader-java
docker image. To take advantage of it you can edit
your question's info.json
file to include:
"externalGradingOptions": {
"image": "prairielearn/grader-java",
"entrypoint": "autograder.sh"
}
To read more about new grader features you can check out the documentation.