-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathconfig.json
More file actions
117 lines (116 loc) · 4.54 KB
/
config.json
File metadata and controls
117 lines (116 loc) · 4.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
{
"resource_limits" : {
// Allow the submission to run for 10 seconds.
"RLIMIT_CPU" : 10,
// Allow up to 20 additional processes launched by the student code.
"RLIMIT_NPROC" : 20
},
"allow_system_calls" : [
"COMMUNICATIONS_AND_NETWORKING_SIGNALS",
"COMMUNICATIONS_AND_NETWORKING_SOCKETS",
"COMMUNICATIONS_AND_NETWORKING_SOCKETS_MINIMAL",
"FILE_MANAGEMENT_RARE",
"PROCESS_CONTROL_NEW_PROCESS_THREAD"
],
"testcases" : [
{
"title" : "Actions Example",
//The expected python program creates a window using tkinter
//This window is a simple dialog box, which echoes input.
//To grade this, we want to type "Submitty" into a text
//field, click the ok box, then click the exit button.
//To do this, we will use the actions defined below.
"command" : ["python3 *.py" ],
//*************** Actions *********************
//Actions allow you to interface GUI programs
//via submitty. Note that in order to run such
//applications, it is required that you have
//set up a "Submitty with a screen;" a machine
//running submitty with a monitor. This machine
//must also run only one grading thread at a
//time. For more information, please visit the
//submitty wiki.
"actions" : [
//it is recommended that programs with GUIs begin with
//an extra delay to allow student code time to fully
//initialize.
{
"action" : "delay",
"seconds" : 2
},
//This command will screenshot the student's window.
//Pair it with the validation below to show it to
//display it to the students.
{
"action" : "screenshot"
},
//The type command will submitty the provided characters
//as keyboard input to the student's window.
{
"action" : "type",
"string" : "Submitty"
},
//This screenshot should show the effects of the type command
//above
{
"action" : "screenshot"
},
//We will now move the mouse (in pixels relative to the upper
//left hand corner of the screen). This location correlates with
//where the student's ok button should be. Note that we could have
//required the student to map the button to a specific hotkey and typed
//that instead.
{
"action" : "move mouse",
"end_x" : 200,
"end_y" : 75
},
//This delay is added merely so that instructors can watch the grading
//happen, in practice it is unnecessary.
{
"action" : "delay",
"seconds" : 1
},
//now we click the ok button.
{
"action" : "click"
},
//This screenshot should show the effect of the previous command.
{
"action" : "screenshot"
},
{
"action" : "delay",
"seconds" : 1
}
],
// Point value of this testcase.
"points" : 10,
//These validation steps check for the screenshots taken above, which are created
//with sequential labels starting at 0. For more information, please visit the submitty wiki.
"validation" : [
{
"actual_file": "0.png",
"description": "Screenshot of an empty echo",
"method": "fileExists",
"show_actual": "always",
"show_message": "always"
},
{
"actual_file": "1.png",
"description": "Screenshot of Submitty in dialog box.",
"method": "fileExists",
"show_actual": "always",
"show_message": "always"
},
{
"actual_file": "2.png",
"description": "Screenshot of echoed Submitty.",
"method": "fileExists",
"show_actual": "always",
"show_message": "always"
}
]
}
]
}