test-scaffoldlisted
Install: claude install-skill tlzmw001/aitest-kit
# 测试脚手架构建
为 `$target` 下的 `$module` 模块构建 fixture/module profile,或为某个用例目录构建 suite profile,使其能进入 `test-codegen` 管线。
## 定位
```
test-design 产出 Markdown 用例
↓
test-scaffold ← 本 skill
↓
test-codegen 消费 fixture + profile 生成 pytest
```
## 产出
| 文件 | 职责 |
|------|------|
| `test_workspace/targets/{target}/target.yaml` | 被测系统入口和默认目录 |
| `test_workspace/targets/{target}/modules/{module}.yaml` | module 归属、fixture、L1 知识引用、registered_suites;手写 registered_suites 时推荐直接写 suite manifest 路径,需要 status 时再写 `{suite, manifest, status}` |
| `test_workspace/targets/{target}/fixtures/{module}.py` | Client 类 + setup/teardown fixture |
| `test_workspace/targets/{target}/helpers/` | target 专属 helper,通用 helper 不够时再新增 |
| `test_workspace/targets/{target}/profiles/profile_{module}.md` | module_type、共享 assertion_rules、默认 fixture/object、L1 稳定能力 |
| `{suite_dir}/suite.yaml` | 用例 suite 归属:target、module、suite、case_files、L2 知识引用;suite profile 走约定路径 |
| `{suite_dir}/profile_{suite}_suite.md` | 本批用例的 variables、requests、case_flows/case_bodies |
| `test_workspace/targets/{target}/api_maps/api_map_{module}.md` | API 面 + env 契约 + 可行性判定(scaffold 过程产物,保留供 review) |
模块级 fixture/profile/helper 归属于 `test_workspace/targets/{target}/`;suite 级文件跟随具体用例目录。
## 参考文档
详细格式模板和约束规则拆分到 `refs/` 目录,按需读取:
- `aitest_config/refs/config-files.md` — target/module/suite/profile/task/env 配置文件总手册,判断字段归属时优先读取
- `refs/formats.md` — API Map、variables/env 矩阵、状态影响表、profile YAML、fixture 代码、输出摘要的模板
- `refs/constraints.md` — fixture 硬约束、测试数据分类、