跳到正文
arXiv cs.AI· Zihan Fang, Ron Asoulin-Handelman, Helen Wu, Yu Huang, Gina R. Bai·· 4 小时前AI 评分25

TestCompass 研究:AI 如何在不代写测试的情况下指导单元测试

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

AI 导读

研究者推出 TestCompass,一个不生成可执行测试、只针对学生测试套件弱点提供反馈的生成式 AI 导师。

正文 · 原文

View PDF HTML (experimental)

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.
Comments: 10 pages, 2 figures
Subjects: Software Engineering (cs.SE); Artificial Intelligence (cs.AI)
Cite as: arXiv:2610.36185 [cs.SE]
  (or arXiv:2610.36185v1 [cs.SE] for this version)
  https://doi.org/10.48550/arXiv.2610.36185

arXiv-issued DOI via DataCite (pending registration)

Submission history

From: Zihan Fang [view email]
[v1] Mon, 26 Oct 2026 19:18:29 UTC (2,460 KB)

来源:arXiv cs.AI · arxiv.org