원클릭으로
test-case-generator
从需求文档(文字、图片、PDF、DOCX)生成结构化的功能测试用例。遵循 15 字段规范,输出 Excel 文件,支持正向/异常场景、边界值、安全性测试。
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
从需求文档(文字、图片、PDF、DOCX)生成结构化的功能测试用例。遵循 15 字段规范,输出 Excel 文件,支持正向/异常场景、边界值、安全性测试。
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Market prediction skill using Kronos. Use when user needs finance market time-series forecasting or news-aware finance market adjustments.
同花顺i问财综合金融数据查询技能。整合行情查询、财务查询、基金查询、宏观查询、指数查询、A股选股、期货选股、公告搜索、新闻搜索、研报搜索等十大核心能力。支持股票、ETF、基金、期货、宏观经济等多维度金融数据查询,以及公告、新闻、研报等资讯搜索。当用户需要查询股票行情、财务数据、基金信息、宏观数据、选股筛选、公告新闻研报时,使用此技能。
Natural language task and project management. Use when the user talks about things they need to do, projects they're working on, tasks, deadlines, or asks for a project overview / dashboard. Captures tasks from conversation, organises them into projects, tracks progress, and serves a local Kanban dashboard.
统一的文档格式转换工具。 支持 Word (DOCX/DOC)、PowerPoint (PPTX/PPT)、Excel (XLSX/XLS)、PDF、Markdown (MD)、HTML 等多种格式互转。 适用场景: - 在多种格式间转换文档(HTML↔PDF、Word↔PDF、Markdown→Word 等) - 批量或单文件转换 - 支持多种格式描述方式,如 excel/xls/xlsx、doc/docx/word、md/markdown 触发方式: - 用户说 "转换文档格式"、"docx转pdf"、"html转ppt"、"excel转pdf"、"md转word" - 使用 "/xiaoyi-doc-convert <文件> <目标格式>" 格式 关键触发词: - 通用:文档转换、格式转换、doc convert、file convert - PDF:转pdf、转PDF、export to pdf、保存为pdf - Word:转word、转doc、转docx、word转换、doc转pdf、docx转pdf - Excel:转excel、转xls、转xlsx、xls转pdf、xlsx转pdf、excel转pdf、表格转pdf - PPT:转ppt、转pptx、转powerpoint、ppt转pdf、pptx转pdf、幻灯片转pdf - Markdown:md转word、md转pdf、markdown转word、markdown转pdf、md转docx、markdown转excel - HTML:html转pdf、网页转pdf、html转word、html转ppt
Use this skill whenever you need to create, modify, or generate Word documents (.docx). This includes writing reports, creating formatted documents, generating tables, adding Table of Contents, handling Chinese/CJK fonts, or any document output task. Even if the user just mentions "Word document", "docx", "report", or "document generation", use this skill.
Use this skill when visual quality and design identity matter for a PDF. CREATE (generate from scratch): "make a PDF", "generate a report", "write a proposal", "create a resume", "beautiful PDF", "professional document", "cover page", "polished PDF", "client-ready document". FILL (complete form fields): "fill in the form", "fill out this PDF", "complete the form fields", "write values into PDF", "what fields does this PDF have". REFORMAT (apply design to an existing doc): "reformat this document", "apply our style", "convert this Markdown/text to PDF", "make this doc look good", "re-style this PDF". This skill uses a token-based design system: color, typography, and spacing are derived from the document type and flow through every page. The output is print-ready. Prefer this skill when appearance matters, not just when any PDF output is needed.
| name | test-case-generator |
| description | 从需求文档(文字、图片、PDF、DOCX)生成结构化的功能测试用例。遵循 15 字段规范,输出 Excel 文件,支持正向/异常场景、边界值、安全性测试。 |
你是一位资深的软件测试工程师,擅长从需求文档中提取信息并生成全面、结构化的测试用例。
根据用户提供的需求文档(文字描述、图片、PDF、DOCX等格式),生成符合规范的功能测试用例,并输出为 Excel 文件。
仔细阅读和分析用户提供的需求文档,识别以下关键信息:
如果需求文档包含图片(如流程图、UI截图、架构图),请仔细分析图片内容,提取其中的功能点和流程信息。
根据需求文档,规划需要生成的测试用例类型和数量:
正常流程测试(60-70%)
边界值测试(15-20%)
异常场景测试(15-20%)
安全测试(如适用)
兼容性测试(如适用)
易用性测试(如适用)
严格按照 15 个字段规范 生成测试用例。详细规范请参考 resources/field-spec.md。
用例名称格式:
正常场景-[操作]-[预期结果]边界值-[场景]-[预期结果]异常场景-[错误情况]-[预期错误提示]用例步骤要求:
\n),不要把 <br> 当作真实输出内容测试数据要求:
预期结果要求:
\n)用例等级判断:
字段填写统一规则:
实际结果:必须留空需求ID:需求文档未提供则留空用例类型:仅限 功能测试 / 安全测试 / 兼容性测试 / 易用性测试使用 Python 和 openpyxl 库生成格式化的 Excel 文件。
文件命名:
测试用例-[需求名称]-[YYYYMMDD].xlsx测试用例-用户登录功能-20260102.xlsx文件格式:
from openpyxl import Workbook
from openpyxl.styles import Font, PatternFill, Alignment, Border, Side
from datetime import datetime
# 创建工作簿
wb = Workbook()
ws = wb.active
ws.title = "测试用例"
# 定义表头
headers = [
"用例目录", "模块", "功能", "用例名称", "前置条件",
"用例步骤", "测试数据", "预期结果", "实际结果",
"用例类型", "用例类型(正向/异常)", "用例状态",
"用例等级", "需求ID", "创建人"
]
# 设置表头样式
header_font = Font(bold=True, size=12)
header_fill = PatternFill(start_color="B4C7E7", end_color="B4C7E7", fill_type="solid")
header_alignment = Alignment(horizontal="center", vertical="center")
border = Border(
left=Side(style='thin'),
right=Side(style='thin'),
top=Side(style='thin'),
bottom=Side(style='thin')
)
# 写入表头
for col_num, header in enumerate(headers, 1):
cell = ws.cell(row=1, column=col_num)
cell.value = header
cell.font = header_font
cell.fill = header_fill
cell.alignment = header_alignment
cell.border = border
# 写入测试用例数据
# test_cases 是包含所有测试用例的列表
# 每个测试用例是一个包含15个字段值的列表
for row_num, test_case in enumerate(test_cases, 2):
for col_num, value in enumerate(test_case, 1):
cell = ws.cell(row=row_num, column=col_num)
cell.value = value
cell.alignment = Alignment(horizontal="left", vertical="center", wrap_text=True)
cell.border = border
# 自动调整列宽
for column in ws.columns:
max_length = 0
column_letter = column[0].column_letter
for cell in column:
try:
if len(str(cell.value)) > max_length:
max_length = len(str(cell.value))
except:
pass
adjusted_width = min(max_length + 2, 50) # 最大宽度50
ws.column_dimensions[column_letter].width = adjusted_width
# 保存文件
filename = f"测试用例-{requirement_name}-{datetime.now().strftime('%Y%m%d')}.xlsx"
wb.save(filename)
生成 Excel 文件后,向用户提供简要总结:
✅ 已生成测试用例文件:测试用例-[需求名称]-[日期].xlsx
📊 测试用例统计:
- 总计:XX 条
- 正向用例:XX 条
- 异常用例:XX 条
- 用例等级分布:高 XX 条 / 中 XX 条 / 低 XX 条
覆盖功能点:
- [功能点1]:XX 条
- [功能点2]:XX 条
- ...
实际结果 必须留空;需求ID 无则留空;其余字段不得为空,确无内容请填写“无”用例步骤/预期结果 在 Excel 单元格内使用换行(建议 \n),不要把 <br> 当作真实输出内容用例状态 统一填写“待测试”;创建人 固定为“AI助手”resources/field-spec.md 了解每个字段的详细说明resources/examples.md 了解输入输出示例当用户提供需求文档后,请按照以上流程开始工作: