git:20260910.699a593 to v1.1.0

34 added, 91 removed. Audit A to A.

---
name: multica-test-t3-api-automation
- description: Tester T3 接口自动化:G2.5 后 Apifox CLI 跑批 + AC 裁决报告。整合 software-development;CLI 在 multica-platform-apifox。
+ description: T3 API automation—only after G2.5 PASS; run Apifox scenarios by contract, join overall verdict with UI side. Requires env + Apifox three IDs complete; no local mock as substitute.
+ version: 1.1.0
metadata:
orchestrates:
- multica-platform-apifox
- credentials:
- priority:
- - APIFOX_ACCESS_TOKEN
+ - multica-test-orchestration
---
- # Test Automation(Apifox CLI · T3 接口)
-
- G2.5 PASS 且具备 **部署环境 URL** 后才能跑。场景写入用 `multica-platform-apifox`;本 skill **跑批 + 接口侧 AC 证据**,整单 PASS/FAIL/BLOCKED 由 `multica-test-orchestration` 合并(含 UI 通道时)。
-
- > 整合自 `software-development`。
-
- ## Platform 协作
-
- | Platform skill | 本 skill 用途 |
- | --- | --- |
- | `multica-platform-apifox` | T3 `run_apifox.py` 跑批 + 环境变量注入 |
-
- 凭据:`APIFOX_ACCESS_TOKEN`(见 platform-apifox SKILL)。本 skill 不重复 REST/CLI 细节。
-
- ## 从评论拼接(先于跑批)
+ # API Automation (T3 · API)
- 只使用本 Issue 描述 + 全部评论(规则见 `multica-test-orchestration`)。不能拼 → **中断**,禁止 CLI。
+ T3 only after **G2.5 PASS**; an AC can only be verified by API → run this skill alone; if it also has a UI channel → run both, orchestration merges one report.
- | 字段 | 评论齐套条件 |
- | --- | --- |
- | `g25_pass` | 明确 G2.5 PASS。仅「G2.5 N/A」→ 缺 deploy 证据(除非同时有 deploy_url 且 Leader 书面允跑) |
- | `deploy_url` | 评论中的 http(s) 环境地址。无则 BLOCKED |
- | `apifox_*` | 有接口自动化:项目 ID + 环境 ID + 场景 ID。契约 N/A → 三字段填 N/A |
+ > Integrated from `api-automation-squad`. **Material assembly + BLOCKED see `multica-test-orchestration`.**
- ## 门禁
+ ## Required Items (stop + interruption list if missing; summary from comments)
- | 条件 | 动作 |
+ | Required | How it counts as complete |
| --- | --- |
- | `g25_pass` 非 true | **BLOCKED**(G2.5 N/A 同等;除非 deploy_url + Leader 书面允跑) |
- | 无 `deploy_url` | **BLOCKED** |
- | 用 localhost / mock 冒充部署环境 | **禁止** |
-
- **禁止**因编译/单测/实现者口头通过而 PASS。**禁止**把 BLOCKED 改判 PASS。
+ | G2.5 PASS | Leader/DevOps explicit G2.5 PASS (or "G2.5 N/A" but deploy_url + Leader written authorization) |
+ | deploy_url | Reachable environment URL |
+ | contract | Apifox/OAS link, or **N/A (reuse xxx)** |
+ | Apifox three IDs | project_id / environment_id / scenario_ids **complete**, else **N/A (not missing)** |
- ## CLI 执行
+ ## Flow
```bash
- pip install -r multica-platform-apifox/scripts/requirements.txt
- npm install -g apifox-cli
- set APIFOX_ACCESS_TOKEN=<token>
-
- python multica-platform-apifox/scripts/run_apifox.py \
- --issue PROJ-2466 \
- --base-url "<deploy_url from comment>" \
- --json
+ python multica-platform-apifox/scripts/run_scenarios.py \
+ --project-id <id> --environment-id <id> --scenario-ids <ids> \
+ --deploy-url <deploy_url> --out ./reports/apifox.json
```
- > CLI **唯一入口**:`multica-platform-apifox/scripts/run_apifox.py`(勿使用本 skill 目录下的副本)。
-
- `deploy_url` 注入 Apifox 环境变量;scenario / environment 见 `multica-platform-apifox/config.yaml`。
-
- ## 裁决(G3 测试报告 · 接口通道)
-
- 对照 Issue **AC-** 逐条,结合 CLI 结果:
-
- | 结论 | 条件 |
- | --- | --- |
- | **PASS** | 全部 AC 满足且部署环境证据充分 |
- | **FAIL** | 有 AC 未满足 + 复现/期望/实际/证据/严重度 |
- | **BLOCKED** | 缺环境/G2.5 未 PASS/CLI 无法验证 |
-
- 条件用例(T2 标范围外):记 BLOCKED(范围外),**不得记 FAIL**。
-
- ## FAIL / ERROR 分诊(强制)
-
- 自动化失败时 **先分诊、再派活**,见 `multica-test-orchestration/references/t3-failure-triage.md`:
-
- | 结论 | 负责人 |
- | --- | --- |
- | 用例/脚本/断言问题 | **@Tester** 修订并重跑 |
- | 产品不符合 AC | **@FrontendDev / @BackendDev**(Tester 派活 + 证据) |
- | 环境/部署 | **BLOCKED** → Leader / DevOps |
-
- **禁止**实现者未等分诊就改测试「刷绿」;**禁止** Tester 跳过分诊直接关单。
-
- ### 人工附录(Leader 书面授权时)
-
- 可列手工步骤结果,标题 **「非自动化、不替代 G2.5」**。整单自动化结论仍为 BLOCKED,除非所有 AC 已在部署环境被充分验证。
+ Scenario source: T2 manifest (MULTICA.md §2 API manifest) or T1 Apifox branch. Missing → interruption list.
- ## 输出模板
+ ## Output and merge
```markdown
- # T3 测试报告(接口通道)— {JIRA_KEY}
-
- ## 结论
- **PASS | FAIL | BLOCKED**
-
- ## 环境
- - G2.5 / deploy_url / Apifox 运行 ID
+ # T3 API Automation — {JIRA_KEY}
+ - G2.5: PASS @ {sha} deploy: {url}
+ - Apifox: project {id} env {id} scenarios {ids}
+ - total / pass / fail / error
+ - per scenario: id / name / status / latency / assertion / log path
+ - conclusion: PASS | FAIL | BLOCKED
+ ```
- ## AC 逐条
- | AC- | 结果 | 证据 |
- |-----|------|------|
+ `multica-test-orchestration` merges with UI side: **one side only** verifies a given AC, missing that side → **whole ticket cannot be PASS**; errors → triage (`references/t3-failure-triage.md`).
- ## FAIL 明细(如有)
- - …
+ ## Platform Collaboration
- ## 自动化日志
- - 路径或附件
- ```
+ | Platform skill | Used for |
+ | --- | --- |
+ | `multica-platform-apifox` | Scenario run; results/logs into report |
+ | `multica-test-orchestration` | T3 gate + merge |
- 跑批完成后由 `multica-test-orchestration` 合并 UI/接口证据并做整单 AC 裁决(报告链接进 JIRA 为团队可选项)。
+ **No local mock** as a substitute for the deployed environment; no environment → BLOCKED.
- ## 为什么有效
+ ## Why it works
- 接口 T3 与 UI T3 分 skill,编排层统一裁决,避免 Apifox 补场景被误当成验收通过。
+ API verification is independent of UI; running after G2.5 ensures automated evidence is trustworthy; three IDs explicit avoids "silent skip".