← 返回 Skills 市场
69
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install test1221413623463462451414
功能描述
Use when creating or editing software test case tables in Excel format, adding test cases to existing tables, or ensuring format consistency with test case t...
使用说明 (SKILL.md)
测试用例表管理
Overview
用于创建和管理软件回归测试用例表的Excel文件,确保格式一致性和规范化的测试用例文档。
When to Use
- 用户要求创建测试用例表
- 需要向现有测试用例表添加新的测试用例
- 需要调整测试用例表格式使其符合模版
- 需要清理重复数据或重新格式化表格
Standard Table Structure
表头(14列):
| 列 | 字段名 | 列宽 |
|---|---|---|
| A | 序号 | 13.0 |
| B | 用例ID | 37.125 |
| C | 所属模块 | 17.125 |
| D | 用例标题 | 75.375 |
| E | 优先级 | 12.125 |
| F | 前置条件 | 95.625 |
| G | 测试步骤 | 50.625 |
| H | 预期结果 | 60.75 |
| I | 实际结果 | 68.375 |
| J | 状态 | 11.5 |
| K | 缺陷ID | 13.0 |
| L | 测试者 | 13.0 |
| M | 执行日期 | 15.625 |
| N | 备注 | 13.0 |
Format Specifications
表头格式
- 字体:粗体,大小11
- 背景:黄色(FFFFFF00)
- 对齐:水平居中、垂直居中
- 边框:细线边框
数据行格式
- 行高:105
- 对齐:自动换行(wrap_text=True)、垂直顶部对齐
- 边框:细线边框
- 内容:多行文本使用换行符分隔步骤
用例ID命名规范
格式:项目名_模块_序号
示例:TPClawHub_Login_001
优先级标准
- P0:核心功能,必须通过
- P1:重要功能,应该通过
- P2:次要功能,可选通过
Implementation
创建新表
from openpyxl import Workbook
from openpyxl.styles import Font, PatternFill, Alignment, Border, Side
wb = Workbook()
sheet = wb.active
sheet.title = "测试用例表"
headers = ['序号', '用例ID', '所属模块', '用例标题', '优先级', '前置条件',
'测试步骤', '预期结果', '实际结果', '状态', '缺陷ID', '测试者', '执行日期', '备注']
for col, header in enumerate(headers, 1):
cell = sheet.cell(row=1, column=col, value=header)
cell.font = Font(bold=True, size=11)
cell.fill = PatternFill(start_color='FFFFFF00', end_color='FFFFFF00', fill_type='solid')
cell.alignment = Alignment(horizontal='center', vertical='center')
column_widths = {'A':13, 'B':37, 'C':17, 'D':75, 'E':12, 'F':95, 'G':50, 'H':60, 'I':68, 'J':11, 'K':13, 'L':13, 'M':15, 'N':13}
for col, width in column_widths.items():
sheet.column_dimensions[col].width = width
wb.save('测试用例表.xlsx')
添加测试用例
from openpyxl import load_workbook
from openpyxl.styles import Alignment, Border, Side
wb = load_workbook('测试用例表.xlsx')
sheet = wb.active
# 找到最后一行
last_row = 2
for row in range(2, sheet.max_row + 1):
if sheet.cell(row=row, column=2).value:
last_row = row
new_case = ['序号', '用例ID', '所属模块', '用例标题', '优先级',
'前置条件', '测试步骤', '预期结果', '', '', '', '', '', '备注']
thin_border = Border(left=Side(style='thin'), right=Side(style='thin'),
top=Side(style='thin'), bottom=Side(style='thin'))
data_alignment = Alignment(wrap_text=True, vertical='top')
for col_idx, val in enumerate(new_case, 1):
cell = sheet.cell(row=last_row + 1, column=col_idx)
cell.value = val
cell.alignment = data_alignment
cell.border = thin_border
sheet.row_dimensions[last_row + 1].height = 105
wb.save('测试用例表.xlsx')
Common Mistakes
| 问题 | 解决方案 |
|---|---|
| 格式丢失 | 使用完整样式对象重新应用格式 |
| 文件占用 | 提示用户关闭Excel后再操作 |
| 重复数据 | 遍历用例ID去重后重写 |
| 列宽不匹配 | 按标准列宽表重新设置 |
Workflow
digraph testcase_workflow {
"用户请求" [shape=box];
"检查文件是否存在" [shape=diamond];
"读取模版格式" [shape=box];
"创建新表" [shape=box];
"添加用例" [shape=box];
"应用格式" [shape=box];
"保存文件" [shape=box];
"验证结果" [shape=box];
"用户请求" -> "检查文件是否存在";
"检查文件是否存在" -> "读取模版格式" [label="存在"];
"检查文件是否存在" -> "创建新表" [label="不存在"];
"读取模版格式" -> "添加用例";
"创建新表" -> "添加用例";
"添加用例" -> "应用格式";
"应用格式" -> "保存文件";
"保存文件" -> "验证结果";
}
安全使用建议
This skill appears coherent and limited to creating/editing Excel test-case tables. Before installing or running it: 1) be aware the example code will read/write files in the current working directory and may overwrite '测试用例表.xlsx' — back up important files; 2) ensure the agent environment has the openpyxl Python package (the SKILL.md imports it but the skill provides no install step); 3) confirm you are comfortable allowing the agent to perform local file I/O (no network or credential access is requested). If you need automatic dependency installation or stricter file path handling, request those additions before use.
功能分析
Type: OpenClaw Skill
Name: test1221413623463462451414
Version: 1.0.0
The skill bundle is a legitimate tool for managing software test case tables in Excel format using the openpyxl library. The SKILL.md file contains standard Python code for creating and updating spreadsheets with specific formatting, and there are no indicators of data exfiltration, malicious execution, or prompt injection.
能力评估
Purpose & Capability
Name/description describe creating and editing Excel test-case tables; SKILL.md contains Python examples using openpyxl to create, format, and append rows to an .xlsx file — all aligned with the stated purpose.
Instruction Scope
Runtime instructions are limited to reading/writing Excel files, applying formatting, and simple in-file operations (checking existence, appending rows, deduplication). They do not reference other system credentials, unrelated files, network endpoints, or broad data collection.
Install Mechanism
No install spec (instruction-only), which lowers risk; however the SKILL.md examples import openpyxl but the skill metadata does not declare or provide an installation step for that dependency. This is an omission (operational, not malicious) to be aware of.
Credentials
The skill requests no environment variables, credentials, or config paths. The operations shown only require filesystem access to Excel files, which is appropriate for this functionality.
Persistence & Privilege
always is false and the skill is user-invocable. It does not request persistent presence or system-wide configuration changes. Autonomous invocation is allowed by default but is not combined with other risky privileges here.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install test1221413623463462451414 - 安装完成后,直接呼叫该 Skill 的名称或使用
/test1221413623463462451414触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
- 新增测试用例表管理技能,用于创建和管理软件回归测试用例的Excel文件
- 提供标准化的14列表格结构,包含序号、用例ID、所属模块等字段
- 详细定义表头和数据行的格式规范,包括字体、背景色、对齐方式和边框
- 包含创建新表和添加测试用例的完整代码实现示例
- 列出常见问题及解决方案,并提供可视化的工作流程图
元数据
常见问题
测试用例表编写 是什么?
Use when creating or editing software test case tables in Excel format, adding test cases to existing tables, or ensuring format consistency with test case t... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 69 次。
如何安装 测试用例表编写?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install test1221413623463462451414」即可一键安装,无需额外配置。
测试用例表编写 是免费的吗?
是的,测试用例表编写 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
测试用例表编写 支持哪些平台?
测试用例表编写 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 测试用例表编写?
由 LKY115(@lky115)开发并维护,当前版本 v1.0.0。
推荐 Skills