feat: 测试开发学习路径收口阶段 3(模块 3、4 上线,造工具全 4 模块完成)

- 新增模块 s3-03-platform-frontend《平台前端与可视化》:Vite 与 Vue 3 工程骨架与目录约定、
  组件粒度与 Pinia 边界、axios 请求层与错误码翻译、登录态与路由守卫(含并发刷新 token)、
  表格分页筛选与批量操作、表单与步骤编排(拖拽排序与 seq 重排)、可视化四问四图与口径纪律、
  执行报告页三段式与失败四步下钻(SSE 实时刷新、深链接贴缺陷单)、2000 条大结果集与页面性能、
  易用性与构建部署、执行报告页实操、速查表、自测。
- 新增模块 s3-04-mock-data《Mock 服务与测试数据平台》:四类场景与算账、三种 Mock 层级对比、
  qa/tdstub 挡板规则与优先级与无感切换、HTTP/RPC/MQ 协议覆盖、契约测试与三条门禁、
  三种造数策略与影子库、qa/tdseed 造数工具设计、批次标记与自动回收、
  数据脱敏与合规、四条反模式与治理机制、四类响应挡板加速造数实操、速查表、自测。
- index.html 的 PAGES 登记 s3-2 / s3-3 路由,阶段 3 四个模块全部上线;
  模块 4 的「下一模块」指向阶段 4 · 提效率。
- glossary.json 补阶段 3 挡板与造数命名(qa/tdstub、qa/tdseed、pay-channel、sms-gateway、
  logistics-api、tp_seed_rule/tp_seed_batch、mall_shadow、批次标记与脱敏规则),
  并新增 sms_gateway / logistics_api / pay_channel / order_20 等漂移正则与规则文件名连字符规则。
- 统一模块 4 内部的规则文件名(pay_channel → pay-channel、order_20/order_paid → order-paid、
  mask_rules → mask-rules 等),消除同批生成的命名漂移。
- README 更新进度表、阶段 3 模块表、目录树与挡板造数命名表。

自检:check-chapter --strict 26 页通过;check-pages 247 页全部通过;
check-glossary 246 页无漂移;add-back-links 补挂 18 页;check-portal 全部通过。
This commit is contained in:
2026-10-16 22:43:14 +08:00
parent 46af4a1e0e
commit 6a0a2cb1eb
32 changed files with 15525 additions and 9 deletions

View File

@@ -10,7 +10,7 @@
| 阶段 0 · 打地基 | 4 | ✅ 已上线(46 章 / 157 小节) |
| 阶段 1 · 会测 | 4 | ✅ 已上线(52 章 / 233 小节) |
| 阶段 2 · 自动化 | 6 | ✅ 已上线(78 章 / 360 小节) |
| 阶段 3 · 造工具 | 4 | 🚧 模块 1–2 已上线(26 章 / 120 小节) |
| 阶段 3 · 造工具 | 4 | ✅ 已上线(52 章 / 240 小节) |
| 阶段 4 · 提效率 | 5 | ⏳ 筹备中 |
| 阶段 5 · 攻难点 | 5 | ⏳ 筹备中 |
| 阶段 6 · 成熟 | 4 | ⏳ 筹备中 |
@@ -50,8 +50,8 @@
|---|---|---|---|
| `modules/s3-01-platform-arch/` | 测试平台架构与技术选型 | 13 | 60 |
| `modules/s3-02-platform-backend/` | 平台后端开发:Go(Gin)与工程实践 | 13 | 60 |
| `modules/s3-03-platform-frontend/` | 平台前端与可视化 | — | 筹备中 |
| `modules/s3-04-mock-data/` | Mock 服务与测试数据平台 | — | 筹备中 |
| `modules/s3-03-platform-frontend/` | 平台前端与可视化 | 13 | 60 |
| `modules/s3-04-mock-data/` | Mock 服务与测试数据平台 | 13 | 60 |
## 目录结构
@@ -70,8 +70,7 @@ testdev-learning-path/
│ ├── s0-02-golang/ … s0-04-database/ 阶段 0 的其余模块,结构同上
│ ├── s1-01-case-design/ … s1-04-defect-process/ 阶段 1 的 4 个模块
│ ├── s2-01-go-test/ … s2-06-framework-eng/ 阶段 2 的 6 个模块
│ └── s3-01-platform-arch/、s3-02-platform-backend/ 阶段 3 已上线的 2 个模块
│ (s3-03-platform-frontend/、s3-04-mock-data/ 已登记在 plan 里,尚未建目录)
│ └── s3-01-platform-arch/ … s3-04-mock-data/ 阶段 3 的 4 个模块
└── tools/
├── modules-plan.json 模块级元数据(按阶段组织:标题、副标题、建议投入、导语)
├── glossary.json 术语表:统一的服务名 / 表名 / 状态取值 / Go 模块路径
@@ -163,6 +162,10 @@ node tools/check-glossary.js # 4. 命名一致性自检,退出码非 0
| 平台表 | `tp_` 前缀共 11 张:`tp_user`、`tp_env`、`tp_case`、`tp_case_step`、`tp_suite`、`tp_suite_case`、`tp_task`、`tp_run`、`tp_run_item`、`tp_agent`、`tp_audit_log`;时间字段统一 `*_time` |
| 平台状态 | 任务 `10` 待执行 / `20` 执行中 / `30` 成功 / `40` 失败 / `50` 已取消;执行记录 `10` 运行中 / `20` 成功 / `30` 失败 / `40` 部分成功 / `50` 已取消;结果明细 `10` 通过 / `20` 失败 / `30` 跳过 / `40` 阻塞 |
| 平台角色与接口 | `admin` / `maintainer` / `runner` / `viewer`;接口前缀 `/api/v1`,统一响应 `{code,msg,data,trace_id}`,错误码 400xx 参数 / 401xx 鉴权 / 403xx 权限 / 500xx 服务端 |
| 阶段 3 挡板与造数 | 挡板服务 `qa/tdstub`(监听 9200)、造数工具 `qa/tdseed`(子命令 `gen` / `clean` / `list`);规则文件名用连字符(`rules/pay-channel.yaml`、`rules/order-paid.yaml`、`rules/mask-rules.yaml`) |
| 外部依赖 | `pay-channel`(第三方支付渠道,HTTPS 加 HMAC 签名、按调用计费)、`sms-gateway`(短信,限速 100 条/分钟)、`logistics-api`(物流轨迹,p99 超时 3.2 秒);切挡板靠 CoreDNS / hosts 指到 `qa/tdstub:9200`,被测服务零改代码 |
| 造数批次与标记 | 批次号形如 `SEED20240710-001`,标记写在 `t_order.remark` 里(`seed:SEED20240710-001`);二期表 `tp_seed_rule` / `tp_seed_batch`,接口 `/api/v1/factory/*`;影子库 `mall_shadow` |
| 脱敏 | 导出即脱敏、禁止明文落地:手机号 `138****1234`、身份证 `1101**********1234`、`pay_no` 中段掩码、`t_order.remark` 里的手机号正则替换;同一手机号脱敏后仍要能关联到同一个人 |
确实需要保留旧名(例如引用第三方系统的真实表)时,在该行加注释 `// glossary-ok` 显式豁免。

View File

@@ -1030,9 +1030,11 @@ const PAGES = {
"s2-3": "modules/s2-04-ui-automation/index.html",
"s2-4": "modules/s2-05-mobile-automation/index.html",
"s2-5": "modules/s2-06-framework-eng/index.html",
/* 阶段 3 · 造工具(模块 1、2 已上线,3、4 编写中) */
/* 阶段 3 · 造工具(4 个模块全部上线) */
"s3-0": "modules/s3-01-platform-arch/index.html",
"s3-1": "modules/s3-02-platform-backend/index.html"
"s3-1": "modules/s3-02-platform-backend/index.html",
"s3-2": "modules/s3-03-platform-frontend/index.html",
"s3-3": "modules/s3-04-mock-data/index.html"
};
/* ============================ 工具 ============================ */

View File

@@ -169,7 +169,7 @@
<nav class="pager">
<a class="prev" href="../s3-01-platform-arch/index.html"><span class="k">← 上一模块</span><span class="v">测试平台架构与技术选型</span></a>
<a class="next" href="../../index.html#s3"><span class="k">下一模块 →</span><span class="v">筹备中:平台前端与可视化</span></a>
<a class="next" href="../s3-03-platform-frontend/index.html"><span class="k">下一模块 →</span><span class="v">平台前端与可视化</span></a>
</nav>
<p class="foot">

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -60,6 +60,19 @@
"接口与错误码": "前缀 /api/v1;统一响应 {code,msg,data,trace_id};400xx 参数(40001)、401xx 鉴权(40101 未登录、40102 token 过期)、403xx 权限(40301)、500xx 服务端(50001)",
"端口与镜像": "tdplat-api 容器内 8080 / 宿主 9100;镜像 mall-qa/tdplat-api、mall-qa/tdplat-agent、mall-qa/tdplat-web",
"里程碑": "M1 骨架与登录 → M2 用例与套件管理 → M3 任务与执行引擎 → M4 报告中心与结果下钻"
},
"阶段 3 挡板与造数": {
"挡板服务": "qa/tdstub(Go 单二进制,监听 9200,规则来自 YAML 且可热更新)",
"造数工具": "qa/tdseed(Go 单二进制 CLI,子命令 gen / clean / list,复用 qa/tdauto 造数包)",
"外部依赖": "pay-channel(第三方支付渠道,HTTPS + HMAC 签名,按调用次数计费)、sms-gateway(短信,限速 100 条/分钟)、logistics-api(物流轨迹查询,p99 超时 3.2 秒)",
"被测链路": "gateway:8000 → pay-api:8081 → pay-channel(外部);挡板插在 pay-api 与 pay-channel 之间",
"无感切换": "CoreDNS / hosts 把外部依赖域名解析到 qa/tdstub:9200,被测服务零改代码;本地开发可用 HTTP_PROXY",
"二期表": "tp_seed_rule(seed_rule_id, name, target, rule_json, owner, create_time)、tp_seed_batch(batch_id, batch_no, seed_rule_id, creator, total, success, status, create_time, clean_time)",
"批次与标记": "批次号形如 SEED20240710-001;数据标记写在 t_order.remark 里,形如 seed:SEED20240710-001(靠它追溯与回收)",
"批次状态": "tp_seed_batch.status = 10 生成中 / 20 已完成 / 30 部分成功 / 40 失败 / 50 已回收",
"二期接口": "POST /api/v1/factory/batches、GET /api/v1/factory/batches、POST /api/v1/factory/batches/:id/clean",
"影子库": "mall_shadow(快照恢复用);固定券 CPN20240614001 只做只读校验,谁都不许消耗",
"脱敏": "导出即脱敏、禁止明文落地;手机号 138****1234、身份证 1101**********1234、pay_no 中段掩码、t_order.remark 里的手机号正则替换;同一手机号脱敏后仍要能关联到同一个人"
}
},
"forbidden": [
@@ -108,6 +121,19 @@
{ "re": "\\b(report_detail|case_result|result_detail)\\b", "hint": "平台结果明细统一为 tp_run_item" },
{ "re": "\\b(platform_user|qa_user)\\b", "hint": "平台用户表统一为 tp_user" },
{ "re": "\\b(updated_at|started_at|finished_at|added_at|archived_at)\\b\\s+(DATETIME|TIMESTAMP|DATE|INT|BIGINT)", "hint": "平台表时间字段统一为 *_time(update_time / start_time / finish_time / add_time / archive_time)" },
{ "re": "<td>(updated_at|started_at|finished_at|added_at|archived_at)</td>", "hint": "平台表时间字段统一为 *_time(update_time / start_time / finish_time / add_time / archive_time)" }
{ "re": "<td>(updated_at|started_at|finished_at|added_at|archived_at)</td>", "hint": "平台表时间字段统一为 *_time(update_time / start_time / finish_time / add_time / archive_time)" },
{ "re": "\\btd[-_]?mock\\b", "hint": "阶段 3 挡板服务统一叫 qa/tdstub" },
{ "re": "\\bqa/stub\\b", "hint": "阶段 3 挡板服务统一叫 qa/tdstub" },
{ "re": "\\bmock[-_]?(server|service)\\b", "hint": "阶段 3 挡板服务统一叫 qa/tdstub" },
{ "re": "\\bpay[-_]?gateway\\b", "hint": "第三方支付渠道统一叫 pay-channel" },
{ "re": "\\bsms[-_]?(service|gw)\\b|\\bsms_?gateway\\b", "hint": "短信依赖统一叫 sms-gateway" },
{ "re": "\\b(logistics|express)_api\\b|\\b(logistics|express)[-_](service|api2)\\b", "hint": "物流依赖统一叫 logistics-api" },
{ "re": "\\bshadow[-_]?(db|database)\\b", "hint": "影子库统一叫 mall_shadow" },
{ "re": "(?<!tp_)\\bseed_batch\\b", "hint": "造数批次表统一为 tp_seed_batch" },
{ "re": "(?<!tp_)\\bseed_rule\\b", "hint": "造数规则表统一为 tp_seed_rule" },
{ "re": "\\b(test|qa)[-_]?data[-_]?factory\\b", "hint": "造数工具统一为 qa/tdseed,平台二期能力叫「数据工厂」" },
{ "re": "\\bbatch_id\\s*[:=]\\s*['\"]?SEED", "hint": "批次号字段统一叫 batch_no(batch_id 是自增主键)" },
{ "re": "rules/(pay_channel|order_20|order_paid|sms_gateway|logistics_api|coupon_api|pay_callback|order_coupon|mask_rules)\\.yaml", "hint": "挡板与造数规则文件名统一用连字符(rules/pay-channel.yaml、rules/order-paid.yaml、rules/mask-rules.yaml)" }
]
}