Mutant Test Execution
To generate mutants you will use the "MuClipse: Tests" runtime configuration. Follow these steps to open and prepare your configuration:
To kill mutants, you will execute JUnit test cases on them by configuring the
Directories tab of the MuClipse: Tests runtime configuration.
Figure 2: Directories (click to enlarge)
- Project: Ensure that this is the same project as when generating mutants.
- Mutants Output: Where the mutants were stored; point it to the same folder it was pointed to when you generated mutants.
- Classes Folder: The root of where your compiled Java binaries are (usually "bin")
- Testset Folder: The root of where your test case source files are
- Source Folder: The root of where your source code files are
- Target Class: This should be the same name of the class you chose when generating mutants. The example below demonstrates selecting
Recipe
as the target class.
- Test Class: This should be a JUnit test case class you wish to execute against your mutants. Select it in the same way as the target class.
Figure 3: Selecting a Class (click to enlarge)
After you have configured MuClipse to execute your tests, you can configure some testing options in the
Testing Options tab.
Figure 4: Testing Options
The testing options tab allows you to specify the following options:
- The Timeout Period: This is the amount of time each testcase is given to run. If a testcase causes an infinite loop, MuClipse kills that thread and counts that as a failure. If a lot of testcases are failing, increase this value. If execution is taking too long, decrease this value.
- Test Traditional/Class-Level Mutants: These are two different types of operators. Do not test an operator type which you did not create mutants for or which did not generate any mutants.
When you have finished specifying your options, click "Run." The console window will display output indicating the test results. The last thing in the output window should be your mutation score and killed/live numbers. When execution is complete, the console will display these statistics and the string "Writing to file..."
On to View Results -->