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 個月前更新