Share your autograding templates here!

Hello Teachers!

We recently launched Autograding in GitHub Classroom. If you missed that announcement, check it out here:

We setup a few examples in, but we’d love to collect some more inspiration for folks to build their autograding assignments off of. In this thread, please share any template repos you’ve created to show off how you’re using autograding!

Before posting, please check the template checkbox in your repository settings to make it easier for people to try out. Also, please include any setup/run command needed to run the tests!

Template to copy:

**URL:** url
**Description:** desc
**Setup command:** `command`
**Run command:** `command`

Nathaniel, GitHub Classroom


Description: Node app with Jest tests
Setup command: npm install
Run command: npm test


I checked example of C. I am wondering if it is possible to use NASM instead of GCC (I teach assembly at the University)

@mlinaje Yes, it should be possible. If the VM doesn’t include the software needed to compile NASM, you can apt-get install to install whatever you need.

I thought I would share this here - I’ve set up autograding in Github Classroom for a Python course I’m taking this semester. There’s over 100 exercises, most with autograding and the students are loving it so far. You’re more than welcome to check it out - I hope it’s of use!

Course notes:

Exercises (with autograding):

Description: Run exercise test with pytest
Setup command: sudo -H pip3 install pytest
Run command: python3 -m pytest


That’s a very good idea and development. It’s good to be creative.

Hey! I’ve found a way to store unit tests in a different repo as a dependency of my assignment template. This means students can’t just change the unit test to get the autograding to get it to pass :sunglasses:

I teach a web design and frontend development course, and my students have little to no experience coding, so it took me some time to find a good process that would let them start on a simple online code editor and sync back to Github. Later in the course, I plan to introduce them to developing locally and pushing branches up, but one step at a time!

Description: A template for learning HTML, CSS, and JavaScript, with Jest tests
Setup command: npm install (thank you for the inspiration @d12!)
Run command: npm test

Hi @ashleykolodziej

Can you elaborate on exactly how you managed to “hide” your unit tests? I am trying to figure out how to use Classroom’s Autograding for some basic C/C++/Python assignments. It’s ok if the students see some of the tests, but I’d like to have a few tests reserved that they can’t see and that are only run after submission.

Is this something you were able to achieve?

Thanks in advance,

I keep my unit tests in a separate repository, and make it a dependency in package.json:

To take this approach, you’ll need to figure out how to tell your testing framework to look for the tests in a different folder, specifically node_modules. I’m using Jest, and on version 25, you can do that. (More recent versions can’t.) Here’s the magic line that tells the assignment where to look for the test:

(need to split this into two replies because I can’t have more than two links in the same post)

The repo that has all my unit tests is over here: So you can see above that my assignment template will run a test using the test inside of test-unit-test.

I actually find some benefit to allowing the students to see the unit tests, so I don’t have that repository set to private. But a nice bonus with this approach is that if you find a bug in your test, you can fix it for everyone’s repos at the same time.

Android Autograding for UI / Integration Tests:
Description: Use the files available in the repo. Do not enable Autograding through Classroom.

© 2017 GitHub, Inc.
with by
GitHub Education