bpmax-cli 0.2.1-beta.39 → 0.2.1-beta.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/dist/bin.js +255 -36
- package/dist/bin.js.map +1 -1
- package/package.json +1 -1
- package/skills/bpmax-e2e-flow-test-operator/SKILL.md +4 -1
- package/skills/bpmax-e2e-flow-test-operator/references/ai-test-suite.md +11 -0
- package/skills/bpmax-e2e-flow-test-operator/references/full-detail-guide.md +5 -3
- package/skills/bpmax-form-template-editor/SKILL.md +2 -0
- package/skills/bpmax-form-template-editor/references/full-detail-guide.md +1 -0
- package/skills/bpmax-form-template-editor/references/payload-checklist.md +2 -0
- package/skills/bpmax-functional-test-design/SKILL.md +2 -2
- package/skills/bpmax-functional-test-design/references/bpmax-test-suite-output.md +3 -3
package/package.json
CHANGED
|
@@ -56,6 +56,9 @@ description: "用于在 BPMAX 中做全链路流程测试、场景回归、前
|
|
|
56
56
|
- `case_steps.csv` 每行只能有一个用户动作,并写清 actor、runner、action、target、input_data、即时 expected_result 和 evidence_required;不能用“然后/接着/再”把多步塞进一行。上传附件属于合法单一步骤,应单独写成“上传 <具体附件>”并记录页面证据。
|
|
57
57
|
- 生成、检查、更新用例资产前,必须先 latest sync,并把证明写入 `.codex/tmp/ai_test_suite/latest-<env>-proof.json`。缺少 `--latest-proof` 时,CLI 必须拒绝 lint/index/draft-update/promote。
|
|
58
58
|
- `.ai_test` suite 的 lint、review init/repair/explain、draft-update、promote 都使用 `bpmax-cli test-suite` 的 TypeScript 实现;不要新增或调用旧 Python suite 脚本作为主路径。
|
|
59
|
+
- 共享 suite 不等于共享失败域。处理单个流程时,必须维护该流程明确的 `scenario_ids`,并对 draft 使用可重复的 `test-suite lint --scenario <id>`;不得先全量 lint 再过滤,也不得让 CG01 的资产更新被 SC02 等其他流程的历史 case 阻断。
|
|
60
|
+
- `lint --scenario` 只证明所选场景通过,输出必须保持 `scope=selected_scenarios`,不得表述成整个 suite 已通过。只有明确治理全部测试资产时才省略 `--scenario` 执行全量 lint。
|
|
61
|
+
- 同一流程包含多个场景时,先用一个 scoped lint 调用覆盖全部 `scenario_ids`,再逐场景完成 review;promote 必须在一次命令中重复传入同一 `flow_type` 的全部 `--scenario`,让 CLI 在复制任何目录前完成全部场景预检。不同 `flow_type` 必须拆成独立批次。
|
|
59
62
|
- 每个场景目录必须有 `README.md`、`cases.csv`、`case_steps.csv`;promote 前必须有合格 `review.json`,`execution_operability.step_judgments` 覆盖全部 active step,且 `unresolved.P0=0`、`unresolved.P1=0`。
|
|
60
63
|
- `cases.csv` 字段、review schema、copy diff、promote 流程见 `references/ai-test-suite.md`;不要凭记忆手写 `review.json`,优先用 `bpmax-cli test-suite review explain/init/repair`。
|
|
61
64
|
- 正式 E2E 用例的 `prep_data` 必须包含 `precondition_check=`、`browser_tool=`、`live_draft=`、`state_file=` 或 `report_run=`,并声明 `resume_policy=full_rerun|checkpoint|evidence_only`。
|
|
@@ -89,7 +92,7 @@ description: "用于在 BPMAX 中做全链路流程测试、场景回归、前
|
|
|
89
92
|
## 标准执行流
|
|
90
93
|
1. 查 memory:搜索业务名、`flow_type`、模板、数据集、上次状态和已知坑点;不要把完整 JSON 贴给用户。CLI 出现 skills out-of-sync notice 时,源码验证必须显式读取当前仓库 skill,正式分发前必须 update/install skills 消除版本差异。
|
|
91
94
|
2. 用 `bpmax-functional-test-design` 从需求、状态、规则、边界和角色旅程生成可追踪用例;设计完成不等于执行通过。
|
|
92
|
-
3.
|
|
95
|
+
3. 先按当前流程的 `scenario_ids` 做隔离 lint/review/promote;其他流程失败只记录到各自批次,不得污染当前流程。然后强制从用例启动:运行 `bpmax-cli test-suite run start --scenario <id> --case-id <id> ...` 生成本轮 execution manifest。不得先临场打开浏览器或直接运行正式 `bpmax-cli e2e`。源码联调必须额外传 `--source-skill <repo>/skills/bpmax-e2e-flow-test-operator/SKILL.md`;分发版默认硬检查安装 skill stamp 与 CLI 版本一致。
|
|
93
96
|
`run start` 会同时生成 `<scenario_id>.md` 报告草稿;执行过程中必须持续更新该文件,不要另找历史报告套用。
|
|
94
97
|
4. 执行当前步骤:只执行 `test-suite run next` 返回的当前 `case_id/case_step_id`;正式 `e2e` 命令必须带 `--execution-manifest --case-id --case-step-id`。
|
|
95
98
|
5. 准备真实业务样本:确认业务对象、主数据关系、边界值、审批人、权限、页面入口和预期业务后果。
|
|
@@ -188,6 +188,17 @@ C001,P0,positive,正常客户换货主链路,有可用旧机SN和新机库存,"t
|
|
|
188
188
|
- `bpmax-cli test-suite lint/index/draft-update/promote` 必须传 `--latest-proof <path>`;缺失或 proof 不合格时命令拒绝执行。
|
|
189
189
|
- latest 失败或远端基线无法确认时,不得继续生成、检查、更新或 promote 用例。
|
|
190
190
|
|
|
191
|
+
## 单流程隔离门禁
|
|
192
|
+
|
|
193
|
+
- 共享 `.ai_test/suite` 可以保存多个流程的场景,但批量迁移、修复和晋级必须以单个 `flow_type` 为失败域。
|
|
194
|
+
- 迁移器必须显式保存当前流程的 `scenario_ids`。不要通过扫描并验证整个 suite 来反推当前流程范围,因为其他流程的损坏 README、case 或 step 会造成无关阻断。
|
|
195
|
+
- 单流程 lint 使用可重复的 `--scenario`:`bpmax-cli test-suite lint --root .ai_test/suite_draft --scenario <main_scenario> --scenario <return_scenario> --latest-proof <proof.json> --format json`。
|
|
196
|
+
- scoped lint 的 JSON 必须是 `scope=selected_scenarios`,并核对 `selected_scenarios`、`ignored_scenario_count` 和 `flow_types`。该结果只代表所选场景,不代表全仓 suite。
|
|
197
|
+
- `e2e_acceleration.missing_cases` 也必须只包含所选场景;其他流程缺少 reusable evidence 时不得污染当前流程。
|
|
198
|
+
- review 始终逐场景完成。一个流程有多个场景时,全部 review 的 `unresolved.P0/P1` 都清零后,才允许在一次 promote 中重复传入这些 `--scenario`。
|
|
199
|
+
- 单次多场景 promote 只允许一个 `flow_type`。CLI 必须先验证全部场景及 review,再复制任何场景;其中一个失败时,本流程不得部分晋级。其他流程使用另一个独立 promote 批次。
|
|
200
|
+
- 省略 `--scenario` 的 lint 保留给全仓测试资产治理,不应用作单流程迁移的默认门禁。
|
|
201
|
+
|
|
191
202
|
## 配置依据规则
|
|
192
203
|
|
|
193
204
|
- 每条用例都必须填写 `config_basis`。
|
|
@@ -174,18 +174,20 @@ bpmax-cli e2e cache refresh --flow-id <flow_id> --profile <profile> --format jso
|
|
|
174
174
|
- `bpmax-cli test-suite lint` 还会硬检查前置证据、错误提示截图要求、人工介入续跑策略、多角色证据隔离和内容乱码/占位文本。新增 lint 文案使用中文说明,机器字段仍保持稳定英文 code/rule_id。
|
|
175
175
|
- 如果 `test_data` 语义对齐失败,先运行 `bpmax-cli test-suite lint --explain ...`,再按 CLI 输出的 title/preconditions/steps/expected 关键词重写 `业务场景=`。不要为了过 lint 把无关业务词塞进 `test_data`。
|
|
176
176
|
- 生成或更新用例必须先落到 `.ai_test/suite_draft/`,执行 lint 并向用户概要说明后,得到用户确认才允许 promote 到 `.ai_test/suite/`。
|
|
177
|
+
- 共享 suite 的单流程更新必须显式维护该流程的 `scenario_ids`,并用可重复的 `--scenario` 做隔离 lint。不要让其他流程的 case、review 或 acceleration gap 阻断当前流程,也不要把 scoped lint 描述成全仓 suite 通过。
|
|
178
|
+
- 一个流程有多个 scenario 时,先一次 lint 全部目标 scenario,再逐场景 review;全部通过后,在一次 promote 命令中重复传入同一 `flow_type` 的全部 `--scenario`。CLI 在任何复制前完成全组预检,禁止部分晋级。
|
|
177
179
|
- 从正式用例复制到草稿,或从草稿 promote 到正式用例时,如果目标场景目录已经存在,第一次 `--replace` 只生成 copy diff preview,不覆盖目标;必须审阅 diff 后第二次显式追加 `--diff-reviewed`。
|
|
178
180
|
- `draft-update` / `promote` 输出 `copy_diff_summary` 时,必须检查新增/删除/修改 case 数、`changed_case_ids`、`README.md` 和 `review.json` 是否变化;不能只看命令成功。
|
|
179
181
|
- 优先使用 `bpmax-cli test-suite` 原生命令:
|
|
180
182
|
|
|
181
183
|
```bash
|
|
182
|
-
bpmax-cli test-suite lint --root .ai_test/suite_draft --latest-proof .codex/tmp/ai_test_suite/latest-<env>-proof.json
|
|
183
|
-
bpmax-cli test-suite lint --root .ai_test/suite_draft --latest-proof .codex/tmp/ai_test_suite/latest-<env>-proof.json --explain
|
|
184
|
+
bpmax-cli test-suite lint --root .ai_test/suite_draft --scenario <scenario_id> --latest-proof .codex/tmp/ai_test_suite/latest-<env>-proof.json
|
|
185
|
+
bpmax-cli test-suite lint --root .ai_test/suite_draft --scenario <scenario_id> --latest-proof .codex/tmp/ai_test_suite/latest-<env>-proof.json --explain
|
|
184
186
|
bpmax-cli test-suite review init --scenario <scenario_id> --draft-root .ai_test/suite_draft --latest-proof .codex/tmp/ai_test_suite/latest-<env>-proof.json
|
|
185
187
|
bpmax-cli test-suite review repair --scenario <scenario_id> --draft-root .ai_test/suite_draft --latest-proof .codex/tmp/ai_test_suite/latest-<env>-proof.json
|
|
186
188
|
bpmax-cli test-suite index --root .ai_test/suite --latest-proof .codex/tmp/ai_test_suite/latest-<env>-proof.json
|
|
187
189
|
bpmax-cli test-suite draft-update --scenario <scenario_id> --replace --latest-proof .codex/tmp/ai_test_suite/latest-<env>-proof.json
|
|
188
|
-
bpmax-cli test-suite promote --scenario <scenario_id> --replace --latest-proof .codex/tmp/ai_test_suite/latest-<env>-proof.json
|
|
190
|
+
bpmax-cli test-suite promote --scenario <scenario_id> [--scenario <same_flow_scenario_id> ...] --replace --latest-proof .codex/tmp/ai_test_suite/latest-<env>-proof.json
|
|
189
191
|
bpmax-cli test-suite next-report-dir --root .ai_test/report --create
|
|
190
192
|
bpmax-cli test-suite lint-report --root .ai_test/report
|
|
191
193
|
```
|
|
@@ -76,6 +76,7 @@ description: "用于通过 bpmax-cli typed config 创建、编辑、校验或美
|
|
|
76
76
|
- `form_rule_id`、`form_template_id`、`template_id`、字段持久化 `id` 等后端持久化 ID 不得出现在 create submit payload 中。
|
|
77
77
|
- `rule.field` 最长 20 字符;超长会在平台先创建空模板后写字段失败。CLI lint/build 必须在远端请求前以 `[form.field.max_length]` 阻断,较长业务含义放在 `key` 或 `title`。
|
|
78
78
|
- `field` 是平台字段标识,`key` 才承载业务语义;脚本、数据集、条件判断优先按稳定业务 `key` 设计。
|
|
79
|
+
- `h_label`、`description`、`i_hr`(以及历史别名 `divider`)是不显示字段标签的展示控件,禁止设置非空 `rule.title` 或 `value.title`。标题/说明的可见文字放在 `rule.props.text`;内部 `rule.field` 仍保留用于 structured layout 和编辑器识别,不得把它误删。
|
|
79
80
|
- 线上回读优先于本地 `think_*` 镜像;本地镜像只用于检索候选结构和差异线索。
|
|
80
81
|
|
|
81
82
|
## 动态字段状态硬门禁
|
|
@@ -99,6 +100,7 @@ description: "用于通过 bpmax-cli typed config 创建、编辑、校验或美
|
|
|
99
100
|
|
|
100
101
|
## 控件专项门禁
|
|
101
102
|
- 涉及控件类型、控件是否存在或某个 `field_type` 怎么配,必须联动 `form-control-library`。
|
|
103
|
+
- 标题、说明和分割线控件不得生成左侧字段名:`h_label` / `description` / `i_hr` / `divider` 的 `rule.title`、`value.title` 必须为空或省略;`h_label` / `description` 的展示内容只写 `props.text`。普通输入控件仍必须保留业务字段标题,不能按文案中含“标题”二字误判。
|
|
102
104
|
- `radio` 不能只写 `type=radio` 和 options;`_fc_drag_tag=radio`、`name=radio` 是运行态控件身份,缺失时必须硬阻断。新建模板还必须使用 `defaultValueType=option` 和 `{ type: "radio", value?: <option> }`;历史 edit 模板的 `defaultValueType=string` 或标量默认值只提示迁移 warning,不得阻断无关字段修改,也不得由 build 静默改写。
|
|
103
105
|
- `sub_form` 不是父表单中的占位对象;必须有父字段配置、已发布子表单模板 ID、运行态保存/展示验证。父表单绑定的 `form_template.id` 必须是已发布模板 ID,不要绑定草稿 ID。
|
|
104
106
|
- `es_project_selector` 必须以当前环境源码或真实接口验证为准;若存在非空 `lambda`,`quickValue` 必须显式为 `true`。
|
|
@@ -300,6 +300,7 @@ bpmax-cli config form-template export --id <sample_template_id> --work-format st
|
|
|
300
300
|
- `rule`
|
|
301
301
|
- `value`
|
|
302
302
|
- `keepIds`
|
|
303
|
+
- `h_label`、`description`、`i_hr`(以及历史别名 `divider`)虽然仍以内部 `field` 参与 `layout` 和编辑器识别,但不显示字段标签:`rule.title` / `value.title` 必须为空或省略。`h_label` / `description` 的可见文字使用 `rule.props.text`,不能同时再生成一个左侧字段名。
|
|
303
304
|
- `basic` 当前默认保留这些顶层提交字段:
|
|
304
305
|
- `name`
|
|
305
306
|
- `desc`
|
|
@@ -26,6 +26,8 @@
|
|
|
26
26
|
- `fields.<field>.rule.field` 是否等于字段 key
|
|
27
27
|
- `fields.<field>.value.field` 是否等于字段 key
|
|
28
28
|
- `fields.<field>.value.field_type` 是否与 `rule.type` 对齐
|
|
29
|
+
- `h_label` / `description` / `i_hr` / `divider` 是否未设置 `rule.title` 和 `value.title`;标题或说明正文是否只放在 `rule.props.text`
|
|
30
|
+
- 是否保留展示控件内部 `field` 作为 layout 引用;不要把“无字段标签”误改成“删除内部 field”
|
|
29
31
|
- `removedFields` 是否只包含确实要删除的字段
|
|
30
32
|
|
|
31
33
|
## submit 文件
|
|
@@ -64,10 +64,10 @@ description: Use when designing BPMAX functional test cases from requirements, b
|
|
|
64
64
|
需要生成 `.ai_test/suite_draft` 内容时,先满足目标配置仓库的 latest proof 门禁,再按 [bpmax-test-suite-output.md](references/bpmax-test-suite-output.md) 映射字段。完成草稿后只允许声明“已生成/已 lint/已评审/已 promote”中有证据支持的状态。
|
|
65
65
|
|
|
66
66
|
```bash
|
|
67
|
-
bpmax-cli test-suite lint --root .ai_test/suite_draft --latest-proof <proof.json>
|
|
67
|
+
bpmax-cli test-suite lint --root .ai_test/suite_draft --scenario <scenario_id> [--scenario <same_flow_scenario_id> ...] --latest-proof <proof.json>
|
|
68
68
|
```
|
|
69
69
|
|
|
70
|
-
|
|
70
|
+
共享 suite 中设计单个流程时必须用 `--scenario` 隔离当前流程;该 lint 只证明所选场景结构可接受,不代表整个 suite 通过。真实页面或流程执行必须使用 `bpmax-e2e-flow-test-operator`。本 skill 不替代用户身份切换、浏览器操作、审批提交、运行 manifest 或证据记录。
|
|
71
71
|
|
|
72
72
|
## 输出顺序
|
|
73
73
|
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
3. 先运行 lint:
|
|
60
60
|
|
|
61
61
|
```bash
|
|
62
|
-
bpmax-cli test-suite lint --root .ai_test/suite_draft --latest-proof <proof.json>
|
|
62
|
+
bpmax-cli test-suite lint --root .ai_test/suite_draft --scenario <scenario_id> [--scenario <same_flow_scenario_id> ...] --latest-proof <proof.json>
|
|
63
63
|
```
|
|
64
64
|
|
|
65
65
|
4. 通过 CLI 初始化或修复评审文件:
|
|
@@ -77,7 +77,7 @@ bpmax-cli test-suite index --root .ai_test/suite --latest-proof <proof.json>
|
|
|
77
77
|
|
|
78
78
|
## 执行边界
|
|
79
79
|
|
|
80
|
-
- `bpmax-cli test-suite lint`
|
|
80
|
+
- `bpmax-cli test-suite lint` 通过只表示结构和规则检查通过,不表示业务执行通过。带 `--scenario` 时只代表所选流程场景,不代表共享 suite 全部通过。
|
|
81
81
|
- `review init` 只创建评审骨架,不表示评审完成。
|
|
82
82
|
- `promote` 只表示测试资产进入正式库。
|
|
83
83
|
- 真实执行必须使用 `bpmax-e2e-flow-test-operator`,创建 run manifest,并逐步记录浏览器、项目、步骤和读回证据。
|
|
@@ -91,5 +91,5 @@ bpmax-cli test-suite index --root .ai_test/suite --latest-proof <proof.json>
|
|
|
91
91
|
需求覆盖:<covered>/<total>
|
|
92
92
|
已采用方法:Domain / Decision Table / State Transition / Use Case
|
|
93
93
|
尚未完成:latest proof、lint、review、promote、runtime execution
|
|
94
|
-
下一步:bpmax-cli test-suite lint --root .ai_test/suite_draft --latest-proof <proof.json>
|
|
94
|
+
下一步:bpmax-cli test-suite lint --root .ai_test/suite_draft --scenario <scenario_id> --latest-proof <proof.json>
|
|
95
95
|
```
|