The IO Test is the most common test to create. This is a test in which you specify an input to a program and an expected output. If the students' program returns the same output as expected, the test passes and they achieve points.
IO Tests are easily created in the CodeGrade AutoTest user interface. One single IO test can have multiple pairs of input and output.
Press the "Add IO Test" button to add a new IO test to your Test Category.
Give the newly added IO Test a name.
Give the command that runs the program to test, this can be a program handed in by the student or a program that was installed or uploaded as fixture.
Set up one or more input and output combinations, each input and output combination defaults to a weight of one (change this in Advanced Options) and has a name. More input output combinations can be added by pressing the "Add Input" button:
Again, give the name of the specific input and output combination.
Give the input, either as Input Arguments or as Input via standard input.
Give the expected output, which can be parsed with the following options:
Case insensitive: comparing of student output and expected output is case insensitive.
Ignore trailing whitespace: trailing whitespace is ignored when comparing the student output with the expected output.
Ignore all whitespace: all whitespace is ignored when comparing the student output with the expected output (including newlines).
Substring: comparing of student output and expected output is done with substring matching. As long as the expected output is present as a substring in the student output, the test succeeds.
Regex: the expected output is a Python3 Regex which should match with the actual output.
After setting up your IO tests and other tests in your category, press the Save button to save.