4. Testing

Previous: 3. Grading and feedback

The first thing we have to do after the compilation of the Tex is to create a new test input. To do so, click an the "Manage Tests" button in the toolbar:

A new window will pop up and now we have to provide test input. Mark the program problem you want to insert a test input for in the left frame and click on the "New Test" button.

Now you have to enter a title for the test and the code the user usually writes in the text field of the problem web page. After that don't forget to click the "Save Test" button.


The surroundings of the text field come from the prganswer environment
of the corresponding tex document. This means, while entering the code
you see the exact same answer-block that will be seen on the web page.

As a first test, we fill in the sample answer und give it a title:

int length = array.length;
int min = Integer.MAX_VALUE;
for ( int i = 0; i < length; ++i )
  min = Math.min(min, array[i]);
return min;

After clicking the "Save Test" button MIAU offers you to open the correction preview in Firefox.
Click "Yes". The following web page shows up in Firefox in a new tab:

You can create more tests by repeating the steps above with different inputs, correct and wrong ones.

If you wish to delete one or multiple tests, mark them in the "Manage Tests" dialog and click the delete button.

You can also run multiple tests in batch mode by clicking "Run Tests".

Running a test in batch mode means applying the corrector to the stored input datasheet and comparing the resulting correction datasheet with the stored one. The test has passed if no error occurs and the resulting correction coincides with the stored one. Otherwise, the test fails. The test status (running, passed, or failed) is displayed in MIAU standard output console.

Previous: 3. Grading and feedback

create_program_problem_16_toolbar_buttons.png (180 KB) Marek Grudzinski, 04/07/2013 11:56 AM

create_program_problem_17_test_input.png (20.4 KB) Marek Grudzinski, 04/07/2013 11:56 AM

create_program_problem_18_correction.png (185 KB) Marek Grudzinski, 04/07/2013 11:56 AM

create_program_problem_19_correction_preview.png (42.7 KB) Marek Grudzinski, 04/07/2013 11:56 AM

create_program_problem_20_save_as_test.png (12.3 KB) Marek Grudzinski, 04/07/2013 11:56 AM

create_program_problem_21_manage_tests.png (23.4 KB) Marek Grudzinski, 04/07/2013 11:56 AM

create_program_problem_22_run_tests.png (24.3 KB) Marek Grudzinski, 04/07/2013 11:56 AM

create_program_problem_23_run_tests_result.png (27.9 KB) Marek Grudzinski, 04/07/2013 11:56 AM

tutorial_screen_testing_01_buttons_with_mark.png (144 KB) Anonymous, 01/31/2014 06:17 PM

tutorial_screen_testing_02_manage_tests.png (21.7 KB) Anonymous, 02/14/2014 02:10 PM

tutorial_screen_testing_03_test_input.png (34.6 KB) Anonymous, 02/14/2014 02:10 PM

Create_program_problem_16_toolbar_buttons Create_program_problem_17_test_input Create_program_problem_18_correction Create_program_problem_19_correction_preview Create_program_problem_20_save_as_test Create_program_problem_21_manage_tests Create_program_problem_22_run_tests Create_program_problem_23_run_tests_result Tutorial_screen_testing_01_buttons_with_mark Tutorial_screen_testing_02_manage_tests Tutorial_screen_testing_03_test_input
Add picture from clipboard (Maximum size: 500 MB)