回归测试技能

SkillDev tools

Run visual regression tests to verify code changes are correct; supports basic/past_issue/complete suites and baseline updates.

Available today. Use it from your connected AI after setup.

Connect ahel once, and every AI you use reads what you have installed.

Then ask your AI: use the 回归测试技能 skill

What this skill tells your AI

The instructions your AI receives, as published by open-guji/luatex-cn in .claude/skills/regression-test/SKILL.md and read by ahel’s review.

运行回归测试来验证代码更改是否正确。

测试套件

套件说明何时运行
basic (默认)核心功能测试每次修改后
past_issue历史 issue 回归测试偶尔验证
complete完整书籍测试发版前

命令

# 默认:只运行 basic 套件
python3 test/regression_test.py check

# 运行 past_issue 套件
python3 test/regression_test.py check --past-issues

# 运行 complete 套件
python3 test/regression_test.py check --complete

# 运行所有套件
python3 test/regression_test.py check --all

# 检查特定文件(在当前套件中搜索)
python3 test/regression_test.py check banxin

# 保存新基准(仅当预期更改时使用)
python3 test/regression_test.py save banxin

使用流程

1. 修改代码后,先检查相关文件

python3 test/regression_test.py check banxin

2. 提交前,运行 basic 全部测试

python3 test/regression_test.py check

3. 发版前,运行所有套件

python3 test/regression_test.py check --all

4. 仅当预期更改时,保存新基准

python3 test/regression_test.py save banxin

目录结构

test/regression_test/
├── basic/          # 核心功能(开发时频繁运行)
│   ├── tex/        # 测试 TeX 源文件
│   └── baseline/   # 基准 PNG 图像
├── past_issue/     # 历史 issue 回归(偶尔运行)
│   ├── tex/
│   └── baseline/
└── complete/       # 完整书籍(发版前运行)
    ├── tex/
    └── baseline/

注意事项

  • check 用于验证,不会修改基准文件
  • save 会覆盖基准文件,仅在确认更改正确时使用
  • 省略文件名则测试当前套件中所有文件
  • 提交代码前务必运行 check 确保 basic 测试通过

Signals

GitHub stars
105
Forks
10
Last commit
Sep 2026
Advanced
Catalog kind
skill
Gateway key
regression-test
Source
github.com/open-guji/luatex-cn