Skip to content

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

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

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

Conversation

@re2zero

@re2zero re2zero commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

变更摘要

为 deepin-reader(文档查看器)生成 AT-SPI YAML 测试套件。

测试范围

  • 19 个模块解析,11 个模块成功映射并生成可执行套件
  • 113 条用例,覆盖文档打开、主菜单、右键菜单、键盘交互、标签页、缩略图、书签、目录、注释、窗口管理等功能
  • 64 个 AT-SPI 元素注册到 elements.yaml

覆盖率

指标
总用例数 113
断言覆盖率 99.1%
元素覆盖率(口径 A) 93.7%
模块数 11

不可自动化模块

  • 文档查看器(12 条)— 玲珑 ll-cli 纯终端命令
  • 交互_触摸屏(8 条)— 触屏手势
  • 交互_触摸板(5 条)— 触控板手势
  • 性能(2 条)— 跨平台硬件依赖
  • 压力(6 条)— 大量窗口/性能测试
  • 兼容性(1 条)— 系统语言切换
  • 交互_其它交互(8 条)— 视觉验证依赖
  • 窗口管理(4 条)— 窗口像素尺寸验证
  • 缩略图_注释(37 条)— 文档画布内渲染元素无 AT-SPI 名称

缺口分析

检出 14 个 AT-SPI 命名缺口(子组件缺 setAccessibleName),详见 at-spi-implementation-checklist.md。
P0 优先级:ScaleWidget 按钮、SlidePlayWidget 控制按钮、EncryptionPage 按钮等交互控件。

产物清单

  • tests/at/at-tree.yaml / at-tree-annotated.yaml — AT-SPI 元树
  • tests/at/context-bundle.md — 上下文包
  • tests/at/cases_mapped.yaml — 用例映射
  • tests/at/yaml/elements.yaml — 元素注册表(64 元素)
  • tests/at/yaml//.suite.yaml — 11 模块套件文件
  • tests/at/ui-map.md / expected-at-spi-elements.md — UI 图谱
  • tests/at/at-spi-implementation-checklist.md — 14 个缺口清单

运行时验证

烟雾测试部分通过(AT-SPI 元素可定位、键盘操作正常),因超时标记为 unstable。
需在有桌面环境后执行完整验收。

Summary by Sourcery

Establish comprehensive AT-SPI test coverage and accessibility mapping for deepin-reader.

New Features:

  • Add 11 executable AT-SPI YAML test suites covering 113 deepin-reader scenarios across document viewing, menus, keyboard interaction, tabs, sidebars, bookmarks, catalogs, annotations, and window management.
  • Register 64 AT-SPI elements and provide annotated accessibility trees, UI maps, context mappings, and expected element inventories.

Enhancements:

  • Document 14 missing AT-SPI naming anchors and prioritize accessibility improvements for interactive controls and dialogs.
  • Record partial smoke-test validation and identify remaining unstable or non-automatable coverage areas.

Documentation:

  • Add AT-SPI implementation, UI mapping, expected-element, and test-context documentation for deepin-reader.

Tests:

  • Generate a deepin-reader AT-SPI test suite with 113 mapped cases and 99.1% assertion coverage across 11 modules.

Chores:

  • Replace obsolete raw AT test data and suite definitions with the generated AT-SPI test artifacts.

生成 AT-SPI YAML 测试套件,共 11 个模块 113 条用例。

变更内容:
- 新增 at-tree.yaml / at-tree-annotated.yaml — AT-SPI 元树
- 新增 context-bundle.md — 上下文包(三张映射表)
- 新增 cases_mapped.yaml — 用例映射文件
- 新增 yaml/elements.yaml — 64 个 AT-SPI 元素注册表
- 新增 11 个模块的 suite.yaml 文件
- 新增 ui-map.md / expected-at-spi-elements.md — UI 图谱
- 新增 at-spi-implementation-checklist.md — 14 个缺口清单

包含 19 个模块解析,管线完整执行(Phase 1-5)。
覆盖率:元素覆盖率 93.7%,断言覆盖率 99.1%。
@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

@sourcery-ai

sourcery-ai Bot commented Aug 20, 2026

Copy link
Copy Markdown

Reviewer's Guide

Adds an AT-SPI-based accessibility test suite for deepin-reader, including annotated element tree, context and UI mapping docs, expected elements list, and 11 YAML module suites, while removing older raw/gap/dump case artifacts.

File-Level Changes

Change Details Files
Introduce AT-SPI implementation checklist and expected elements/coverage documentation for deepin-reader accessibility.
  • Add at-spi-implementation-checklist.md describing naming conventions, current coverage, and 14 accessibleName gaps with P0–P2 priorities.
  • Add expected-at-spi-elements.md enumerating expected AT-SPI elements, roles, triggers, and gap classification.
  • Add ui-map.md giving a UI topology, menus, dialogs, shortcuts, and file index for accessible-related components.
tests/at/at-spi-implementation-checklist.md
tests/at/expected-at-spi-elements.md
tests/at/ui-map.md
Define an annotated AT-SPI element tree and semantic context bundle to drive test case mapping.
  • Add at-tree-annotated.yaml capturing the current accessibility element hierarchy with roles, names, and annotations.
  • Add context-bundle.md mapping elements to features, screens, and operations/assertions for traceability.
  • Register panels and widgets like EncryptionPage, HandleMenu, PagingWidget, TextEditShadowWidget, etc., in the annotated tree for later automation work.
tests/at/at-tree-annotated.yaml
tests/at/context-bundle.md
Replace legacy raw/gap/dump suite artifacts with structured, mapped AT-SPI YAML suites for 11 modules.
  • Delete legacy files such as cases_raw.yaml, runtime.yaml, scanned_* dumps, element_gaps.yaml, suite-cases.yaml, and state snapshots.
  • Add elements.yaml (not shown in diff but referenced) and multiple *.suite.yaml files under tests/at/yaml/ for different feature modules (opening, menus, interactions, window management, thumbnails, annotations, etc.).
  • Ensure mapped suites align with the new element tree and context bundle, covering 113 cases and 64 elements with ~99% assertion coverage.
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

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

@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

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