[Gts]Fail-GtsTvTestCases#testLauncherChange

3001 ワード

【問題の説明】


Gts-7.0-R 4試験項目、失敗項目を追加します.-m GtsTvTestCases -t com.google.android.tv.gts.LauncherChangeTest#testLauncherChange 02-29 13:03:11 I/ModuleListener: [1/1] com.google.android.tv.gts com.google.android.tv.gts.LauncherChangeTest#testLauncherChange fail: java.lang.AssertionError: Android TV launcher doesn't resolve first, resolve stack: ResolveInfo.ActivityInfo.packageName: com.eeee.dddd priority: 0 ResolveInfo.ActivityInfo.packageName: com.google.android.pseudolauncheractivity priority: 0 ResolveInfo.ActivityInfo.packageName: com.android.tv.settings priority: -1000 at org.junit.Assert.fail(Assert.java:88) at com.google.android.tv.gts.LauncherChangeTest.testLauncherChange(LauncherChangeTest.java:89)

【問題の結論】


最新の結論、chip-mkはGoogleの問題であることを認め、Google waiverを申請した.

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


Googleのテストケースの問題を推測するには、チップメーカーとコミュニケーションして確認する必要があります.

【分析詳細】####


1.GtstTvTestCasesを逆コンパイルする.apkはテスト用例の論理を分析し、以下のように整理する.
@Test
    public void testLauncherChange() throws Exception {
        String str = TAG;
        Log.i(str, "testLauncherChange()");
        PackageManager pm = InstrumentationRegistry.getContext().getPackageManager();
        Intent intent = new Intent("android.intent.action.MAIN");
        intent.addCategory("android.intent.category.HOME");
        List resolveInfos = pm.queryIntentActivities(intent, 0);//1. , intent( ) package
        StringBuilder stringBuilder = new StringBuilder();
        stringBuilder.append("testLauncherChange() : resolveInfos.size(): ");
        stringBuilder.append(resolveInfos.size());
        stringBuilder.append("


"); Log.i(str, stringBuilder.toString()); Assert.assertFalse("No launcher present", resolveInfos.isEmpty()); stringBuilder = new StringBuilder(); for (ResolveInfo r : resolveInfos) { String debug = new StringBuilder(); debug.append("ResolveInfo.ActivityInfo.packageName: "); debug.append(r.activityInfo.packageName); debug.append("\t priority: "); debug.append(r.priority); debug = debug.toString(); StringBuilder stringBuilder2 = new StringBuilder(); stringBuilder2.append("
\t"); stringBuilder2.append(debug); stringBuilder.append(stringBuilder2.toString()); Log.d(str, debug); } String packageName = ((ResolveInfo) resolveInfos.get(0)).activityInfo.packageName; int priority = ((ResolveInfo) resolveInfos.get(0)).priority; StringBuilder stringBuilder3 = new StringBuilder(); stringBuilder3.append("packageName: >"); stringBuilder3.append(packageName); stringBuilder3.append("