Hide test steps

Hide information shown to students about the tests in your assignment

Sometimes it's desirable to have some information about your automatic tests hidden from students. For example, you may want to have some more advanced tests that check for things like error handling for which extra credit is awarded. In this situation, hiding your test configuration and the program output may help to make it more difficult for your students to cheat.

This is possible in AutoTest v2 using the Hide wrapper block. The options provided by the Hide block are as follows:


  • Config Hide the program that is being run in the test OR hide the input and expected output if placed around a match block

  • Output Hide the output of the program or command being run

  • Result Hide the result of the test (whether the student passed or failed the test)


  • Always The information is always hidden, even after the deadline.

  • Before or After deadline The information is hidden before or after the deadline.

  • Before or After lock date The information is hidden before or after the lock date.

How to use the Hide block in AutoTest v2:

  1. Navigate to the Tests portion of the AutoTest settings.

  2. Click the Hide block to add it to the bottom of your AutoTest configuration or drag-and-drop it to the desired location.

  3. Nest the test you want to hide within the Hide block.

  4. Adjust the information that you want to hide and when you want it to be hidden using the drop-down menus on the hide block.

  5. Nest up to 3 hide blocks within each other to hide all information about the test from students.

When you build your snapshots you will still see the content you are trying to hide using Hide blocks; this is because you have teacher permissions. After publishing your snapshot if you want to double check how the Autotest report looks like from a student's perspective, you can:

  • if you are using CodeGrade integrated within an LMS, impersonate a test student in your LMS, submit for the CodeGrade assignment and then check the Autotest results;

  • if you are using CodeGrade as Standalone, create a student account for yourself and then use that account to make a submission and check the Autotest results.

Last updated