Mutation Testing and Test Input Generation

DUE: 11:59PM, Friday 15 March 2019

40 points


Objectives

  • Practice a problem from syntax-based testing.
  • Use a mutation tool of your choice.
  • Use a test input generation tool.

Tasks

  1. (10 points): For this question refer to your textbook: Figure 5.1 on page 189 of edition 1, or Figure 9.1 on page 243 of edition 2. Provide the reachability conditions, infection conditions, propagation conditions, and test case values to kill 2, 4, 5, and 6 in the figure.

  2. (10 points): Mutate the implementation of the Chess program (not the test cases) you used in A1 and then run the JUnit test cases that you wrote. Prepare a report that shows the numbers of different types of mutants that were generated, and how many were killed. You are allowed to use any one of PIT (probably the easiest to use), MAJOR, MuJava version 4, and Javalanche.

  3. Install any one of the following two test input generation tools.
    • Randoop: Click here for instructions on installation and usage. Get the Java version.
    • EvoSuite: Click here for instructions on installation and usage.

  4. Generate test cases for your Chess program from assignment A1.

  5. (10 points): Explore the generated test inputs. Create a report showing the number of test cases generated. Comment on what you found interesting about the test inputs.

  6. (10 points): Insert five faults of your choice one by one in the code. See if the generated test cases find them. Include a description of the fault (e.g., file name, line number, what you changed) and whether it was detected. If it was, describe the test case that detected it.


Submission

Type the answers to the above questions in a document called a6.pdf. Submit the file using Assignment Submission in Canvas.