来自现场的洞察:探索学生对不良单元测试实践的看法
Insights from the Field: Exploring Students' Perspectives on Bad Unit Testing Practices
AI总结:
本文通过让三所高校184名学生使用IDE插件自动检测测试异味,考察其对不良单元测试实践的认知及插件效果,为优化测试教学和代码评审提供依据。
摘要:
对学生进行软件测试实践教育是许多计算机科学相关课程不可或缺的组成部分,通常涉及让学生编写单元测试。与生产代码/源代码类似,学生可能会无意中偏离既定的单元测试最佳实践,并在其测试套件中引入被称为测试异味的有问题代码。鉴于测试异味的目录非常广泛,学生要在自己的代码中识别测试异味变得颇具挑战,尤其是对于那些缺乏测试实践经验的学生。在这份经验报告中,我们旨在提高学生对不良单元测试实践的认识,并详细介绍让来自三所高等教育机构的184名学生使用一款IDE插件自动检测其代码中测试异味的结果。我们的研究结果表明,虽然学生反馈该插件有助于学习和检测测试异味,但他们也指出了一些自己认为无害的特定测试异味。我们预计,研究结果将支持学术界完善单元测试课程体系,并使教育工作者能够通过测试代码的代码评审策略为学生提供支持。
英文摘要:
Educating students about software testing practices is integral to the curricula of many computer science-related courses and typically involves students writing unit tests. Similar to production/source code, students might inadvertently deviate from established unit testing best practices, and introduce problematic code, referred to as test smells, into their test suites. Given the extensive catalog of test smells, it becomes challenging for students to identify test smells in their code, especially for those who lack experience with testing practices. In this experience report, we aim to increase students' awareness of bad unit testing practices, and detail the outcomes of having 184 students from three higher educational institutes utilize an IDE plugin to automatically detect test smells in their code. Our findings show that while students report on the plugin's usefulness in learning about and detecting test smells, they also identify specific test smells that they consider harmless. We anticipate that our findings will support academia in refining course curricula on unit testing and enabling educators to support students with code review strategies of test code.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。