1. Control and switch between multiple activities of a single app.
2. Control an switch between multiple apps.
3. Combine with API for result checking?
4. User gesture coverage (Single tap, Double tap, Long press, Swipe, Scroll, etc).
5. UI component travel
Study:
2. How to run: http://my.oschina.net/yuchaolee/blog/171289
3. Sample:
b. Calculator:
c. Guadian: http://www.theguardian.com/info/developer-blog/2013/jul/31/robust-testing-uiautomator-android
f. Clock: http://blog.chengyunfeng.com/?p=504 / http://mobileautomation.blogspot.tw/2012/11/android-uiutomater-sample-test-case.html
g.
5. Basic training: http://blog.chengyunfeng.com/?p=504
Step:
1. Create a Java project.
2. Add Junit lib.
3. Add android.jar & uiautomator.jar.
4. Coding.
5. <android-sdk>/tools/android create uitest-project -n <project_name> -t <AVD_ID> -p <project_path> (AVD_ID 透過 android list 取得)
6. Edit build.xml -> line2 ("help" -> "build").
7. build.xml -> ant build
8. adb push xxx.jar /data/local/tmp/
9. adb shell uiautomator runtest xxx.jar -c <Package_name>.<Class_Name>.
沒有留言:
張貼留言