All Collections
Tests / Autograding
Running tests
Running codePost autograder tests
Running codePost autograder tests
Learn how to run tests using the codePost autograder.
James avatar
Written by James
Updated over a week ago

The codePost autograder's Test Editor and Source Editor allow you to run tests against solution code and student code for the purposes of perfecting your tests.

But once you finish writing your tests, you’re to run them for real!

What does running tests “for real” mean? When you run a test from the test editor or source editor, test results aren't saved. So you won't see any results in the Code Console, or any points deducted or added as a result of test outcomes.

When you run the tests outside of the tests editor, the results of each test are saved, with the following consequences:

  • Test outcomes are displayed in the Code Console, viewable by any admin, grader, or student who can view the submission.

  • Points will be added or deducted based on test outcomes

  • If you've chosen to dump test outputs, a _tests.txt  file with log output will be added to each submission when tests are run against it.

Where to run tests

There are two ways to run tests against student code for real: from within the Admin
Console or when a student submits.

Admin Console

From the Tests Summary page, you can run tests against individual submissions or all submissions at once. You can also see a summary of how each submission performed.

  • Note: Using ‘Run All’ to run your tests on all available submissions can take some time, especially if you have > 50 students or have written > 5 test cases. After triggering, you don't need to stay on the page to ensure your tests complete. You'll receive an email when your tests are done running.

During upload

For each test case you define, you can choose to "expose" the test to students. Any tests that are exposed will be run on student code when students upload to codePost. Results will be shown to the student once testing is complete. Note that this feature  only works if students submit directly to codePost. If instructors upload student code, then tests cannot be exposed to students. 

Tests that aren't exposed to students won't be run during upload. An instructor will need to run these tests from the Admin Console.

Did this answer your question?