Engaging Young Learners with Testing Using the Code Critters Mutation Game
Philipp Straubinger, Lena Bloch, Gordon Fraser
TL;DR
Code Critters tackles the challenge of teaching software testing to younger learners by gamifying block-based mutation testing in a Tower Defense-inspired game. The browser-based platform uses portals as test inputs and oracles to distinguish healthy from mutant critters, thereby instantiating testing concepts through play. An empirical study with 40 children demonstrates active engagement, enjoyment, and measurable testing activity, including mutant detection and healthy critter preservation. The work suggests that block-based, game-based approaches can scaffold early testing literacy and provides open-source code and online access to facilitate adoption in education.
Abstract
Everyone learns to code nowadays. Writing code, however, does not go without testing, which unfortunately rarely seems to be taught explicitly. Testing is often not deemed important enough or is just not perceived as sufficiently exciting. Testing can be exciting: In this paper, we introduce Code Critters, a serious game designed to teach testing concepts engagingly. In the style of popular tower defense games, players strategically position magical portals that need to distinguish between creatures exhibiting the behavior described by correct code from those that are mutated, and thus faulty. When placing portals, players are implicitly testing: They choose test inputs (i.e., where to place portals), as well as test oracles (i.e., what behavior to expect), and they observe test executions as the creatures wander across the landscape passing the players' portals. An empirical study involving 40 children demonstrates that they actively engage with Code Critters. Their positive feedback provides evidence that they enjoyed playing the game, and some of the children even continued to play Code Critters at home, outside the educational setting of our study.
