Skip to content

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

Draft
re2zero wants to merge 2 commits into
linuxdeepin:masterfrom
re2zero:agent/at/1787290545
Draft

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

Conversation

@re2zero

@re2zero re2zero commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

概述

全量生成 deepin-reader 文档查看器 AT-SPI 测试套件,来自 xlsx 测试用例(313 条)。

可自动化用例

  • 3 个模块16 条用例
  • 主菜单 (9) / 文档打开 (5) / 文档视图_右键菜单 (2)
  • 37 个 AT-SPI 元素注册

不可自动化

297 条用例因以下原因标记为 unsupported:

  • 像素级视觉验证(窗口尺寸、缩略图大小、渲染效果)
  • 文档内容状态验证(文本内容、注释保存、书签状态)
  • 拖拽操作(标签页拖拽、侧栏拖拽)
  • 触摸屏/触摸板手势
  • 条件分支弹框(保存/不保存)
  • 性能/压力测试需人工判断

图谱缺口

  • 14 个控件缺少 setAccessibleName 或 setObjectName
  • 详见 at-spi-implementation-checklist.md

产物

  • tests/at/yaml/ — 可执行 suite YAML
  • tests/at/ui-map.md / expected-at-spi-elements.md / at-spi-implementation-checklist.md
  • tests/at/context-bundle.md / at-tree-annotated.yaml / cases_mapped.yaml

验证状态

  • 已通过 pipeline_assemble.py 校验(0 错误)
  • Gate 3/4/5 校验有已知质量警告(子 agent 字段名兼容性问题)
  • 需在桌面环境执行 youqu at run 验证运行时

Summary by Sourcery

Establish an AT-SPI test suite for deepin-reader by converting supported document-viewer scenarios into executable tests and documenting the accessibility model and remaining coverage gaps.

New Features:

  • Add executable AT-SPI suites covering main-menu interactions, document opening, and document-view context menus.
  • Provide a mapped test-case catalog with selectors, actions, assertions, and reusable element definitions.
  • Document the application UI graph, expected accessibility elements, implementation gaps, and validation strategy.

Enhancements:

  • Refresh the AT-SPI runtime tree with accessibility roles, states, actions, and static UI metadata.
  • Replace the previous broad/raw case and dump artifacts with a focused set of supported automated scenarios and accessibility context data.

Documentation:

  • Add user-facing AT-SPI documentation for UI mapping, expected elements, accessibility implementation gaps, and test context.

Tests:

  • Add 16 executable AT-SPI cases across three deepin-reader modules and register their required UI elements.
  • Validate the generated suite structure with the assembly pipeline.

Chores:

  • Track unsupported source cases and remaining accessibility naming and registration gaps for future work.

全量生成 deepin-reader 文档查看器 AT-SPI 测试套件。

## 产出
- 3 个可执行 suite 模块: 主菜单(9), 文档打开(5), 文档视图_右键菜单(2)
- 总计 16 条可自动化用例
- 37 个 AT-SPI 元素注册表 (elements.yaml)
- context-bundle.md / at-tree-annotated.yaml / cases_mapped.yaml

## 不可自动化原因
313 用例中 297 条不可自动化,主要原因:
- 像素级视觉验证(窗口尺寸、缩略图大小、渲染效果)
- 文档内容状态验证(文本内容、注释保存、书签状态)
- 拖拽操作(标签页拖拽、侧栏拖拽)
- 触摸屏/触摸板手势操作
- 条件分支弹框(保存/不保存)
- 性能/压力测试需要人工判断(卡顿、响应时间)

## 图谱
- 14 个 AT-SPI 缺口项(setAccessibleName 缺失)
- 详见 at-spi-implementation-checklist.md
@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 21, 2026

Copy link
Copy Markdown

Reviewer's Guide

Introduce a full AT-SPI automation test suite for deepin-reader (16 automated cases out of 313 total), replacing older raw case definitions with generated/mapped YAML suites, and add detailed AT-SPI UI/element documentation plus implementation gap analysis to guide future accessibility naming changes in the app codebase.

File-Level Changes

Change Details Files
Define an annotated AT-SPI tree model and a richer runtime AT-SPI snapshot format for deepin-reader to drive automation and documentation.
  • Add at-tree-annotated.yaml describing the expected widget hierarchy, roles, names, and classifications with comments and annotation_status for each node.
  • Refactor at-tree.yaml from a minimal node list into a richer schema including app-level metadata, runtime vs static sources, detailed states/actions, and class_name/state_labels fields.
  • Add explicit static nodes in at-tree.yaml for sidebar, encryption page, handle menu, paging widget, text edit widgets, and other non-runtime elements so they can be referenced by tests.
tests/at/at-tree-annotated.yaml
tests/at/at-tree.yaml
Introduce a structured, mapped AT-SPI test case catalog and remove legacy raw/dump artifacts to standardize on executable suite YAML.
  • Replace the previous verbose cases_mapped.yaml content with a concise, normalized v1.0 schema and a curated set of runnable cases for main menu, document opening, and document view context menu behaviors.
  • Delete legacy raw/dump/gap YAMLs (cases_raw.yaml, runtime.yaml, scanned_* and states dumps, element_gaps.yaml, suite-cases.yaml) that were used for generation/analysis but are no longer needed for execution.
  • Add or regenerate per-module suite YAML files under tests/at/yaml (e.g. 主菜单, 文档打开, 文档视图_右键菜单) to align with the new case IDs and structure.
tests/at/cases_mapped.yaml
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/suite-cases.yaml
tests/at/yaml/*.suite.yaml
Document the AT-SPI implementation, expected elements, and UI mapping to support both test development and application accessibility work.
  • Add at-spi-implementation-checklist.md with a detailed inventory of accessible registrations, setAccessibleName/setObjectName call sites, and a prioritized GAP-01..GAP-14 list of missing names and how to fix them in the C++ codebase.
  • Add expected-at-spi-elements.md that formalizes naming rules (RolePrefix+separator+fallback), lists all factory-registered widgets and explicit names, and explains runtime naming behavior and risks.
  • Add ui-map.md and context-bundle.md to describe the UI hierarchy, key widgets, menus, dialogs, shortcuts, and map AT-SPI elements to functions and test operations/assertions.
tests/at/at-spi-implementation-checklist.md
tests/at/expected-at-spi-elements.md
tests/at/ui-map.md
tests/at/context-bundle.md
Define reusable AT-SPI element selectors for the automation layer.
  • Rewrite elements.yaml to use human-readable keys (e.g. DTabBarAddButton, Button_SelectFile, 新窗口) instead of numeric node IDs, adding roles where needed so tests can reference stable logical selectors.
  • Add selector entries for all widgets and menu items used by the new suites, including window controls, file dialog, paging widget, and titlebar/menu actions.
tests/at/yaml/elements.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

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