Skip to content

Epic: iOS E2E 测试用例 — V1 核心流程回归 #10

@robinv8

Description

@robinv8

目标

覆盖 iOS 客户端 V1 全部核心用户流程,建立可重复执行的回归测试基线。

测试环境

  • 工具: Maestro v2.3.0(YAML 流程测试)
  • 设备: iOS 模拟器 iPhone 17 Pro / iOS 26.2
  • 后端: 本地 bun run dev (localhost:3001)
  • App Bundle: com.robin.pith
  • 自动化脚本: KnowledgeSpeedNote-iOS/.maestro/

测试模块

# 模块 Issue 用例数 自动化 状态
1 认证 — 游客模式 #11 3 01_auth_guest.yaml ✅ 通过
2 首页 — 浏览与导航 #12 5 02_dashboard_browse.yaml ✅ 通过
3 创建收集 #13 6 03_create_collection.yaml ⏳ 需后端+登录
4 分类 — 导航与标签 #14 6 04_category_nav.yaml ✅ 通过
5 搜索 — 输入与历史 #15 9 05_search_history.yaml ✅ 通过
6 个人中心 — 资料与登出 #16 5 06_profile_logout.yaml ✅ 通过

合计: 34 个测试用例,5/6 模块自动化通过

执行方式

# 全部回归(约 65 秒)
cd KnowledgeSpeedNote-iOS
maestro test .maestro/

# 单模块
maestro test .maestro/01_auth_guest.yaml

已发现并修复的缺陷

  • SearchViewModel.searchHistory 是 UserDefaults 计算属性,@Observable 无法追踪变化,清除历史后视图不刷新 → 改为存储属性 + didSet 同步

Maestro 适配备忘

  • iOS 26 上 back 命令不可靠,改用 swipe RIGHT 手势返回
  • hideKeyboard 不支持,用 tapOn point 点击非输入区域代替
  • SwiftUI Text 需精确匹配完整内容(如 "你好,探索者" 而非 "你好")
  • 无文本按钮需添加 .accessibilityIdentifier() 才能被 Maestro 定位

Metadata

Metadata

Assignees

No one assigned

    Labels

    QA测试/质量保证epicEpic: 大需求总览iosiOS 客户端

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions