Software Architecture – Homework
Question Description
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.
- 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.
- Round-trip tree with sneak paths
- Use a computer-aided tool to draw the round-trip tree with sneak paths (20 points). Handwritten answer will not be accepted.
- Write a Junit class ControllerRoundTripSneakPathsTest.java in the correct package to implement all the test cases from the round-trip tree with sneak paths. Each path from the root to a leaf should be implemented by a separate Junit test. Run ControllerRoundTripSneakPathsTest.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 ControllerRoundTripSneakPathsTest.java (10 points) and the screenshot of the test execution result (5 points)
- Copy your ControllerRoundTripSneakPathsTest.java in Problem 2.2 to each mutantX (X=1, 2, …, 9) package. Make sure the package statement in ControllerRoundTripSneakPathsTest 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)
- Analysis of the testing methods
- Compare mutants 7-9 to the correct version and explain why the test suites in Problems 1 and 2 cannot kill these mutants. (10 points)
- Discuss how the given finite state model can be enhanced so that the tests in the round-trip tree and the round-trip tree with sneak paths generated from the enhanced state model can reveal the bugs in mutants 7-9 (5 points)
Mutant Version |
Test failure: Yes or No? |
1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
Mutant Version |
Test failure: Yes or No? |
1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
Have a similar assignment? "Place an order for your assignment and have exceptional work written by our team of experts, guaranteeing you A results."