testcases.py file
File structure
- This file declares 2 dictionaries.
-
TEST_SCORE
Set the partial scores for each test case defined in the
sketch_unittest.cc
file.
# Example: Setting partial scores for 3 test cases
TEST_SCORE = {
'quiz1': 33,
'quiz2': 33,
'quiz3': 34
}
-
MESSAGE
Set the guidance text for the grading criteria for each test case.
ℹ️ It is recommended to write clear guidance text that accurately represents the grading criteria.
# Example: Setting guidance text for 3 test cases
MESSAGE = {
'quiz1': 'Have you set the pins for the RGB LED and ultrasonic sensor correctly?',
'quiz2': 'When the measured distance is less than or equal to 17cm, did you make the RGB LED flash red?',
'quiz3': 'When the measured distance exceeds 17cm, did you make the RGB LED flash blue?'
}
- The partial scores and guidance text set in this file can be checked in the Elice platform terminal when the [Submit] button is clicked, as shown in the example below.
Example 1: When all test cases are passed
Example 2: When a test case is not passed