Selector Drift Recovery

petrkindlmann/qa-skills/skills/selector-drift-recovery

作者 petrkindlmannb3bb61bd268bMIT168 个星标收录于 2026年10月9日更新于 2026年10月9日仓库4个月前更新

Bulk-regenerate broken test selectors after a UI refactor or redesign. Detects drift between old and new DOM with an aria-snapshot diff, maps old locators to new equivalents using role-first + region scoping, validates against the new build, and produces a single PR with grouped per-file selector updates and per-change evidence. Assumes Playwright >= 1.50 (trace viewer DOM-snapshot panel, getByRole filtering, ariaSnapshot). Use when: "UI refactor broke tests," "redesign broke tests," "bulk update selectors," "regenerate selectors after refactor," "selector drift," "fix N broken tests after redesign." Not for: healing one flaky test at runtime — use test-reliability. Not for: writing a new test suite from scratch — use playwright-automation. Not for: re-recording tests after a framework switch (Selenium to Playwright) — use test-migration. Related: test-reliability, playwright-automation, test-migration, ci-cd-integration, visual-testing.

添加到 SourceWeft 工作区

  1. 在控制台中打开该技能,并将它添加到工作区。
  2. 为需要使用它的对话启用该技能。

该技能包含脚本。使用该技能时,脚本会在你的工作区沙箱中运行——添加前请先查看文件列表和源代码。

添加到 SourceWeft

系统会先要求你登录,然后直接带你回到这个技能。

让你的智能体来安装

把这段提示词粘贴到 Claude Code、Codex、Cursor 或其他能运行命令的智能体中,也可以粘贴到 SourceWeft 对话里。智能体会阅读这个技能的安装说明,向你展示它的来源、许可证和脚本情况,在你同意后用 SourceWeft CLI 安装。

阅读 https://sourceweft.com/skills/gh-petrkindlmann-qa-skills-selector-drift-recovery/install.md 中的说明,按说明安装这个技能。安装前先告诉我它的来源、许可证以及是否附带脚本,等我确认。修改我电脑上的其他任何内容之前也要先问我。

查看智能体所遵循的安装说明

用命令行自行安装

适用于 Claude Code、Codex、Cursor 及其他本地智能体。SourceWeft CLI 会从源代码仓库中获取此处扫描过的那次提交,并根据扫描时记录的哈希值逐一校验每个文件。只要有任何不一致,就不会写入任何内容。

npx @sourceweft/cli skills install @petrkindlmann/selector-drift-recovery

添加 --agent claude-code、codex、cursor 或 universal 来选择安装给哪个智能体(默认为 Claude Code)。

在本地安装后,该技能的脚本会直接在你的电脑上运行,而不是在沙箱中。请先阅读这些脚本——CLI 会在安装前征求你的确认。

上游安装器——未经 SourceWeft 校验

开源的 skills 安装器会获取同一个固定的提交,但不会根据 SourceWeft 记录的哈希值校验文件。

npx skills add https://github.com/petrkindlmann/qa-skills/tree/b3bb61bd268b147476252c6ed5a0440c87b97441/skills/selector-drift-recovery

来源与署名

来源:petrkindlmann/qa-skills位于skills/selector-drift-recovery提交b3bb61b

许可证: MIT

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架

更多来自 petrkindlmann/qa-skills 的技能

Visual Testing

petrkindlmann

指导使用 Playwright 截图以及 Chromatic、Percy、Argos CI 等托管工具进行视觉回归测试。

Software Development1684个月前更新

Unit Testing

petrkindlmann

指导使用 Jest、Vitest 和 pytest 编写有效的单元测试,涵盖测试替身、覆盖率门禁、快照、假定时器和变异测试。

Software Development1684个月前更新

Test Suite Curation

petrkindlmann

Audit a whole regression suite and prune/restructure it with evidence: per-test coverage fingerprinting, AST near-duplicate clustering, CI-history mining for never-failing and flaky tests, prune decision rules (redundant/obsolete/low-value/keep), smoke/core/extended tiering by risk and defect-detection history, and a defensible "what we deleted and why" record. Deletion is destructive — quarantine and human sign-off are mandatory. Use when: "audit the test suite," "prune redundant tests," "find duplicate tests," "which tests can we delete," "restructure into smoke/core/extended," "is this test pulling its weight," "shrink the regression suite." Not for: Judging whether an individual test is WELL-WRITTEN (smells, assertions) — that is ai-qa-review. Healing one flaky test at runtime — that is test-reliability. Bulk selector regeneration after a UI refactor — that is selector-drift-recovery. Related: ai-qa-review, coverage-analysis, test-reliability, risk-based-testing, qa-project-context.

待分类1684个月前更新

Test Strategy

petrkindlmann

Produce a multi-quarter QA strategy document. Covers scope, risk-based prioritization, test levels (unit/integration/E2E), pyramid analysis, entry/exit criteria, quality KPIs, tool selection rationale, CI scaling levers, and timeline planning. Output is an actionable strategy document, not a shelf document. Use when: "test strategy," "QA strategy doc," "testing approach," "QA roadmap," "multi-quarter QA direction." Not for: a single-sprint or single-release plan — use test-planning. Not for: identifying which areas carry the most risk — use risk-based-testing first. Related: risk-based-testing, qa-metrics, release-readiness, test-planning, test-reliability.

待分类1684个月前更新

Test Planning

petrkindlmann

为单个冲刺或发布制定一页式测试计划,涵盖覆盖映射、工作量估算、优先级排序、资源分配与排期。

Productivity & Workflow1684个月前更新

Test Migration

petrkindlmann

指导测试套件在不同框架之间增量迁移,例如 Selenium、Cypress 或 Jest 迁移到 Playwright 或 Vitest,并支持并行 CI。

Software Development1684个月前更新