Software Testing Assignment #5 Please submit one (zip) file for the entire assignment The problems are based on a simplified cruise control simulation program in Java. The zipped code file includes...

Need to complete all the sections


Software Testing Assignment #5 Please submit one (zip) file for the entire assignment 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. 1. Round-trip tree 1.1 Use a computer-aided tool to draw the round-trip tree of the state model (20 points). Handwritten answer will not be accepted. 1.2 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) 1.3 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 2. Round-trip tree with sneak paths 2.1 Use a computer-aided tool to draw the round-trip tree with sneak paths (20 points). Handwritten answer will not be accepted. 2.2 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) 2.3 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) Mutant Version Test failure: Yes or No? 1 2 3 4 5 6 7 8 9 3. Analysis of the testing methods 3.1 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) 3.2 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) 1 CruiseControlAssignment/.DS_Store __MACOSX/CruiseControlAssignment/._.DS_Store CruiseControlAssignment/bin/correct/ControllerStateCoverageTest.class package correct; public synchronized class ControllerStateCoverageTest { private Controller controller; public void ControllerStateCoverageTest(); public void test(); } CruiseControlAssignment/bin/correct/Controller.class package correct; synchronized class Controller { public static final int INACTIVE = 0; public static final int ACTIVE = 1; public static final int CRUISING = 2; public static final int STANDBY = 3; private int controlState; private SpeedControl sc; public void Controller(); public void brake(); public void accelerator(); public void engineOff(); public void engineOn(); public void on(); public void off(); public void resume(); public int getControlState(); public SpeedControl getSpeedControl(); } CruiseControlAssignment/bin/correct/SpeedControl.class package correct; synchronized class SpeedControl { public static final int DISABLED = 0; public static final int ENABLED = 1; private int state; public void SpeedControl(); public void enableControl(); public void disableControl(); public int getSpeedControlState(); } CruiseControlAssignment/bin/mutant9/Controller.class package mutant9; synchronized class Controller { public static final int INACTIVE = 0; public static final int ACTIVE = 1; public static final int CRUISING = 2; public static final int STANDBY = 3; private int controlState; private SpeedControl sc; public void Controller(); public void brake(); public void accelerator(); public void engineOff(); public void engineOn(); public void on(); public void off(); public void resume(); public int getControlState(); public SpeedControl getSpeedControl(); } CruiseControlAssignment/bin/mutant9/SpeedControl.class package mutant9; synchronized class SpeedControl { public static final int DISABLED = 0; public static final int ENABLED = 1; private int state; public void SpeedControl(); public void enableControl(); public void disableControl(); public int getSpeedControlState(); } CruiseControlAssignment/bin/mutant7/Controller.class package mutant7; synchronized class Controller { public static final int INACTIVE = 0; public static final int ACTIVE = 1; public static final int CRUISING = 2; public static final int STANDBY = 3; private int controlState; private SpeedControl sc; public void Controller(); public void brake(); public void accelerator(); public void engineOff(); public void engineOn(); public void on(); public void off(); public void resume(); public int getControlState(); public SpeedControl getSpeedControl(); } CruiseControlAssignment/bin/mutant7/SpeedControl.class package mutant7; synchronized class SpeedControl { public static final int DISABLED = 0; public static final int ENABLED = 1; private int state; public void SpeedControl(); public void enableControl(); public void disableControl(); public int getSpeedControlState(); } CruiseControlAssignment/bin/.DS_Store CruiseControlAssignment/bin/mutant1/Controller.class package mutant1; synchronized class Controller { public static final int INACTIVE = 0; public static final int ACTIVE = 1; public static final int CRUISING = 2; public static final int STANDBY = 3; private int controlState; private SpeedControl sc; public void Controller(); public void brake(); public void accelerator(); public void engineOff(); public void engineOn(); public void on(); public void off(); public void resume(); public int getControlState(); public SpeedControl getSpeedControl(); } CruiseControlAssignment/bin/mutant1/SpeedControl.class package mutant1; synchronized class SpeedControl { public static final int DISABLED = 0; public static final int ENABLED = 1; private int state; public void SpeedControl(); public void enableControl(); public void disableControl(); public int getSpeedControlState(); } CruiseControlAssignment/bin/mutant6/Controller.class package mutant6; synchronized class Controller { public static final int INACTIVE = 0; public static final int ACTIVE = 1; public static final int CRUISING = 2; public static final int STANDBY = 3; private int controlState; private SpeedControl sc; public void Controller(); public void brake(); public void accelerator(); public void engineOff(); public void engineOn(); public void on(); public void off(); public void resume(); public int getControlState(); public SpeedControl getSpeedControl(); } CruiseControlAssignment/bin/mutant6/SpeedControl.class package mutant6; synchronized class SpeedControl { public static final int DISABLED = 0; public static final int ENABLED = 1; private int state; public void SpeedControl(); public void enableControl(); public void disableControl(); public int getSpeedControlState(); } CruiseControlAssignment/bin/mutant8/Controller.class package mutant8; synchronized class Controller { public static final int INACTIVE = 0; public static final int ACTIVE = 1; public static final int CRUISING = 2; public static final int STANDBY = 3; private int controlState; private SpeedControl sc; public void Controller(); public void brake(); public void accelerator(); public void engineOff(); public void engineOn(); public void on(); public void off(); public void resume(); public int getControlState(); public SpeedControl getSpeedControl(); } CruiseControlAssignment/bin/mutant8/SpeedControl.class package mutant8; synchronized class SpeedControl { public static final int DISABLED = 0; public static final int ENABLED = 1; private int state; public void SpeedControl(); public void enableControl(); public void disableControl(); public int getSpeedControlState(); } CruiseControlAssignment/bin/mutant3/Controller.class package mutant3; synchronized class Controller { public static final int INACTIVE = 0; public static final int ACTIVE = 1; public static final int CRUISING = 2; public static final int STANDBY = 3; private int controlState; private SpeedControl sc; public void Controller(); public void brake(); public void accelerator(); public void engineOff(); public void engineOn(); public void on(); public void off(); public void resume(); public int getControlState(); public SpeedControl getSpeedControl(); } CruiseControlAssignment/bin/mutant3/SpeedControl.class package
May 07, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here