回归测试用例生成器

v1.0.0

回归测试用例生成器。当软件发生变更时,根据变更影响范围自动推荐需要执行的回归测试用例,并生成优先级排序,帮助测试团队快速聚焦。触发词:生成回归测试、回归测试、测试用例推荐、regression test、测试建议

0· 118·0 current·0 all-time

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for gnllk/regression-test-generator.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "回归测试用例生成器" (gnllk/regression-test-generator) from ClawHub.
Skill page: https://clawhub.ai/gnllk/regression-test-generator
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install regression-test-generator

ClawHub CLI

Package manager switcher

npx clawhub@latest install regression-test-generator
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description match the provided artifacts: SKILL.md describes generating regression test recommendations and the repository includes a Python script that takes a change description and prints prioritized test cases. There are no extra credentials, unrelated binaries, or config paths requested.
Instruction Scope
Runtime instructions are narrowly scoped: accept a change description and run scripts/generate_regression_test.py "变更描述". The SKILL.md does not instruct reading arbitrary system files, environment variables, or contacting external endpoints. It contains policy/guideline text for test teams which is expected.
Install Mechanism
No install spec is present (instruction-only plus a bundled script). The included Python script is plain text, uses only standard library modules, and will run locally. No downloads or archives are fetched.
Credentials
The skill declares no required environment variables, no primary credential, and no config paths. The code itself does not attempt to read env vars or external credentials; it only processes the provided change description string.
Persistence & Privilege
Skill is not force-included (always:false) and does not request persistent or elevated privileges. It does not modify other skills or system settings.
Scan Findings in Context
[unicode-control-chars] unexpected: The pre-scan flagged unicode control characters in SKILL.md. Invisible control characters are not required for the skill's functionality and can be used for prompt-injection or visual obfuscation; this should be inspected and removed if unintended. The Python script itself contains no obfuscated or network code.
Assessment
This skill appears internally consistent and benign: it includes a self-contained Python script that parses a text description and prints prioritized test cases. Before installing, inspect SKILL.md and the script for any unexpected invisible/control characters (they were flagged by the pre-scan), and optionally run the script locally in a sandbox to confirm behavior. If you plan to integrate with CI or a test management system, review/modify the code to add explicit, auditable endpoints and credentials rather than trusting opaque instructions. If you see any unexpected network calls, hidden files, or added install scripts, do not proceed and re-audit the package.

Like a lobster shell, security has layers — review code before you run it.

latestvk9708v2tyz6f50yec3zsfd792183xt8r
118downloads
0stars
1versions
Updated 4w ago
v1.0.0
MIT-0

回归测试用例生成器

当软件发生变更时,根据变更影响范围,自动推荐需要执行的回归测试用例,并生成优先级排序。

何时使用

  • 代码修改完成后,需要确定回归测试范围
  • 软件版本发布前,制定回归测试计划
  • Bug 修复后,验证不影响其他功能
  • 需求变更时,评估测试影响范围

处理流程

Step 1: 解析变更内容

用户输入变更描述,脚本分析:

  • 受影响的模块
  • 变更类型(新功能/Bug 修复/重构)
  • 影响范围(核心功能/边缘功能)

Step 2: 匹配测试用例

使用 scripts/generate_regression_test.py 从测试用例库中筛选:

scripts/generate_regression_test.py "变更描述"

匹配规则:

  • 关键词匹配(模块名、功能名)
  • 功能依赖关系
  • 历史缺陷关联

Step 3: 优先级排序

按风险等级排序测试用例:

优先级判断标准执行要求
核心功能、患者安全、数据完整性必须执行
重要功能、用户体验建议执行
边缘功能、界面展示可选执行

Step 4: 输出测试清单

生成回归测试建议清单,包含:

  • 用例编号和名称
  • 优先级分类
  • 预计执行耗时
  • 测试类型说明

测试用例分类

核心功能测试(高优先级)

类别说明示例
患者安全直接影响患者安全的功能试剂量计算、结果判定
数据完整性影响数据准确性的功能数据存储、传输、计算
核心流程主要业务流程样本检测、结果报告
法规要求法规强制要求的功能审计追踪、权限控制

重要功能测试(中优先级)

类别说明示例
常用功能日常使用的功能样本管理、试剂管理
接口功能与其他系统交互LIS 通信、数据导出
报警功能异常提示和报警耗材不足、错误提示

边缘功能测试(低优先级)

类别说明示例
界面展示UI 显示相关字体、颜色、布局
辅助功能非核心辅助功能帮助文档、关于页面
配置选项可选配置项主题设置、语言切换

使用示例

示例 1:算法修改

用户输入:

生成回归测试:修改缓冲液消耗计算逻辑,支持单人份独立配置

输出:

变更:修改缓冲液消耗计算逻辑

回归测试建议:

【高优先级 - 必须执行】
1. TC-032: 缓冲液不足时提示并停止实验
   类型:功能测试 | 预计:15 分钟
   
2. TC-045: 连续多个实验的缓冲液累计消耗
   类型:功能测试 | 预计:20 分钟

【中优先级 - 建议执行】
3. TC-078: 不同人份数的缓冲液计算
   类型:功能测试 | 预计:15 分钟
   
4. TC-091: 缓冲液余量显示准确性
   类型:界面测试 | 预计:10 分钟

【低优先级 - 可选执行】
5. TC-089: 界面显示消耗量格式
   类型:UI 测试 | 预计:5 分钟

预计总耗时:65 分钟

示例 2:Bug 修复

用户输入:

生成回归测试:修复试剂仓传感器数据读取偶发失败的问题,添加了重试机制

输出:

变更:修复试剂仓传感器数据读取问题

回归测试建议:

【高优先级 - 必须执行】
1. TC-101: 试剂仓传感器数据准确性验证
   类型:功能测试 | 预计:20 分钟
   
2. TC-102: 传感器故障时的错误处理
   类型:异常测试 | 预计:15 分钟

【中优先级 - 建议执行】
3. TC-105: 重试机制功能验证(最多 3 次)
   类型:功能测试 | 预计:20 分钟
   
4. TC-108: 试剂余量计算准确性
   类型:功能测试 | 预计:15 分钟

预计总耗时:70 分钟

示例 3:界面修改

用户输入:

生成回归测试:优化主界面布局,调整按钮位置和颜色

输出:

变更:优化主界面布局

回归测试建议:

【中优先级 - 建议执行】
1. TC-201: 主界面按钮可点击性验证
   类型:UI 测试 | 预计:10 分钟
   
2. TC-202: 界面在不同分辨率下的显示
   类型:兼容性测试 | 预计:15 分钟

【低优先级 - 可选执行】
3. TC-205: 按钮颜色和样式一致性
   类型:UI 测试 | 预计:10 分钟
   
4. TC-208: 界面文字清晰可读
   类型:UI 测试 | 预计:5 分钟

预计总耗时:40 分钟

参考文档

详见 references/test-case-priority.md - 测试用例优先级判断指南 详见 references/test-categories.md - 测试用例分类参考 详见 references/effort-estimation.md - 测试工时估算方法

注意事项

  1. 风险优先 - 涉及患者安全的用例必须执行
  2. 变更影响 - 根据变更范围调整测试深度
  3. 时间约束 - 根据可用时间调整优先级 cutoff
  4. 历史缺陷 - 曾出问题的模块应加强测试
  5. 自动化优先 - 优先执行自动化测试用例

团队规范建议

## 回归测试规范

1. 代码变更必须附带回归测试建议
2. 高优先级用例 100% 执行
3. 中优先级用例根据时间决定
4. 低优先级用例可延后执行
5. 测试结果记录到测试管理系统

Comments

Loading comments...