con un clic
解析 Axure RP 导出的 HTML - 提取页面结构、元件、注释和交互说明,供测试用例生成使用
npx skills add https://github.com/lrwei91/QA --skill axure-parserCopia y pega este comando en Claude Code para instalar la habilidad
解析 Axure RP 导出的 HTML - 提取页面结构、元件、注释和交互说明,供测试用例生成使用
npx skills add https://github.com/lrwei91/QA --skill axure-parserCopia y pega este comando en Claude Code para instalar la habilidad
QA 项目内置知识库管理能力(基于 llm-wiki 框架)。 触发条件:用户明确提到"知识库"、"wiki"、"消化素材"、"查询知识"、"知识结晶"等, 或通过 `/qa` 命令选择「知识库管理」选项。
读取 Figma 设计稿数据 - 提取文案、组件结构、设计标注和交互说明,供测试用例生成使用
测试用例工程化处理 - 负责转换为模板结构、调用脚本生成 Excel、更新索引,与 Python scripts 对接
从需求文档/PRD/页面/接口说明生成结构化测试用例 - 负责需求解析、模块识别、平台拆分、测试点设计、输出结构化用例
Fetch any URL and convert to markdown using Chrome CDP. Saves the rendered HTML snapshot alongside the markdown, uses an upgraded Defuddle pipeline with better web-component handling and YouTube transcript extraction, and automatically falls back to the pre-Defuddle HTML-to-Markdown pipeline when needed. If local browser capture fails entirely, it can fall back to the hosted defuddle.md API. Supports two modes - auto-capture on page load, or wait for user signal (for pages requiring login). Use when user wants to save a webpage as markdown.
仅分析需求质量与测试风险,不生成完整测试用例 - 负责模块拆分、风险识别、输出测试点清单与分析报告
| name | axure-parser |
| description | 解析 Axure RP 导出的 HTML - 提取页面结构、元件、注释和交互说明,供测试用例生成使用 |
parse_axure_html.py 脚本解析testcase-generate 使用输入:outputs/axure_export/login_page.html
输出:单个页面的结构化数据
输入:outputs/axure_export/
输出:所有 HTML 文件的聚合数据
输入:outputs/axure_export/ --recursive
输出:包括子目录所有 HTML 文件的聚合数据
{
"source": "axure",
"file": "path/to/file.html",
"pages": [
{
"name": "登录页",
"id": "page_001",
"components": [],
"annotations": []
}
],
"components": [
{
"id": "comp_001",
"name": "手机号输入框",
"type": "input",
"parent": "page_001",
"page": "登录页"
}
],
"annotations": [
{
"page": "登录页",
"content": "手机号必须是 11 位数字",
"element_id": "comp_001"
}
],
"summary": {
"page_count": 1,
"component_count": 5,
"annotation_count": 3
}
}
{
"source": "axure",
"modules": [
{
"name": "登录页",
"source": "axure_page"
}
],
"function_points": [
{
"module": "登录页",
"name": "手机号输入框",
"type": "input"
}
],
"ui_elements": [
{
"module": "登录页",
"element_name": "手机号输入框",
"element_type": "input"
}
],
"interactions": [],
"constraints": [
{
"module": "登录页",
"description": "手机号必须是 11 位数字",
"source": "axure_annotation"
}
]
}
用户提供:
- HTML 文件路径,或
- HTML 目录路径
python3 engine/scripts/parse_axure_html.py \
<input_path> \
--format testcase \
--output /tmp/axure_data.json
▎ Axure HTML 解析完成
文件:outputs/axure_export/login_page.html
【页面结构】
- 已识别 XX 个页面
- 页面列表:登录页、首页、个人中心...
【元件信息】
- 已提取 XX 个元件
- 按钮:XX 个
- 输入框:XX 个
- 表格:XX 个
【注释说明】
- 已提取 XX 条注释
- 约束条件:XX 条
- 交互说明:XX 条
【可用于测试用例的信息】
- 模块:XX 个
- 功能点:XX 个
- UI 元素:XX 项
- 约束条件:XX 条
触发条件:用户要求将 Axure 解析结果保存到知识库
保存命令:
# 保存页面结构到 sources 目录
python3 engine/scripts/save_axure_to_wiki.py \
<axure_json_output> \
--type sources \
--output knowledge/wiki/sources/
# 保存元件列表到 entities 目录
python3 engine/scripts/save_axure_to_wiki.py \
<axure_json_output> \
--type entities \
--output knowledge/wiki/entities/
保存后的知识库结构:
knowledge/wiki/sources/
└── <页面名称>.md # 页面结构、交互说明、约束条件
knowledge/wiki/entities/
└── UI 组件.md # 元件列表、组件规范
将解析结果传递给 testcase-generate 技能:
{
"source": "axure",
"axure_data": { ... },
"testcase_hints": {
"modules": ["模块 1", "模块 2"],
"ui_elements": ["元素 1", "元素 2"],
"constraints": ["约束 1", "约束 2"]
}
}
/qa 生成测试用例
↓
选择用例类型(冒烟/完整)
↓
提供需求文档 ← Axure HTML 作为输入之一
↓
(如为 Axure HTML) 调用 axure-parser
↓
(可选) 提供 Figma 链接
↓
合并 Axure + Figma + 其他需求数据
↓
生成测试用例
优先级:
1. 需求文档(PRD/Word)- 主需求来源
2. Axure HTML - UI 结构和注释
3. Figma 设计稿 - 视觉细节和状态
合并规则:
- 模块识别:以需求文档为准,Axure 补充
- 功能点:合并三方数据,去重
- 约束条件:Axure 注释优先(最详细)
- UI 元素:Axure + Figma 合并
| 错误 | 原因 | 处理 |
|---|---|---|
| 文件不存在 | 路径错误或文件被移动 | 提示用户确认路径 |
| 解析失败 | HTML 格式不符合预期 | 尝试备用解析策略 |
| 无有效数据 | HTML 中无页面/元件信息 | 提示用户检查导出设置 |
| 编码问题 | 非 UTF-8 编码 | 自动尝试 GBK 等编码 |
❌ Axure HTML 解析失败
错误类型:无有效数据
可能原因:
1. Axure 导出时未勾选"生成元件注释"
2. HTML 文件不完整
3. 导出格式不兼容
解决方案:
1. 在 Axure 中重新导出,确保勾选:
- 生成 HTML 说明
- 包含元件注释
- 包含交互说明
2. 提供完整的导出目录
3. 尝试提供 Axure .rp 源文件
如需帮助,请查看:docs/axure-export-guide.md
1. 发布 → 生成 HTML 文件
2. 选项设置:
✓ 生成原型说明
✓ 包含元件注释
✓ 包含交互说明
✓ 按页面生成(推荐)
✓ 包含母版说明
3. 输出目录:outputs/axure_export/
在 Axure 中为元件添加注释:
1. 选中元件
2. 右键 → 添加注释
3. 填写内容:
- 功能说明
- 输入约束
- 交互效果
- 边界条件
在 Axure 中设置交互:
1. 选中元件
2. 交互面板 → 新建交互
3. 设置:
- 触发事件(onClick、onChange 等)
- 目标动作(跳转、显示、隐藏等)
- 动画效果
# 解析单个文件
python3 engine/scripts/parse_axure_html.py \
outputs/axure_export/login_page.html
# 解析目录
python3 engine/scripts/parse_axure_html.py \
outputs/axure_export/
# 递归解析
python3 engine/scripts/parse_axure_html.py \
outputs/axure_export/ --recursive
# 输出到文件
python3 engine/scripts/parse_axure_html.py \
outputs/axure_export/ \
--output axure_data.json
# 详细模式
python3 engine/scripts/parse_axure_html.py \
outputs/axure_export/ \
--verbose
| 选项 | 说明 |
|---|---|
input_path | 输入 HTML 文件或目录路径 |
--output, -o | 输出 JSON 文件路径 |
--recursive, -r | 递归搜索子目录 |
--format | 输出格式:raw(原始)或 testcase(测试用例) |
--verbose, -v | 详细输出模式 |
parse_axure_html.py - Axure 解析脚本testcase-generate/SKILL.md - 测试用例生成技能figma-reader/SKILL.md - Figma 设计稿读取技能testcase-generate - 从需求生成测试用例figma-reader - Figma 设计稿读取