Setting up Run Program Tests
Tip
CodeGrade has a Help Center, with better guides, more videos and updated documentation. The documentation and guides on this website are deprecated and will not be updated in the future. Please click here to go to this page on the Help Center!
The Run Program Test simply executes a specified program and checks the return code or exit status of this program. Meaning, an exit status of 0 (or success) results in passing the test and any nonzero exit status (or failure) results in failing the test.
Run Program Tests are easy to set up and effective to check program execution when specific output is not important. Use Run Program Tests, for instance, to check the successful compilation of student code or to run single unit tests that you provide as fixtures.
Press the “ Run Program” button to add a new Run Program test to your Test Category.
Give the newly added Run Program test a name.
Note
A test’s name is the first moment of feedback to the student, more extensive and clear names provide better feedback to students.
Optionally, give the test a weight, this defaults to
1
.Finally, give the command of the program to test. The binary exit status (success or fail) of this command will determine the score of the test.
Note
This program can be handed in or uploaded as fixture, access fixtures in the
$FIXTURES
directory.After setting up your IO tests and other tests in your category, press the Save button to save.