Code Defenders is a web-based game in which students practice two central activities in software testing: (1) assessing how well a program is tested by the current test suite, and (2) improving the test suite by creating additional tests. Players can either take the role of attackers, who aim to introduce artificial bugs (“mutants”) into the class under test that reveal weaknesses in the test suite, or the role of defenders wo aim to improve the test suite by adding tests. If a test which passes on the original program fails on a mutant, then that mutant is detected and the defender scores points, whereas the attacker scores points if the mutant is not detected. The number of points a mutant is worth depends on the number of tests it “survives”, which further encourages players to create as subtle as possible mutants, and as strong as possible tests.
More information about Code Defenders and its use in the classroom can be found in the following publications:
- Gordon Fraser, Alessio Gambi, Marvin Kreis and José Miguel Rojas. “Gamifying a Software Testing Course with Code Defenders,” In Proc. of the ACM Technical Symposium on Computer Science Education (SIGCSE), ACM, 2019 [PDF]
- Gordon Fraser, Alessio Gambi, José Miguel Rojas. “A Preliminary Report on Gamifying a Software Testing Course with the Code Defenders Testing Game,” In Proc. of The European Conference of Software Engineering Education, pp. 50-54, ACM, 2018. [PDF}