Use the simple Run Program tests to check if a (student) program runs or compiles.
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.
Simple Run Program test to compile Java code and check for successful compilation
Press the "AddRun Program" button to add a new Run Program test to your Test Category.
Give the newly added Run Program test a name.
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.
After setting up your optional other tests in your category, press the Save button to save the category.
It is a good practice to give your names extensive and clear names, to provide better feedback to your students and they understand what is being tested.
You can use uploaded fixtures as programs to run too, access them in the $FIXTURES directory.