arXiv:2610.36185cs.SEOct 2026

Manuscript Offprint

arXiv:2610.36185

Can AI Guide Testing Without Generating Tests? A Comparative Study of AI-Assisted Unit Testing

Zihan Fang, Ron Asoulin-Handelman, Helen Wu, Yu Huang, Gina R. Bai

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Zihan Fang, Ron Asoulin-Handelman, Helen Wu, Yu Huang, Gina R. Bai

Vanderbilt University, Nashville, TN, USA

{zihan.fang, ron.asoulin-handelman, helen.wu, yu.huang, rui.bai}@vanderbilt.edu

Abstract—Recent advances in generative AI have enabled assistants to generate increasingly sophisticated executable unit tests. However, novices may accept these outputs without independently identifying what to test, evaluating test-suite completeness, or verifying correctness, potentially limiting opportunities to develop essential testing skills. Although prior work has explored AI-assisted test generation and feedback-oriented programming tutors, little is known about whether AI can support novices' testing practices without generating tests for them. To investigate this, we introduce TestCompass, a generative AI tutor that provides targeted feedback on weaknesses in students' test suites without generating executable tests. In a classroom study with 18 students, we compared TestCompass with a general AI assistant across two Java unit-testing tasks, examining students' testing behaviors, test-suite quality, and subjective experiences. We found that participants using the general-purpose AI assistant produced more tests, whereas TestCompass participants spent more time developing and verifying tests themselves. However, most test-suite quality measures were comparable between conditions, and TestCompass participants achieved similar requirement coverage with significantly fewer test methods (p = 0.012) in one task. Neither group reported short-term improvements in perceived testing knowledge or confidence. These findings suggest that feedback-oriented AI can support meaningful testing outcomes while preserving opportunities for hands-on testing practice, offering a complementary approach to AI-assisted testing education.

Index Terms—Software Testing, Computer Science Education, AI-assisted Programming, AI-assisted Testing

I. INTRODUCTION

Generative AI is reshaping both programming education and real-world development workflows, changing how programmers write code and the skills they need [1], [2]. As AI-generated code becomes increasingly common, students must also learn to critically evaluate and verify code they did not write themselves [3], [4]. Software testing plays a central role by providing a systematic way to determine whether generated code behaves as intended [5], rather than accepting AI-generated solutions without adequately verifying their correctness [6]. However, students can now also rely on generative AI to produce the tests used for verification, creating a new challenge: learners must evaluate not only AI-generated code but also the quality of AI-generated tests [7]. This is particularly concerning because software testing often receives limited instructional emphasis in computing curricula [8], and novices already struggle to decide what to test, determine whether a test suite is sufficient, and evaluate the correctness of their tests [9]–[11].

Prior work has explored how general-purpose AI assistants, such as ChatGPT, can support students in software testing [12]–[14]. These tools can explain testing concepts, suggest test cases, and generate executable tests, making testing more accessible [15]. However, prior studies have raised concerns about incorrect or incomplete AI-generated tests, insufficient verification, and students' reliance on AI-generated solutions [12], [13], [16]. By providing ready-to-use tests alongside explanations, general-purpose AI assistants may encourage students to adopt generated solutions without critically evaluating their correctness or reasoning through testing decisions themselves [13]. This motivates exploring AI as a tutor that guides students' testing decisions rather than providing ready-to-use solutions. An important question is whether such an approach can provide meaningful testing support while keeping students actively engaged in designing and verifying their own test suites.

Prior work has explored feedback-oriented AI tutors for programming that provide hints and explanations without revealing solutions [17], [18], as well as conceptual feedback and structured scaffolding for software testing [16], [19], [20]. Other studies have compared general-purpose AI assistants with testing checklists or pedagogically designed tutors [14], [21]. However, evidence remains limited on how testing-specific, feedback-only generative AI compares with general-purpose AI assistants that generate executable tests, particularly in terms of novices' testing behaviors and test-suite quality. Understanding this distinction can inform the design of AI tools that support effective testing while keeping students actively engaged in test design and verification.

We investigate this gap in the context of unit testing, a foundational practice in programming and software engineering education [22], [23] that requires students to understand expected behavior, identify edge cases, and assess whether their tests adequately cover intended functionality [24]. We introduce TestCompass, a testing-specific generative AI tutor that provides targeted feedback on weaknesses in students' test suites without generating tests for them. In a classroom study with 18 students, we compare TestCompass with a general AI across two Java unit-testing tasks, examining students' testing behaviors, test-suite quality, and experiences with the tools. General AI participants spent more time interacting with AI assistants, whereas TestCompass participants devoted more time to developing and verifying tests themselves based on AI-generated feedback. Most test-suite quality measures were comparable between conditions, while TestCompass participants achieved similar requirement coverage with significantly fewer test methods. We make the following contributions:

  • TestCompass, a feedback-oriented generative AI tutor that guides novice unit testing without generating executable tests.

• An empirical comparison of feedback-only and general-purpose AI assistants in terms of students’ testing behaviors, test-suite quality, and perceptions.

• Design insights for future AI tutors in software testing education.

Overall, TestCompass demonstrates the potential of AI to support effective testing without taking test development away from students, while highlighting the need for future AI tutors to provide greater guidance on test implementation and verification.

References (38)