跳到正文
返回论文列表
cs.SE提交于 已译

AI 能否在不生成测试的情况下指导测试?AI 辅助单元测试对比研究

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

中文摘要

生成式 AI 能生成复杂单元测试,但新手可能直接接受结果,缺乏独立识别测试点、评估完整性及验证正确性的机会,限制了技能发展。现有研究多关注 AI 生成测试或反馈式导师,鲜有探讨 AI 在不生成测试的前提下如何支持新手。为此,引入 TestCompass,一种提供针对性反馈以指出学生测试套件弱点的生成式 AI 导师,不生成可执行测试。在包含 18 名学生的课堂研究中,对比 TestCompass 与通用 AI 助手在两个 Java 单元测试任务中的表现,考察测试行为、套件质量及主观体验。结果显示,使用通用 AI 助手的参与者生成的测试更多,而 TestCompass 组花费更多时间自行开发和验证测试。两组测试套件质量指标大体相当,但在一个任务中,TestCompass 组以显著更少的测试方法(p=0.012)实现了相似的需求覆盖率。两组均未报告短期感知测试知识或信心的提升。这表明反馈导向的 AI 能在保留动手实践机会的同时支持有效的测试成果,为 AI 辅助测试教育提供互补方案。

关键要点

  1. 01针对新手依赖 AI 生成测试导致缺乏独立测试技能培养的问题,探索不生成测试的 AI 辅助模式。
  2. 02提出 TestCompass,通过提供针对性反馈指出测试套件弱点,而非直接生成可执行测试代码。
  3. 0318 人课堂研究显示,TestCompass 组花费更多时间自行验证,且以更少测试方法达到相似需求覆盖率。
  4. 04两组在测试套件整体质量及短期测试知识信心提升方面无显著差异,表明反馈式 AI 可保留动手实践机会。

解读

尚无解读。

原始英文摘要

arXiv:2610.36185v1 Announce Type: cross 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.

同方向论文 · cs.SE

查看全部 →

反向发现 · 这篇论文相关的工具与提示词

去交叉发现 →

关联提示词 · 6

编程zhuanlan.zhihu.com·外部收录·

用于指导 Claude Code 按阶段规划、测试驱动实现、重构并提交代码。

### 1. 规划与分阶段 将复杂的工作分解为 3-5 个阶段。在 `IMPLEMENTATION_PLAN.md` 中记录: ```text ## 阶段 N: [Name] **目标**: [具体可交付成果] **成功标准**: [可测试的结果] **测试**: [具体的测试用例] **状态**: [未开始|进行中|已完成] ``` * 随着进展更新状态 * 所有阶段完成后删除文件 ### 2. 实现流程 1. **理解** - 研究代码库中的现有模式 2. **测试**…

编程github.com/f/awesome-chatgpt-prompts·外部收录·

TypeScript Library taste

# TypeScript library taste - Use pnpm as the package manager. Confidence: 0.95 - Enable strict mode and noUncheckedIndexedAccess in tsconfig. Confidence: 0.95 - Build with tsup and emit both ESM and CJS with .d.ts files. Confidence: 0.90 - …

编程github.com/f/awesome-chatgpt-prompts·外部收录·

Classic Algorithm writing tutorial

I want you to provide a course note and a presentation for about 3 hours of first session of python programming course with following topic: "Basic programming concepts (problem, solution, algorithm, flowchart, code, program) and programmin…

编程github.com/f/awesome-chatgpt-prompts·外部收录·

VLSI asic design verification engineer

This is the job of the model Create a test pinch and Raman hotel minis verification test in Raymond for SBI from the scratch along with the design as well dispatched be in the uvm environment and also it is pinch is should be expendable wh…

编程github.com/f/awesome-chatgpt-prompts·外部收录·

Algorithm Competition Coach

Act as a coach for algorithm competitions. You are an experienced mentor in preparing students for algorithm contests, providing guidance on problem-solving techniques, optimizing algorithms, and developing competitive programming skills. Y…