Autograding can help both students and instructors focus on what truly matters: learning and teaching. In this blog post, we’ll walk you through an example Java assignment—building a doubly linked list—and show you how to configure CodeGrade to automatically grade your students’ submissions.
Overview of the Assignment
In this example assignment, students will develop a doubly linked list in Java, focusing on both functionality and code quality. The core requirements include:
- Core List Operations
- Checking if the list is empty
- Adding elements to the beginning or the end
- Swapping nodes
- Sorting Functionality
- Implementing a basic sorting algorithm (e.g., Bubble Sort) to arrange elements in ascending order.
- Main Method
- Accept user input to populate the list
- Display both the original and sorted versions of the list
This assignment is evaluated via a detailed multi-faceted rubric that checks whether the code:
- Compiles and runs without errors
- Produces correct results for given inputs (through I/O tests)
- Is well-structured and organized
- Passes unit tests at the component level (using JUnit5)
- Adheres to established coding standards for readability and maintainability
Why Autograding?
By using CodeGrade’s powerful AutoTest feature, your students receive immediate, actionable feedback on their code. This helps them learn faster through trial and error and alleviates your workload by automating many of the repetitive manual checks.
Step 1: Design Your Rubric
Before adding any tests, create a rubric in CodeGrade. This rubric:
- Guides students on your exact grading criteria
- Standardizes and streamlines the grading process
- Allows you to attach point values to specific tests (e.g., compilation, I/O outputs, code style, etc.)

Step 2: Create Automatic Tests
CodeGrade supports various types of automatic tests. In this tutorial, we will set up:
- Compile Tests
- Input/Output (I/O) Tests
- Code Structure Tests (using Semgrep)
- JUnit5 Tests
- Code Style Checks (using Checkstyle)
Setting Up the Environment
- Go to the Setup tab and add an Install Java block.
- Choose the latest version of Java from the drop-down menu.
Once your setup is ready, go to the Tests tab to configure each type of test.
.png)
%20(800%20x%20525%20px)%20(800%20x%20525%20px)%20(11).png)
%20(800%20x%20525%20px)%20(800%20x%20525%20px)%20(10).png)
%20(800%20x%20525%20px)%20(800%20x%20525%20px)%20(9).png)