一、Android UiAutomator报告查看

1.错误类型

1)断言错误:就是断言这个用例的成功或者失败(AssrtionFailedError)
2)脚本错误:UiObjectNotFoundException(找不到对象异常)、java异常等

2.报告状态

1)运行状态
2)结果状态
3)运行信息

运行状态

结果状态

运行信息

运行前(1) OK(0) 运行前的信息
运行完成(-1) Errors(-1) 运行中的信息
运行完成 (-1) Failures(-2) 运行后的信息

3.报告示例说明

二、各种状态报告及定位问题

1)断言失败的例子
  • 示例代码:
//断言失败报告例子
public void testDemo1() throws UiObjectNotFoundException{
//点击短信查看是否有无会话产生
//当前界面获取短信按钮
UiObject msm=new UiObject(new UiSelector().text("短信"));
UiObject None=new UiObject(new UiSelector().text("短信"));
//点击短信按钮
msm.clickAndWaitForNewWindow();
assertTrue(!None.exists());
}
  • 生成报告内容:
//运行前
INSTRUMENTATION_STATUS: current=1
INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
INSTRUMENTATION_STATUS: class=Jian1.test1
INSTRUMENTATION_STATUS: stream=
Jian1.test1:
INSTRUMENTATION_STATUS: numtests=1
INSTRUMENTATION_STATUS: test=testDemo1
INSTRUMENTATION_STATUS_CODE: 1 //运行中
INSTRUMENTATION_STATUS: current=1
INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
INSTRUMENTATION_STATUS: class=Jian1.test1
INSTRUMENTATION_STATUS: stream=
Failure in testDemo1:
junit.framework.AssertionFailedError//报断言错误
at Jian1.test1.testDemo1(test1.java:17)//错误地点Jian/test1/testDemo1/第17行
at java.lang.reflect.Method.invokeNative(Native Method)
at com.android.uiautomator.testrunner.UiAutomatorTestRunner.start(UiAutomatorTestRunner.java:160)
at com.android.uiautomator.testrunner.UiAutomatorTestRunner.run(UiAutomatorTestRunner.java:96)
at com.android.commands.uiautomator.RunTestCommand.run(RunTestCommand.java:91)
at com.android.commands.uiautomator.Launcher.main(Launcher.java:83)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:235)
at dalvik.system.NativeStart.main(Native Method)
INSTRUMENTATION_STATUS: numtests=1
INSTRUMENTATION_STATUS: stack=junit.framework.AssertionFailedError
at Jian1.test1.testDemo1(test1.java:17)
at java.lang.reflect.Method.invokeNative(Native Method)
at com.android.uiautomator.testrunner.UiAutomatorTestRunner.start(UiAutomatorTestRunner.java:160)
at com.android.uiautomator.testrunner.UiAutomatorTestRunner.run(UiAutomatorTestRunner.java:96)
at com.android.commands.uiautomator.RunTestCommand.run(RunTestCommand.java:91)
at com.android.commands.uiautomator.Launcher.main(Launcher.java:83)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:235)
at dalvik.system.NativeStart.main(Native Method)
INSTRUMENTATION_STATUS: test=testDemo1
INSTRUMENTATION_STATUS_CODE: -2 //运行后
INSTRUMENTATION_STATUS: stream=
Test results for WatcherResultPrinter=.F
Time: 2.577
FAILURES!!!
Tests run: 1, Failures: 1, Errors: 0
INSTRUMENTATION_STATUS_CODE: -1
2)报告通过例子
  • 示例代码:
//报告通过例子
public void testDemo1() throws UiObjectNotFoundException{
//点击短信查看是否有无会话产生
//当前界面获取短信按钮
UiObject msm=new UiObject(new UiSelector().text("短信"));
UiObject None=new UiObject(new UiSelector().text("短信"));
//点击短信按钮
msm.clickAndWaitForNewWindow();
// assertTrue(!None.exists());
assertTrue(None.exists());
}
  • 生成报告内容:
//运行前
INSTRUMENTATION_STATUS: current=1
INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
INSTRUMENTATION_STATUS: class=Jian1.test1
INSTRUMENTATION_STATUS: stream=
Jian1.test1:
INSTRUMENTATION_STATUS: numtests=1
INSTRUMENTATION_STATUS: test=testDemo1
INSTRUMENTATION_STATUS_CODE: 1 //运行中
INSTRUMENTATION_STATUS: current=1
INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
INSTRUMENTATION_STATUS: class=Jian1.test1
INSTRUMENTATION_STATUS: stream=.
INSTRUMENTATION_STATUS: numtests=1
INSTRUMENTATION_STATUS: test=testDemo1
INSTRUMENTATION_STATUS_CODE: 0 //运行后
INSTRUMENTATION_STATUS: stream=
Test results for WatcherResultPrinter=.
Time: 3.668
OK (1 test)
INSTRUMENTATION_STATUS_CODE: -1
3)脚本错误中途中断例子
  • 示例代码:
//脚本错误中断例子
public void testDemo1() throws UiObjectNotFoundException{
//获取一个搜索不到的对象
UiObject msm=new UiObject(new UiSelector().text("短信123"));
//点击对象
msm.clickAndWaitForNewWindow();
}
  • 生成报告内容:
//运行前
INSTRUMENTATION_STATUS: current=1
INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
INSTRUMENTATION_STATUS: class=Jian1.test1
INSTRUMENTATION_STATUS: stream=
Jian1.test1:
INSTRUMENTATION_STATUS: numtests=1
INSTRUMENTATION_STATUS: test=testDemo1
INSTRUMENTATION_STATUS_CODE: 1 //运行中
INSTRUMENTATION_STATUS: current=1
INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
INSTRUMENTATION_STATUS: class=Jian1.test1
INSTRUMENTATION_STATUS: stream=
Error in testDemo1://脚本运行错误
com.android.uiautomator.core.UiObjectNotFoundException: UiSelector[TEXT=短信123]//找不到对象出现的错误
at com.android.uiautomator.core.UiObject.clickAndWaitForNewWindow(UiObject.java:432)
at com.android.uiautomator.core.UiObject.clickAndWaitForNewWindow(UiObject.java:410)
at Jian1.test1.testDemo1(test1.java:14)//出现的位置
at java.lang.reflect.Method.invokeNative(Native Method)
at com.android.uiautomator.testrunner.UiAutomatorTestRunner.start(UiAutomatorTestRunner.java:160)
at com.android.uiautomator.testrunner.UiAutomatorTestRunner.run(UiAutomatorTestRunner.java:96)
at com.android.commands.uiautomator.RunTestCommand.run(RunTestCommand.java:91)
at com.android.commands.uiautomator.Launcher.main(Launcher.java:83)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:235)
at dalvik.system.NativeStart.main(Native Method)
INSTRUMENTATION_STATUS: numtests=1
INSTRUMENTATION_STATUS: stack=com.android.uiautomator.core.UiObjectNotFoundException: UiSelector[TEXT=短信123]
at com.android.uiautomator.core.UiObject.clickAndWaitForNewWindow(UiObject.java:432)
at com.android.uiautomator.core.UiObject.clickAndWaitForNewWindow(UiObject.java:410)
at Jian1.test1.testDemo1(test1.java:14)
at java.lang.reflect.Method.invokeNative(Native Method)
at com.android.uiautomator.testrunner.UiAutomatorTestRunner.start(UiAutomatorTestRunner.java:160)
at com.android.uiautomator.testrunner.UiAutomatorTestRunner.run(UiAutomatorTestRunner.java:96)
at com.android.commands.uiautomator.RunTestCommand.run(RunTestCommand.java:91)
at com.android.commands.uiautomator.Launcher.main(Launcher.java:83)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:235)
at dalvik.system.NativeStart.main(Native Method)
INSTRUMENTATION_STATUS: test=testDemo1
INSTRUMENTATION_STATUS_CODE: -1 //运行后
INSTRUMENTATION_STATUS: stream=
Test results for WatcherResultPrinter=.E
Time: 11.655
FAILURES!!!
Tests run: 1, Failures: 0, Errors: 1//一个报错
INSTRUMENTATION_STATUS_CODE: -1
4)多用例同时运行例子
  • 示例代码:
public void testDemo1() throws UiObjectNotFoundException{
//获取一个搜索不到的对象
UiObject msm=new UiObject(new UiSelector().text("短信123"));
//点击对象
msm.clickAndWaitForNewWindow();
}
public void testDemo2(){
UiDevice.getInstance().pressBack();
}
public void testDemo3(){
UiDevice.getInstance().pressBack();
assertTrue(false);//断言失败的例子
}
public void testDemo4(){
UiDevice.getInstance().pressBack();
}
//报告通过例子
public void testDemo5() throws UiObjectNotFoundException{
//点击短信查看是否有无会话产生
//当前界面获取短信按钮
UiObject msm=new UiObject(new UiSelector().text("短信"));
UiObject None=new UiObject(new UiSelector().text("短信"));
//点击短信按钮
msm.clickAndWaitForNewWindow();
assertTrue(None.exists());//断言成功
}
  • 生成报告:
INSTRUMENTATION_STATUS: current=1
INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
INSTRUMENTATION_STATUS: class=Jian1.test1
INSTRUMENTATION_STATUS: stream=
Jian1.test1:
INSTRUMENTATION_STATUS: numtests=5
INSTRUMENTATION_STATUS: test=testDemo1
INSTRUMENTATION_STATUS_CODE: 1 INSTRUMENTATION_STATUS: current=1
INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
INSTRUMENTATION_STATUS: class=Jian1.test1
INSTRUMENTATION_STATUS: stream=
Error in testDemo1:
com.android.uiautomator.core.UiObjectNotFoundException: UiSelector[TEXT=短信123]
at com.android.uiautomator.core.UiObject.clickAndWaitForNewWindow(UiObject.java:432)
at com.android.uiautomator.core.UiObject.clickAndWaitForNewWindow(UiObject.java:410)
at Jian1.test1.testDemo1(test1.java:16)
at java.lang.reflect.Method.invokeNative(Native Method)
at com.android.uiautomator.testrunner.UiAutomatorTestRunner.start(UiAutomatorTestRunner.java:160)
at com.android.uiautomator.testrunner.UiAutomatorTestRunner.run(UiAutomatorTestRunner.java:96)
at com.android.commands.uiautomator.RunTestCommand.run(RunTestCommand.java:91)
at com.android.commands.uiautomator.Launcher.main(Launcher.java:83)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:235)
at dalvik.system.NativeStart.main(Native Method)
INSTRUMENTATION_STATUS: numtests=5
INSTRUMENTATION_STATUS: stack=com.android.uiautomator.core.UiObjectNotFoundException: UiSelector[TEXT=短信123]
at com.android.uiautomator.core.UiObject.clickAndWaitForNewWindow(UiObject.java:432)
at com.android.uiautomator.core.UiObject.clickAndWaitForNewWindow(UiObject.java:410)
at Jian1.test1.testDemo1(test1.java:16)
at java.lang.reflect.Method.invokeNative(Native Method)
at com.android.uiautomator.testrunner.UiAutomatorTestRunner.start(UiAutomatorTestRunner.java:160)
at com.android.uiautomator.testrunner.UiAutomatorTestRunner.run(UiAutomatorTestRunner.java:96)
at com.android.commands.uiautomator.RunTestCommand.run(RunTestCommand.java:91)
at com.android.commands.uiautomator.Launcher.main(Launcher.java:83)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:235)
at dalvik.system.NativeStart.main(Native Method)
INSTRUMENTATION_STATUS: test=testDemo1
INSTRUMENTATION_STATUS_CODE: -1 INSTRUMENTATION_STATUS: current=2
INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
INSTRUMENTATION_STATUS: class=Jian1.test1
INSTRUMENTATION_STATUS: stream=
INSTRUMENTATION_STATUS: numtests=5
INSTRUMENTATION_STATUS: test=testDemo2
INSTRUMENTATION_STATUS_CODE: 1 INSTRUMENTATION_STATUS: current=2
INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
INSTRUMENTATION_STATUS: class=Jian1.test1
INSTRUMENTATION_STATUS: stream=.
INSTRUMENTATION_STATUS: numtests=5
INSTRUMENTATION_STATUS: test=testDemo2
INSTRUMENTATION_STATUS_CODE: 0 INSTRUMENTATION_STATUS: current=3
INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
INSTRUMENTATION_STATUS: class=Jian1.test1
INSTRUMENTATION_STATUS: stream=
INSTRUMENTATION_STATUS: numtests=5
INSTRUMENTATION_STATUS: test=testDemo3
INSTRUMENTATION_STATUS_CODE: 1 INSTRUMENTATION_STATUS: current=3
INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
INSTRUMENTATION_STATUS: class=Jian1.test1
INSTRUMENTATION_STATUS: stream=
Failure in testDemo3:
junit.framework.AssertionFailedError
at Jian1.test1.testDemo3(test1.java:23)
at java.lang.reflect.Method.invokeNative(Native Method)
at com.android.uiautomator.testrunner.UiAutomatorTestRunner.start(UiAutomatorTestRunner.java:160)
at com.android.uiautomator.testrunner.UiAutomatorTestRunner.run(UiAutomatorTestRunner.java:96)
at com.android.commands.uiautomator.RunTestCommand.run(RunTestCommand.java:91)
at com.android.commands.uiautomator.Launcher.main(Launcher.java:83)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:235)
at dalvik.system.NativeStart.main(Native Method)
INSTRUMENTATION_STATUS: numtests=5
INSTRUMENTATION_STATUS: stack=junit.framework.AssertionFailedError
at Jian1.test1.testDemo3(test1.java:23)
at java.lang.reflect.Method.invokeNative(Native Method)
at com.android.uiautomator.testrunner.UiAutomatorTestRunner.start(UiAutomatorTestRunner.java:160)
at com.android.uiautomator.testrunner.UiAutomatorTestRunner.run(UiAutomatorTestRunner.java:96)
at com.android.commands.uiautomator.RunTestCommand.run(RunTestCommand.java:91)
at com.android.commands.uiautomator.Launcher.main(Launcher.java:83)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:235)
at dalvik.system.NativeStart.main(Native Method)
INSTRUMENTATION_STATUS: test=testDemo3
INSTRUMENTATION_STATUS_CODE: -2 INSTRUMENTATION_STATUS: current=4
INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
INSTRUMENTATION_STATUS: class=Jian1.test1
INSTRUMENTATION_STATUS: stream=
INSTRUMENTATION_STATUS: numtests=5
INSTRUMENTATION_STATUS: test=testDemo4
INSTRUMENTATION_STATUS_CODE: 1 INSTRUMENTATION_STATUS: current=4
INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
INSTRUMENTATION_STATUS: class=Jian1.test1
INSTRUMENTATION_STATUS: stream=.
INSTRUMENTATION_STATUS: numtests=5
INSTRUMENTATION_STATUS: test=testDemo4
INSTRUMENTATION_STATUS_CODE: 0 INSTRUMENTATION_STATUS: current=5
INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
INSTRUMENTATION_STATUS: class=Jian1.test1
INSTRUMENTATION_STATUS: stream=
INSTRUMENTATION_STATUS: numtests=5
INSTRUMENTATION_STATUS: test=testDemo5
INSTRUMENTATION_STATUS_CODE: 1 INSTRUMENTATION_STATUS: current=5
INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
INSTRUMENTATION_STATUS: class=Jian1.test1
INSTRUMENTATION_STATUS: stream=.
INSTRUMENTATION_STATUS: numtests=5
INSTRUMENTATION_STATUS: test=testDemo5
INSTRUMENTATION_STATUS_CODE: 0 INSTRUMENTATION_STATUS: stream=
Test results for WatcherResultPrinter=.E..F..
Time: 16.215
FAILURES!!!
Tests run: 5, Failures: 1, Errors: 1
INSTRUMENTATION_STATUS_CODE: -1

三、输出信息到报告

1.setup与tearDown

1)setup(开始)
2)tearDown(结尾)

2.相关API

1)Bundle
2)getAutomationSupport().sendStatus(int ,Bundle)
  • 例如:
//setUp
protected void setUp() throws Exception{
super.setUp();
System.out.println("setUp:用例开始执行了---------");
//新建bundle对象
Bundle bundle=new Bundle();
bundle.putString("key1", "value1");
bundle.putString("key2", "value2");
bundle.putString("key3", "value3");
bundle.putString("key4", "value4");
bundle.putString("key5", "value5");
//发送状态,注意不能跟系统状态码一样(0,1,-1),这里我们用10
getAutomationSupport().sendStatus(10, bundle);
}
//testCase
public void testReport(){ System.out.println("test:用例正在执行中------------");
//新建bundle对象
Bundle bundle=new Bundle();
bundle.putString("key1-", "value1-");
bundle.putString("key2-", "value2-");
bundle.putString("key3-", "value3-");
bundle.putString("key4-", "value4-");
bundle.putString("key5-", "value5-");
//发送状态,注意不能跟系统状态码一样(0,1,-1),这里我们用11
getAutomationSupport().sendStatus(11, bundle);
UiDevice.getInstance().pressBack();
}
//tearDown
protected void tearDown() throws Exception {
// TODO Auto-generated method stub
super.tearDown();
System.out.println("tearDown:用例执行完了-----------");
//新建bundle对象
Bundle bundle=new Bundle();
bundle.putString("key1*", "value1*");
bundle.putString("key2*", "value2*");
bundle.putString("key3*", "value3*");
bundle.putString("key4*", "value4*");
bundle.putString("key5*", "value5*");
//发送状态,注意不能跟系统状态码一样(0,1,-1),这里我们用12
getAutomationSupport().sendStatus(12, bundle);
}
  • 生成报告:
INSTRUMENTATION_STATUS: current=1
INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
INSTRUMENTATION_STATUS: class=Jian1.test1
INSTRUMENTATION_STATUS: stream=
Jian1.test1:
INSTRUMENTATION_STATUS: numtests=1
INSTRUMENTATION_STATUS: test=testDemo6
INSTRUMENTATION_STATUS_CODE: 1 setUp:用例开始执行了---------
INSTRUMENTATION_STATUS: key4=value4
INSTRUMENTATION_STATUS: key3=value3
INSTRUMENTATION_STATUS: key5=value5
INSTRUMENTATION_STATUS: key2=value2
INSTRUMENTATION_STATUS: key1=value1
INSTRUMENTATION_STATUS_CODE: 10 Set up:用例开始执行...
INSTRUMENTATION_STATUS: key4=value4
INSTRUMENTATION_STATUS: key3=value3
INSTRUMENTATION_STATUS: key5=value5
INSTRUMENTATION_STATUS: key2=value2
INSTRUMENTATION_STATUS: key1=value1
INSTRUMENTATION_STATUS_CODE: 10 tearDown:用例执行完了-----------
INSTRUMENTATION_STATUS: key4*=value4*
INSTRUMENTATION_STATUS: key5*=value5*
INSTRUMENTATION_STATUS: key1*=value1*
INSTRUMENTATION_STATUS: key2*=value2*
INSTRUMENTATION_STATUS: key3*=value3*
INSTRUMENTATION_STATUS_CODE: 12 INSTRUMENTATION_STATUS: current=1
INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
INSTRUMENTATION_STATUS: class=Jian1.test1
INSTRUMENTATION_STATUS: stream=.
INSTRUMENTATION_STATUS: numtests=1
INSTRUMENTATION_STATUS: test=testDemo6
INSTRUMENTATION_STATUS_CODE: 0 INSTRUMENTATION_STATUS: stream=
Test results for WatcherResultPrinter=.
Time: 0.083
OK (1 test)
INSTRUMENTATION_STATUS_CODE: -1

四、传入参数控制脚本

  • 演示范例
1)通过-e传入数据到用例中,如:拨打一个指定电话
public void testDemo7() throws UiObjectNotFoundException{
//初始化动作(按返回键才能万全退出一个应用)
UiDevice.getInstance().pressBack();
UiDevice.getInstance().pressBack();
UiDevice.getInstance().pressBack();
UiDevice.getInstance().pressHome();//返回桌面
//获取对象
UiObject call=new UiObject(new UiSelector().text("拨号"));//拨号按钮
UiObject dialpad=new UiObject(new UiSelector().className("android.widget.TableLayout"));//拨号盘
//点击对象
call.clickAndWaitForNewWindow();
dialpad.clickAndWaitForNewWindow();
//传入参数
Bundle b=getParams();
String phone =(String) b.get("phone");//-e key value -e phone 10086
//逻辑判断和输入
for (int i=0;i<phone.length();i++){
String c=phone.charAt(i)+"";
UiObject phoneNum=new UiObject(new UiSelector().text(c));//拨号盘
phoneNum.click();
sleep(1200);
}
}
  • 注意事项:
1.Uiautomator不能进行传参的快速调试,可以先run一下,用例push到手机上之后然后使用命令行进行输入,上面的用例运行命令为:
adb shell uiautomator runtest test.jar --nohup -c Jian1.test1#testDemo7 -e phone 10086
2)通过-e出传入整体控制参数控制脚本,如:清理应用数据
public void testDemo8() throws UiObjectNotFoundException {
//初始化动作(按返回键才能万全退出一个应用)
UiDevice.getInstance().pressBack();
UiDevice.getInstance().pressBack();
UiDevice.getInstance().pressBack();
UiDevice.getInstance().pressHome();//返回桌面
//传入参数
Bundle b=getParams();
String ctrl=(String) b.get("ctrl");
//开始逻辑判定
boolean isClear=Boolean.valueOf(ctrl);
if(isClear){
//执行清理步骤
//点菜单按钮
UiDevice.getInstance().pressMenu();
//点管理应用按钮
UiObject manAPP=new UiObject(new UiSelector().text("管理应用"));
manAPP.clickAndWaitForNewWindow();
//滚动查找对象并点击
UiScrollable list=new UiScrollable(new UiSelector().resourceId("android:id/list"));
UiObject browser=new UiObject(new UiSelector().text("浏览器"));
list.scrollIntoView(browser);
browser.clickAndWaitForNewWindow();
//点击清除数据按钮
UiObject clear=new UiObject(new UiSelector().text("清除数据"));
clear.clickAndWaitForNewWindow();
//点击确定
UiObject OK=new UiObject(new UiSelector().text("确定"));
OK.clearTextField(); }else{
//不执行清理
System.out.println("不执行清理-------------");
}
//打开浏览器
UiObject browser=new UiObject(new UiSelector().text("浏览器"));
browser.clickAndWaitForNewWindow();
}
  • 注意事项
1.Uiautomator不能进行传参的快速调试,可以先run一下,用例push到手机上之后然后使用命令行进行输入,上面的用例运行命令为:
adb shell uiautomator runtest test.jar --nohup -c Jian1.test1#testDemo8 -e ctrl false
or
adb shell uiautomator runtest test.jar --nohup -c Jian1.test1#testDemo8 -e ctrl true

8.Android_UiAutomator 报告查看的更多相关文章

  1. [z]根据awr报告查看最慢的sql语句

    http://blog.itpub.net/12679300/viewspace-2125679/ 当系统运行了一段时间后,系统基本也趋于稳定了,SQL调优也变了DBA的一个主要的工作内容,很多时候都 ...

  2. Azure china服务状态报告查看网址

    https://www.azure.cn/support/service-dashboard/

  3. ORACLE查看SQL的执行次数/频率

    在ORACLE数据库应用调优中,一个SQL的执行次数/频率也是常常需要关注的,因为某个SQL执行太频繁,要么是由于应用设计有缺陷,需要在业务逻辑上做出优化处理,要么是业务特殊性所导致.如果执行频繁的S ...

  4. (原创)如何在性能测试中自动生成并获取Oracle AWR报告

    版权声明:本文为原创文章,转载请先联系并标明出处 由于日常使用最多的数据库为Oracle,因此,最近又打起了Oracle的AWR报告的主意. 过去我们执行测试,都是执行开始和结束分别手动建立一个快照, ...

  5. C#中的RDLC报告

    介绍 此示例显示如何在C#中生成RDLC报告,您可以为小型,中型和大型企业生成报告. 构建示例 Visual Studio 2013,.Net Frameworm 4.5,MS SQL Server ...

  6. monkey配置及简单报告生成(安卓)

    参考网址:http://www.51testing.com/html/72/502872-3709760.html   1.安装jdk,配置环境变量   2.安装sdk(解压后,配置环境变量到path ...

  7. 查看SQL实际内存占用

    如果打开了AWE,在任务管理器中就看不到实际的内存使用了.可以用SQL语句来查内存占用,或是“性能监视器(Performance Monitor)中的SQLServer: Memory Manager ...

  8. Jenkins传参修改jmeter的报告名称和详细报告地址

    目前已经可以发送邮件了,我已经配置了Jenkins,但是有几个显示问题,待处理1.报告名称地址, 2详细报告地址没有做跳转 更改后为: 修改url 1.打开样式的jmeter-results-deta ...

  9. 使用jmeter做简单的压测(检查点、负载设置、聚合报告)

    1.添加断言(检查点) 在需要压测的接口下添加--断言--响应断言,取接口响应中包含有的数据即可 检查点HTTP请求-->断言-->响应断言1.名称.注释2.Apply to//作用于哪里 ...

随机推荐

  1. NO.3:自学python之路------集合、文件操作、函数

    引言 本来计划每周完成一篇Python的自学博客,由于上一篇到这一篇遇到了过年.开学等杂事,导致托更到现在.现在又是一个新的学期,春天也越来越近了(冷到感冒).好了,闲话就说这么多.开始本周的自学Py ...

  2. 详解Python中的下划线

    本文将讨论Python中下划线(_)字符的使用方法.我们将会看到,正如Python中的很多事情,下划线的不同用法大多数(并非所有)只是常用惯例而已. 单下划线(_) 通常情况下,会在以下3种场景中使用 ...

  3. Scrum立会报告+燃尽图(十一月十五日总第二十三次):代码规范与技术交流

    此作业要求参见:https://edu.cnblogs.com/campus/nenu/2018fall/homework/2384 项目地址:https://git.coding.net/zhang ...

  4. c# Application.run和form.show区别

    Application.run(form):在当前线程上开始运行标准应用程序消息循环,并使指定窗体可见. form.show() :使指定窗体可见: 参照:https://blog.csdn.net/ ...

  5. 【线段树求区间第一个不大于val的值】Lpl and Energy-saving Lamps

    https://nanti.jisuanke.com/t/30996 线段树维护区间最小值,查询的时候优先向左走,如果左边已经找到了,就不用再往右了. 一个房间装满则把权值标记为INF,模拟一遍,注意 ...

  6. Educational Codeforces Round 16 E. Generate a String dp

    题目链接: http://codeforces.com/problemset/problem/710/E E. Generate a String time limit per test 2 seco ...

  7. 《我是IT小小鸟》读笔

    兴趣是第一原则.一定要根据自己的兴趣确定发展方向,不要盲目从众和跟风.没有一个人的经历是可以复制的,多思考,不要照搬他人的做法,学习一下想法还是可以的,具体方法因人而异.学习软件技术时,不仅在知识节点 ...

  8. 常用的比较器:实现方式Compareable和Comparator

    class Dog{ int size; int weight; public Dog(int s, int w){ size = s; weight = w; } } 目的:对于Dog对象作为元素所 ...

  9. lintcode-384-最长无重复字符的子串

    384-最长无重复字符的子串 给定一个字符串,请找出其中无重复字符的最长子字符串. 样例 例如,在"abcabcbb"中,其无重复字符的最长子字符串是"abc" ...

  10. UEditor前端配置项说明

    UEditor 的配置项分为两类:前端配置项 和 后端配置项 后端配置项具体看这个文档L:后端配置项说明 本文档介绍如何通过设置前端配置项,定制编辑器的特性,配置方法主要通过修改ueditor.con ...