Ape applies a CEGAR style technique to refine and coarsen the model abstraction. A paper about Ape's main idea has been accepted to ICSE 2019.
In the ICSE paper, we evaluated Ape in two experiments.
We provided a
libart.so for x86 emulators to collect coverage without instrumentation.
That means, you can use this tool to collect coverage for apps such as Google Doc to evaluate your tools.
1 2 3 4 5 6
ape-bin/ ape-bin/ape ape-bin/ape.jar ape-bin/ape.py ape-bin/install.py ape-bin/README.md
Copy Just copy the
ape.jar to the phone.
adb push ape.jar /data/local/tmp/
adb shell CLASSPATH=/data/local/tmp/ape.jar /system/bin/app_process /data/local/tmp/ com.android.commands.monkey.Monkey
More details can be found in
We provide a python script (i.e.,
ape.py) to facilitate running ape on Android platform.
The following command starts to run Ape to test the Calculator on a real device connected via
adb is available in your
./ape.py -p com.google.android.calculator --running-minutes 100 --ape sata
ape.py if you want to run Ape with multiple devices via
-p: specify the package name, the same as Monkey
--running-minutes: the total testing time in minutes
--ape sata: use the default exploration strategy described in the paper.
sataare supported now, where
satais the default exploration strategy described in the paper.
You can also specify the total amount of Monkey events. In this mode, Ape will stop by default once there is a crash.
./ape.py -p com.google.android.calculator --ape sata 1000
Users should save everything that has been outputted into the console.
In addition to the standard output, Ape also records both high-level actions and low-level events and saves them into a folder under
action-history.log: The history of actions. We create a phantom action
PHANTOM_CRASHto record crash information. An action may produce more than one events.
produce.log: The history of events that are generated from actions.
consume.log: The history of events that are actually injected but the injection may fail. For example, a click event may fail if the GUI changes after the event is created.
sataGraph.vis.js: Model graph can be visualized using vis.
sataTimeline.vis.js: Timeline can be visualized using vis.
sataModel.obj: Model graph has been dumped using the Java Serialization API. This file could be used for off-line graph analysis of the model.
step-11-g5s8.txt: The state at iteration 11.
step-1404.xml: The GUI tree (in XML) at iteration 1404.
step-597.png: The snapshot at step 597.
We provide a tool to visualize the model.
adb pull /sdcard/your-output-folderto your local directory.
vis.htmlin your browser.
Now we can check the timeline.
We thank the following experts for their insightful comments on Ape.