Skip to content

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

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

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

Conversation

@re2zero

@re2zero re2zero commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

AT-SPI 测试套件生成报告

用例统计

  • 总用例数: 105
  • 含断言用例: 105 (100% 断言覆盖率)
  • 已生成模块: 文档视图操作(88)、标签页栏(17)
  • 已映射套件: 28个模块,共1778步,937个断言

AT-SPI 元素覆盖率

  • 口径 A(基于运行时元素表): 18.6%(8/43)
  • 仅基于运行时元素表,无源码全集对照

图谱三件套

  • ui-map.md — 组件 Mermaid 图 + 控件表 + 菜单/对话框索引
  • expected-at-spi-elements.md — 87+ 预期元素清单
  • at-spi-implementation-checklist.md — 12个缺口条目 + 实施模板

管线执行

全量生成管线(auto 模式): parse → scan → dump → merge → tree-info → AI 标注 → 规范化 → 语义映射 → 生成 → 验证

不可自动化用例

  • 12个玲珑CLI操作 → cases_non_gui.yaml
  • 触摸屏/触摸板操作 → 标记 UNSUPPORTED
  • 系统语言切换兼容性 → 标记 UNSUPPORTED

Summary by Sourcery

Expand deepin-reader accessibility testing into a generated, module-based AT-SPI suite with refreshed UI mappings, coverage documentation, and automation boundaries.

New Features:

  • Add a comprehensive AT-SPI test suite covering document viewing, tabs, menus, annotations, keyboard input, window management, document opening, performance, and interaction scenarios.
  • Add generated test plans and recording guides for the mapped test modules.

Enhancements:

  • Expand and reorganize the test case and mapping data into module-based suites with normalized metadata and explicit unsupported-case handling.
  • Refresh the runtime accessibility tree and element mappings, including interactive controls, menus, and static UI components.
  • Add accessibility coverage artifacts documenting the UI structure, expected AT-SPI elements, and implementation gaps.

Documentation:

  • Add UI maps, expected AT-SPI element inventories, and an AT-SPI implementation checklist.
  • Document non-GUI cases that require CLI operations or unavailable hardware/system configuration.

Tests:

  • Increase the generated test inventory to 313 cases, including 301 GUI cases and 12 non-GUI cases, with mapped action and assertion steps.
  • Add coverage for 19 source test modules and retain explicit unsupported markers for touch, system-language, and other non-automatable interactions.

Chores:

  • Remove obsolete runtime dump artifacts and replace the previous small sample suite with generated V25 test assets.

Generate AT-SPI YAML test suites for deepin-reader (文档查看器):
- UI map derivation with 3 documents (ui-map.md, expected elements, implementation checklist)
- 28 mapped test suites from 301 GUI cases (1778 steps, 937 assertions)
- 105 generated suite cases with 100% assertion coverage
- Pipeline: parse -> scan -> dump -> merge -> annotate -> normalize -> map -> generate
- Standard actions: element_action, dtk_main_menu, dtk_context_menu, keyboard_press/hot_key

Log: deepin-reader AT-SPI test suite generation
@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 20, 2026

Copy link
Copy Markdown

Reviewer's Guide

Introduce a comprehensive AT-SPI test suite and UI map for deepin-reader, expanding suite-cases to full V25 coverage, generating mapped automation steps, annotating the accessibility tree, defining expected elements and gaps, and adding an execution plan/non-GUI case separation.

File-Level Changes

Change Details Files
Expand suite-cases.yaml from a small, hand-curated set of suites to the full V25 文档查看器 test set, grouped by functional modules and enriched with metadata and detailed steps.
  • Replace previous 4-suite, 600+ line suite-cases.yaml with a 29-suite, 300+ case structure covering 文档视图操作、标签页栏、右键菜单、主菜单、缩略图、书签、窗口管理、目录、压力、性能、文档打开、键盘交互、触摸板交互、触摸屏交互、社区需求等模块。
  • Add top-level metadata including generated_at, source, total_cases, gui_cases, non_gui_cases, suites_count.
  • Normalize steps into case_id/case_name/step_type/description records, ensuring each test case is decomposed into individual action/assert steps for AT automation.
  • Reuse a shared annotation anchor (&id001/&id002/&id003/&id004/&id005/&id006/&id007) across suites to keep consistent "测试界面"、"测试功能"、"前置条件"、"AT元素引用" descriptions.
tests/at/suite-cases.yaml
Generate a mapped automation file cases_mapped.yaml that converts human-readable suite steps into executable AT actions and selector-based assertions.
  • Create metadata for cases_mapped.yaml and populate cases array with suites and mapped steps.
  • Map narrative descriptions to concrete actions like session_start, element_action (click), keyboard_press, keyboard_hot_key, dtk_main_menu, dtk_context_menu, and assert_element with appropriate selectors.
  • Ensure non-automatable or ambiguous steps are marked as UNSUPPORTED for future handling.
  • Align selectors with names/roles from the accessibility tree and ui-map (e.g. Form_DMainWindow, Button_ThumbnailToggle, BrowserMenu).
tests/at/cases_mapped.yaml
Refine and significantly extend the accessibility tree definition to match runtime structure and add an annotated version for documentation.
  • Replace the minimal at-tree.yaml with a richer tree describing Form_DMainWindow, titlebar left/right areas, TitleWidget, ScaleWidget, DTitlebar buttons, DocTabBar, CentralDocPage/NavPage, and key forms and buttons, including actions and states.
  • Introduce runtime vs static source markers and provide IDs for relevant interactive elements (e.g. DTitlebarIconLabel, Button_ThumbnailToggle, DLineEditChildLineEdit, DTabBarAddButton, 向左滚动, 向右滚动).
  • Add at-tree-annotated.yaml that documents each node with classification, comment, annotation_status, and links to source files and semantics.
  • Ensure the annotated tree aligns with elements used in suite-cases and cases_mapped (e.g. Form_findSearchEdit_P, DLineEditChildLineEdit, BrowserMenu).
tests/at/at-tree.yaml
tests/at/at-tree-annotated.yaml
Update elements.yaml to reflect the new AT-SPI tree, providing stable names/roles for key interactive elements referenced in tests.
  • Replace old n*-based entries with semantic keys like Button_ThumbnailToggle, Form_DMainWindow, BrowserMenu, Form_scaleEdit_P, DTabBarAddButton, 向左滚动, 向右滚动, and add mapping for Titlebar buttons.
  • Map runtime IDs (n6, n8, n10, n18, n19, n20, n21, n27, n28, n29, n30, n36, n40-42, n43-59, n61-66) to names and roles for use in selectors in cases_mapped.
  • Align elements.yaml structure with the new at-tree and suite annotations so that automation can resolve selectors deterministically.
tests/at/yaml/elements.yaml
Extend element_gaps.yaml with a synthesized checklist of missing accessible IDs and recommended setAccessibleName additions.
  • Change summary counts to reflect the larger interactive set (total_interactive/missing_accessible_id from 25 to 36).
  • List each interactive node (buttons/menu items/checkboxes/text inputs) lacking accessible_id with suggested setAccessibleName strings (e.g. Button_ZoomOut, Button_ZoomIn, Button_ZoomArrow, Button_TabScrollLeft/Right/Add, Button_FindPrev/Next/Close, Menu_DocView, Menu_Scale).
  • Ensure recommendations follow the Form_/Button_/Menu_ naming convention compatible with accessibledefine.h.
  • Provide a concrete implementation hint path per gap (e.g. which source file/method to modify).
tests/at/element_gaps.yaml
Generate AT-SPI documentation files to describe expected elements, implementation checklist, UI map, and pipeline plan for deepin-reader AT tests.
  • Add expected-at-spi-elements.md summarizing visible AT-SPI nodes, roles, names, and where runtime confirmation is still needed ([INFERENCE] tags).
  • Add at-spi-implementation-checklist.md listing 12 concrete gaps (GAP-001..012) with file locations, recommended setAccessibleName/setObjectName calls, and validation hints.
  • Add ui-map.md with Mermaid diagrams, component tables, menu layouts, dialog catalogue, and file:line indexes to serve as a structural atlas for deepin-reader.
  • Add plan.yaml and plan.md describing all V25 modules, case counts per module, slugs, and human-friendly recording guides for each suite.
  • Add cases_non_gui.yaml to explicitly mark 玲珑 CLI cases和语言兼容性为non_gui,避免误入 GUI 自动化管线.
tests/at/expected-at-spi-elements.md
tests/at/at-spi-implementation-checklist.md
tests/at/ui-map.md
tests/at/plan.yaml
tests/at/plan.md
tests/at/cases_non_gui.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