arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2603.26329cs.SE
收藏

大型语言模型在软件测试教育中的应用:经验报告

Large Language Models for Software Testing Education: an Experience Report

South China Normal University(华南师范大学);Guangzhou Polytechnic University(广州 polytechnic 大学);Nanjing University(南京大学);Mooctest Inc.(慕课测试有限公司)

Peng Yang, Yunfeng Zhu, Chao Chang, Shengcheng Yu, Zhenyu Chen, Yong Tang

AI总结:

本文通过混合方法研究,探讨学生在使用LLM进行测试任务时的交互问题及教学策略,提出轻量级提示框架以提升测试脚本生成能力。

摘要:

大型语言模型(LLM)的快速整合正在重塑软件工程实践中软件测试的执行方式。LLM越来越多地被用于支持软件测试,因此软件测试教育必须进化以培养学生成为这一新范式的参与者。然而,尽管学生已经开始在测试任务中随意使用LLM,但对其使用如何影响测试行为、判断和学习成果的实证理解仍然有限。有必要系统研究学生如何学习评估、控制和优化LLM辅助的测试结果。本文呈现了一项混合方法、两阶段探索性研究,探讨软件测试教育中的人机协作。第一阶段分析了15名学生的课堂学习成果和交互记录,以及全国软件测试竞赛中进行的大型调查(337份有效回复),以识别测试任务中反复出现的提示相关困难。结果揭示了系统性的交互断裂,包括缺失的上下文信息、不足的约束、僵化的单次提示和有限的策略驱动迭代,自动化测试脚本生成成为特别异质性和劳动密集型的交互环境。基于这些发现,第二阶段进行了一项示范性课堂教学实践,将观察到的断裂转化为一个轻量级、阶段意识的提示框架,用于测试脚本生成,引导学生明确表达与执行相关的信息,如环境假设、交互基础、同步和验证意图,并报告学生在与LLM交互时在测试相关表达上的描述性变化。

英文摘要:

The rapid integration of Large Language Models (LLMs) into software engineering practice is reshaping how software testing activities are performed. LLMs are increasingly used to support software testing. Consequently, software testing education must evolve to prepare students for this new paradigm. However, while students have already begun to use LLMs in an ad hoc manner for testing tasks, there is limited empirical understanding of how such usage influences their testing behaviors, judgment, and learning outcomes. It is necessary to conduct a systematic investigation into how students learn to evaluate, control, and refine LLM-assisted testing results. This paper presents a mixed-methods, two-phase exploratory study on human-LLM collaboration in software testing education. In Phase I, we analyze classroom learning artifacts and interaction records from 15 students, together with a large-scale survey conducted in a national software testing competition (337 valid responses), to identify recurring prompt-related difficulties across testing tasks. The results reveal systematic interaction breakdowns, including missing contextual information, insufficient constraints, rigid one-shot prompting, and limited strategy-driven iteration, with automated test script generation emerging as a particularly heterogeneous and effort-intensive interaction context. Building on these findings, Phase II conducts an illustrative classroom practice that operationalizes the observed breakdowns into a lightweight, stage-aware prompt scaffold for test script generation, guiding students to explicitly articulate execution-relevant information such as environmental assumptions, interaction grounding, synchronization, and validation intent, and reporting descriptive shifts in students' testing-related articulation when interacting with LLMs.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑