Skip to content

test(mobile): W3 综合回归矩阵 + 边界单测 - #43

Merged
currycan merged 1 commit into
masterfrom
test/w3-regression
May 6, 2026
Merged

test(mobile): W3 综合回归矩阵 + 边界单测#43
currycan merged 1 commit into
masterfrom
test/w3-regression

Conversation

@currycan

@currycan currycan commented May 6, 2026

Copy link
Copy Markdown
Owner

Summary

单测执行结果(本地)

  • poetry run pytest --cov=mobile --cov-fail-under=80
    • 1020 passed, 1 xfailed
    • coverage 80.98%(≥ 80% 门槛)

新发现的语义缺陷(待 PM 决策)

  • TBD-1(P2): PageProbe(unknown_threshold=0) 当前实现 max(1, ...) 夹紧到 1,第一次 unknown 即告警;与"0 = 禁用告警"的直觉语义相反。已用 xfail(strict=True) 锁定,源码修复后 xfail 自动失效。详见 tests/manual/W3_regression_summary.md 「发现的新问题」区。

Test plan

  • 单测全绿,覆盖率 ≥80%
  • 新增 3 单测覆盖(C1×2 PASS + C2×1 XFAIL strict)
  • 真机执行回归矩阵(人工填写 W3_multi_session_log.md + W3_p2_log.md

不在本 PR 范围

  • 真机执行:模板已就位,待 qa 现场操作回填
  • 源代码改动(qa 角色约束)

关联

新增 manual 回归模板(待真机回填):
- tests/manual/W3_multi_session_log.md  : #25 多场次 5 场景
- tests/manual/W3_p2_log.md             : #28/#23/#24 共 15 个真机子用例
- tests/manual/W3_regression_summary.md : 通过率 + 新发现问题汇总

单测增补 3 条 (C1+C2):
- TestSelectSessionBoundaryCases.test_select_session_returns_first_match_when_city_omitted
- TestSelectSessionBoundaryCases.test_select_session_falls_back_to_index_when_no_match
- TestUnknownThresholdZeroBoundary.test_unknown_threshold_zero_disables_alert
  (xfail strict=True,锁定 unknown_threshold=0 当前 clamp→1 与"0=disable"语义反直觉的缺陷)

发现 1 个新 issue 候选 (TBD-1,P2): unknown_threshold=0 的语义需 PM 决定,
已在 W3_regression_summary.md 记录。

执行结果:
- 1020 passed, 1 xfailed(C2 锁定 issue)
- coverage 80.98% (>= 80% 门槛)

Refs #25 #28 #23 #24
@currycan
currycan merged commit 5cf9de1 into master May 6, 2026
5 checks passed
@currycan
currycan deleted the test/w3-regression branch July 11, 2026 07:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant