跳转到内容
#0329
DisplayContainers

The GUI homework gets clicked by the grader

Assignment 7 is a Tkinter calculator. For years it was graded by a TA clicking buttons for two hours on a Friday.

Now the grading script opens each student's copy and POSTs to the display URL: /api/v1/display/window/search to find the calculator window, /api/v1/display/input/batch to click 7, ×, 6, =, then /api/v1/display/screenshot to read the result. Between students, /api/v1/display/input/reset clears the input state. A diff against the expected screenshot is the score for that case. Twelve cases per student, forty students, twenty minutes.

The student built a real desktop program on a real Linux display. Nobody asked them to write a headless mode or a test harness around their GUI. Their program didn't change; the display around it happens to answer HTTP.

The desktop is an API, so a desktop assignment is finally gradable without a human clicking.