CSI 3373 Assignment 13 (A13)
Due: December 9, Monday, 11:55pm
Objective: Using muJava for Java Mutation Testing
Tasks
- Tool Review: Read the tool overview on muJava Version 4 home page - a hardcopy of the page will also be provided. Note: Do not start downloading or running the tool yet.
- Create a sub-folder mujava on C: drive.
- Download the following files to your mujava folder:
- mujava.jar: muJava version 4 system library
- openjava.jar: OpenJava library that is adapted for muJava (OpenJava page)
- mujava.config: A file to specifies the muJava system home directory
- Cal.java: A class file to test
-
Complete the following three steps as instructed in the 1. Environment Settings section on muJava home page:
-
CLASSPATH, slight difference from the instructions:
1. Hit the windows button on your keyboard 2. type "Edit environment variables for your account". 3. add a new User variable, called CLASSPATH. Set the value of this variable to C:\mujava\mujava.jar;C:\mujava\openjava.jar;C:\Program Files\Java\jdk1.8\lib\tools.jar.
-
setting the config file
-
creating subdirectories
Note: Cal.java should be moved to Mujava_Home\src and all commands should be run in the directory that contains "mujava.config".
- To test a method cal(...) using muJava, complete the following step:
- Enclose the method *cal() *from *Cal.java *in src folder and its complied class file in class folder respectively. Note that you should work with four subdirectories as listed below:
MuJava_HOME\src | directory for Java files under test |
MuJava_HOME\classes | directory for compiled classes of Java files from MuJava_HOME\src |
MuJava_HOME\testset | directory for test sets |
MuJava_HOME\result | directory for generated mutants |
- Generate mutants with muJava (Refer to* *2. Generating Mutants with muJava section on muJava home page).
- First, generate all traditional mutants.
- Compare the provided types of traditional mutants with the list given in the textbook. Summarize the differences in two lists and your mutants generation results (i.e., # mutants generated for each operator, etc.) in YourLastNames_A13.docx.
- Regenerate mutants only for the following operators: AOR, ROR, COR, UOI and SVR.
- Summarize your new mutants generation result in YourLastNames_A13.docx.
Note: When you try to run the GUI from command line with:
"java mujava.gui.GenMutantsMain", you might get an error saying “could not find or load main class mujava.gui.GenMutantsMain”. It means that your class path does not contain the mujava.jar. Set the CLASSPATH carefully.
- Make a test set. (refer to* 3. Making a test set *section on muJava home page). Make sure to add the JUnit library to the CLASSPATH.
- Run mutants. (refer to* 4. Running mutants *section on muJava home page)
- Summarize your mutation testing result. (Include multiple screen captures, as needed, in your summary)
- Submit the following files to Canvas via Assignment 13 submission link on Assignments page.
- YourLastName_A13.docx
- YourLastName_A13.zip: the compressed file of your *muJava *system home directory
Last revised on November 26, 2019