一句话:提出 IntelliGame 游戏化插件,在 IDE 内奖励测试行为,实验表明能提升测试数量、覆盖率与变异得分。
测试在软件开发中至关重要,却常被开发者忽视。覆盖率或变异分析等测试质量报告通常只在持续集成或代码评审时被零星查看,对开发者测试行为的影响往往微乎其微。该文认为,要真正改变开发者行为,需要在其编码过程中于编程环境内直接激励他们。为此,作者提出 IntelliGame——一个面向 IntelliJ Java 集成开发环境的游戏化插件。它采用多级成就系统,包含 27 种不同成就,每种成就又设有多级递进,在开发者表现出良好测试行为时给予肯定反馈,并激励其持续改进。为评估效果,作者开展了一项有 49 名参与者完成的 Java 编程任务受控实验。结果表明,受 IntelliGame 激励的开发者会编写更多测试、获得更高的覆盖率和变异得分、更频繁地运行测试,并更早实现所需功能。
Testing is an important aspect of software development, but unfortunately, it is often neglected. While test quality analyses such as code coverage or mutation analysis inform developers about the quality of their tests, such reports are viewed only sporadically during continuous integration or code review, if they are considered at all, and their impact on the developers' testing behavior therefore tends to be negligible. To actually influence developer behavior, it may rather be necessary to motivate developers directly within their programming environment, while they are coding. We introduce IntelliGame, a gamified plugin for the popular IntelliJ Java Integrated Development Environment, which rewards developers for positive testing behavior using a multi-level achievement system: A total of 27 different achievements, each with incremental levels, provide affirming feedback when developers exhibit commendable testing behavior, and provide an incentive to further continue and improve this behavior. A controlled experiment with 49 participants given a Java programming task reveals substantial differences in the testing behavior triggered by IntelliGame: Incentivized developers write more tests, achieve higher coverage and mutation scores, run their tests more often, and achieve functionality earlier.
DOI 原文 ·
@inproceedings{paperbot11446,
title = {Improving Testing Behavior by Gamifying IntelliJ},
author = {Philipp Straubinger and Gordon Fraser},
booktitle = {ICSE},
year = {2024},
doi = {10.1145/3597503.3623339}
}