【问题描述】

工具:Cts-Verifier-9.0-R11.apk

测试Camera ITS Test时,点击该测试项后verifier apk闪退。重新打开后该项未pass变绿。

【问题结论】

AuthBlog:秋城https://www.cnblogs.com/houser0323

最新结论:是waiver项。

拿到了Google-waiver id:https://partnerissuetracker.corp.google.com/issues/150153190

怀疑verifier工具问题

r8工具没问题,r11有问题。

r11工具在送测成功的盒子也有问题。

【分析详细】

1.crash日志:

03-04 14:34:36.977  8091  8091 D AndroidRuntime: Shutting down VM
--------- beginning of crash
03-04 14:34:36.987 8091 8091 E AndroidRuntime: FATAL EXCEPTION: main
03-04 14:34:36.987 8091 8091 E AndroidRuntime: Process: com.android.cts.verifier, PID: 8091
03-04 14:34:36.987 8091 8091 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.android.cts.verifier/com.android.cts.verifier.camera.its.ItsTestActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'int com.android.cts.verifier.TestListAdapter.getCount()' on a null object reference
。。。。。。
03-04 14:34:36.987 8091 8091 E AndroidRuntime: Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'int com.android.cts.verifier.TestListAdapter.getCount()' on a null object reference
03-04 14:34:36.987 8091 8091 E AndroidRuntime: at com.android.cts.verifier.PassFailButtons$TestListActivity.getHistoryCollection(PassFailButtons.java:294)
03-04 14:34:36.987 8091 8091 E AndroidRuntime: at com.android.cts.verifier.PassFailButtons$TestListActivity.setTestResultAndFinish(PassFailButtons.java:282)
03-04 14:34:36.987 8091 8091 E AndroidRuntime: at com.android.cts.verifier.camera.its.ItsTestActivity.onCreate(ItsTestActivity.java:347)
03-04 14:34:36.987 8091 8091 E AndroidRuntime: at android.app.Activity.performCreate(Activity.java:7144)
03-04 14:34:36.987 8091 8091 E AndroidRuntime: at android.app.Activity.performCreate(Activity.java:7135)
03-04 14:34:36.987 8091 8091 E AndroidRuntime: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271)
03-04 14:34:36.987 8091 8091 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2894)
03-04 14:34:36.987 8091 8091 E AndroidRuntime: ... 11 more
03-04 14:34:37.000 3184 4971 W ActivityManager: Force finishing activity com.android.cts.verifier/.camera.its.ItsTestActivity
03-04 14:34:37.003 3184 4971 W ActivityManager: Force finishing activity com.android.cts.verifier/.CtsVerifierActivity
03-04 14:34:37.009 2988 3123 W libc : Unable to set property "sys.vsync.type" to "": error code: 0x18
03-04 14:34:37.010 8091 8091 I Process : Sending signal. PID: 8091 SIG: 9

2.比较追溯源码

经对比,r8不会crash。r8工具与r11工具的代码有差异,新增了一个函数调用getHistoryCollection()

camera/its/ItsTestActivity.java +347
342 if (mToBeTestedCameraIds.size() == 0) {
343 showToast(R.string.all_exempted_devices);
344 ItsTestActivity.this.getReportLog().setSummary(
345 "PASS: all cameras on this device are exempted from ITS"
346 , 1.0, ResultType.NEUTRAL, ResultUnit.NONE);//该语句表明测试已经pass。crash出现在下一句,与测试逻辑无关,是apk自身代码有问题。
347 setTestResultAndFinish(true);//
348 } =============================================
ItsTestActivity.java:347
@@ -171,25 +160,19 @@
@Override
public void setTestResultAndFinish(boolean passed) {
PassFailButtons.setTestResultAndFinishHelper(
+ this, getTestId(), getTestDetails(), passed, getReportLog(),
+ getHistoryCollection());//增加了最后一个参数,是函数的调用返回值。
- this, getTestId(), getTestDetails(), passed, getReportLog());
} =============================================
PassFailButtons.java:294
288 /**
289 * Get existing test history to aggregate.
290 */
291 @Override
292 public TestResultHistoryCollection getHistoryCollection() {
293 List<TestResultHistoryCollection> histories =
294 IntStream.range(0, mAdapter.getCount())//由于mAdapter是null,所以空指针异常crash了。
295 .mapToObj(mAdapter::getHistoryCollection)
296 .collect(Collectors.toList());

如上294,测试apk的代码有问题,所以空指针异常crash了。

[Cts-Verifier]waiver-Camera-ITS-Test的更多相关文章

  1. Android N和O中使用adb shell dpm set-device-owner 'com.android.cts.verifier/com.android.cts.verifier.managedprovisioning.DeviceAdminTestReceiver' setup Device Owner失败

    PC端出现如下log: D:\workspace\AndroidO\CTS\CTS_Verifier>adb shell dpm set-device-owner 'com.android.ct ...

  2. CTS camera的基础操作和debug

    手机端 设置永久不锁屏 1 CTS 进入cts目录tools 运行以下命令 ./cts-tradefed adb devices找设备数串 整跑 run cts -m CtsCameraTestCas ...

  3. 【转】Android兼容性测试CTS Verifier-环境搭建、测试执行、结果分析

    原文网址:http://www.cnblogs.com/zh-ya-jing/p/4452675.html CTS Verifier算是CTS的一部分,需要手动进行,主要用于测试那些自动测试系统无法测 ...

  4. 简析Android 兼容性测试框架CTS使用

    一.什么是兼容性测试? 1)为用户提供最好的用户体验,让更多高质量的APP可以顺利的运行在此平台上 2)让程序员能为此平台写更多的高质量的应用程序 3)可以更好的利用Android应用市场 二.CTS ...

  5. Android兼容性测试CTS Verifier-环境搭建、测试执行、结果分析

    CTS Verifier算是CTS的一部分,需要手动进行,主要用于测试那些自动测试系统无法测试的功能,比如相机.传感器等.由于硬件配置或其他原因,不同手机上部分测试项目被隐藏,也就是说CTS Veri ...

  6. android 兼容性测试 CTS 测试过程(实践测试验证通过)

    source: http://blog.csdn.net/jianguo_liao19840726/article/details/7222814 写这个博客的时候是为了记忆,建议大家还是看官方的说明 ...

  7. 监听Android CTS测试项解决方案(二)

    二,监听当前测试项是否是Accelerometer Measurement Test测试项 通过第一种方式介绍的,我们可以得到当前处于活动状态的Activity类似监听CTS测试当前的测试项.但是由于 ...

  8. 监听Android CTS测试项解决方案(一)

    前言: 首先这里需要详细叙述一下标题中"监听Android CTS测试项解决方案"的需求.这里的需求是指我们需要精确的监听到当前CTS测试正在测试的测试项. 因为我们知道CTS认证 ...

  9. 【转】android 兼容性测试 CTS 测试过程(实践测试验证通过)

    原文网址:http://blog.csdn.net/jianguo_liao19840726/article/details/7222814 写这个博客的时候是为了记忆,建议大家还是看官方的说明,官方 ...

  10. Android CTS(frome google)

    Compatibility Test Suite How does the CTS work? The Compatibility Test Suite (CTS) is a free, commer ...

随机推荐

  1. 达梦、oracel、mysql数据库兼容

    联合表更新sql语句: 只支持mysql.oracle,不支持达梦 update to_pub_report a, to_pub_rec_process b set a.Satisfy_ID , a. ...

  2. 基于rtmp的移动端推流解决方案

    因工作需要,及考虑成本因素,需要探索一套免费的移动端基于rtmp推流的直播解决方案,过程虽稍显曲折,但最终还是完成了目标.在这里将记录下来,以便日后查阅. 总体思路 移动端推流(RTMP) ---&g ...

  3. 25)PHP,数据库定义

    (1)数据库定义语句: create database [if not exists ] 数据库名 [charset 字符集] [collate 字符排序规则]: 说明: ,if not exists ...

  4. day43-线程概念

    #1.进程:程序不能单独运行,要将程序加载到内存当中,系统为它分配资源才能运行,而这种执行的程序就是进程. #程序和进程的区别在于:程序是指令的集合,它是进程运行的静态描述文本:进程是程序的一次执行活 ...

  5. Git ubuntu 升级

    外文文档 This team will distribute the most current stable package of Git for Ubuntu. Stable releases: h ...

  6. 系统学习javaweb重点难点2--.JavaScript中的正则对象简述和正则对象使用注意事项。

    注意:只是简述,对正则对象的了解目前还不是很深刻,日后详细了解了再来修改. 正文: 正则对象 首先,我们要了解一下什么是正则对象: 正则表达式,又称规则表达式.(英语:Regular Expressi ...

  7. 84)PHP,SQL注入基础讲解

     怎么预防: 填写防止SQL注入的代码:

  8. GIL锁和进程/线程池

    GIL锁 1.GIL锁 全局解释器锁,就是一个把互斥锁,将并发变成串行,同一时刻只能有一个线程使用共享资源,牺牲效率,保证数据安全,也让程序员避免自己一个个加锁,减轻开发负担 带来的问题 感觉单核处理 ...

  9. 非参数检验|Sign test|Wilcoxon signed rank test|Wilcoxon rank sum test|Bootstrapping

    非参数检验条件没有参数,因此就没有分布,利用数据等级之间的差距,依次赋值之后再用参数方法测试.将连续型变量转化为离散型变量,即顺序变量.与参数检验相比,正态分布较弱(p值有可能不显著,浪费信息,比如最 ...

  10. JSON — Java与JSON数据互转

    转换时Bean所要求的: 被转换的Bean必需是public的. Bean被转换的属性一定要有对应的get方法,且一定要是public的. Bean中不能用引用自身的this的属性,否则运行时出现et ...