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

相关推荐
程序员-珍3 分钟前
报错下载android sdk失败
android·java
sulikey1 小时前
个人Linux操作系统学习笔记11 - 环境变量
linux·笔记·学习
齊家治國平天下1 小时前
AAOS 电源管理深度解析:休眠/唤醒/功耗优化
android·车载系统·aaos·aosp·电源管理·休眠唤醒·carpowermanager
治愈系贝壳2 小时前
ARM --- day 6 时钟
linux·arm开发·学习
Xzaveir2 小时前
企业号码展示不可观测怎么办:状态机、拨测事件与异常回放
android·人工智能
2501_916007472 小时前
iOS和macOS应用程序性能分析和优化工具使用综合指南
android·macos·ios·小程序·uni-app·iphone·webview
minglie12 小时前
zynq高频小数据量PS闭环的三个实验-第0课:目的和目标
学习
黄林晴2 小时前
Nearby Connections 重大变更:不再自动开启 Wi-Fi / 蓝牙,适配指南
android
恋猫de小郭3 小时前
Flutter 全新真 3D 实现,用 flutter_scene 能开发一个「我的世界」
android·前端·flutter
劈星斩月3 小时前
监督学习算法 之 决策树
学习·算法·决策树