The high-level goals of this game-based exercise are to (1) solidify software testing skills and (2) reason about potential sources of program errors.
Team up in groups of size 3. Unlike previous in-class exercises, this is an individual assignment, but you will be playing in a team of 3 against another team of 3 students.
Assign yourself to a group (in-class-2-CodeDefenders) on Canvas. Students not assigned to a group by Thursday 5 PM will be randomly assigned.
Log into the Code Defenders game, hosted on Attu, using the link, username, and password you received in an email.
In this exercise, you will be playing a battleground-style game of mutation testing. The general gameplay is:
attackers introduce subtle bugs into a given class under test and
defenders write effective unit tests to detect the bugs.
You will play three games (described below).
Join the easy game (~10 min), which will be the only open game. This game will have both tests and bugs visible. The goal is to familiarize yourself with the game interface and to freely communicate with opponents.
Join the hard game (~20 min). This game will have both tests and bugs invisible.
For a final challenge, join the last game (~15 min) to play against staff.
Create subtle bugs (mutants) and tests in the game. You do not need to submit anything for this part, as we can collect these directly from the game server.
Fill out this brief survey about the game and exercise experience.
In what format can I write tests and assertions?
You can write JUnit4 tests and assertions.
I think one of the mutants is equivalent, what should I do?
Defenders can click on the “Claim Equivalent” button for a mutant if they think it is equivalent. This initiates a duel. The attacker either provides a detecting test for that mutant, or surrenders the duel and loses points if they accept that the mutant is indeed equivalent. Note that the attacker has only one chance to provide a detecting test.
I’m a defender; where is the “Claim Equivalent” button for a mutant?
Once you have written tests in an attempt to detect a mutant, then the button should appear to claim equivalence.
In a melee game, why can’t my tests detect my own mutants?
You cannot detect your own mutants, even if you submit a test that would actually detect it. However, others can detect your mutant by submitting the same test.
What does it mean if a test has a smell?
You may find more information about test smells here.