MZoltar's DeMobile 2013 Paper

Downloads - Android project of the example application used in the paper

FaultFramework.jar - Framework used to inject faults in the subject applications - Sourcecode of the injection framework (FaultFramework.jar) - Customised InstrumentationTestRunner used


To inject a fault, using our framework, the syntas is the following:

this.let +=<id>, <expectedResult>, <incorrectResult>);

Let's suppose one needs to inject a fault where the counter should be incremented by one, but is instead incremented by two:

this.let += 1; // correct code (no fault injected)
this.let += 2; // incorrect code (with fault injected)
this.let +=,1,2); //framework code

To activate the fault(s), the MZoltarTestTunner must be in the source of the test application and declared in its AndroidManifest.xml:

android:targetPackage="example.charactercount" />

Last, when running the tests the argument injectedFaults should be passed, containing the ids of the faults to activate, in the form of comma-separated values

adb shell instrument -w -e injectedFaults 1,2,3 example.charactercount.test\mzoltar.testrunner.MZoltarTestRunner