7.0 CTS fail 项分析(一)

来源:互联网 发布:js trim函数使用 编辑:程序博客网 时间:2024/04/29 22:12
1、在CTS测试过程中报如下错误,然后测试停止
11-08 19:59:40 E/TestInvocation: Unexpected exception when running invocation: java.lang.RuntimeException: com.android.tradefed.targetprep.TargetSetupError: Failed to install CtsLibcoreTestRunner.apk on 0123456789ABCDEF. Reason: 'Unknown failure'
或者
11-08 19:01:01 E/TestInvocation: Unable to install WifiUtil utility: Unknown failure
java.lang.RuntimeException: Unable to install WifiUtil utility: Unknown failure

原因:在CTS测试过程中会安装一些测试相关的APK,由于apk安装失败导致。

2、
CtsCarrierApiTestCases
android.carrierapi.cts.CarrierApiTest#testHasCarrierPrivileges       fail
junit.framework.AssertionFailedError: This test requires a SIM card with carrier privilege rule on it.
原因:该测试项需要特殊SIM卡才可pass,该特殊SIM卡把google certificate hash code加到卡中。MTK提供的卡商:http://www.gemalto.com/china/companyinfo/

3、
CtsVoiceInteractionTestCases:
android.voiceinteraction.cts.VoiceInteractionTest#testAll
android.voiceinteraction.cts.LocalVoiceInteractionTest#testLifecycle

CtsVoiceSettingsTestCases:
android.voicesettings.cts.AirplaneModeTest#testAll
android.voicesettings.cts.BatterySaverModeTest#testAll

原因:这两个moudle是测试语音助手的,在low ram device上不可用,
android.voiceinteraction.cts.VoiceInteractionTest#testAll
android.voicesettings.cts.AirplaneModeTest#testAll
android.voicesettings.cts.BatterySaverModeTest#testAll
这3项已经有修复,如果有配置[ro.config.low_ram]: [true] 属性那CTS会skip而直接pass

4、
android.permission.cts.DebuggableTest#testNoDebuggable         fail
junit.framework.AssertionFailedError: Packages marked debuggable: [com.ape.stsmonths]

原因:这是由于com.ape.stsmonths,两个应用NoDebuggable 属性设置不对,需要将AndroidManifest.xml文件中的android:debuggable属性为false

5、
android.telecom.cts.WiredHeadsetTest#testInCallLongPress_hangupCall
android.telecom.cts.WiredHeadsetTest#testInCallShortPress_togglesMute

分析:这两项需要插入耳机测试,如果driver only 版本没有问题,那么可能是由于客制化开发的telecomFramework引起的。

6、
android.appsecurity.cts.DirectBootHostTest#testDirectBootEmulated
android.appsecurity.cts.DirectBootHostTest#testDirectBootNone

分析:这两项是Google Issue,可以用上面的bug ID去申请豁免
b/30380246
b/30686636

7、
android.permission.cts.FileSystemPermissionTest#testDeviceTreeCpuCurrent  fail
java.lang.NullPointerException: Attempt to get length of null array

原因:该问题属于google issue,
bug ID是30295379,需要Google修改test case才能完全解决,可以申请豁免

8、
android.os.cts.BuildVersionTest#testBuildFingerprint   fail
junit.framework.ComparisonFailure: Tag expected:<[release]-keys> but was:<[dev]-keys>
解决方法:这是由于Fingerprint 配置引起的 ,

0 0