2026 ASEE Annual Conference & Exposition

A Software Framework for Testing Java Software Using Benchmark Code

Presented at Computers in Education (CoED): Computing Pedagogy & Methods (7 of 8) -- W408B

Testing student Java submissions is an important task performed by computer science faculty. JUnit testing is appropriate in many situations but can be cumbersome when the correct answer is not readily known or is too large to conveniently specify in the code directly. This paper presents one aspect of a software framework that assists instructors in these types of situations. In particular, this feature provides instructors the ability to automatically compare the output produced by the student’s code against the output produced by an instructor-created solution, referred to as benchmark code. Within the instructor’s solution, test cases are specified as a series of Java annotations appearing above the method. During testing, the student’s method is executed on all test cases and its output is compared to the output produced by the benchmark code. Proper exception handling is also examined as well as verifying that input parameters are modified correctly or left unchanged. The framework includes report generation and scoring to lessen the burden of testing. The framework is available as a jar file on github.

Authors
  1. Michael A Zmuda Miami University [biography]
Download paper (476 KB)

Are you a researcher? Would you like to cite this paper? Visit the ASEE document repository at peer.asee.org for more tools and easy citations.