Tutorials

A3E is an exploration utility for automated GUI testing. It consists of two GUI eploration strategies,

Depth-First Exploration

To start a depth-first exploration, find the ruby script rec.rb in troyd/bin and use the following command,

ruby bin/rec.rb aut/your_application.apk --no-rec -loop

The script will then automatically launch the main activity, and starts ripping the appication thus discovering GUI widgets. It will attempt to send logical inputs by validating the particular GUI element which is represented by a View. To initialize text boxes with default value there are two options. Modify the a3e.conf file to set the default string parameters. Currently it is "test". Also to push specific text to specific GUI elements or View objects in a particular activity, provide an xml file named activities.input.xml The format is

<activity name="com.org.foo" viewid="4523651">John</activity>
<activity name="com.org.foo" viewid="4523652">john@example.com</activity>

A3E will then attempt to provide these particular inputs to those Views in the activities. This is useful in providing log in credentials while testing the applications.

The View Id of elements can be gained by trying to launch the particular activity and giving the getViews command,

ruby bin/rec.rb aut/your_application.apk --no-rec -noloop com.org.foo getViews


Targeted Depth-First Exploration

Steps

1. Construct SATG
java -Xmx6g -jar sap.jar --android-lib=lib/android-2.3.7_r1.jar application.apk | grep "<activity>" > file.g
java -jar convert.jar file.g file.xml
java -jar tdef.jar meta application.apk file.xml application.xml
2. Verify the xml
Create data flow test cases using the tutorial from SCanDroid.
3. Run A3E script
ruby bin/rec.rb aut/your_application.apk --no-rec -tdf -loop
just like DFE you can use,

ruby bin/rec.rb aut/your_application.apk --no-rec -tdf -noloop com.org.foo getViews
 to get the views for activity com.org.foo