Skip to content
cccskills
FreePublished on GitHub

quick-debug

测试失败时免登跳转原地排查修复。触发:排查、纠错、debug、定位符失败、超时、元素找不到、断言失败。

The English summary is being prepared. Showing the original description.

Works withPlaywright
See how to install

Files included (2)

  • SKILL.md3.3 KB
  • references/diagnosis-tree.md2.3 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

Quick Debug — 快速纠错验证

核心思路

跳过从登录到问题节点的完整流程,直接免登到目标页面原地排查。

利用项目已有的 token URL 免登机制,配合浏览器工具直接在问题页面进行 DOM 探索、定位符验证、等待策略调整,修复后原地验证,全程不重跑完整测试流程。


主干流程(5 步)

Step 1: 解析失败信息
    ↓
Step 2: 构造免登跳转 URL
    ↓
Step 3: 免登跳转到目标页面
    ↓
Step 4: 诊断问题(决策树)
    ↓
Step 5: 修复 + 原地验证

Step 1: 解析失败信息

从堆栈 / 用户描述提取:失败用例名、错误类型(TimeoutError / AssertionError)、失败定位符、失败时所在 URL。信息不足时读取测试代码反推。

Step 2: 构造免登跳转 URL

从配置文件读取对应环境的 token。

⚠️ 免登前必须向用户确认 --env(见 agent-behavior P0.2)。

两种情况:

情况策略
目标页面有明确 URL 路径先免登(/entry?token=<JWT>),再导航到目标路径
目标页面需要交互才能到达(弹窗、新 tab 等)免登到最近的可直接访问的父级页面,执行最少量的导航操作到达目标

Step 3: 免登跳转到目标页面

browser_navigate → <base_url>/entry?token=<JWT> → 导航到目标路径 → 验证 is_page_loaded()。免登失败(跳回登录页)→ 提示用户刷新 token。

Step 4: 诊断问题

见下一节「诊断决策树」。

Step 5: 修复 + 原地验证

根据诊断结果调用对应 skill:

诊断结果调用 skill
定位符问题locator-replacer
等待策略问题wait-strategy
页面加载断言问题page-load-assertion
页面大改版报告用户,建议 gen-page-test 重新生成
断言预期值变更报告差异,由用户决策是否更新预期值

原地验证: 修复后在当前浏览器页面直接验证(用 Playwright MCP 重新执行失败操作),确认无误后建议用户重跑完整测试。


诊断决策树(Step 4 展开)

走到 Step 4 需要判断根因时展开 → references/diagnosis-tree.md

浏览器工具选择

DOM 探索/定位符采集 → agent-browser(优先);精确验证/断言 → Playwright MCP;agent-browser 未安装 → 全程 Playwright MCP(P0.4 降级)。


检查清单

每次 quick-debug 结束前,必须确认:

  • 已明确失败原因并归类(A/B/C/D 哪个分支)
  • 修复动作已执行(或已报告用户需人工决策)
  • 原地验证通过(修复后的定位符/等待在当前页面生效)
  • 建议用户重跑完整测试确认回归
  • 保存操作验证失败时,参考 save-verify-strategy(Toast 时序 / 重定向检测 / 数据对比)

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

为已有 PageObject 增量添加回归测试点。触发:新增测试点、添加回归点、add test point、增加覆盖、扩展页面方法。

The English summary is being prepared. Showing the original description.

DanielSuo117/velocitai159Updated Sep 28, 2026

POM 分层与 context 共享决策树。触发:架构、分层、POM、Page Object、基类设计、新增角色。

The English summary is being prepared. Showing the original description.

DanielSuo117/velocitai159Updated Sep 28, 2026

浏览器 viewport / headless / 超时分层配置。触发:viewport、浏览器配置、导航超时、headless、slow_mo、incognito。

The English summary is being prepared. Showing the original description.

DanielSuo117/velocitai159Updated Sep 28, 2026

共享 page 下用例离开起点后必须 UI 返回并断言。触发:往返闭合、case round trip、复位超时、scope 共享 page。

The English summary is being prepared. Showing the original description.

DanielSuo117/velocitai159Updated Sep 28, 2026

AST 知识图谱:变更审查、探索、调试、重构。触发:知识图谱、代码审查、影响分析、爆炸半径、重构。

The English summary is being prepared. Showing the original description.

DanielSuo117/velocitai159Updated Sep 28, 2026

一键生成 PageObject + 配套测试。触发:新增页面、生成页面、gen page、create page、添加页面对象。

The English summary is being prepared. Showing the original description.

DanielSuo117/velocitai159Updated Sep 28, 2026

See all skills by DanielSuo117

Report a problem with this skill