How to Run an Online Coding Exam for Your Students

It is 9:58 on exam morning. Two hundred students are logging in. One can't open the editor, another's laptop is missing a library, and a third emails to ask whether the exam has started. You haven't even looked at the first submission, and you are already worried about who might be using an AI tool in another tab.
An online coding exam doesn't have to feel like this. With the right plan, the morning can be quiet, the results fair, and the grading done in hours instead of a week. This guide walks instructors through it, from writing the questions to sending grades to the LMS.
What makes an online coding exam different from a written one?
A written exam checks whether students can describe code. A coding exam checks whether they can write and run it, which is closer to what the course is really about. Doing that online adds three challenges:
- Environment. Every student needs a working editor, the right language version, and the same libraries.
- Integrity. Students are not in one room, and AI tools are a click away.
- Grading at scale. Two hundred programs can't be read line by line in a weekend.
Plan for all three before you write a single question.
Step 1: Decide what the exam should measure
Start from the course outcomes, not from a question bank. For each question, write one sentence: "This checks whether a student can…". Then balance the paper:
- One warm-up question students should all finish, such as a simple function.
- Two or three core questions on the main topics, such as loops, lists, and functions.
- One stretch question that separates strong students, such as an edge case-heavy problem.
- One debugging or reading question, where students find and fix a mistake in given code.
Keep the total working time realistic. If you can solve the paper in 30 minutes, give students 90.
Step 2: Set up an environment every student can trust
Most exam-day problems are setup problems. Remove them before the day:
- Give every student the same environment with the same language version and libraries.
- Prefer a browser-based setup so nothing needs to be installed on personal laptops.
- Open the environment for a practice session a few days before, using a sample question.
- Write a one-page exam-day guide: how to log in, how to submit, and what to do if something breaks.
Step 3: Plan for integrity without punishing honest students
You don't need to treat every student as a suspect. You need a setup that makes cheating hard and honest work easy.
- State the AI policy clearly. Say which tools are allowed, if any.
- Use questions tied to your course, with your own data or constraints, rather than famous problems.
- Add hidden test cases, so a pasted generic answer doesn't automatically pass.
- Choose the right proctoring level for the stakes. A weekly quiz needs less than a final exam. Our proctoring levels guide explains the options.
- Review flags; don't auto-fail. A proctoring flag is a reason to look, not proof. Read how online proctoring can make coding assessments more secure.
- Plan accommodations such as extra time before the day, not during it.
Step 4: Write the grading plan before the exam
Decide how marks will be awarded while the questions are fresh:
| Part of the mark | How it is checked |
| Correct output for normal inputs | Visible and hidden test cases |
| Edge cases | Hidden test cases |
| Code quality and structure | Rubric, reviewed by you or a TA |
| Explanation (optional) | A short written answer about one decision |
Partial credit matters. A student whose code passes six of ten tests should not score the same as one who submitted nothing. Our guide to hidden test cases covers how to design them.
Step 5: On exam day
- Open the exam a few minutes early for log-in checks.
- Keep one channel for technical issues and one person watching it.
- Don't change questions mid-exam unless there is a real error; if you do, announce it to everyone.
- Remind students to submit before the deadline, not at the deadline.
Step 6: After the exam
- Run the tests across every submission.
- Review the borderline scores and any integrity flags by hand.
- Check one question's results: if most of the class failed the same test, the test may be wrong.
- Sync grades to the LMS and release them with short feedback.
- Note what to change next time while the details are fresh.
Where does Lab.Computer fit?
Lab.Computer gives every student an identical, browser-based coding environment, launched within seconds even for classes of 3,000, so exam morning starts with coding instead of troubleshooting.
Proctoring through our Proctortrack partnership adds identity verification, browser and camera monitoring, environment checks and session recording, which you can review after the exam. Tests run automatically, including hidden ones, and AI Evaluation drafts feedback while you review, edit, or override every grade. Scores sync to Canvas, Moodle, Blackboard, Sakai, or Brightspace through LTI 1.3.
Planning an end-of-term coding exam? We can set one up with you on a sample paper.
Quick takeaways
- Plan for environment, integrity, and grading before writing questions.
- Give every student the same ready environment and a practice session.
- Use course-specific questions, hidden tests, and proctoring that matches the stakes.
- Write the grading plan first, give partial credit, and review flags by hand.
Frequently asked questions
How do you conduct an online coding exam for students?
Plan the questions from your course outcomes, give every student the same ready environment, run a practice session, choose a proctoring level that matches the stakes, and grade with visible and hidden tests plus a short rubric.
How do you prevent cheating in an online coding exam?
Use questions tied to your course, hidden test cases, a clear AI policy, and proctoring suited to the exam's stakes. Review flags by hand rather than failing students automatically.
How long should an online coding exam be?
Long enough that students can think, not just type. A common rule is to give students about three times as long as it takes you to solve the paper.
Can coding exams be graded automatically?
Correctness can be graded automatically with visible and hidden test cases. Code quality and explanations still benefit from a quick human review, so plan time for both.
What should students do if their code won't run during the exam?
Give them one clear support channel and a short exam-day guide. Using the same browser-based environment for every student removes most setup problems before they start.


