8.Android_UiAutomator 报告查看
一、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 报告查看的更多相关文章
- [z]根据awr报告查看最慢的sql语句
http://blog.itpub.net/12679300/viewspace-2125679/ 当系统运行了一段时间后,系统基本也趋于稳定了,SQL调优也变了DBA的一个主要的工作内容,很多时候都 ...
- Azure china服务状态报告查看网址
https://www.azure.cn/support/service-dashboard/
- ORACLE查看SQL的执行次数/频率
在ORACLE数据库应用调优中,一个SQL的执行次数/频率也是常常需要关注的,因为某个SQL执行太频繁,要么是由于应用设计有缺陷,需要在业务逻辑上做出优化处理,要么是业务特殊性所导致.如果执行频繁的S ...
- (原创)如何在性能测试中自动生成并获取Oracle AWR报告
版权声明:本文为原创文章,转载请先联系并标明出处 由于日常使用最多的数据库为Oracle,因此,最近又打起了Oracle的AWR报告的主意. 过去我们执行测试,都是执行开始和结束分别手动建立一个快照, ...
- C#中的RDLC报告
介绍 此示例显示如何在C#中生成RDLC报告,您可以为小型,中型和大型企业生成报告. 构建示例 Visual Studio 2013,.Net Frameworm 4.5,MS SQL Server ...
- monkey配置及简单报告生成(安卓)
参考网址:http://www.51testing.com/html/72/502872-3709760.html 1.安装jdk,配置环境变量 2.安装sdk(解压后,配置环境变量到path ...
- 查看SQL实际内存占用
如果打开了AWE,在任务管理器中就看不到实际的内存使用了.可以用SQL语句来查内存占用,或是“性能监视器(Performance Monitor)中的SQLServer: Memory Manager ...
- Jenkins传参修改jmeter的报告名称和详细报告地址
目前已经可以发送邮件了,我已经配置了Jenkins,但是有几个显示问题,待处理1.报告名称地址, 2详细报告地址没有做跳转 更改后为: 修改url 1.打开样式的jmeter-results-deta ...
- 使用jmeter做简单的压测(检查点、负载设置、聚合报告)
1.添加断言(检查点) 在需要压测的接口下添加--断言--响应断言,取接口响应中包含有的数据即可 检查点HTTP请求-->断言-->响应断言1.名称.注释2.Apply to//作用于哪里 ...
随机推荐
- 排查GCC 4.4.X版本优化switch-enum的BUG
起因 一次偶然碰到一个诡异的bug,现象是同一份C++代码使用GCC4.4.x版本在开启优化前和优化后的结果不一样,优化后的代码逻辑不正确. 示例代码如下: //main.cpp #include & ...
- [kuangbin带你飞]专题一 简单搜索 回顾总结
第二题:bfs,忘了将queue清空. 第三题:bfs,记得使用vis数组,防止重复入队
- [C++基础] tips
1. 在g++ 中使支持C++11 https://askubuntu.com/questions/773283/how-do-i-use-c11-with-g This you can do by ...
- 日本IT行业劳动力缺口达22万 在日中国留学生迎来就业好时机 2017/07/18 11:25:09
作者:倪亚敏 来源:日本新华侨报 发布时间:2017/07/18 11:25:09 据日本政府提供的数据,日本2018年应届毕业生的“求人倍率”已经达到了1.78倍.换言之,就是100名大学生 ...
- mysql基础知识大全
前言:本文主要为mysql基础知识的大总结,mysql的基础知识很多,这里作简单概括性的介绍,具体的细节还是需要自行搜索.当然本文还有很多遗漏的地方,后续会慢慢补充完善. 数据库和数据库软件 数据库是 ...
- BETA阶段冲刺集合
冲刺开始: https://www.cnblogs.com/LZTZ/p/9097296.html 第一天: https://www.cnblogs.com/LZTZ/p/9097303.html 第 ...
- apache反向代理服务器
1 正向代理: 客户端无法直接访问外部的web,需要在客户端所在的网络内架设一台代理服务器,客户端通过代理服务器访问外部的web(需要在客户端的浏览器中设置代理服务器) 适用于: ①局域网的代理服务器 ...
- UVALive6434_Number Assignment
简单dp题. 这样的,意思为给你n个数,要你现在将这n个数分为m组,使得所有组内最大值与最小值的差的和最小. 其实可以这样来考虑这个问题,首先可以把所有的数字从小到大排个序,显然如果有一种取法是最优的 ...
- UVA11737_Extreme Primitive Society
这是隐藏的最深的一个水题.其隐藏性能如此之好,是因为题目的描述十分蛋疼,写了好多好多的废话. 让我们这种过不了六级的孩子情何以堪啊. 是这样的,给你若干个矩形,每次在所有的矩形中两两组合形成许多许多新 ...
- 【uoj#51】[UR #4]元旦三侠的游戏 博弈论+dp
题目描述 给出 $n$ 和 $m$ ,$m$ 次询问.每次询问给出 $a$ 和 $b$ ,两人轮流选择:将 $a$ 加一或者将 $b$ 加一,但必须保证 $a^b\le n$ ,无法操作者输,问先手是 ...