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

相关推荐
Star(up up up)1 分钟前
MySQL 事务隔离级别是如何实现的?从 MVCC 到锁机制原理详解
笔记·vscode·sql·学习·程序人生·mysql·学习方法
FungLeo12 小时前
FengCMS · PHP+MySQL 升级实录 · 危险默认值之殇:root/123456、认证码 8888 写进配置加载器
android·mysql·php·安全加固·fengcms
yz_aiks12 小时前
Termux 使用教程:把安卓手机变成随身 Linux(装 Python、SSH 远程、跑自动化脚本)
android·linux·python·智能手机·ssh·termux
Z21-X17 小时前
云原生运维学习笔记:Kubernetes Volume 与 Secret 实验
运维·笔记·学习·云原生·kubernetes
booboosui20 小时前
编号没变,消息还是来了:Mac 端通知读取漏第二条的原因
android
console.log('npc')21 小时前
Python 学习教程 · 第4课:数据结构
数据结构·python·学习
星落梦生1 天前
Docker学习(11)
学习·docker·容器
雨白2 天前
单例设计模式:从 Java/Kotlin 实现到 Android 实战
android
hai_android2 天前
一行 asLiveData,背后是一座生命周期的桥
android·java·kotlin