MDroidPlus is a mutation analysis framework for Android applications. MDroidPlus implements 35 mutation operators specifically for Android apps, covering the following categories:
- Activity/Intents
- Android Programming
- Back-End Services
- Connectivity
- Data
- Database
- General Programming
- GUI
- I/O
- Non-Functional Requirements
The complete list of mutation operators and their specification is available at the MDroidPlus website. Given an Android App, MDroidPlus first extracts the Potential Fault Profile (PFP) and then automatically seeds mutants generating mutated copies of the App.
MDroidPlus is a collaborative research effort between the SEMERU group at William & Mary,the Universidad de los Andes (Colombia), the University of Lugano, and the University of Sannio.
For more information please visit: http://android-mutation.com
If you use MDroidPlus for academic purposes, please cite:
Linares-Vásquez, M., Bavota, G., Tufano, M., Moran, K., Di Penta, M., Vendome, C., Bernal-Cárdenas, C., and Poshyvanyk, D., “Enabling Mutation Testing for Android Apps”, in Proceedings of 11th Joint Meeting of the European Software Engineering Conference and the 25th ACM SIGSOFT International Symposium on the Foundations of Software Engineering (ESEC/FSE’17), Paderborn, Germany, September 4-8, 2017, to appear 12 pages (24.4% acceptance ratio)
Download and compile MDroidPlus with the following commands:
git clone https://gitlab.com/SEMERU-Code-Public/Android/Mutation/MDroidPlus.git
cd MDroidPlus
mvn clean
mvn package
The generated runnable jar can be found in: MDroidPlus/target/MDroidPlus-1.0.0.jar
To run MDroidPlus use the following command, specifying the required arguments:
java -jar MDroidPlus-1.0.0.jar <libs4ast> <AppSourceCode> <AppPackage> <Output> <operatorsDir> <multithread>
Provide the following list of required arguments when running MDroidPlus:
libs4ast: path of the lib4ast folder (MDroidPlus/lib4ast/);AppSourceCode: path of the Android app source code folder;AppPackage: App main package name;Output: path of the folder where the mutantns will be created;operatorsDir: path to the folder containing the operators.properties.multithread: true or false, specifying whether the mutant generation should be multithreaded or not.
Mutation operators can be selected or deselected editing the operators.properties file. To deselect an operator, either comment (#) or delete the corresponding line.
cd MDroidPlus
java -jar target/MDroidPlus-1.0.0.jar libs4ast/ /tmp/AppFoo/src/ AppFoo /tmp/mutants/ . true
The output directory will contain a folder for each generated mutant and a log file. The mutants folders are named with the corresponding mutant ID (i.e., numerical ID). The log file contains information about the mutation process as well as the type and location of each mutant generated.
- Include PIT and Major operators