In-Class Exercise
Chapter 9 Code-based Mutation Exercise

Introduction to Software Testing, Edition 2
Ammann & Offutt

This is an in-class paired exercise. Follow the instructions below to play Code Defenders.

Code Defenders allows users to learn mutation as a game. Attackers create mutants in a Java class, and defenders design JUnit tests to kill the mutants. Defenders score by killing mutants, and attackers score by creating mutants defenders cannot kill.

A duel game is between two players, and a battleground is multiplayer. In duels, one player creates the game and the other joins. In battlegrounds, the instructor creates a game and functions as an observer. Other players can join as either defender (creating tests) or attacker (creating mutants).

  1. Create an account (you will need an email address)
  2. You can play a duel game with one partner, or join the class battleground that the instructor will create.
  3. Use the Java class, which should be already uploaded (it’s okay to use another Java class if you wish)
  4. Game levels should be hard
  5. Games should be at least three rounds

Defenders can claim a mutant is equivalent by clicking the “Claim Equivalent” button. The attacker then either has to agree (giving the point to the defender) or prove the mutant is not equivalent by designing a test to kill the mutant.