问题描述
GtsSecurityHostTestCases中有如下2条case测试fail
GtsSecurityHostTestCases
com.google.android.security.gts.SELinuxHostTest#testNoExemptionsForDataBetweenCoreAndVendor
com.google.android.security.gts.SELinuxHostTest#testNoUntrustedAppVisiblehwservice
源
GtsSecurityHostTestCases中有如下2条case测试fail
GtsSecurityHostTestCases
com.google.android.security.gts.SELinuxHostTest#testNoExemptionsForDataBetweenCoreAndVendor
com.google.android.security.gts.SELinuxHostTest#testNoUntrustedAppVisiblehwservice
com.google.android.nmgiarc.gts.CarrierServicesTests#testAcsaPropertySetCorrectly fail
继续阅读“【GTS】com.google.android.nmgiarc.gts.CarrierServicesTests#testAcsaPropertySetCorrectly fail”
GTS测试项:
com.google.android.gts.provisioning.ProvisioningHostTest#testDeviceProvisioningPackageName fail
[DESCRIPTION]
com.google.android.placement.gts.CoreGmsAppsTest#testCoreGmsAppsPreloaded
fail
9-21 17:57:28 D/ModuleListener: ModuleListener.testStarted(com.google.android.placement.gts.CoreGmsAppsTest#testCoreGmsAppsPreloaded)
09-21 17:57:29 I/ModuleListener: [1/1] com.google.android.placement.gts.CoreGmsAppsTest#testCoreGmsAppsPreloaded fail:
java.lang.AssertionError: Mandatory core GMS packages not found as system apps:
com.google.android.videos
at org.junit.Assert.fail(Assert.java:88)
at org.junit.Assert.assertTrue(Assert.java:41)
at com.google.android.placement.gts.CoreGmsAppsTest.checkGeneralCoreGmsAppsPreloaded(CoreGmsAppsTest.java:198)
at com.google.android.placement.gts.CoreGmsAppsTest.testCoreGmsAppsPreloaded(CoreGmsAppsTest.java:402)
at java.lang.reflect.Method.invoke(Native Method)
[SOLUTION]
继续阅读“com.google.android.placement.gts.CoreGmsAppsTest#testCoreGmsAppsPreloaded fail”
[SOLUTION]
As part of the GTS v6.0r2 release, we will check for the presence of Android Messages (CarrierServiceTest) by default against all devices for any ACSA (Agreement to preload Carrier Services and Android Messages) partner.
In addition, for any device with Android Message installed, regardless of ACSA status, the GTS tests will run to check proper system permissions for Android Message, as well as checking system permission and privileges for Carrier Services.
The only way to exempt devices/builds from the above tests is for the Google Comms OEM team to write an exemption.
[DESCRIPTION]
GTS 3.0R2在M平台上运行时会报如下错误:
com.google.android.xts.permissions.InitialRuntimePermissionStateTest
-- testAllSystemAppsUsingRuntimePermissionsTargetMncAndAboveSdk fail junit.framework.AssertionFailedError: testAllSystemAppsUsingRuntimePermissionsTargetMncAndAboveSdk errors: Package:com.mediatek.voicecommand.overlay uses runtime permissions but doesn't target 23+ SDK
com.google.android.xts.permissions.InitialRuntimePermissionStateTest
-- testAllSystemAppsUsingRuntimePermissionsTargetMncAndAboveSdk fail junit.framework.AssertionFailedError: testAllSystemAppsUsingRuntimePermissionsTargetMncAndAboveSdk errors: Package:com.mobisystems.office uses runtime permissions but doesn't target 23+ SDK
[SOLUTION]
[DESCRIPTION]
GtsPackageManagerHostTestCases---com.google.android.pm.gts.PackageManagerHostTest#testSettingsReadable
[SOLUTION]
[DESCRIPTION]
run gts -m GtsBackupHostTestCases -t com.google.android.gts.backup.LocaleSettingsRestoreHostSideTest#testLocaleRestore
junit.framework.AssertionFailedError: Locales after restore are not as expected. expected:<[en-US, gl-ES, ga-IE, af-ZA]> but was:<[en-US, gl-ES]>
at junit.framework.Assert.fail(Assert.java:50)
at junit.framework.Assert.failNotEquals(Assert.java:287)
at junit.framework.Assert.assertEquals(Assert.java:67)
at com.google.android.gts.backup.testscontainerapp.LocaleSettingsRestoreTest.checkLocales(LocaleSettingsRestoreTest.java:105)
at java.lang.reflect.Method.invoke(Native Method)
[SOLUTION]
继续阅读“GTS com.google.android.gts.backup.LocaleSettingsRestoreHostSideTest#testLocaleRestore”
[DESCRIPTION]
GTS测试是云测试测试之前要检查网络,两个基础指标要确认:
1、测试机所连接网络可正常访问google官网;
2、测试机连接网络后可以正常播放youtube官网视频;
测试过程中如有遇到如下现象:
1、测试周期拉长,比如32位项目GTS测试完正常时间一般6-8小时;有时超过这个时间仍然没有生成一次full run的结果;
2、一些视频相关的case失败;
Android P CTS Hightlight, CTS Instant, Waiver Process
CTS and GTS Best Practice
Android P GMS Req.
Treble Compliance/VTS
Secutiry
OTA
Android Go
Camera Image Test Suite (ITS)
Branding Approval
How to get Android tech help
继续阅读“Google Android Partnership Boot Camp -Shenzhen- Sep 2018 深圳研讨会”
##########################################################
cts测试的一些命令:
1 2 3 4 5 6 7 |
sudo chmod a+x copy_media.sh ./copy_media.sh all adb install CtsDeviceAdmin.apk ./cts-traded run cts --plan CTS //CTS全量测试 run cts -c .... -m ..... // 单项测试 run cts --continue-session sessionID //fail项测试 |
##########################################################
cts测试前需要注意的事项:
Google enforces GTS Business Logic (BL) authentication. GTS will fail if the testing environment is not configured correctly. To configure the testing environment, you need to obtain a key file from your TAM. If you are a 3PL partner, please contact your 3PL directly.
Google强制执行GTS业务逻辑(BL)身份验证。 如果未正确配置测试环境,GTS将失败。 要配置测试环境,您需要从TAM获取密钥文件。 如果您是第三方物流合作伙伴,请直接联系您的3PL。
BL authentication affects the tests below. More tests will require BL authentication in the future.
com.google.android.placement.gts.DefaultIntentTest#testDefaultIntentHandlers
com.google.android.placement.gts.HomescreenLayoutTest#testShortcutPlacement
com.google.android.placement.gts.HomescreenLayoutTest#testFolderPlacement
com.google.android.placement.gts.HomescreenLayoutTest#testWidgetPlacement
com.google.android.placement.gts.InstalledAppsTest#testAppsInstalled
com.google.android.placement.gts.InstalledAppsTest#testSystemAppsInstalled
继续阅读“GTS Business Logic authentication 业务逻辑影响 GtsPlacementTestCases fail”
[DESCRIPTION]
GTS[6.0_r1]:com.google.android.memory.gts.StreamingVideoMemoryHostTest#testPeakMemoryUsage Fail
继续阅读“GTS[6.0_r1]:com.google.android.memory.gts.StreamingVideoMemoryHostTest#testPeakMemoryUsage”
[DESCRIPTION]
GtsPlacementTestCases 下6条CaseFail
com.google.android.placement.gts.DefaultIntentTest#testDefaultIntentHandlers
com.google.android.placement.gts.HomescreenLayoutTest#testFolderPlacement
com.google.android.placement.gts.HomescreenLayoutTest#testShortcutPlacement
com.google.android.placement.gts.HomescreenLayoutTest#testWidgetPlacement
com.google.android.placement.gts.InstalledAppsTest#testAppsInstalled
com.google.android.placement.gts.InstalledAppsTest#testSystemAppsInstalled
第一种报错信息:
java.lang.AssertionError: Unable to execute because authorization failed, please ensure the service account key is properly installed..
[DESCRIPTION]
由于目前所有的手机都要求支持Android for work, 客户在测试CTS,GTS过程中,经常在profile_provisioning的过程中出错,这边对经常出错的地方进行分析,并提供对应的解决方案
[SOLUTION]
armeabi-v7a GtsPlacementTestCases fail
java.lang.AssertionError: Unable to execute because authorization failed, please ensure the service account key is properly installed..
继续阅读“GTS 6.0 R1 armeabi-v7a GtsPlacementTestCases六项fail public key”
[DESCRIPTION]
GtsPackageManagerHostTestCases中com.google.android.pm.gts.PackageManagerHostTest#testSoundPool Fail]
Fail:
07-07 11:24:13 I/RemoteAndroidTest: Running am instrument -w -r --user 0 -e timeout_msec 600000 -e class 'com.google.android.gts.packagemanager.InstantAppTestCases#testSoundPool' com.google.android.gts.packagemanager.instant/android.support.test.runner.AndroidJUnitRunner on alps-k80_bsp-0123456789ABCDEF
07-07 11:24:19 I/XtsHostTestBase: Test com.google.android.gts.packagemanager.InstantAppTestCases#testSoundPool: FAILURE
07-07 11:24:19 W/XtsHostTestBase: java.lang.AssertionError: Instant App should be able to access Media / DrmManager.
Please apply patches r.android.com/502604, SHA d2b3a45, and SHA b93f049
at org.junit.Assert.fail(Assert.java:88)
at org.junit.Assert.assertTrue(Assert.java:41)