This guide is an in-depth overview of the basics of creating a JavaScript Karel autograder and extends the knowledge base article for Creating a Karel Exercise. It is recommended that you read the knowledge base article, specifically the Add and Edit a Custom Autograder section, before continuing.
❗️Before writing the solution code and setting up the autograder, you should have written the exercise directions and built the starting and ending worlds for Karel.
We will review each of the following items below to learn more about creating fun and basic Karel autograders. The last item, JavaScript General Autograder, is a more advanced feature, and will require intermediate understanding of JavaScript in order to further customize autograders. You are encouraged to preview CodeHS Karel activities that have the JavaScript General Autograder enabled to learn more.
This checks if the student's code is properly indented (e.g., using consistent tabs). Helps enforce readable and well-structured code.
Ensures that the commands follow a specific style guide. Could check for things like proper spacing.
❗️🚧 This feature is currently under construction. You may use this document, Karel Autograder Test Case -- Code Outside of Functions, within the JavaScript General Autograder item to test.
This would check if the student uses a for loop in their code and what the starting and ending conditions should be.