1、在cmd中运行如下命令,生成build.xml文件,位于 E:\Users\Administrator\workspace\beixunUiautomatorTest目录下

android create uitest-project -n beixunUiautomatorTest -t 31 -p E:\Users\Administrator\workspace\beixunUiautomatorTest

2、修改build文件,将<project name="beixunUiautomatorTest" default="help">修改为<project name="beixunUiautomatorTest" default="build">,接下来build.xml文件执行ant,执行默认目标

ant -buildfile E:\Users\Administrator\workspace\beixunUiautomatorTest\build.xml

3、连接手机,将生成的beixunUiautomatorTest.jar push到手机/data/local/tmp目录下

adb push E:\Users\Administrator\workspace\beixunUiautomatorTest\bin\beixunUiautomatorTest.jar /data/local/tmp

4、执行指定测试用例adb shell uiautomator runtest beixunUiautomatorTest.jar -c com.beixun.test.inputTest

 

备注:文字红字加粗字体可替换成实际操作名称

 

相关文章:

  • 2021-08-08
  • 2022-12-23
  • 2021-12-10
  • 2021-12-20
  • 2021-12-29
  • 2022-01-02
猜你喜欢
  • 2021-09-04
  • 2021-05-05
  • 2021-08-21
  • 2022-12-23
  • 2021-11-30
  • 2021-11-13
相关资源
相似解决方案