🤖 AI Summary
Existing programming games for children (e.g., Code Critters) lack pedagogical support for teaching loop structures and their testing, hindering learners’ understanding of loop boundary conditions and iterative behavior verification.
Method: This study designs and integrates mutation-based loop-testing levels, introducing the “Magic Portal”—a gameified test oracle—that renders loop logic observable and verifiable within a tower-defense-style interaction; it employs a block-based dynamic execution engine and a lightweight mutation injection mechanism.
Contribution: We present the first loop-oriented, gamified testing framework tailored for adolescents, addressing a critical gap in computational thinking education for loops. Empirical evaluation demonstrates significantly improved learner engagement and identifies recurrent cognitive challenges in loop testing—such as off-by-one errors and incomplete iteration coverage—providing evidence-based insights to inform future pedagogical interventions.
📝 Abstract
Serious games can teach essential coding and testing concepts even to younger audiences. In the Code Critter game critters execute short snippets of block-based code while traversing the game map, and players position magical portals (akin to test oracles) at locations (akin to test inputs) to distinguish between critters executing correct code from those who execute faulty code. However, this adaptation of the tower defense genre limits code under test to basic sequences and branches, and excludes the fundamental programming concept of loops. To address this limitation, in this paper we introduce an entirely new game concept integrated into the Code Critters storyline, tasking players to test the behavior of critters collecting ingredients for a healing potion using loop-based recipes at a second-stage level. In a study involving 29 secondary school students, we observed active engagement with these new loop-integrated levels. The results highlight challenges the students face, which can inform future strategies for improving coding and testing education.