首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > 移动开发 >

uiautomator 试工心得

2013-01-21 
uiautomator 试用心得这是官方地址:https://developer.android.com/tools/testing/testing_ui.html觉得有

uiautomator 试用心得
这是官方地址:https://developer.android.com/tools/testing/testing_ui.html
觉得有这两点缺陷 :
1) 因为需要打jar包然后push到机器上,调试很不方便
2)API level 16以上(4.1以上) 所以机型就有限制,老用模拟器也不实际

需要用到如下命令:
到sdk tool目录(需根据你实际目录情况修改项目名和路径),执行android create uitest-project -n Hello -t 9 -p ../../truck/Hello/

ant build


需进入到项目目录
adb push Hello.jar /data/local/tmp/
adb shell uiautomator runtest Hello.jar -c com.test.HelloWorld

热点排行