Mutation Testing is a technique through which we bring artificial changes to the source code in order to enable the test suite to detect those changes. In this project we plan to implement a tool that can implement all the mutators available with Pitest tool and perform mutation testing on the jsoup project.
- Clone the repository.
- Run mvn clean, mvn test, to verify the code is in its original state.
- Run CodeModifierTest.java file.
- See mutationScores.txt to find mutants killed, executed and generated for respective mutators.
- Check finalStatistics.txt to find the comparison of our tool with Pitest.
Our main aim is to generate the mutants and execute them for the mutators implemented by Pitest. For doing so, we are first genrating mutatnts, and then executing them. After execution phase, we are running the test suite of jsoup and checking if the tests are able to detect those changes. If yes, that means we have successfully killed the mutant. Below is the step by step explanation of the process we are following:
- Create a Java file for each mutator
- Iterate over all the categories of mutators
- Extract all the Java files
- Iterate over all Java files
- Parse Java files
- Generate Mutants
- Select the mutants to execute
- Execute Mutants
- Record the statistics for the respective mutator
- Generate maven surefire-reports
- Copy the reports to a different directory
- Repeat steps 4 to 11 for all mutators
- Print the consolidated statistics.