feat(tester): add integration-first journey execution
This commit is contained in:
@@ -14,10 +14,9 @@ runs/<run-id>.yaml 每次运行快照(执行源);run-id 必须唯一
|
||||
runs/*.csv 同一次运行的成绩单;generate_run_csv.py 从对应 yaml 生成
|
||||
```
|
||||
|
||||
客户端旅程在上述目录中仍使用同一套 cases/runs 和五态报告,不另造成绩单。启用旅程
|
||||
契约的用例声明 `client_suite`(兼容迁移期别名 `suite`);catalog 可用
|
||||
`client_suites` 显式列出三个标准套件:`client-smoke`、`client-regression`、`safety`。
|
||||
`category` 仍是文件/执行顺序容器,不被套件字段替代。
|
||||
两类用例共用同一套 cases/runs 和五态报告,不另造成绩单。新目录显式声明顶层
|
||||
`test_type: journey | integration`;旧目录没有该字段时按已有 `client_suite`/`journey`
|
||||
或 `integration_suite` 推断。`category` 仍是文件/执行顺序容器,不被套件字段替代。
|
||||
|
||||
## catalog.yaml
|
||||
|
||||
@@ -35,6 +34,7 @@ runs/*.csv 同一次运行的成绩单;generate_run_csv.py 从对
|
||||
| `run_together` | 可选。成组执行:`[{ids: [TC-…, TC-…], continue_on_fail: true}]`。点到组内任一条,`select` 会按 `ids` 顺序把整组扩进命中列表。`continue_on_fail: true` 时组内前一条产品 fail 仍跑后一条(返回/收尾)。一个 id 只能属于一组。 |
|
||||
| `status_probe` | 可选。顶层默认值,一个**分类级前置条件**:`{url, stop_if: {字段: [命中值]}}`。运行前请求 `url`,响应命中任一 `stop_if` 条件即视为前置不满足。分类项可用同名键覆盖:缺省继承顶层、`false` 关闭、mapping 整体替换。命中或不可达只影响用它的分类,不是产品失败。业界对应 pytest 的 session fixture / Robot 的 Suite Setup。`select` 会按分类返回解析后的生效值,`url` 已用 `vars` 展开 |
|
||||
| `client_suites` | 可选的标准套件声明;出现时必须完整包含 `client-smoke`、`client-regression`、`safety`。缺省运行仍按 `tag` 兼容旧目录 |
|
||||
| `integration_suites` | 可选的集成套件声明;标准值为 `api-contract`、`authorization`、`build-contract` |
|
||||
|
||||
`local.yaml` 与环境变量覆盖 `HOST` 和授权开关。模板中的 `HOST` 默认是
|
||||
`127.0.0.1`;远程目标必须显式覆盖。查找顺序:环境变量 > `local.yaml` >
|
||||
@@ -76,6 +76,7 @@ terminal;运行结束用 `orca terminal close --terminal <handle>` 关闭本
|
||||
| 字段 | 必填 | 含义 |
|
||||
|------|------|------|
|
||||
| `id` | 是 | 匹配 `id_pattern` |
|
||||
| `test_type` | 新用例是 | `journey` 或 `integration`;缺省兼容旧目录并按字段推断 |
|
||||
| `category` | 是 | 必须等于文件声明的 category |
|
||||
| `title` | 是 | 短名 |
|
||||
| `what` | 是 | 一句可观察的「测什么」 |
|
||||
@@ -94,6 +95,18 @@ terminal;运行结束用 `orca terminal close --terminal <handle>` 关闭本
|
||||
| `teardown` | 否 | 跑完回退 |
|
||||
| `notes` | 否 | 备注 |
|
||||
|
||||
### 集成测试用例契约
|
||||
|
||||
`test_type: integration` 的用例不创建 browser/mobile session,也不能声明 `platform` 或
|
||||
客户端 `journey`。必须有 `integration_suite`(迁移期可用 `suite`)且值为
|
||||
`api-contract`、`authorization` 或 `build-contract`;`fixture` 必须是非空 mapping;
|
||||
`request`、`input`、`call`、`integration` 之一或旧式 `how` 用于描述调用;`expected` 是
|
||||
协议/数据断言。`mutating`/`destructive` 集成用例必须提供 `cleanup.steps` 或
|
||||
`cleanup.run`(只读探针可用 `required: false` + `reason`)。
|
||||
|
||||
选择 `--suite api-contract` 或 `--test-type integration` 才会进入集成阶段;无显式类型
|
||||
时的默认选择不会包含 integration。
|
||||
|
||||
### 客户端旅程用例契约
|
||||
|
||||
声明 `client_suite` 后,以下字段都必须存在;`catalog.py validate` 和 `select` 使用同一
|
||||
|
||||
Reference in New Issue
Block a user