Skip to content

[AT] deepin-reader AT-SPI 测试套件 - #324

Closed
re2zero wants to merge 2 commits into
linuxdeepin:masterfrom
re2zero:agent/at/1787114436
Closed

[AT] deepin-reader AT-SPI 测试套件#324
re2zero wants to merge 2 commits into
linuxdeepin:masterfrom
re2zero:agent/at/1787114436

Conversation

@re2zero

@re2zero re2zero commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

概述

自动生成的 deepin-reader AT-SPI 测试套件。

测试范围

  • 来源: 文档查看器V25-用例.xlsx(313 个测试用例)
  • 自动化: 41 个 GUI 自动化用例(16 套 suite 文件)
  • 非 GUI: 21 个标记为不可自动化(玲珑 CLI、压力、性能、兼容性)

自动化用例分布

模块 用例数
文档操作 9
文档打开 4
键盘交互 4
注释 4
主菜单 3
标签页 3
书签 3
... ...

断言覆盖率

100% — 所有 41 个自动化用例均包含断言。

图谱三件套

  • ui-map.md: 组件树 + 控件表 + 菜单/对话框/快捷键索引
  • expected-at-spi-elements.md: 预期 AT-SPI 元素清单
  • at-spi-implementation-checklist.md: 15 个实现缺口

Pipeline

完整管线执行:parse → scan → dump → merge → tree-info → AI annotation → normalization → semantic mapping → generate → validate → coverage report

注意

  • 运行时目录是 Draft PR,需要人工review后合入
  • 非 GUI 用例(玲珑 CLI 等)已标记 unsupported
  • 如有桌面环境可执行 youqu at run --testdir tests/at/yaml/ 做验收

Summary by Sourcery

Establish a generated AT-SPI test suite and accessibility reference set for deepin-reader.

New Features:

  • Add a generated deepin-reader AT-SPI test suite covering document operations, opening, annotations, menus, tabs, bookmarks, keyboard input, window management, and related interactions.
  • Classify non-GUI, CLI, performance, compatibility, and stress cases as unsupported.

Enhancements:

  • Replace the previous small mapped-case set with normalized metadata, structured annotations, and expanded selectors for the generated test corpus.
  • Add UI maps, expected AT-SPI element inventories, and an implementation-gap checklist to guide accessibility review.

Documentation:

  • Document the deepin-reader accessibility component tree, controls, menus, dialogs, shortcuts, expected runtime elements, and accessibility implementation gaps.

Tests:

  • Expand the AT coverage data to 313 source cases, 27 GUI suites, and 21 unsupported non-GUI cases.
  • Provide suite YAML files for the generated GUI test modules and retain assertions across the automated cases.

Chores:

  • Remove intermediate raw-case, runtime-dump, scan, and legacy suite artifacts from the test data.

Automatically generated test suite from test case document
'文档查看器V25-用例.xlsx' (313 cases, 293 GUI + 20 non-GUI).

Pipeline:
- AT-SPI UI map derivation (via remote-codebase MCP)
- Step 0: Parse xlsx, generate docs + plan
- Step 1: Source scan + runtime dump + merge
- Step 2: tree-info structured output
- Step 3: AI annotation of interactive elements
- Step 5: Case normalization (28 GUI suites, 21 non-GUI)
- Step 7: AI semantic mapping
- Step 8-9: Gate validation + generate
- Step 10: Coverage report

Deliverables:
- elements.yaml: 2 AT-SPI elements
- 16 suite files, 41 automated test cases
- 21 non-GUI cases marked unsupported
- 100% assertion coverage
- UI map, expected elements, implementation checklist
@deepin-ci-robot

Copy link
Copy Markdown

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: re2zero

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@sourcery-ai

sourcery-ai Bot commented Aug 19, 2026

Copy link
Copy Markdown

Reviewer's Guide

This PR auto-generates and wires a deepin-reader AT-SPI GUI test suite: it restructures case mapping metadata, defines new suites grouped by functional modules, introduces AT-SPI UI/element documentation and implementation gaps checklist, simplifies the runtime AT tree, and replaces legacy case/dump files with normalized YAML suite files per module.

File-Level Changes

Change Details Files
Restructure and massively expand mapped test cases with new metadata and schema for deepin-reader AT-SPI automation.
  • Redefine cases_mapped.yaml header comments and example structure to use ids, modules, status, annotation, and typed steps.
  • Replace existing 900-line mapping with ~11k-line auto-generated content grouping cases into suites like 主菜单, 书签, 注释, 文档操作, 文档打开, 键盘交互, 窗口管理, etc.
  • Normalize step fields (step_type, action, selector, description) and reference AT elements via ReaderTitle and BrowserPage selectors instead of numeric ids.
  • Mark non-GUI / CLI cases as unsupported with explicit reason and minimal annotation.
tests/at/cases_mapped.yaml
Normalize suite-level case definitions, replacing raw/non-normalized inputs with structured suites grouped by functional modules.
  • Introduce metadata in suite-cases.yaml with generation timestamp, source file, and counts of raw/non-GUI/gui suites.
  • Define 27+ suites under cases: each with module, status, annotation (测试界面/功能/前置条件/AT元素引用) and high-level manual-style step descriptions.
  • Remove legacy version and non_gui_cases structure from suite-cases.yaml and align it with auto-generated suite semantics.
tests/at/suite-cases.yaml
Add AT-SPI documentation artifacts (UI map, expected elements, implementation checklist) to describe deepin-reader accessibility surface and gaps.
  • Create ui-map.md describing MainWindow/component hierarchy (Mermaid graph), control table, menu index, dialog index, and shortcut index for deepin-reader.
  • Create expected-at-spi-elements.md listing expected AT-SPI names, roles, and derivation from accessibleName rules and source locations.
  • Create at-spi-implementation-checklist.md summarizing already registered accessible classes, missing setAccessibleName spots, and concrete code templates for fixing gaps.
  • Add coverage stats and validation notes to guide future AT-SPI implementation work.
tests/at/ui-map.md
tests/at/expected-at-spi-elements.md
tests/at/at-spi-implementation-checklist.md
Simplify and refocus AT runtime tree and element mappings towards stable, semantic identifiers.
  • Replace large, id-heavy at-tree.yaml (n0..n256) with a concise v2.0 tree focusing on BrowserMenu, SideBarImageListView, EncryptionPage, HandleMenu, PagingWidget, TextEditShadowWidget, TransparentTextEdit.
  • Define generic children panels and widget nodes with static class_name and minimal actions/states to reflect structural AT surface rather than full widget enumeration.
  • Revise elements.yaml to map to semantic identifiers like ReaderTitle and BrowserPage, and drop many numeric element ids (n6, n224, etc.).
tests/at/at-tree.yaml
tests/at/yaml/elements.yaml
Prune obsolete raw/dump AT test artifacts and introduce per-module YAML suite files for execution.
  • Delete legacy inputs: cases_raw.yaml, runtime.yaml, scanned_gaps.yaml, scanned_ok.yaml, and states/00_all.yaml, as well as element_gaps.yaml and various old module suite YAMLs.
  • Add new YAML suite files under tests/at/yaml/, named by module in UTF-8 (e.g. 主菜单.suite.yaml, 书签.suite.yaml, 注释.suite.yaml, 文档操作.suite.yaml, 文档打开.suite.yaml, 键盘交互.suite.yaml, 右键菜单.suite.yaml, 窗口管理.suite.yaml, 缩略图.suite.yaml, 触摸屏.suite.yaml, 触摸板.suite.yaml, 社区需求.suite.yaml).
  • Ensure new suites share the normalized schema (metadata, cases, steps) and align with cases_mapped/suite-cases definitions for the test pipeline.
tests/at/cases_raw.yaml
tests/at/dump/runtime.yaml
tests/at/dump/scanned_gaps.yaml
tests/at/dump/scanned_ok.yaml
tests/at/dump/states/00_all.yaml
tests/at/element_gaps.yaml
tests/at/yaml/主菜单/主菜单.suite.yaml
tests/at/yaml/书签/书签.suite.yaml
tests/at/yaml/注释/注释.suite.yaml
tests/at/yaml/文档操作/文档操作.suite.yaml
tests/at/yaml/文档打开/文档打开.suite.yaml
tests/at/yaml/键盘交互/键盘交互.suite.yaml
tests/at/yaml/右键菜单/右键菜单.suite.yaml
tests/at/yaml/窗口管理/窗口管理.suite.yaml
tests/at/yaml/缩略图/缩略图.suite.yaml
tests/at/yaml/触摸屏/触摸屏.suite.yaml
tests/at/yaml/触摸板/触摸板.suite.yaml
tests/at/yaml/社区需求/社区需求.suite.yaml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@re2zero re2zero closed this Aug 20, 2026
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.

2 participants