android studio 的UIAutomator用例 如何通过adb 启动

现在在AS 上写了个uiautomator的用例,但是每次要测都要打开AS run这个test工程,现在是想是否可用adb命令来做,这样就可以写个脚本来用了。。但是死活不知如何启动。
Installing APK: H:\dev\AndroidStudioProjects\MyApplication\testapp\build\outputs\apk\testapp-debug.apk
Uploading file to: /data/local/tmp/com.example.android.testing.uiautomator.BasicSample
Installing com.example.android.testing.uiautomator.BasicSample
DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/com.example.android.testing.uiautomator.BasicSample"
pkg: /data/local/tmp/com.example.android.testing.uiautomator.BasicSample
Success

Installing APK: H:\dev\AndroidStudioProjects\MyApplication\testapp\build\outputs\apk\testapp-debug-androidTest-unaligned.apk
Uploading file to: /data/local/tmp/com.example.android.testing.uiautomator.BasicSample.test
Installing com.example.android.testing.uiautomator.BasicSample.test
DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/com.example.android.testing.uiautomator.BasicSample.test"
pkg: /data/local/tmp/com.example.android.testing.uiautomator.BasicSample.test
Success

**********************以上的都是可以的,但是安装完后不知如果做以下操作
Running tests
Test running startedFinish

1个回答

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!