CS Mutation Testings

The problems are based on a simplified cruise control simulation program in Java. The zipped code file includes the following ten folders/packages: correct, mutant1, mutant2, …., and mutant9. The correct folder is the correct version, whereas each of the other folders contains a mutant of Controller.java. The finite state model of the Controller class is given below.

pastedGraphic.png

Round-trip tree
Use a computer-aided tool to draw the round-trip tree of the state model (20 points). Handwritten answer will not be accepted.
Write a Junit class ControllerRoundTripTest.java in the correct package to implement all the test cases from the round-trip tree. Each path from the root to a leaf should be implemented by a separate Junit test. Run ControllerRoundTripTest.java and none of the tests should fail, otherwise your tests are incorrect and you need to fix them before moving on to the next problem. Provide the source code of your ControllerRoundTripTest.java (15 points) and the screenshot of the test execution result (5 points)

Copy your ControllerRoundTripTest.java in Problem 1.2 to each mutantX (X=1, 2, …, 9) package. Make sure the package statement in ControllerRoundTripTest.java is correct so that you can test Controller.java in the same package. Summarize the test execution results in the following table and provide a screenshot of the test execution result for each mutantX (X=1, 2, …, 9). (5 points)
Mutant Version

Test failure: Yes or No?

1

2

3

4

5

6

7

8

9

Sample Solution