To install and use MuDroid:
1- Download the plugin from here.
2- Import the plugin into your Eclipse workspace.
3- Open the project in the Eclipse and look for "META-INF" folder.
4- Right click on the "MANIFEST.MF" file and run it as an "Eclipse Application". This opens a new Eclipse workspace with the "MuDroid" menu added to after "Help".
5- Import your subject application into the runtime Eclipse workspace (The newly opened workspace).
6- Click on the "MuDroid" menu and select a mutation operator you want to apply on the subject app.
For a better illustration of how MuDroid framework works and make it easier to follow the changes made by mutation operator,
we authored a small Android application consists of two activities. The main activity
contains a text box and a button, where you can fill the text box with a number.
When you click on the button, it starts new activity and logs a message into the logcat N times, where
N is the number you entered in the text box.
The source code of the app is located under "Apps" folder. After installing and starting
the plugin, import the source code of the app into the runtime Eclipse workspace (Step 5 of Installation).
A Robotium test case for this app is located under the "test" folder in the source code of the app.
We applied three mutation operators to the app, namely "ILI", "MSB", and "LBC" and collected
the power traces of running the given test case on the original version of the app and mutant
versions. The detailed measurement data for the original app and mutants is available
under the folder "Example" in the plugin source code.
To analyze and compare power traces, you need to run "Run.java" under "edu.uci.seallab.mudroid" package
in the plugin source code, which prints out if the test case kills mutants or not.
You can also find the power traces of "representative" power trace for the original app,
as well as power traces of mutants under the folder "Example/Traces" in the plugin source code.
The following table summarizes the results of this example. ILI mutation operator increases
the number of spikes in the app and MSB mutation operators increases the amplitude of
each sampling (The average amplitude of spikes in original app is below 1500 mW for the
original version, while that of for the MSB version is 4500). For the given test case,
LBC does not significantly impact the power consumption and consequently power trace of
the app.
Version | Killed? | Power Trace |
---|---|---|
Original | - | ![]() |
MSB | Y | ![]() |
ILI | Y | ![]() |
LBC | N | ![]() |