HKG15-306: Introducing Aster - a tool for remote GUI testing on AOSP / Build system modifications to ease working with other AOSP projects
---------------------------------------------------
Speaker: Yongqin Liu, Bernhard Rosenkränzer
Date: February 11, 2015
---------------------------------------------------
★ Session Summary ★
Title: Introducing Aster - a tool for remote GUI testing on Android
Abstract:
There are many tools that can be used to do remote GUI control for Android platform, but they have limitations like needing device at hand, or needing to install extras into the device, or not providing sufficient authentication methods for remote access, etc. In this presentation, we will show how to use Aster to work around these problems, how to add your own features into it, and how to use it as a record/replay tools and do GUI smoke/stability tests for the Android platform.
Title: Build system modifications to ease working with other Android projects
Abstract:
Along with updating the LCR builds to Android L, we have made some modifications to the build system to ease working with other Android projects: local manifests and scripts that apply patches from Gerrit submissions.
This presentation introduces the concepts and their uses, and some ideas for future improvements.
--------------------------------------------------
★ Resources ★
Pathable: https://hkg15.pathable.com/meetings/250811
Video:
Etherpad: http://pad.linaro.org/p/hkg15-306
---------------------------------------------------
★ Event Details ★
Linaro Connect Hong Kong 2015 - #HKG15
February 9-13th, 2015
Regal Airport Hotel Hong Kong Airport
---------------------------------------------------
http://www.linaro.org
http://connect.linaro.org
HKG15-306: Introducing Aster - a tool for remote GUI testing on AOSP
1. Presented by
Date
Introducing Aster - a tool
for remote GUI testing on
Android
Yongqin Liu
Android Software Enginner @ LMG
2015.02.08~2015.02.14
2. Contents
● Background
● New Features
● How to control remote device
● Dependencies
● Limitations
● Develop with Eclipse
● UI Concept
● Action Concept/Source Structure
● How to add new action
● How to add new adb type
● Links
3. Aster is the abbreviation of Android System
Testing Environment and Runtime, which is
developed by 0xlab originally, which is said
built upon the concept of Sikuli.
We can use it to control the UI of local android
device, but since it is based on the monkey
runner engine, we can not use it to control the
device at the remote side. Change it!
Background
4. New Features
● Support access for remote device
○ only support access via ssh now
● Support input of serial number
● Display for logcat/kmsg
● Support for AdbShell action
● Make it an eclipse project
○ easily to develop/debug
5. 1. make “ssh aster-adb-host adb devices” work
a. add “aster-adb-host” Host in .ssh/config with
necessary account and Hostname information
b. copy public key information to ssh side so that no
interaction when run “ssh aster-adb-host adb”s
2. select “ssh” as the adb type
3. input serial number you want to control
4. Check if you can see the home screen
displayed in the Aster window
How to control remote device
7. Limitations
● Not support Monkeyrunner Yet
● Can not edit action or script
● No interaction between devices
supported
● Only tested on Ubuntu14.04
● Call/InstallApk action is not ready
8. 1. git clone https://github.com/liuyq/aster.git
2. Open Eclipse, and import the aster project
3. Run/Debug as “Java Application”, and use org.
zeroxlab.aster.AsterMain as Main class
4. run ant under the aster project can help to
create the distributable files under dist
directory, the dist/aster file can be used to start
aster
Develop with Eclipse
11. public abstract class AsterCommand {
private static final Map<String, Class>
supportedCommands =
new LinkedHashMap<String, Class>() {
{
...
put("Call", Call.class);
put("InstallApk", InstallApk.class);
put("AdbShell", AdbShell.class);
put("Wait", Wait.class);
}
};
...
}
public class InstallApk extends
AsterCommand {
….
}
How to add new action
public class AdbShell extends
AsterCommand {
….
}
12. public abstract class DeviceForAster {
….
public static void initialize(String adbType, String serial)
throws Exception {
if (adbType == null || Constants.ADB_TYPE_LOCAL.equals(adbType)) {
instance = new LocalAdb(serial);
return;
} else if (adbType.equals(Constants.ADB_TYPE_SSH)) {
instance = new SshAdb(serial, Constants.SSH_ADB_HOST);
return;
} else if (adbType.equals(Constants.ADB_TYPE_MONKEYRUNNER)) {
throw new Exception("Monkeyrunner still not implemented yet");
}
throw new Exception("Not supported ADB Type:" + adbType);
}
...
}
public class SshAdb extends DeviceForAster {
...
protected ...getAdbSerialArrayList() {
...
}
public String getScreenShotPath(){
...
}
…
}
How to add new remote type