Commit 8f1b241a authored by Kevin Moran's avatar Kevin Moran

Added README and made slightly more modular

Added README and made slightly more modular
parent 417023e0
......@@ -16,5 +16,21 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path="target/generated-sources/annotations">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="ignore_optional_problems" value="true"/>
<attribute name="m2e-apt" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="target/generated-test-sources/test-annotations">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="ignore_optional_problems" value="true"/>
<attribute name="m2e-apt" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>
eclipse.preferences.version=1
org.eclipse.jdt.apt.aptEnabled=false
......@@ -9,4 +9,6 @@ org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.processAnnotations=disabled
org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=1.8
# Pit Wrapper for Android
## Overview
This project adapts the [Pit Mutation tool](https://pitest.org) so that it can be applied to the bytecode of Android applications. This is a multi-threaded program that can be applied to generate thousands of mutants in a relatively efficient manner.
## Use
The project dependencies are managed by Maven, and we provide the necessary files so that the project can be automatically imported into Eclipse. The use of the tool proceeds as follows:
1) Decompile the target Android application to be mutated using a combination of [APKTool]() and your Java Decompiler of Choice. There is also some supporting code for this in the `ExtractDataService` Class in the project.
2) Make sure all the .class files for the app are contained within a single folder which we will call the `ClassesFolder`.
3) Specify an empty folder where the mutants will be created called the `MutantsOutputFolder`.
4) If the app uses specific libraries that are packaged as jars, place all of these in a separate folder called the `JarsFolder`.
5) Run the main method in the `PITMutationWrapper` class passing in the absolute paths to the three folders above in the order they are introduced. The program should run and will generate mutants in the `MutantsOutputFolder`.
## Troubleshooting
If you have any issues or questions, please feel free to open a ticket and tag @kpmoran for assistance.
\ No newline at end of file
......@@ -71,8 +71,8 @@ import com.strobel.decompiler.PlainTextOutput;
/**
* This class was created (by Joel) as an example of how PIT's mutation engine can be used
* directly to output mutations of a mutatee to file. Then, it was customized and extended by Mario to
* generate mutants from several files and to fit the requirements for the ASE experience report.
* directly to output mutations of a mutatee to file. Then, it was customized and extended by Kevin and Mario to
* generate mutants from several files in a multi-threaded manner.
*
* Original version of the file is here: https://groups.google.com/forum/#!msg/pitusers/9MB4ZUhUJ34/SeECRxKqQo4J
*
......@@ -96,18 +96,18 @@ public class PITMutationWrapper {
PITGenerationConfig config = new PITGenerationConfig();
//Output folder for the generated files
config.setMutantsOutputFolder("/Users/KevinMoran/Desktop/PitMutation/Output/");
config.setMutantsOutputFolder(args[0]);
//This is the folder having the classes (i.e., .class files) for the main package
config.setClassesFolder("/Users/KevinMoran/Desktop/PitMutation/Input/");
config.setClassesFolder(args[1]);
//This is required for those apps that require extras or specific jars from Android
config.setJarsFolder("/Users/KevinMoran/Desktop/PitMutation/libs4analysis");
config.setJarsFolder(args[2]);
//Flag to control whether the .class files are decompiled to Java source code
config.setDecompileClass(true);
//PITMutationWrapper wrapper = new PITMutationWrapper(config);
PITMutationWrapper wrapper = new PITMutationWrapper(config);
// wrapper.generateMutants();
// countMutantTypes(args[0]);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment