One Android app in.

Realistic mutants out.

Faults modeled on real Android bugs — to test your tests.

Introducing
MDroid+
A mutation testing framework for Android

First, profile the app.

AST and text analysis find every spot one of 38 operators can strike.

Then clone and mutate — in parallel.

One project clone per location, one fault per clone, across every core.

Every mutant, logged.

The log records which operator went where — ready to build and test.

APP SOURCE

notes-app/ AndroidManifest.xml src/…/NoteList.java src/…/Editor.java res/values/strings.xml res/layout/main.xml

① PFP DERIVATION

AST analysisText analysis
NullIntentNoteList.java
FindViewByIdReturnsNullEditor.java
MissingPermissionManifestManifest
InvalidLabelManifest
WrongStringResourcestrings.xml
mutants.log
mutant_1 NullIntent NoteList.java
mutant_2 MissingPermissionManifest AndroidManifest.xml

Need a new operator? Add one.

Open to extension, closed to modification: two small pieces per operator.

01 · WHERE

A Locator

class MyLocator implements Locator {
  findExactLocations(loc) { … }
}
02 · HOW

A MutationOperator

class NullStream implements MutationOperator {
  performMutation(loc) { // stream = null; }
}
Evaluated on 55 open-source apps
0 s
average runtime per app, on server-class hardware
8,000+mutants for 50+ apps
0.56%non-compilable mutants
2.42%trivial mutants · fewest of 4 tools

MDroid+: A Mutation Testing Framework for Android

Kevin Moran · Michele Tufano · Carlos Bernal-Cárdenas · Mario Linares-Vásquez · Gabriele Bavota · Christopher Vendome · Massimiliano Di Penta · Denys Poshyvanyk
ICSE 2018 · IEEE/ACM International Conference on Software Engineering · Demonstrations