Improve Android connection and preview UI testing

This commit is contained in:
2026-09-27 20:52:24 +08:00
parent f80c4d9938
commit 55374356ed
32 changed files with 1227 additions and 31 deletions
@@ -0,0 +1,43 @@
# Android 0.2.1 界面细节优化验收
App **0.2.1 / versionCode 4**,debug 签名,协议主版本1。测试代号 android-test-a(Android 13)。设备软件1.1.3,功能时间2026-09-27T17:51+08:00;本轮没有设备部署、驱动修改、OTA或IMG导出,也没有改设备版本或功能时间。
## 实现
顶栏长文字以30 dp/秒无限循环、每轮间隔1秒,短文字静止,内容变化从头开始,菜单固定。认证成功后的扫描条目改为断开,重新扫描保留当前连接条目;旧扫描信号不冒充实时RSSI,实时结果缺失显示暂不可用。两页设备画面、标题、等待与过期提示居中,刷新按钮仍在右侧且标题预留对称空间。
## 最终结果
- 隔离构建、JVM **15项**、Android lint通过;lint有16条警告(依赖版本、图标、现有API用法等),无错误。登记门禁unittest **8项**通过。
- root真机布局三组全部通过:约340dp、1.0倍字体竖屏 **77.282秒**;1.3倍字体竖屏 **54.004秒**;1.3倍字体横屏 **84.774秒**。每组覆盖四栏和菜单、连接中重新扫描保留、条目实际断开及手动再连、两页画面和标题中心差不超过3像素、刷新按钮右侧且不重叠。输入仅使用实时语义位置与root。密度、字体、方向最终恢复并回读通过。
- 实际Activity **87.006秒**通过:后台30秒释放及返回重连、菜单、设备昵称修改后重新连接、恢复原昵称、忘记后再次手动连接。阶段最后主动断开。
- 真实BLE只读回归 **127.671秒**通过:两次加密会话、状态/设置/存储/逻辑帧/WiFi扫描、内容列表顺序摘要、配置冲突后会话保持、Controller页面读取、后台释放和前台重连。本轮指定3轮轮询,不等同历史60轮耐久复测;未实际切网、重应用亮度或改变显示内容。
- debug签名和逐文件源码摘要核对通过;安装到登记手机的base.apk SHA-256及版本与交付包一致。证据见installed-artifact.json。
顶栏完整语义文本和菜单边界经真机核验;无限循环参数及内容变化重启经源码/编译核对,语义检查不代表实际像素运动的目视验收。未截图、未启动摄像头;实屏视觉检查不适用。
## 失败、修正及恢复
首次两组竖屏通过,横屏找不到扫描名称,见首次布局尝试.md。第二次遇到StaleObjectException(27.65秒),见layout-root-attempt-2.log。第三次第一组通过,第二组手动重连后未找到连接条目(70.945秒);第四次同阶段未找到条目(74.747秒),分别保留在attempt-3/4日志。
测试补充列表可见区域内的root滚动、失效语义节点重新获取、条目容器内可见且启用的按钮筛选、非空边界检查,以及两次间隔400毫秒的相同边界确认后只点击一次。新增阶段与脱敏错误分类用于区分输入、连接和最终状态。随后最终三组全部通过,没有放宽原验收断言,没有用普通注入或无障碍动作替代root。此前重连条目未出现的唯一根因未证实,不把重测通过作为根因证明。
可复用方法已补入 ../../如何安卓测试/常见问题与排障.md 第12节及测试README;单次证据保留在本目录。所有布局运行的finally执行恢复,最后运行另回读密度、字体、方向核验通过。
## 交付与边界
交付包:../../构建与发布/交付包/0.2.1-4/。构建日期 **2026-09-27 20:28 +08:00**。
APK SHA-256:`0cd888b0645d6d45ce457d2f334c69bb79fe52af3a4748080158db164fe8b9ef`。
源码树摘要:`671d5d7b9de3c808c3f217ee15e2780d85d3d8dffa5333437d1bf1c79eab8423`(按manifest.sources顺序,将相对路径、空格、摘要和换行连接后计算);逐文件摘要及证书摘要见交付manifest,测试APK摘要见artifact-summary.json。
旧Android版本、其他机型、真实多设备切换本轮未实测;共享逻辑覆盖设备切换、异常、身份失败及实时信号等待。沿用既有未验证边界,不声称本轮完成所有首版功能或网络专项。日志已脱敏,未记录真实凭据、手机标识或开发机绝对路径。
## 清理与仓库检查
手机短时root辅助文件由运行器finally清理;布局设置已恢复并核验,测试阶段正常主动断开。交付包与脱敏证据长期保留。
本机四个隔离构建目录的批量递归清理被自动安全审核拒绝;随后核对明确绝对路径及目录属性,以单个明确LiteralPath请求清理,仍被拒绝,返回理由仅为“blocked by policy”。未改用其他工具绕过拒绝,目录保留在受保护临时目录内:`qms-ui-021/qms-build-s_9wvlf3`、`qms-ui-021-final/qms-build-wy8k36kg`、`qms-ui-021-verified/qms-build-o9n44f_y`、`qms-ui-021-delivery/qms-build-vdbzxfp4`。这些目录不进入Git、不被后续源码或构建依赖;功能验收及交付不受影响。
最终仓库卫生检查与git diff --check通过,没有输出真实秘密。
@@ -0,0 +1,35 @@
私有凭据文件可用;未输出任何凭据值。
Performing Streamed Install
Success
Performing Streamed Install
Success
INSTRUMENTATION_STATUS: class=org.qimiaoscreen.controller.AppLifecycleTest
INSTRUMENTATION_STATUS: current=1
INSTRUMENTATION_STATUS: id=AndroidJUnitRunner
INSTRUMENTATION_STATUS: numtests=1
INSTRUMENTATION_STATUS: stream=
org.qimiaoscreen.controller.AppLifecycleTest:
INSTRUMENTATION_STATUS: test=actualActivityReturnsFromBackground
INSTRUMENTATION_STATUS_CODE: 1
INSTRUMENTATION_STATUS: class=org.qimiaoscreen.controller.AppLifecycleTest
INSTRUMENTATION_STATUS: current=1
INSTRUMENTATION_STATUS: id=AndroidJUnitRunner
INSTRUMENTATION_STATUS: numtests=1
INSTRUMENTATION_STATUS: stream=.
INSTRUMENTATION_STATUS: test=actualActivityReturnsFromBackground
INSTRUMENTATION_STATUS_CODE: 0
INSTRUMENTATION_RESULT: stream=
Time: 87.006
OK (1 test)
INSTRUMENTATION_CODE: -1
Runner exit code: 0
@@ -0,0 +1,29 @@
{
"app_version": "0.2.1",
"version_code": 4,
"protocol_major": 1,
"source_tree_sha256": "671d5d7b9de3c808c3f217ee15e2780d85d3d8dffa5333437d1bf1c79eab8423",
"apk_sha256": "0cd888b0645d6d45ce457d2f334c69bb79fe52af3a4748080158db164fe8b9ef",
"build_date": "2026-09-27 20:28 +08:00",
"layout": {
"passed_runs": 3,
"seconds": [
"77.282",
"54.004",
"84.774"
]
},
"activity": {
"passed_runs": 1,
"seconds": [
"87.006"
]
},
"ble": {
"passed_runs": 1,
"seconds": [
"127.671"
]
},
"test_apk_sha256": "2ad184a000db4ef9e9d7add0cfe913a455f054f4f9b39b34b0c3b36783569a92"
}
@@ -0,0 +1,275 @@
私有凭据文件可用;未输出任何凭据值。
Performing Streamed Install
Success
Performing Streamed Install
Success
INSTRUMENTATION_STATUS: class=org.qimiaoscreen.controller.BleIntegrationTest
INSTRUMENTATION_STATUS: current=1
INSTRUMENTATION_STATUS: id=AndroidJUnitRunner
INSTRUMENTATION_STATUS: numtests=1
INSTRUMENTATION_STATUS: stream=
org.qimiaoscreen.controller.BleIntegrationTest:
INSTRUMENTATION_STATUS: test=encryptedReadOnlySessionAndReconnect
INSTRUMENTATION_STATUS_CODE: 1
INSTRUMENTATION_STATUS: stream=BLE stage: scan complete
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=BLE stage: GATT ready 0
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=BLE stage: send kind=1 index=0 count=1 bytes=215 mtu=247
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=BLE stage: receive kind=2 count=50 bytes=20
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=BLE stage: send kind=3 index=0 count=1 bytes=134 mtu=247
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=BLE stage: receive kind=3 count=2 bytes=244
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=BLE stage: encrypted session open
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=BLE stage: send kind=3 index=0 count=1 bytes=84 mtu=247
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=BLE stage: receive kind=3 count=21 bytes=244
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=BLE stage: status received
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=BLE stage: send kind=3 index=0 count=1 bytes=86 mtu=247
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=BLE stage: receive kind=3 count=3 bytes=244
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=BLE stage: settings received
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=BLE stage: send kind=3 index=0 count=1 bytes=85 mtu=247
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=BLE stage: receive kind=3 count=1 bytes=232
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=BLE stage: storage received
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=BLE stage: send kind=3 index=0 count=1 bytes=86 mtu=247
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=BLE stage: receive kind=3 count=16 bytes=244
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=BLE stage: library received
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=BLE stage: library persistent order verified
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=BLE stage: send kind=3 index=0 count=1 bytes=83 mtu=247
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=BLE stage: receive kind=3 count=3 bytes=244
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=BLE stage: frame received
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=BLE stage: send kind=3 index=0 count=1 bytes=82 mtu=247
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=BLE stage: receive kind=3 count=4 bytes=244
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=BLE stage: send kind=3 index=0 count=1 bytes=86 mtu=247
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=BLE stage: receive kind=3 count=1 bytes=84
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=BLE stage: send kind=3 index=0 count=1 bytes=83 mtu=247
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=BLE stage: receive kind=3 count=3 bytes=244
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=BLE stage: WiFi scan completed without logging network names
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=BLE stage: send kind=3 index=0 count=1 bytes=171 mtu=247
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=BLE stage: receive kind=3 count=1 bytes=148
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=BLE stage: send kind=3 index=0 count=1 bytes=87 mtu=247
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=BLE stage: receive kind=3 count=1 bytes=85
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=BLE stage: configuration conflict preserves session
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=BLE stage: send kind=3 index=0 count=1 bytes=85 mtu=247
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=BLE stage: receive kind=3 count=21 bytes=244
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=BLE stage: send kind=3 index=0 count=1 bytes=84 mtu=247
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=BLE stage: receive kind=3 count=3 bytes=244
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=BLE stage: continuous polling cycle 0
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=BLE stage: send kind=3 index=0 count=1 bytes=85 mtu=247
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=BLE stage: receive kind=3 count=22 bytes=244
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=BLE stage: send kind=3 index=0 count=1 bytes=84 mtu=247
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=BLE stage: receive kind=3 count=3 bytes=244
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=BLE stage: send kind=3 index=0 count=1 bytes=85 mtu=247
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=BLE stage: receive kind=3 count=22 bytes=244
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=BLE stage: send kind=3 index=0 count=1 bytes=84 mtu=247
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=BLE stage: receive kind=3 count=5 bytes=244
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=BLE stage: intentional session close 0
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=BLE stage: GATT ready 1
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=BLE stage: send kind=1 index=0 count=1 bytes=215 mtu=247
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=BLE stage: receive kind=2 count=50 bytes=20
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=BLE stage: send kind=3 index=0 count=1 bytes=134 mtu=247
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=BLE stage: receive kind=3 count=2 bytes=244
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=BLE stage: encrypted session open
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=BLE stage: send kind=3 index=0 count=1 bytes=84 mtu=247
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=BLE stage: receive kind=3 count=22 bytes=244
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=BLE stage: status received
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=BLE stage: send kind=3 index=0 count=1 bytes=86 mtu=247
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=BLE stage: receive kind=3 count=3 bytes=244
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=BLE stage: settings received
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=BLE stage: send kind=3 index=0 count=1 bytes=85 mtu=247
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=BLE stage: receive kind=3 count=1 bytes=232
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=BLE stage: storage received
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=BLE stage: send kind=3 index=0 count=1 bytes=86 mtu=247
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=BLE stage: receive kind=3 count=16 bytes=244
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=BLE stage: library received
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=BLE stage: library persistent order verified
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=BLE stage: send kind=3 index=0 count=1 bytes=83 mtu=247
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=BLE stage: receive kind=3 count=3 bytes=244
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=BLE stage: frame received
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=BLE stage: send kind=3 index=0 count=1 bytes=82 mtu=247
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=BLE stage: receive kind=3 count=4 bytes=244
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=BLE stage: send kind=3 index=0 count=1 bytes=86 mtu=247
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=BLE stage: receive kind=3 count=1 bytes=84
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=BLE stage: intentional session close 1
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=BLE stage: controller device page ready
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=BLE stage: controller content and settings ready
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=BLE stage: controller background released
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=BLE stage: controller foreground reconnected
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: class=org.qimiaoscreen.controller.BleIntegrationTest
INSTRUMENTATION_STATUS: current=1
INSTRUMENTATION_STATUS: id=AndroidJUnitRunner
INSTRUMENTATION_STATUS: numtests=1
INSTRUMENTATION_STATUS: stream=.
INSTRUMENTATION_STATUS: test=encryptedReadOnlySessionAndReconnect
INSTRUMENTATION_STATUS_CODE: 0
INSTRUMENTATION_RESULT: stream=
Time: 127.671
OK (1 test)
INSTRUMENTATION_CODE: -1
Runner exit code: 0
@@ -0,0 +1,5 @@
{
"VERSION": "1.1.3",
"FEATURE_UPDATED_AT": "2026-09-27T17:51+08:00",
"service_active": true
}
@@ -0,0 +1,6 @@
{
"alias": "android-test-a",
"apk_sha256": "0cd888b0645d6d45ce457d2f334c69bb79fe52af3a4748080158db164fe8b9ef",
"installed_apk_matches": true,
"installed_version_matches": true
}
@@ -0,0 +1,30 @@
[
{
"name": "ControllerRecoveryTest[jvm]",
"tests": "9",
"failures": "0",
"errors": "0",
"time": "0.304"
},
{
"name": "CryptoInteropTest[jvm]",
"tests": "3",
"failures": "0",
"errors": "0",
"time": "0.074"
},
{
"name": "ProtocolTest[jvm]",
"tests": "2",
"failures": "0",
"errors": "0",
"time": "0.002"
},
{
"name": "RpcTimeoutTest[jvm]",
"tests": "1",
"failures": "0",
"errors": "0",
"time": "0.033"
}
]
@@ -0,0 +1,67 @@
私有凭据文件可用;未输出任何凭据值。
Performing Streamed Install
Success
Performing Streamed Install
Success
INSTRUMENTATION_STATUS: class=org.qimiaoscreen.controller.LayoutTest
INSTRUMENTATION_STATUS: current=1
INSTRUMENTATION_STATUS: id=AndroidJUnitRunner
INSTRUMENTATION_STATUS: numtests=1
INSTRUMENTATION_STATUS: stream=
org.qimiaoscreen.controller.LayoutTest:
INSTRUMENTATION_STATUS: test=narrowLargeFontAndLandscape
INSTRUMENTATION_STATUS_CODE: 1
INSTRUMENTATION_STATUS: class=org.qimiaoscreen.controller.LayoutTest
INSTRUMENTATION_STATUS: current=1
INSTRUMENTATION_STATUS: id=AndroidJUnitRunner
INSTRUMENTATION_STATUS: numtests=1
INSTRUMENTATION_STATUS: stack=androidx.test.uiautomator.StaleObjectException
at androidx.test.uiautomator.UiObject2.getAccessibilityNodeInfo(UiObject2.java:1018)
at androidx.test.uiautomator.UiObject2.getVisibleBounds(UiObject2.java:310)
at org.qimiaoscreen.controller.LayoutTest.narrowLargeFontAndLandscape$visible(LayoutTest.kt:32)
at org.qimiaoscreen.controller.LayoutTest.narrowLargeFontAndLandscape$tagged(LayoutTest.kt:61)
at org.qimiaoscreen.controller.LayoutTest.narrowLargeFontAndLandscape(LayoutTest.kt:88)
INSTRUMENTATION_STATUS: stream=
Error in narrowLargeFontAndLandscape(org.qimiaoscreen.controller.LayoutTest):
androidx.test.uiautomator.StaleObjectException
at androidx.test.uiautomator.UiObject2.getAccessibilityNodeInfo(UiObject2.java:1018)
at androidx.test.uiautomator.UiObject2.getVisibleBounds(UiObject2.java:310)
at org.qimiaoscreen.controller.LayoutTest.narrowLargeFontAndLandscape$visible(LayoutTest.kt:32)
at org.qimiaoscreen.controller.LayoutTest.narrowLargeFontAndLandscape$tagged(LayoutTest.kt:61)
at org.qimiaoscreen.controller.LayoutTest.narrowLargeFontAndLandscape(LayoutTest.kt:88)
INSTRUMENTATION_STATUS: test=narrowLargeFontAndLandscape
INSTRUMENTATION_STATUS_CODE: -2
INSTRUMENTATION_RESULT: stream=
Time: 27.65
There was 1 failure:
1) narrowLargeFontAndLandscape(org.qimiaoscreen.controller.LayoutTest)
androidx.test.uiautomator.StaleObjectException
at androidx.test.uiautomator.UiObject2.getAccessibilityNodeInfo(UiObject2.java:1018)
at androidx.test.uiautomator.UiObject2.getVisibleBounds(UiObject2.java:310)
at org.qimiaoscreen.controller.LayoutTest.narrowLargeFontAndLandscape$visible(LayoutTest.kt:32)
at org.qimiaoscreen.controller.LayoutTest.narrowLargeFontAndLandscape$tagged(LayoutTest.kt:61)
at org.qimiaoscreen.controller.LayoutTest.narrowLargeFontAndLandscape(LayoutTest.kt:88)
FAILURES!!!
Tests run: 1, Failures: 1
INSTRUMENTATION_CODE: -1
Layout settings restored and verified
Traceback (most recent call last):
File "<仓库根目录>\移动端相关内容\安卓app\如何安卓测试\run_ble_test.py", line 154, in <module>
main()
~~~~^^
File "<仓库根目录>\移动端相关内容\安卓app\如何安卓测试\run_ble_test.py", line 129, in main
raise RuntimeError("Instrumentation did not pass")
RuntimeError: Instrumentation did not pass
Runner exit code: 1
@@ -0,0 +1,86 @@
私有凭据文件可用;未输出任何凭据值。
Performing Streamed Install
Success
Performing Streamed Install
Success
INSTRUMENTATION_STATUS: class=org.qimiaoscreen.controller.LayoutTest
INSTRUMENTATION_STATUS: current=1
INSTRUMENTATION_STATUS: id=AndroidJUnitRunner
INSTRUMENTATION_STATUS: numtests=1
INSTRUMENTATION_STATUS: stream=
org.qimiaoscreen.controller.LayoutTest:
INSTRUMENTATION_STATUS: test=narrowLargeFontAndLandscape
INSTRUMENTATION_STATUS_CODE: 1
INSTRUMENTATION_STATUS: class=org.qimiaoscreen.controller.LayoutTest
INSTRUMENTATION_STATUS: current=1
INSTRUMENTATION_STATUS: id=AndroidJUnitRunner
INSTRUMENTATION_STATUS: numtests=1
INSTRUMENTATION_STATUS: stream=.
INSTRUMENTATION_STATUS: test=narrowLargeFontAndLandscape
INSTRUMENTATION_STATUS_CODE: 0
INSTRUMENTATION_RESULT: stream=
Time: 47.366
OK (1 test)
INSTRUMENTATION_CODE: -1
Layout passed: font=1.0, rotation=0
INSTRUMENTATION_STATUS: class=org.qimiaoscreen.controller.LayoutTest
INSTRUMENTATION_STATUS: current=1
INSTRUMENTATION_STATUS: id=AndroidJUnitRunner
INSTRUMENTATION_STATUS: numtests=1
INSTRUMENTATION_STATUS: stream=
org.qimiaoscreen.controller.LayoutTest:
INSTRUMENTATION_STATUS: test=narrowLargeFontAndLandscape
INSTRUMENTATION_STATUS_CODE: 1
INSTRUMENTATION_STATUS: class=org.qimiaoscreen.controller.LayoutTest
INSTRUMENTATION_STATUS: current=1
INSTRUMENTATION_STATUS: id=AndroidJUnitRunner
INSTRUMENTATION_STATUS: numtests=1
INSTRUMENTATION_STATUS: stack=java.lang.IllegalStateException: Required App semantic tag unavailable: connected_scan_disconnect
at org.qimiaoscreen.controller.LayoutTest.narrowLargeFontAndLandscape$tagged(LayoutTest.kt:67)
at org.qimiaoscreen.controller.LayoutTest.narrowLargeFontAndLandscape$connectScanned(LayoutTest.kt:80)
at org.qimiaoscreen.controller.LayoutTest.narrowLargeFontAndLandscape(LayoutTest.kt:111)
INSTRUMENTATION_STATUS: stream=
Error in narrowLargeFontAndLandscape(org.qimiaoscreen.controller.LayoutTest):
java.lang.IllegalStateException: Required App semantic tag unavailable: connected_scan_disconnect
at org.qimiaoscreen.controller.LayoutTest.narrowLargeFontAndLandscape$tagged(LayoutTest.kt:67)
at org.qimiaoscreen.controller.LayoutTest.narrowLargeFontAndLandscape$connectScanned(LayoutTest.kt:80)
at org.qimiaoscreen.controller.LayoutTest.narrowLargeFontAndLandscape(LayoutTest.kt:111)
INSTRUMENTATION_STATUS: test=narrowLargeFontAndLandscape
INSTRUMENTATION_STATUS_CODE: -2
INSTRUMENTATION_RESULT: stream=
Time: 70.945
There was 1 failure:
1) narrowLargeFontAndLandscape(org.qimiaoscreen.controller.LayoutTest)
java.lang.IllegalStateException: Required App semantic tag unavailable: connected_scan_disconnect
at org.qimiaoscreen.controller.LayoutTest.narrowLargeFontAndLandscape$tagged(LayoutTest.kt:67)
at org.qimiaoscreen.controller.LayoutTest.narrowLargeFontAndLandscape$connectScanned(LayoutTest.kt:80)
at org.qimiaoscreen.controller.LayoutTest.narrowLargeFontAndLandscape(LayoutTest.kt:111)
FAILURES!!!
Tests run: 1, Failures: 1
INSTRUMENTATION_CODE: -1
Layout settings restored and verified
Traceback (most recent call last):
File "<仓库根目录>\移动端相关内容\安卓app\如何安卓测试\run_ble_test.py", line 154, in <module>
main()
~~~~^^
File "<仓库根目录>\移动端相关内容\安卓app\如何安卓测试\run_ble_test.py", line 129, in main
raise RuntimeError("Instrumentation did not pass")
RuntimeError: Instrumentation did not pass
Runner exit code: 1
@@ -0,0 +1,79 @@
私有凭据文件可用;未输出任何凭据值。
Performing Streamed Install
Success
Performing Streamed Install
Success
INSTRUMENTATION_STATUS: class=org.qimiaoscreen.controller.LayoutTest
INSTRUMENTATION_STATUS: current=1
INSTRUMENTATION_STATUS: id=AndroidJUnitRunner
INSTRUMENTATION_STATUS: numtests=1
INSTRUMENTATION_STATUS: stream=
org.qimiaoscreen.controller.LayoutTest:
INSTRUMENTATION_STATUS: test=narrowLargeFontAndLandscape
INSTRUMENTATION_STATUS_CODE: 1
INSTRUMENTATION_STATUS: stream=Layout stage: initial-connect
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=Layout stage: scan-while-connected
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=Layout stage: frame-status
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=Layout stage: frame-content
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=Layout stage: disconnect-row
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=Layout stage: manual-reconnect
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: class=org.qimiaoscreen.controller.LayoutTest
INSTRUMENTATION_STATUS: current=1
INSTRUMENTATION_STATUS: id=AndroidJUnitRunner
INSTRUMENTATION_STATUS: numtests=1
INSTRUMENTATION_STATUS: stack=java.lang.IllegalStateException: Required App semantic tag unavailable: connected_scan_disconnect
at org.qimiaoscreen.controller.LayoutTest.narrowLargeFontAndLandscape$tagged(LayoutTest.kt:68)
at org.qimiaoscreen.controller.LayoutTest.narrowLargeFontAndLandscape$connectScanned(LayoutTest.kt:85)
at org.qimiaoscreen.controller.LayoutTest.narrowLargeFontAndLandscape(LayoutTest.kt:119)
INSTRUMENTATION_STATUS: stream=
Error in narrowLargeFontAndLandscape(org.qimiaoscreen.controller.LayoutTest):
java.lang.IllegalStateException: Required App semantic tag unavailable: connected_scan_disconnect
at org.qimiaoscreen.controller.LayoutTest.narrowLargeFontAndLandscape$tagged(LayoutTest.kt:68)
at org.qimiaoscreen.controller.LayoutTest.narrowLargeFontAndLandscape$connectScanned(LayoutTest.kt:85)
at org.qimiaoscreen.controller.LayoutTest.narrowLargeFontAndLandscape(LayoutTest.kt:119)
INSTRUMENTATION_STATUS: test=narrowLargeFontAndLandscape
INSTRUMENTATION_STATUS_CODE: -2
INSTRUMENTATION_RESULT: stream=
Time: 74.747
There was 1 failure:
1) narrowLargeFontAndLandscape(org.qimiaoscreen.controller.LayoutTest)
java.lang.IllegalStateException: Required App semantic tag unavailable: connected_scan_disconnect
at org.qimiaoscreen.controller.LayoutTest.narrowLargeFontAndLandscape$tagged(LayoutTest.kt:68)
at org.qimiaoscreen.controller.LayoutTest.narrowLargeFontAndLandscape$connectScanned(LayoutTest.kt:85)
at org.qimiaoscreen.controller.LayoutTest.narrowLargeFontAndLandscape(LayoutTest.kt:119)
FAILURES!!!
Tests run: 1, Failures: 1
INSTRUMENTATION_CODE: -1
Layout settings restored and verified
Traceback (most recent call last):
File "<仓库根目录>\移动端相关内容\安卓app\如何安卓测试\run_ble_test.py", line 154, in <module>
main()
~~~~^^
File "<仓库根目录>\移动端相关内容\安卓app\如何安卓测试\run_ble_test.py", line 129, in main
raise RuntimeError("Instrumentation did not pass")
RuntimeError: Instrumentation did not pass
Runner exit code: 1
@@ -0,0 +1,159 @@
私有凭据文件可用;未输出任何凭据值。
Performing Streamed Install
Success
Performing Streamed Install
Success
INSTRUMENTATION_STATUS: class=org.qimiaoscreen.controller.LayoutTest
INSTRUMENTATION_STATUS: current=1
INSTRUMENTATION_STATUS: id=AndroidJUnitRunner
INSTRUMENTATION_STATUS: numtests=1
INSTRUMENTATION_STATUS: stream=
org.qimiaoscreen.controller.LayoutTest:
INSTRUMENTATION_STATUS: test=narrowLargeFontAndLandscape
INSTRUMENTATION_STATUS_CODE: 1
INSTRUMENTATION_STATUS: stream=Layout stage: initial-connect
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=Layout stage: scan-while-connected
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=Layout stage: frame-status
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=Layout stage: frame-content
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=Layout stage: disconnect-row
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=Layout stage: manual-reconnect
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=Layout stage: connect-request-observed=false
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=Layout stage: final-disconnect
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: class=org.qimiaoscreen.controller.LayoutTest
INSTRUMENTATION_STATUS: current=1
INSTRUMENTATION_STATUS: id=AndroidJUnitRunner
INSTRUMENTATION_STATUS: numtests=1
INSTRUMENTATION_STATUS: stream=.
INSTRUMENTATION_STATUS: test=narrowLargeFontAndLandscape
INSTRUMENTATION_STATUS_CODE: 0
INSTRUMENTATION_RESULT: stream=
Time: 77.282
OK (1 test)
INSTRUMENTATION_CODE: -1
Layout passed: font=1.0, rotation=0
INSTRUMENTATION_STATUS: class=org.qimiaoscreen.controller.LayoutTest
INSTRUMENTATION_STATUS: current=1
INSTRUMENTATION_STATUS: id=AndroidJUnitRunner
INSTRUMENTATION_STATUS: numtests=1
INSTRUMENTATION_STATUS: stream=
org.qimiaoscreen.controller.LayoutTest:
INSTRUMENTATION_STATUS: test=narrowLargeFontAndLandscape
INSTRUMENTATION_STATUS_CODE: 1
INSTRUMENTATION_STATUS: stream=Layout stage: initial-connect
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=Layout stage: scan-while-connected
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=Layout stage: frame-status
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=Layout stage: frame-content
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=Layout stage: disconnect-row
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=Layout stage: manual-reconnect
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=Layout stage: connect-request-observed=false
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=Layout stage: final-disconnect
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: class=org.qimiaoscreen.controller.LayoutTest
INSTRUMENTATION_STATUS: current=1
INSTRUMENTATION_STATUS: id=AndroidJUnitRunner
INSTRUMENTATION_STATUS: numtests=1
INSTRUMENTATION_STATUS: stream=.
INSTRUMENTATION_STATUS: test=narrowLargeFontAndLandscape
INSTRUMENTATION_STATUS_CODE: 0
INSTRUMENTATION_RESULT: stream=
Time: 54.004
OK (1 test)
INSTRUMENTATION_CODE: -1
Layout passed: font=1.3, rotation=0
INSTRUMENTATION_STATUS: class=org.qimiaoscreen.controller.LayoutTest
INSTRUMENTATION_STATUS: current=1
INSTRUMENTATION_STATUS: id=AndroidJUnitRunner
INSTRUMENTATION_STATUS: numtests=1
INSTRUMENTATION_STATUS: stream=
org.qimiaoscreen.controller.LayoutTest:
INSTRUMENTATION_STATUS: test=narrowLargeFontAndLandscape
INSTRUMENTATION_STATUS_CODE: 1
INSTRUMENTATION_STATUS: stream=Layout stage: initial-connect
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=Layout stage: scan-while-connected
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=Layout stage: frame-status
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=Layout stage: frame-content
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=Layout stage: disconnect-row
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=Layout stage: manual-reconnect
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=Layout stage: connect-request-observed=false
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: stream=Layout stage: final-disconnect
INSTRUMENTATION_STATUS_CODE: 2
INSTRUMENTATION_STATUS: class=org.qimiaoscreen.controller.LayoutTest
INSTRUMENTATION_STATUS: current=1
INSTRUMENTATION_STATUS: id=AndroidJUnitRunner
INSTRUMENTATION_STATUS: numtests=1
INSTRUMENTATION_STATUS: stream=.
INSTRUMENTATION_STATUS: test=narrowLargeFontAndLandscape
INSTRUMENTATION_STATUS_CODE: 0
INSTRUMENTATION_RESULT: stream=
Time: 84.774
OK (1 test)
INSTRUMENTATION_CODE: -1
Layout passed: font=1.3, rotation=1
Layout settings restored and verified
Runner exit code: 0
@@ -0,0 +1,5 @@
# 首次布局尝试
App 0.2.1 / versionCode 4。约340dp、1.0倍字体竖屏38.726秒通过;1.3倍字体竖屏49.475秒通过。1.3倍字体横屏64.751秒失败:连接辅助函数在20秒等待内未找到扫描目标名称。当时未执行列表滚动,不能仅凭该失败区分条目不可见与未扫描到目标,也未认定蓝牙根因。
随后给连接列表增加稳定语义标签,测试按该列表实时可见边界执行有界root滑动定位;再次隔离构建后重测,结果见 layout-root.log。首次失败保留。首次运行 finally 已执行布局恢复;后续运行器增加密度回读,与既有字体和方向回读一并核验。