These Are The Autograders You’ve Been Looking For

We’ve been thinking about the problem of creating a great autograder for coding problems for quite some time now. We’re teaching about the power of computing — we want to use that to make the experience of creating and grading problems fantastic for teachers. Now on CodeHS you can easily create your own problems and autograders with our Custom Content tool.

Upgrade Your Autograding System with CodeHS

At CodeHS, we’ve now visited over 100 high school computer science classrooms all over the United States. We’ve helped teach thousands of students at Stanford and now hundreds of thousands of students online with CodeHS. We’ve seen over and over again the need for an improved grading system for coding classes.

Even the best teachers are stuck with old systems: emailing in submissions, copy-pasting student code into their own programs, printing out submissions, or not having time to actually do grading.

Even the best teachers are stuck with old systems: emailing in submissions, copy-pasting student code into their own programs, printing out submissions, or not having time to actually do grading.

Now with the new autograding tools and Custom Content feature on CodeHS, you can create any type of problem you like as well as the graders to go along with it. This tool is built for teachers who have been teaching computer science for a while but are looking for better ways to do grading, give students quicker feedback, and save lots of time.

We’re excited to tell you more about the autograders you can now use and create on CodeHS. Spend more time helping students, let students get immediate feedback, and create and customize your own problems.

Spend more time helping students, let students get immediate feedback, and create and customize your own problems.

Great Support For Easy to Create and Extensible Unit Tests

The first goal was making easy to create robust and simple unit test graders. This allows us to test functions or methods students write in a simple way.

Here are a few exciting things about our unit test autograders:

  1. They are very easy to create. You just write the starter code, solution code, and add the function calls you’d like to test.
  2. They support multiple languages, including Java, JavaScript, and Python, with more languages in the works!
  3. In Java, parameters and return types can be objects or primitives, which give you a lot more flexibility in creating problems
  4. In Java, you can create other custom classes that can be references within the unit tests that you create.
  5. You can write initial setup code for the unit tests, to allow for more advanced use cases or setting up complex objects.

Here are some visual demos of our unit test problems.

Square Method in Java

Demo this problem in the editor: https://codehs.com/editor/101270

Sum Method in Java, Using Arrays as Parameters

Demo this problem in the editor: https://codehs.com/editor/101328

Sum Method in Python

Demo this problem in the editor: https://codehs.com/editor/101330

Sum Method in JavaScript

Demo this problem in the editor: https://codehs.com/editor/101331

Java Unit Tests with Strings

Java Unit Test with Custom Student.java Class and ArrayList Parameter (more advanced)

The sky is the limit with the types of problems you can create. This shows that you can create problems with custom classes (here Student.java), use objects and containers, like ArrayList, and create custom setup code (for a list of Students).

Fully General Java Autograders (most advanced)

You can write your own general Java test code to test student submissions. We provide a few methods to hook into the autograder UI, and then all problems can be immediately graded. Here we wrote custom code to test a getPerimeter() method.

Try it out Today!

As you can see, there’s lots you can do with our new autograders. They give students immediate helpful feedback, and allow you to customize your own course. To try out these problems in action visit our AP Computer Science in Java course here.

If you’d like to create your own problems and autograders, visit your teacher page, and then click Custom Content. You can also go directly there with this link. With the Custom Content tool you can create all the problems we’ve demonstrated above, as well as view the short tutorial videos on how we created them below.

If you have feedback, please let us know at hello@codehs.com.


Short Videos on How to Make Autograders

These short videos show you how all of these problems were made, usually just in a few minutes.

Create a Problem to Write a Square Method (1min, 44 seconds)

Create a Problem to Write a Sum Method in Java, Using Arrays as Parameters (2 min, 11 seconds)

Creating a Problem to Write a Sum Method in Python (1 min, 30 seconds)

Create a Problem to Write a Sum Method in JavaScript (1 min, 36 seconds)

Create a Problem With Java Methods and Strings (3 min, 10 seconds)

Create a Problem with Custom Classes and ArrayLists for Java Unit Tests (3 min, 16 seconds)

Writing a Fully General Java Autograder to Grade a getPerimeter() method on the Rectangle Class