一句话:将游戏化工具 Gamekins 集成到 Jenkins 持续集成中,通过测试挑战、积分与排行榜激励学生更积极地编写测试。
软件测试在软件开发中至关重要,但如何激励软件工程学生在写代码时主动编写并运用自动化测试,一直是教学中的难点。本文提出以游戏化持续集成的方式提升学生的测试参与度:借助无缝集成于 Jenkins 平台的工具 Gamekins,根据学生对源码仓库的提交生成测试挑战与任务,学生通过完成这些挑战获得积分,可在排行榜上与其他同学或团队竞争,并因测试相关的成就获得徽章。作者将该方案引入一门本科软件测试课程,观察到学生的测试方式与其 Gamekins 使用情况之间存在相关性;与未引入游戏化的上一轮课程相比,学生测试结果的准确性有显著提升。此外,学生也报告称使用 Gamekins 编写测试让他们感到有趣,进一步说明该方法改善了测试行为。
Testing plays a crucial role in software development, and it is es-sential for software engineering students to receive proper testing education. However, motivating students to write tests and use auto-mated testing during software development can be challenging. To address this issue and enhance student engagement in testing when they write code, we propose to incentivize students to test more by gamifying continuous integration. For this we use Gamekins, a tool that is seamlessly integrated into the Jenkins continuous inte-gration platform and uses game elements based on commits to the source code repository: Developers can earn points by completing test challenges and quests generated by Gamekins, compete with other developers or teams on a leaderboard, and receive achieve-ments for their test-related accomplishments. In this paper, we present our integration of Gamekins into an undergraduate-level course on software testing. We observe a correlation between how students test their code and their use of Gamekins, as well as a significant improvement in the accuracy of their results compared to a previous iteration of the course without gamification. As a further indicator of how this approach improves testing behavior, the students reported enjoyment in writing tests with Gamekins.