bpmax-cli 0.2.1-beta.40 → 0.2.1-beta.41
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 +1 -1
- package/dist/bin.js +81 -20
- package/dist/bin.js.map +1 -1
- package/package.json +1 -1
- package/skills/bpmax-console-template-editor/SKILL.md +1 -0
- package/skills/bpmax-e2e-flow-test-operator/SKILL.md +2 -1
- package/skills/bpmax-e2e-flow-test-operator/references/ai-test-suite.md +3 -2
- package/skills/bpmax-e2e-flow-test-operator/references/full-detail-guide.md +2 -0
package/package.json
CHANGED
|
@@ -86,6 +86,7 @@ bpmax-cli config console-template delete --id <id> --profile <profile> --confirm
|
|
|
86
86
|
- `TableSmart` 必须有 `page_size`、`exportCount`、`dataSource`、`config`;导出无 `ctx.pageInfo` 时必须返回 `allRows`,不能只出第一页。
|
|
87
87
|
- `ProjectOverviewSmart` 的 `config.config` 必须返回 `{ title, amount, icon }[]`;`icon` 只能使用当前源码支持的 `total` / `finished` / `delay_warning` / `delay`。
|
|
88
88
|
- 当前前端 `useDataSource` 只识别 `es` / `mysql` / `customer` / `custom_bpmax` / `service`;看板模块 `dataSource` 里 ES 数据源必须写 `driver: 'es'`,不能写 `driver: 'raw-es-search'`。
|
|
89
|
+
- `custom_bpmax + TableSmart` 只有在服务端 script 明确使用 `search_after`、页码/页大小、当前页 `slice`,并返回 `rows + total` 时,前端才可对已分页 `rows` 做列和链接映射;缺少这些边界时仍按前端拉全量明细阻断。
|
|
89
90
|
- 禁止在模块脚本里把 `data_set_id` 当 ES 查询入口,禁止默认使用 `/bpmax/project/list` / 用户态 `ESProjectList`。
|
|
90
91
|
- 禁止拉全量明细到前端逐行统计库存、销量、项目数;统计类看板必须优先用 ES `size: 0 + aggs`。
|
|
91
92
|
- 禁止用 `wildcard: "*"` / `value: "*"` 表示非空;必须显式排除空字符串或使用验证过的 exists/term 组合。
|
|
@@ -30,7 +30,7 @@ description: "用于在 BPMAX 中做全链路流程测试、场景回归、前
|
|
|
30
30
|
- Chrome DevTools MCP 出现 `Network.enable timed out`、快照不可用或页面通道挂住时,允许切换到 AppleScript;AppleScript 只能做 DOM 读取、按钮点击、输入、截图和页面提交,不得改用接口直调替代页面动作。
|
|
31
31
|
- H5 测试必须打开 `/m/#/...`,页面 viewport 设为 `412x844`;只调 viewport,不调浏览器外层窗口尺寸。
|
|
32
32
|
- 多角色页面测试使用 [$bpmax-user-mock-operator](../bpmax-user-mock-operator/SKILL.md),只用于浏览器页面测试,不用于 API Key impersonation 或 CLI 业务命令身份切换;结束前必须 unmock 并验证恢复。
|
|
33
|
-
-
|
|
33
|
+
- 多角色用例的身份步骤必须声明 `runner=identity`,使用 `bpmax-cli e2e identity mock|status|unmock` 并与当前 execution manifest/case step 绑定;不得写成 `e2e_step_run`,也不得再运行 Skill 内的旧 Python Cookie 脚本作为正式主路。
|
|
34
34
|
|
|
35
35
|
## 重复操作加速模式
|
|
36
36
|
- E2E 加速分两层:`bpmax-cli e2e` 提供稳定、可复用、可审计的执行能力;本 skill 负责把这些能力编排成标准打法。
|
|
@@ -80,6 +80,7 @@ description: "用于在 BPMAX 中做全链路流程测试、场景回归、前
|
|
|
80
80
|
- `full_rerun` 报告的 `run_id:` 必须等于当前报告目录名;`state_file:`、`precondition_check:`、`report_run:` 必须指向本轮 run 或本轮日期;截图文件必须位于本轮 `screenshots/` 且修改时间落在 `started_at` / `finished_at` 时间窗内。
|
|
81
81
|
- 本轮截图必须是可解析且尺寸至少 100x80 的真实 PNG;改后缀的文本文件、空白占位图或损坏图片不能作为 pass evidence。
|
|
82
82
|
- `e2e step-run` 在任何远端提交前必须完成 evidence 目录范围和可写性预检;结果必须分别检查 `remote_submitted`、`evidence_failed`、`readback_confirmed`。只要证据失败或回读未确认,就停止后续步骤,不得重复提交,也不得形成 pass evidence。
|
|
83
|
+
- `e2e step-run` 的 actor 门禁以当前有效 owner/assignee 集合为准;`step.user_id` 只作辅助诊断。两者冲突或只有 `user_id` 而无 owner 证明时必须 fail closed,并先用 `identity status` 和真实页面按钮复核。
|
|
83
84
|
- 标准 evidence manifest 必须记录运行状态、远端响应摘要、写后回读,以及每个证据文件的 SHA-256、实际 MIME 和扩展名一致性;JPEG 内容伪装成 `.png` 不得通过。
|
|
84
85
|
- 正式 browser 步骤的 evidence JSON 必须写当前 `case_id`、`case_step_id`、`browser_verified: true`、`runtime_scope: page|project|step`、真实 `runtime_url`、本轮 PNG 的 `screenshot` 路径和非空 `assertions`,且所有 assertion 都是 `passed: true`;要求 DOM 时还必须写可定位的 `dom_snapshot`。仅自声明 `browser_verified: true` 不算证据。
|
|
85
86
|
- `runtime_scope=page` 用于首页、列表、搜索等非项目页面,不要求业务 ID;`project` 必须有数字 `project_id`;`step` 必须同时有数字 `project_id` 和业务 `step_id`。测试用例的 `step_no` 绝不能冒充业务 step ID。
|
|
@@ -105,12 +105,13 @@ case_id,step_id,step_no,actor,runner,action,target,input_data,expected_result,ev
|
|
|
105
105
|
C001,S001,1,store_staff,browser,打开客户换货创建页面,客户换货创建页,无,页面展示换货表单,screenshot+url+dom
|
|
106
106
|
C001,S002,2,store_staff,browser,填写客户换货字段,换货表单旧机和新机字段,真实旧机SN和新机SN,页面显示真实业务数据,screenshot+dom
|
|
107
107
|
C001,S003,3,store_staff,e2e_create_page,点击提交客户换货申请,创建页提交按钮,无,项目创建成功并进入审批链,screenshot+project_detail
|
|
108
|
-
C001,S004,4,
|
|
108
|
+
C001,S004,4,store_staff,identity,切换测试身份,当前浏览器会话,目标用户ID,会话切换为目标审批人,identity+mock+readback
|
|
109
|
+
C001,S005,5,dealer_owner,e2e_step_run,审批通过客户换货申请,经销商负责人审批环节,审批意见为同意,审批完成并进入终态,step_context+submit+readback
|
|
109
110
|
```
|
|
110
111
|
|
|
111
112
|
规则:
|
|
112
113
|
|
|
113
|
-
- `runner` 只能是 `browser`、`e2e_create_page`、`e2e_step_run`、`observe`。
|
|
114
|
+
- `runner` 只能是 `browser`、`identity`、`e2e_create_page`、`e2e_step_run`、`observe`;身份 mock/status/unmock 必须使用 `identity`,不得声明为 `e2e_step_run`。
|
|
114
115
|
- `step_no` 从 1 开始连续递增;`step_id` 在 case 内唯一。
|
|
115
116
|
- `actor` 必须属于 cases.csv 的 roles,系统观察步骤可写 `system`。
|
|
116
117
|
- `action` 一行只能有一个动作,禁止 `>`、连续编号和“然后/接着/再然后”;上传附件是合法单一步骤,必须写清具体附件和目标控件。
|
|
@@ -71,6 +71,7 @@
|
|
|
71
71
|
- `bpmax-cli test-suite lint` 会强制检查每条非 deprecated E2E 用例是否已有首次运行沉淀方式;缺少 `bpmax-cli e2e create-page-submit`、`bpmax-cli e2e step-run`、`bpmax-cli e2e record-from-evidence`、`data profile`、`scenario plan` 或 reusable step template 时,不要直接判业务失败,而是读取输出中的 `e2e_acceleration.bootstrap_required=true` 和 `missing_cases`。
|
|
72
72
|
- 发现 `bootstrap_required=true` 时,执行编排必须先跑一次真实页面或安全 step-run,把截图、DOM/URL、console/network、submit/readback 证据保存到稳定目录,然后运行 `bpmax-cli e2e record-from-evidence` 生成 reusable step template;完成沉淀后再进入批量复跑或结论判断。
|
|
73
73
|
- 缓存执行不是无条件信任旧模板。每个 reusable step template 必须包含 `expected_checks`,复用时 `bpmax-cli e2e step-run --data-profile @...` 会先检查当前运行态模式是否仍符合预期,例如处理人可处理、step 未结束、必填字段集合、缺失字段范围、动作仍存在。
|
|
74
|
+
- 处理人判定必须优先使用当前有效 owner/assignee;`step.user_id` 只能作为辅助字段。若它与 owner 冲突,或只有 `user_id` 没有权威 owner 证明,step-run 必须阻断,不能生成可提交计划。
|
|
74
75
|
- 如果 `expected_checks` 缺失、失败,或没有拿到预期范围内的结果,必须把该 step 判为 `cache_stale`,停止继续提交后续步骤;不要把缓存失效误判为业务失败,也不要继续用旧 payload 硬推。
|
|
75
76
|
- 缓存失效时优先自动重建当前步骤缓存:
|
|
76
77
|
|
|
@@ -266,6 +267,7 @@ bpmax-cli test-suite lint-report --root .ai_test/report
|
|
|
266
267
|
|
|
267
268
|
### 1.6 多角色浏览器身份切换
|
|
268
269
|
- 这一节只适用于浏览器 E2E 页面测试。不要把模拟用户身份用于 API Key、CLI 远端命令或非页面路径结论。
|
|
270
|
+
- 正式 `case_steps.csv` 的身份 mock/status/unmock 步骤必须使用 `runner=identity`,并要求 identity operation 与 readback/status 证据;`e2e_step_run` 只用于业务环节提交。
|
|
269
271
|
- 多角色场景必须先列出角色矩阵:
|
|
270
272
|
- 原始管理账号
|
|
271
273
|
- 目标角色
|