CodeGrade autograding tutorial for python and java
August 17, 2021

Webinar: Getting Started for the new Academic Year

With our latest webinar, our goal was to get you ready for the new academic year, whether this is your first time using CodeGrade or a new iteration of your previous courses. This webinar was part of our monthly Focus Groups and was recorded on August 13th 2021, it is available on demand now.

CodeGrade Basics

The first part of the webinar was dedicated to CodeGrade basics. In our example, we discussed a very basic autograded Python Assignment in which a student has to generate the numbers of the Fibonacci sequence. We show the three CodeGrade workflows:

  • Handing in to this assignment as a student. We hand in our code as a student and get instant feedback on it. If we want, we can use this feedback to improve our code and resubmit. Want to learn more about the student workflows in CodeGrade? Click here!
  • Grading code manually. After the students have handed in, we switched to the teacher / grader view to start marking the submission. We explored inline comments, snippets, general feedback and the rubric. Furthermore, we show how the feedback can be released to the student. More information about Grading in CodeGrade can be found here.
  • Setting up the autograded Python assignment. We conclude by showing how the previously used assignment can be set up from scratch. We go over the basic configuration: hand in instructions, submission settings, rubrics and the automatic tests in AutoTest. You can find more information on setting up an assignment in our Help Center, or in our previous webinars and guides.

Copying your previous work

If you are doing a new iteration of a previous course, or if you would like to import parts of a previous assignment, you can use the various importing options we have in CodeGrade:

Start using CodeGrade now to supercharge your programming assignments!

Autograding best practices & Cheat sheet

Generally speaking, it is best to try complex AutoTest configurations out locally before. AutoTest simply runs a regular Ubuntu operating system in the background and all input fields are regular Bash commands. All software that is run under the hood (e.g. Python, Java, JUnit, Bash, ...) are all regular, meaning that all error messages are universal and can be very easily resolved with our biggest friends Google and Stack Overflow. You can always find more info under the `stdout` and `stderr` tabs in CodeGrade if something goes wrong:

There are two different places in which you can do configuration in AutoTest: Global Setup Script and Per-Student Setup Script. Both have different use cases for you:

Differences between Global and Per-Student Setup Script in CodeGrade AutoTest

Finally, we share an AutoTest Cheat Sheet with all useful folders and built in scripts in AutoTest:

  • `$FIXTURES`: Folder with your uploaded fixtures, read more here;
  • `$STUDENT`: Folder with the code submission of the current student, also the current directory;
  • `$AT_OUTPUT`: Folder to write generated output too that you want to show up in the Code Viewer as feedback for students or for your further visual grading, learn more here;
  • `from cg_at_utils import CG_INFO`: Python package (automatically installed in AutoTest environment) to access submission metadata, learn more about using this here;
  • `become_nobody`: Built in command to limit student access to $FIXTURES folder, use before your command. More info on limiting visibility to students can be found here;
  • `normalize_floats`: Built in command to normalize floating point output to a number of decimals, read usage info here.

CodeGrade Resources

Reading this blog means you have probably already found your way around CodeGrade's resources, which you can find:

Finally, with this webinar we hope to have given you a great way to kickstart your CodeGrade course in the new academic year. We are here to make your course with CodeGrade a success, so please do not hesitate to reach out to us on Discord or via with any question, request or if you would like some technical or educational consultancy. We are always more than happy to help you out!

Devin Hillenius

Devin Hillenius


Continue reading

The Case for Change: Accessibility, Inclusion, and Equity in Computer Science Education

Learn how to drive institutional change, create safe spaces, teach accessible, and develop inclusive coding assignments with Dr. Brianna Blaser, Dr. Yasmine Elglaly, and Dr. Richard Ladner.

How to Check for Plagiarism in C, C++, and C# source code

Simplify plagiarism checks on C-family source code by integrating CodeGrade into your courses.

How to Stop Caring about Grades

Learn to save time with grading with alternative methods for teaching. Make your course accessible and inclusive with methods backed by research.

How to Stop Caring about Grades

Embracing a New Era: Harnessing Generative AI for Computer Science Education

Discover the transformative impact of Generative AI (Gen AI) on computer science education. Explore innovative tools and methodologies reshaping learning experiences and preparing learners for an AI-centric future. Uncover benefits, challenges, and evolving practices at the intersection of technology and pedagogy.

Sign up to our newsletter

See how CodeGrade can transform your courses today!