Skip to content

[AT] deepin-music AT-SPI 测试套件 - #777

Draft
re2zero wants to merge 1 commit into
linuxdeepin:masterfrom
re2zero:agent/at/11b39d23
Draft

[AT] deepin-music AT-SPI 测试套件#777
re2zero wants to merge 1 commit into
linuxdeepin:masterfrom
re2zero:agent/at/11b39d23

Conversation

@re2zero

@re2zero re2zero commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

AT-SPI 测试套件

从音乐V25-用例.xlsx 生成 AT-SPI 自动化测试套件。

交付物

  • tests/at/yaml/elements.yaml — 46 个 AT-SPI 元素
  • tests/at/yaml/主菜单/主菜单.suite.yaml — 4 条用例
  • tests/at/yaml/歌曲导入/歌曲导入.suite.yaml — 2 条用例
  • tests/at/yaml/快捷键/快捷键.suite.yaml — 4 条用例
  • tests/at/yaml/删除确认/删除确认.suite.yaml — 2 条用例
  • tests/at/at-tree.yaml / at-tree-annotated.yaml — AT-SPI 元素树
  • tests/at/suite-cases.yaml / cases_mapped.yaml — 用例规范化与映射中间产物

统计

  • 总用例数: 12 (active) + 128 (unsupported) + 21 (non_gui)
  • 断言覆盖率: 100%
  • AT-SPI 元素覆盖率 (口径 A): 14.8% (受限于大量空名控件)
  • MCP 不可用,跳过 UI 图谱推导 (口径 B 不可用)

备注

运行时元素表显示 deepin-music 大量交互控件 (工具栏播放控制、搜索框、播放队列等) 缺少 setAccessibleName 调用,导致 AT-SPI 树中名称为空,无法被自动化测试寻址。详见 tests/at/element_gaps.yaml

Summary by Sourcery

Add the generated AT-SPI test suite and supporting accessibility artifacts for deepin-music.

New Features:

  • Add an AT-SPI automation suite covering 12 active deepin-music GUI cases across menus, song import, keyboard shortcuts, and deletion confirmation flows.

Enhancements:

  • Add runtime AT-SPI element inventories, annotated accessibility trees, normalized case mappings, and coverage reporting.
  • Document unsupported and non-GUI cases separately with reasons, including accessibility naming and environment limitations.

Tests:

  • Add generated AT-SPI suite definitions and coverage metadata with assertions for every active case.

Chores:

  • Record accessibility gaps affecting interactive controls and limiting element-based automation coverage.

Generate AT-SPI YAML test suites from 音乐V25-用例.xlsx covering main
menu, song import, keyboard shortcuts, and delete confirmation flows.

从音乐V25用例文档生成AT-SPI测试套件,覆盖主菜单、歌曲导入、快捷键、
删除确认四个模块,共12条可执行用例和140条不可自动化用例标记。

Log: 添加deepin-music AT-SPI测试套件
Influence: 新增tests/at/目录,包含at-tree、suite-cases、cases_mapped及4个suite yaml,不影响现有代码。
@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

Introduces an AT-SPI-based automated UI test suite for deepin-music generated from the 音乐V25-用例.xlsx spec, including normalized case definitions, element tree snapshots, element mappings, coverage reporting, and module-level suites for main menu, song import, keyboard shortcuts, and delete-confirmation dialogs.

File-Level Changes

Change Details Files
Add normalized AT-SPI case catalog generated from the Excel spec, including active, unsupported, and non-GUI cases.
  • Introduce suite-cases.yaml capturing all source cases with raw annotations, statuses (active/unsupported/non_gui), and human-readable reasons for non-automatable cases.
  • Add cases_mapped.yaml that maps a selected subset of active GUI cases into executable AT-SPI actions and assertions (session_start, dtk_main_menu, element_action, keyboard_hot_key, assert_*), ensuring each mapped case has concrete steps.
  • Add cases_non_gui.yaml to explicitly track non-GUI and CLI/performance-related cases that are intentionally excluded from AT-SPI automation.
tests/at/suite-cases.yaml
tests/at/cases_mapped.yaml
tests/at/cases_non_gui.yaml
Capture the runtime AT-SPI element tree and annotate it for test addressing and documentation.
  • Add at-tree.yaml with a raw runtime AT-SPI tree snapshot for deepin-music, including roles, names, states, indices, and classification metadata to support selector design.
  • Add at-tree-annotated.yaml with a slimmed, annotated view of key nodes (navigation list items, empty-state buttons, confirmation dialogs, tray menu) including human-readable comments about GUI location and function.
  • Record element coverage and identify missing accessible metadata via element_gaps.yaml, including per-node suggestions to add setAccessibleName calls.
tests/at/at-tree.yaml
tests/at/at-tree-annotated.yaml
tests/at/element_gaps.yaml
Define a reusable AT-SPI element catalog and module-level YAML test suites for execution.
  • Add elements.yaml mapping logical element names and node IDs (n0, n11, etc.) to AT-SPI roles and names, providing a central selector registry for tests.
  • Introduce module suites under tests/at/yaml (主菜单, 歌曲导入, 快捷键, 删除确认) that reference the mapped cases and elements to form executable .suite.yaml files.
  • Ensure suite files align with the mapped cases’ modules and use the standardized step/action schema expected by the AT runner.
tests/at/yaml/elements.yaml
tests/at/yaml/主菜单/主菜单.suite.yaml
tests/at/yaml/歌曲导入/歌曲导入.suite.yaml
tests/at/yaml/快捷键/快捷键.suite.yaml
tests/at/yaml/删除确认/删除确认.suite.yaml
Add an automatically generated coverage and duplication report for the AT-SPI test suite.
  • Introduce report.md summarizing case counts, assertion coverage, module distribution, AT-SPI element coverage (口径 A), and listing uncovered elements.
  • Include detection of duplicate operation sequences across cases to highlight potential redundancy in the suite.
  • Document limitations (no MCP / UI graph, visual-only checks, missing accessible names) to contextualize coverage numbers.
tests/at/yaml/report.md

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-bot

deepin-bot Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

TAG Bot

New tag: 7.0.66
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #779

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