Android16 EDLA【CTS】CtsConnectivityMultiDevicesTestCases存在fail项

Android16 EDLA【CTS】CtsConnectivityMultiDevicesTestCases存在fail项

文章目录

一、前言

这里记录一个【CTS】CtsConnectivityMultiDevicesTestCases 测试Failed项。

从测试模块名称看是和多设备连接有关。

二、分析解决

测试模块: CtsConnectivityMultiDevicesTestCases

1、报错信息

报错项信息,如下图所示:

具体报错信息:

复制代码
测试项: ConnectivityMultiDevicesTest#test_hotspot_upstream_wifi 
报错堆栈:
Traceback (most recent call last):
  File "connectivity_multi_devices_test.py", line 30, in test_hotspot_upstream_wifi
  File "net_tests_utils/host/python/tether_utils.py", line 83, in setup_hotspot_and_client_for_upstream_type
  File "mobly/snippet/client_base.py", line 213, in rpc_call
  File "mobly/snippet/client_base.py", line 306, in _rpc
  File "mobly/snippet/client_base.py", line 415, in _handle_rpc_response
mobly.snippet.errors.ApiError: <AndroidDevice|an4009059c06d08301a13> 
-------------- Java Stacktrace ---------------
java.lang.AssertionError: Could not connect to a wifi access point within 30000 ms. Check that the test device has a wifi network configured, and that the test access point is functioning properly.
	at org.junit.Assert.fail(Assert.java:89)
	at org.junit.Assert.assertTrue(Assert.java:42)
	at org.junit.Assert.assertNotNull(Assert.java:713)
	at kotlin.test.junit.JUnitAsserter.assertNotNull(JUnitSupport.kt:48)
	at kotlin.test.AssertionsKt__AssertionsKt.assertNotNull(Assertions.kt:145)
	at kotlin.test.AssertionsKt.assertNotNull(Unknown Source:1)
	at com.android.testutils.ConnectUtil.ensureWifiConnected$lambda$5(ConnectUtil.kt:307)
	at com.android.testutils.ConnectUtil.$r8$lambda$HgCmL0DSouVbioJ09sNCV1Fdj8s(Unknown Source:0)
	at 
----------------------------------------------

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "mobly/base_test.py", line 801, in exec_one_test
  File "connectivity_multi_devices_test.py", line 34, in test_hotspot_upstream_wifi
  File "net_tests_utils/host/python/tether_utils.py", line 115, in cleanup_tethering_for_upstream_type
  File "mobly/snippet/client_base.py", line 213, in rpc_call
  File "mobly/snippet/client_base.py", line 306, in _rpc
  File "mobly/snippet/client_base.py", line 415, in _handle_rpc_response
mobly.snippet.errors.ApiError: <AndroidDevice|an4009059c06d08301a13> 

另外一个测试项报错的堆栈信息也是差不多的。

堆栈信息看不懂。

2、原因分析

大概能看出Failed报错原因
java.lang.AssertionError: Could not connect to a wifi access point within 30000 ms测试设备(an4009059c06d08301a13)在 30 秒超时时间内未能连接到预设的 WiFi 热点,触发断言失败。

该项测试应该是一个开wifi,另外一个开热点相互连接测试的,未在规定时间成功连接导致Failed。

3、解决

之前在其他方案是有遇到过的,不用修改代码,需要使用特定手法测试就可以了。

复制代码
此问题测试时需要使用两台一样的机器:
1.测试设备都连接ipv6网络;
2.EDLA测试笔记本和两台设备的时间显示保持一致;
3.确保EDLA测试笔记本可以识别到两台设备的adb;
4.运行run cts --shard-count 2 -m CtsConnectivityMultiDevicesTestCases跑此项测试。

该项测试项必须用两个设备测试,多设备或者少设备都是不行的。

三、其他

1、【CTS】CtsConnectivityMultiDevicesTestCases存在fail项小结

该项报错的可能原因有:

复制代码
(1)使用一个设备或者多个设备测试该模块的该项;
(2)设备未连接ipv6的网络;
(3)其中一个设备的wifi或者热点异常;

2、Android16 EDLA 认证测试CTS问题分析解决

Android EDLA 认证测试的主要内容是 CTS、GTS、VTS ,还有一些其他的。

Android16 的CTS的测试项有900多个模块,总共有两百九十多万项需要测试。

其中有个测试模块 CtsDeqpTestCases ,包含了两百八十多万项,这个模块基本不会报错;

讲解CTS的某些Failed项解决思路:

https://blog.csdn.net/wenzhi20102321/article/details/155891415

相关推荐
恋猫de小郭2 小时前
Amper 正式转正 Kotlin Toolchain ,Gradle 未来何去何从
android·前端·flutter
plainGeekDev4 小时前
ButterKnife → ViewBinding
android·java·kotlin
成都大菠萝17 小时前
Android Car CarProperty 车辆信号链路
android
敲代码的鱼18 小时前
PDF 预览与签名批注写回 支持安卓 iOS 鸿蒙 UTS插件
android·前端·ios
时光足迹19 小时前
uni-app 视频通话实战:康复师与患者视频问诊的 6 个致命 Bug 与解决方案
android·ios·uni-app
Coffeeee1 天前
闲聊几句,Android老哥们,你们多久没做技改需求了
android·程序员·代码规范
萝卜er1 天前
Fragment 生命周期与状态恢复-《Android深水区(四)》
android
萝卜er1 天前
Intent 显式、隐式与 PendingIntent-《Android深水区(五)》
android
Kapaseker1 天前
一文吃透 Kotlin 集合操作符
android·kotlin
三少爷的鞋1 天前
Main-safe:现代Android 架构真正的分水岭
android