fix(tester): default local host to loopback
This commit is contained in:
@@ -3,7 +3,8 @@ name: tester
|
||||
description: >-
|
||||
维护并执行项目黑盒测试目录(.pouch/tester):列出/增改用例,按分类或
|
||||
id 跑脚本、浏览器或移动模拟器。触发词:/tester、列出测试、完善测试用例、
|
||||
按分类测、跑 smoke、现场复测。默认风险最低档,不猜 HOST。
|
||||
按分类测、跑 smoke、现场复测。默认风险最低档;local 配置的 HOST 默认是
|
||||
127.0.0.1。
|
||||
---
|
||||
|
||||
# Tester:项目测试目录
|
||||
@@ -29,7 +30,9 @@ python3 <skill-dir>/scripts/catalog.py <list|select|show|validate|next-id|run-sc
|
||||
|
||||
## 边界(所有模式)
|
||||
|
||||
- 不猜 HOST / Base URL / 是否已授权。缺 HOST 则停,记 environment-fail,不用 localhost。
|
||||
- `local.yaml.example` 的 HOST 默认是 `127.0.0.1`;如果目标不是本机,必须在
|
||||
`local.yaml` 或环境变量中显式覆盖。`local.yaml` 不存在且没有环境变量时仍不猜
|
||||
HOST,停下并记 environment-fail。
|
||||
- 默认风险上限是 catalog 里的 `default_max_risk`。超出上限的条目标 `skipped`,禁止执行。
|
||||
- `risk` 只能是 `readonly` / `mutating` / `destructive`,默认只跑 `readonly`。`tag=smoke` 只能配 `risk=readonly`。规则见 [levels.md](references/levels.md)。
|
||||
- `driver=browser` 必须开真实页面;`driver=mobile` 必须挂模拟器 session。二者都不得改成只打 API。
|
||||
@@ -45,7 +48,7 @@ python3 <skill-dir>/scripts/catalog.py <list|select|show|validate|next-id|run-sc
|
||||
|
||||
1. 建 `.pouch/tester/{cases,runs}/`。
|
||||
2. 若不存在,从 `<skill-dir>/templates/` 拷 `catalog.yaml` 和 `local.yaml.example`。
|
||||
3. 不写 `local.yaml` 的 HOST。不猜地址。
|
||||
3. 从模板生成的 `local.yaml` 默认使用 `HOST: "127.0.0.1"`;不要根据项目内容猜远程地址。
|
||||
4. 跑 `catalog.py validate --root <root>`。无用例是「部分完成」,不是失败。
|
||||
|
||||
```text
|
||||
|
||||
Reference in New Issue
Block a user