-
To install MutPy (for Mutation testing in Python) you need to run:
pip install mutpy
-
Use this link to install Maven (for Mutation testing in Java)
-
Navigate to the
Code/Python (MutPy)/Unitdirectory (MutPy only supports unit testing not integration for integration testing we have manually created mutations). -
Run the following command in the terminal:
mut.py --target numAnalysis --unit-test tester -m --runner pytest --report-html Output/
-
View the mutation testing results in the corresponding folder by just opening
index.html.
-
Create project using
mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app -DarchetypeArtifactId=maven-archetype-quickstart -DarchetypeVersion=1.4 -DinteractiveMode=false cd my-app -
Navigate to the
Code/Java (PIT)/directory choose eitherUnitorIntegrationand copypom.xml,App.javaandAppTest.java. -
To run the test cases, use:
mvn package
-
Run the following command for mutation testing:
mvn test-compile org.pitest:pitest-maven:mutationCoverage
-
View the mutation testing results in
target/pit-reports/index.html.