Project 2026 Summer

Comparing Automated Unit Test Generation Approaches for a Java Library Management System

Project Image
Student Mohamad Radaideh
Supervisor Jean-Pierre Corriveau
Abstract

Large language models can generate unit tests in one response or through an iterative multi-agent workflow, but the relative effectiveness of these configurations is not well established. This project compares a human reference suite, whole-context one-shot generation, and a cloud-model adaptation of the CANDOR multi-agent framework on 25 selected classes from a Java library-management system. GPT-4o and Gemini 2.5 Flash were each used in both AI configurations. Test execution, JaCoCo coverage, and 206 PiTest mutants were evaluated under a common Java 21 build. Gemini one-shot achieved the highest line coverage (95.65%), branch coverage (78.05%), and mutation score (88.35%, 182/206), while the reference suite achieved 83.98% (173/206). GPT-4o one-shot reached 69.90%; CANDOR reached 45.63% with GPT-4o and 35.92% with Gemini. Only 17 GPT and 13 Gemini CANDOR files survived generation and aggregate compilation. The result is an observed configuration effect rather than evidence that iteration is intrinsically harmful: context, output budgets, orchestration, and historical test-workspace state differed between routes. The study demonstrates the value of mutation testing and provides an exact frozen-suite re-evaluation protocol while identifying limits on historical generation replay and cost accounting.