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

相关推荐
2501_9378609414 分钟前
MySQL表的操作:创建、查看、修改、删除完整实战
android·数据库·mysql
蒸蒸yyyyzwd9 小时前
秋招不熟悉力扣学习笔记1
笔记·学习·leetcode
我就是妖怪10 小时前
KMP全栈开发:从Android到AI Agent的技术演进与实践
android·人工智能
小弥儿11 小时前
GitHub今日热榜 | 2026-08-11:图原生基础设施首日登顶
学习·开源·github
心平气和量大福大11 小时前
android-实例-蒲公英-更新与安装-5-签名与生成APK
android·java·开发语言
阿pin12 小时前
Android随笔-Serializable与Parcelable
android·serializable·parcelable
天空之城--13 小时前
Android 事件分发机制深度解析——原理、源码与实战综合总结
android
阿pin13 小时前
Android随笔-AIDL
android·开发语言·aidl
for_ever_love__14 小时前
python基础语法学习: 数据容器
windows·python·学习
2501_9160074714 小时前
Bundle ID 注册与管理 App ID 创建指南 命名规则 权限开关与删除注意事项
android·ios·小程序·https·uni-app·iphone·webview