Permalink
Fetching contributors…
Cannot retrieve contributors at this time
66 lines (62 sloc) 2.03 KB
{
"testcases" : [
{
"title" : "Python - Static Analysis",
// Here, multiple commands are provided (to be executed in sequence).
// The first is to execute the student code, the second is to count the number of calls to the
// "print" function.
"command" : [ "python3 *.py",
"submitty_count token -l python Equal *.py",
"submitty_count token -l python Asterisk *.py",
"submitty_count token -l python Plus *.py" ],
"points" : 4,
"validation" : [
// First, ensure that the student received the correct answer.
{
"method" : "diff",
"actual_file" : "STDOUT_0.txt",
"description" : "Program Output",
"expected_file" : "output.txt"
},
{
// Grade by comparing the contents of a file to a given integer.
"method" : "intComparison",
// Use the output of the second command.
"actual_file" : "STDOUT_1.txt",
"description" : "Number of assignments",
// The method by which to compare the output of "submitty_count"
// against the provided term (here, "greater-than-or-equal" is used).
"comparison" : "ge",
// The integer against which to compare.
"term" : 5,
// Message to the student.
"failure_message" : "Re-read the problem instructions.",
// Only display a message if the test failed.
"show_message" : "on_failure",
// Hide the student/instructor comparison.
"show_actual" : "never"
},
{
"method" : "intComparison",
"actual_file" : "STDOUT_2.txt",
"description" : "Number of multiplications",
"comparison" : "ge",
"term" : 7,
"failure_message" : "Re-read the problem instructions.",
"show_message" : "on_failure",
"show_actual" : "never"
},
{
"method" : "intComparison",
"actual_file" : "STDOUT_3.txt",
"description" : "Number of additions",
"comparison" : "ge",
"term" : 2,
"failure_message" : "Re-read the problem instructions.",
"show_message" : "on_failure",
"show_actual" : "never"
}
]
}
]
}