Difference between revisions of "Submitting programs for automatic testing on Moodle"
(→Run the Program) |
(→Evaluate & Grade Program) |
||
Line 51: | Line 51: | ||
<center>[[Image:MoodleSubmission4.png|600px]]</center> | <center>[[Image:MoodleSubmission4.png|600px]]</center> | ||
<br /> | <br /> | ||
− | * The output above shows that the program didn't run as expected. It didn't crash, but its output is not the one wanted. | + | * The output above shows that the program didn't run as expected. It didn't crash, but its output is not the one wanted. In particular: |
+ | ** It got a grade of 0/100. There was 1 test only, so failing it yields a grade of 0. If the program had been one that expected an input and would have generated an output, it could have been tested with, say, 3 different types of input. If it had failed 1 of the 3 inputs, it would have gotten a grade of 66/100. | ||
+ | ** The output window also shows the difference between the current output of your program, and the one that was expected. This is an easy way for you to see what needs to change in your program. | ||
+ | ** Finally, you are shown that your program was tested only once, and failed that one test. | ||
<br /> | <br /> |
Revision as of 10:34, 2 September 2014
--D. Thiebaut (talk) 11:04, 2 September 2014 (EDT)
|
Steps
Login to Moodle
- Point your browser to Moodle and pick the link for this course.
Submit your Program
- Find the link for today's assignment or lab.
- Click on it!
- You should see something similar to this screen capture:
- Click on the 'Edit tab, and copy/paste your program
- Click on Save in the menu to save your program.
Run the Program
- Click on Run to test your program. This step will automatically assemble and link your program, display errors if any, and if not, it will display the output of the program.
- When you are satisfied that your program runs, close the Console window.
- Fix any errors you may have, or modify the program behavior by going back to the Edit tab and modifying the code.
- When you are satisfied that your code works well, you can have it evaluated for an automatic grade.
Evaluate & Grade Program
- Click on the Evaluate menu option.
- The output above shows that the program didn't run as expected. It didn't crash, but its output is not the one wanted. In particular:
- It got a grade of 0/100. There was 1 test only, so failing it yields a grade of 0. If the program had been one that expected an input and would have generated an output, it could have been tested with, say, 3 different types of input. If it had failed 1 of the 3 inputs, it would have gotten a grade of 66/100.
- The output window also shows the difference between the current output of your program, and the one that was expected. This is an easy way for you to see what needs to change in your program.
- Finally, you are shown that your program was tested only once, and failed that one test.