bpmax-cli 0.2.1-beta.9 → 0.2.1-beta.90
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 +30 -7
- package/dist/bin.js +45185 -12834
- package/dist/bin.js.map +1 -1
- package/package.json +12 -5
- package/scripts/install-skills.mjs +27 -60
- package/scripts/run-source-cli.mjs +145 -0
- package/skills/bpmax-ai-taskbook/SKILL.md +17 -1
- package/skills/bpmax-ai-taskbook/references/blueprint-taskbook-gates.md +141 -0
- package/skills/bpmax-ai-taskbook/references/taskbook-template.md +43 -3
- package/skills/bpmax-api-platform-editor/SKILL.md +24 -31
- package/skills/bpmax-api-platform-editor/agents/openai.yaml +2 -2
- package/skills/bpmax-api-platform-editor/references/platform-api-map.md +2 -2
- package/skills/bpmax-api-platform-editor/references/runtime-workflow.md +3 -3
- package/skills/bpmax-approval-matrix/SKILL.md +54 -2
- package/skills/bpmax-blueprint-doc-workflow/SKILL.md +38 -5
- package/skills/bpmax-blueprint-doc-workflow/references/blueprint-structure.md +24 -8
- package/skills/bpmax-blueprint-doc-workflow/references/business-language.md +74 -0
- package/skills/bpmax-blueprint-doc-workflow/references/per-flow-required-structure.md +13 -0
- package/skills/bpmax-blueprint-doc-workflow/references/review-and-confirmation-dialogue.md +70 -0
- package/skills/bpmax-blueprint-doc-workflow/references/sample-missing-modeling-review.xml +23 -0
- package/skills/bpmax-blueprint-doc-workflow/references/sample-missing-review-record.xml +72 -0
- package/skills/bpmax-blueprint-doc-workflow/references/sample-paragraph-flow-details.xml +27 -0
- package/skills/bpmax-blueprint-doc-workflow/references/sample-pass.xml +59 -35
- package/skills/bpmax-blueprint-doc-workflow/references/sample-system-identifier.xml +79 -0
- package/skills/bpmax-blueprint-doc-workflow/references/source-traceability-and-flow-modeling.md +115 -0
- package/skills/bpmax-blueprint-doc-workflow/scripts/lint_blueprint_doc.py +586 -5
- package/skills/bpmax-bug-reporting/SKILL.md +72 -0
- package/skills/bpmax-builder-shared/SKILL.md +1 -0
- package/skills/bpmax-builder-shared/configuration-impact-review.md +76 -0
- package/skills/bpmax-builder-shared/template_script_hard_rules.py +3 -1
- package/skills/bpmax-builder-shared/tests/test_template_script_hard_rules.py +16 -0
- package/skills/bpmax-business-skill/SKILL.md +3 -1
- package/skills/bpmax-cli/SKILL.md +46 -0
- package/skills/bpmax-config-latest/SKILL.md +4 -0
- package/skills/bpmax-console-template-editor/SKILL.md +113 -523
- package/skills/bpmax-console-template-editor/agents/openai.yaml +2 -2
- package/skills/bpmax-console-template-editor/references/full-detail-guide.md +45 -0
- package/skills/bpmax-console-template-editor/references/local-temp-workflow.md +13 -12
- package/skills/bpmax-console-template-editor/scripts/console_template_editor_common.py +299 -78
- package/skills/bpmax-console-template-editor/tests/test_console_template_editor.py +344 -30
- package/skills/bpmax-dataset-field-template-editor/SKILL.md +131 -594
- package/skills/bpmax-dataset-field-template-editor/references/full-detail-guide.md +570 -0
- package/skills/bpmax-dataset-field-template-editor/references/nested-field-patterns.md +8 -8
- package/skills/bpmax-dataset-field-template-editor/references/runtime-verified-field-page-shape.md +1 -1
- package/skills/bpmax-dataset-field-template-editor/scripts/dataset_field_editor_common.py +11 -77
- package/skills/bpmax-dataset-field-template-editor/scripts/export_dataset_field.py +4 -57
- package/skills/bpmax-dataset-field-template-editor/scripts/init_create_dataset_field.py +2 -0
- package/skills/bpmax-dataset-field-template-editor/scripts/inspect_dataset_field_runtime.py +4 -78
- package/skills/bpmax-dataset-field-template-editor/scripts/submit_dataset_field.py +3 -89
- package/skills/bpmax-dataset-field-template-editor/tests/test_dataset_field_editor.py +14 -0
- package/skills/bpmax-dataset-field-template-editor/tests/test_init_create_dataset_field.py +2 -0
- package/skills/bpmax-dataset-template-editor/SKILL.md +123 -778
- package/skills/bpmax-dataset-template-editor/references/dataset-script-runtime-matrix.md +11 -0
- package/skills/bpmax-dataset-template-editor/references/full-detail-guide.md +753 -0
- package/skills/bpmax-dataset-template-editor/references/runtime-gotchas.md +12 -0
- package/skills/bpmax-dataset-template-editor/references/ui-to-backend-field-map.md +1 -0
- package/skills/bpmax-dataset-template-editor/references/work-file-to-submit-mapping.md +2 -2
- package/skills/bpmax-dataset-template-editor/scripts/basic_table_audit.py +8 -1
- package/skills/bpmax-dataset-template-editor/scripts/dataset_editor_common.py +9 -90
- package/skills/bpmax-dataset-template-editor/scripts/export_dataset.py +8 -1
- package/skills/bpmax-dataset-template-editor/scripts/resolve_dataset.py +8 -1
- package/skills/bpmax-dataset-template-editor/scripts/submit_dataset.py +1 -2
- package/skills/bpmax-dataset-template-editor/scripts/verify_dataset_list.py +8 -1
- package/skills/bpmax-dataset-template-editor/scripts/verify_publish_health.py +8 -1
- package/skills/bpmax-dataset-template-editor/tests/test_dataset_editor.py +6 -40
- package/skills/bpmax-e2e-flow-config-orchestrator/SKILL.md +18 -4
- package/skills/bpmax-e2e-flow-config-orchestrator/agents/openai.yaml +2 -2
- package/skills/bpmax-e2e-flow-config-orchestrator/references/orchestration-matrix.md +13 -9
- package/skills/bpmax-e2e-flow-test-operator/SKILL.md +174 -546
- package/skills/bpmax-e2e-flow-test-operator/agents/openai.yaml +2 -3
- package/skills/bpmax-e2e-flow-test-operator/references/ai-test-suite.md +181 -15
- package/skills/bpmax-e2e-flow-test-operator/references/browser-action-dsl.md +169 -0
- package/skills/bpmax-e2e-flow-test-operator/references/browser-only-checkpoints.md +15 -7
- package/skills/bpmax-e2e-flow-test-operator/references/full-detail-guide.md +589 -0
- package/skills/bpmax-e2e-flow-test-operator/references/minimal-test-loop.md +12 -8
- package/skills/bpmax-e2e-flow-test-operator/references/negative-sale-api-matrix.md +4 -4
- package/skills/bpmax-e2e-flow-test-operator/references/profile-schema.md +1 -1
- package/skills/bpmax-e2e-flow-test-operator/references/state-schema.md +3 -1
- package/skills/bpmax-e2e-flow-test-operator/scripts/e2e_doc.py +7 -5
- package/skills/bpmax-e2e-flow-test-operator/scripts/e2e_state.py +2 -2
- package/skills/bpmax-e2e-flow-test-operator/scripts/flow_runner.py +5 -1
- package/skills/bpmax-e2e-flow-test-operator/tests/test_negative_sale_api_tools.py +71 -0
- package/skills/bpmax-e2e-flow-test-operator-v2/SKILL.md +64 -0
- package/skills/bpmax-e2e-flow-test-operator-v2/agents/openai.yaml +7 -0
- package/skills/bpmax-e2e-flow-test-operator-v2/references/automation-generation-pipeline.md +33 -0
- package/skills/bpmax-e2e-flow-test-operator-v2/references/autonomous-execution.md +40 -0
- package/skills/bpmax-e2e-flow-test-operator-v2/references/batch-generation-and-execution.md +17 -0
- package/skills/bpmax-e2e-flow-test-operator-v2/references/browser-action-runner.md +19 -0
- package/skills/bpmax-e2e-flow-test-operator-v2/references/browser-recording-and-replay.md +95 -0
- package/skills/bpmax-e2e-flow-test-operator-v2/references/form-script-generation.md +41 -0
- package/skills/bpmax-e2e-flow-test-operator-v2/references/identity-and-failure-routing.md +92 -0
- package/skills/bpmax-e2e-flow-test-operator-v2/references/multi-request-mutation.md +9 -0
- package/skills/bpmax-e2e-flow-test-operator-v2/references/scenario-coverage-generation.md +17 -0
- package/skills/bpmax-e2e-flow-test-operator-v2/references/scoped-execution.md +13 -0
- package/skills/bpmax-e2e-flow-test-operator-v2/references/step-restartability-and-state.md +23 -0
- package/skills/bpmax-e2e-flow-test-operator-v2/references/test-assets-and-evidence.md +9 -0
- package/skills/bpmax-e2e-flow-test-operator-v2/references/test-data-and-selector-contract.md +51 -0
- package/skills/bpmax-e2e-flow-test-operator-v2/references/test-preflight-and-confirmation.md +32 -0
- package/skills/bpmax-filter-template-editor/SKILL.md +114 -551
- package/skills/bpmax-filter-template-editor/references/experience-coverage-matrix.md +18 -18
- package/skills/bpmax-filter-template-editor/references/filter-content-schema.md +21 -0
- package/skills/bpmax-filter-template-editor/references/filter-request-shape.md +29 -26
- package/skills/bpmax-filter-template-editor/references/filter-runtime-patterns.md +19 -2
- package/skills/bpmax-filter-template-editor/references/full-detail-guide.md +56 -0
- package/skills/bpmax-filter-template-editor/references/runtime-verified-filter-page-shape.md +10 -9
- package/skills/bpmax-filter-template-editor/scripts/filter_template_editor_common.py +7 -57
- package/skills/bpmax-filter-template-editor/tests/test_filter_template_editor.py +4 -48
- package/skills/bpmax-flow/SKILL.md +2 -0
- package/skills/bpmax-flow-detail-template-editor/SKILL.md +53 -0
- package/skills/bpmax-flow-template-editor/SKILL.md +132 -1137
- package/skills/bpmax-flow-template-editor/agents/openai.yaml +2 -2
- package/skills/bpmax-flow-template-editor/references/diff-strategy.md +3 -3
- package/skills/bpmax-flow-template-editor/references/editor-runtime-vs-draft.md +9 -9
- package/skills/bpmax-flow-template-editor/references/flow-template-api-workflow.md +2 -1
- package/skills/bpmax-flow-template-editor/references/full-detail-guide.md +1162 -0
- package/skills/bpmax-flow-template-editor/references/local-temp-workflow.md +1 -1
- package/skills/bpmax-flow-template-editor/references/message-card-professional-standard.md +234 -0
- package/skills/bpmax-flow-template-editor/references/payload-checklist.md +2 -0
- package/skills/bpmax-flow-template-editor/references/project-create-runtime-gotchas.md +17 -0
- package/skills/bpmax-flow-template-editor/references/requirement-to-node-mapping.md +8 -3
- package/skills/bpmax-flow-template-editor/references/runtime-verified-flow-detail-shape.md +7 -7
- package/skills/bpmax-flow-template-editor/references/runtime-verified-meta-fields.md +2 -2
- package/skills/bpmax-flow-template-editor/references/runtime-verified-node-fields.md +12 -2
- package/skills/bpmax-flow-template-editor/references/save-draft-request-shape.md +7 -23
- package/skills/bpmax-flow-template-editor/references/script-review-hard-rules.md +17 -0
- package/skills/bpmax-flow-template-editor/references/work-file-to-submit-mapping.md +1 -1
- package/skills/bpmax-flow-template-editor/tests/test_flow_template_editor.py +19 -75
- package/skills/bpmax-form-template-editor/SKILL.md +138 -1151
- package/skills/bpmax-form-template-editor/agents/openai.yaml +2 -2
- package/skills/bpmax-form-template-editor/references/dynamic-field-state.md +167 -0
- package/skills/bpmax-form-template-editor/references/form-template-api-workflow.md +51 -51
- package/skills/bpmax-form-template-editor/references/full-detail-guide.md +1115 -0
- package/skills/bpmax-form-template-editor/references/local-temp-workflow.md +4 -4
- package/skills/bpmax-form-template-editor/references/payload-checklist.md +3 -1
- package/skills/bpmax-form-template-editor/references/sub-form-patterns.md +6 -0
- package/skills/bpmax-form-template-editor/scripts/form_template_editor_common.py +8 -0
- package/skills/bpmax-form-template-editor/tests/test_form_template_editor.py +42 -19
- package/skills/bpmax-functional-test-design/LICENSE.upstream +24 -0
- package/skills/bpmax-functional-test-design/SKILL.md +80 -0
- package/skills/bpmax-functional-test-design/agents/openai.yaml +4 -0
- package/skills/bpmax-functional-test-design/references/bpmax-test-suite-output.md +95 -0
- package/skills/bpmax-functional-test-design/references/decision-table-testing.md +50 -0
- package/skills/bpmax-functional-test-design/references/domain-testing.md +43 -0
- package/skills/bpmax-functional-test-design/references/state-transition-testing.md +47 -0
- package/skills/bpmax-functional-test-design/references/technique-selection.md +38 -0
- package/skills/bpmax-functional-test-design/references/use-case-testing.md +55 -0
- package/skills/bpmax-group-model-editor/SKILL.md +24 -0
- package/skills/bpmax-home-portal-editor/SKILL.md +81 -0
- package/skills/bpmax-icon-catalog/SKILL.md +18 -0
- package/skills/bpmax-icon-catalog/agents/openai.yaml +4 -0
- package/skills/bpmax-icon-catalog/assets/ri-icons.json +3140 -0
- package/skills/bpmax-icon-catalog/references/source-contract.md +3 -0
- package/skills/bpmax-list-template-editor/SKILL.md +133 -466
- package/skills/bpmax-list-template-editor/agents/openai.yaml +2 -2
- package/skills/bpmax-list-template-editor/references/content-config-shape.md +16 -4
- package/skills/bpmax-list-template-editor/references/full-detail-guide.md +461 -0
- package/skills/bpmax-list-template-editor/references/list-template-api-workflow.md +6 -9
- package/skills/bpmax-list-template-editor/references/local-temp-workflow.md +1 -1
- package/skills/bpmax-list-template-editor/references/runtime-verified-workflow.md +50 -2
- package/skills/bpmax-list-template-editor/references/special-formats.md +5 -2
- package/skills/bpmax-list-template-editor/scripts/list_template_editor_common.py +9 -78
- package/skills/bpmax-memory-protocol/SKILL.md +7 -6
- package/skills/bpmax-nav-config-editor/SKILL.md +14 -17
- package/skills/bpmax-nav-config-editor/agents/openai.yaml +2 -2
- package/skills/bpmax-nav-config-editor/references/api-workflow.md +2 -2
- package/skills/bpmax-nav-config-editor/references/runtime-probing.md +11 -12
- package/skills/bpmax-page-composition-template-editor/SKILL.md +398 -0
- package/skills/bpmax-page-composition-template-editor/examples/presets/catalog.json +41 -0
- package/skills/bpmax-page-composition-template-editor/examples/presets/full-capability-workbench.json +294 -0
- package/skills/bpmax-page-composition-template-editor/examples/presets/project-detail-step-panel.json +184 -0
- package/skills/bpmax-page-composition-template-editor/examples/presets/project-list-quick-process.json +177 -0
- package/skills/bpmax-page-composition-template-editor/examples/presets/project-operations-dashboard.json +400 -0
- package/skills/bpmax-page-composition-template-editor/examples/presets/project-operations-visual-light.json +214 -0
- package/skills/bpmax-page-composition-template-editor/examples/presets/step-related-projects.json +184 -0
- package/skills/bpmax-page-composition-template-editor/references/resource-api.md +9 -0
- package/skills/bpmax-plugin-config/SKILL.md +55 -5
- package/skills/bpmax-project/SKILL.md +37 -1
- package/skills/bpmax-project-detail-template-editor/SKILL.md +13 -39
- package/skills/bpmax-project-detail-template-editor/agents/openai.yaml +2 -2
- package/skills/bpmax-role-editor/SKILL.md +11 -30
- package/skills/bpmax-shared/SKILL.md +19 -9
- package/skills/bpmax-team-editor/SKILL.md +27 -0
- package/skills/bpmax-ui-ux-audit/LICENSE.upstream +23 -0
- package/skills/bpmax-ui-ux-audit/SKILL.md +42 -0
- package/skills/bpmax-ui-ux-audit/agents/openai.yaml +4 -0
- package/skills/bpmax-ui-ux-audit/references/audit-framework.md +39 -0
- package/skills/bpmax-ui-ux-audit/references/bpmax-ux-findings.md +56 -0
- package/skills/bpmax-user/SKILL.md +33 -1
- package/skills/bpmax-user-mock-operator/SKILL.md +58 -56
- package/skills/bpmax-user-mock-operator/agents/openai.yaml +2 -2
- package/skills/bpmax-user-mock-operator/scripts/chrome_identity_bridge.mjs +1766 -0
- package/skills/bpmax-user-model-editor/SKILL.md +24 -0
- package/skills/bpmax-workspace-editor/SKILL.md +1 -0
- package/skills/form-control-library/references/form-template-submit-schema.md +3 -1
- package/skills/bpmax-user-mock-operator/scripts/switch_user_identity.py +0 -37
- package/skills/bpmax-user-mock-operator/scripts/user_mock_operator_common.py +0 -136
- package/skills/bpmax-user-mock-operator/tests/test_user_mock_operator.py +0 -138
|
@@ -0,0 +1,589 @@
|
|
|
1
|
+
# E2E Full Detail Guide
|
|
2
|
+
|
|
3
|
+
> 这是 bpmax-e2e-flow-test-operator 主 skill 瘦身前的完整细节归档。主入口只保留硬门禁和路由;命令样例、历史经验、接口骨架和 lint 细则在这里查阅。
|
|
4
|
+
|
|
5
|
+
## 全局范围门禁
|
|
6
|
+
- 范围 gate 对本 skill 是强要求。任何会修改 BPMAX 配置、线上状态、本地提交体或最终结果的动作,都必须先归类为 `requested`、`required-collateral` 或 `out-of-scope`。
|
|
7
|
+
- 范围 gate 必须基于线上最新配置:分析或编辑配置前,先通过对应 workflow/API 拉取或读取远端最新状态;提交前再次确认本地 work/submit/payload 仍基于该最新远端基线,若线上配置已变化必须停止并重新对照。
|
|
8
|
+
- 只有用户明确要求的 `requested`,或为闭合需求不可避免的 `required-collateral`,才允许进入 work / submit / 线上 payload / 状态变更。
|
|
9
|
+
- `required-collateral` 必须逐项解释“不改会坏/会失真/会不闭合”的原因并取得确认;`out-of-scope` 一律不得提交或顺手混入。
|
|
10
|
+
- 不得以历史脏配置、顺手修复、统一风格、编辑器自动补字段、方便调试为理由修改需求外配置。
|
|
11
|
+
|
|
12
|
+
## 何时使用
|
|
13
|
+
- 用户要在 BPMAX 中验证一条或多条业务流程是否真正可用。
|
|
14
|
+
- 用户要准备测试前置数据、跑场景、做失败复测、回归脚本/状态写回。
|
|
15
|
+
- 用户要把测试结果沉淀成 `.ai_test/report/<run>` 执行报告;`.codex/docs` 只放复盘、长周期总结或交付版文档。
|
|
16
|
+
- 用户要延续上一次 BPMAX 测试,而不希望重新解释全部上下文。
|
|
17
|
+
|
|
18
|
+
## 核心原则
|
|
19
|
+
- 开始前先查 [$bpmax-memory-protocol](../../bpmax-memory-protocol/SKILL.md),不要直接重复试错。
|
|
20
|
+
- 浏览器实时页面、实时接口返回、最新 live/draft 配置优先于本地镜像。
|
|
21
|
+
- 若用户要求“线上跑完整链路”“真实验证用户路径”或等价目标,必须在真实运行页面完成发起、填单、选择、提交、审批、驳回、回退等关键动作;不得用脚本、控制台、手改 request body 或接口直调绕过界面。
|
|
22
|
+
- 浏览器 E2E 中如果发起页、审批页或详情页的表单打不开、白屏、字段不渲染、按钮不可用,第一步必须检查浏览器 Console 和 Network 里的真实报错;优先解决 `form_template` 加载、表单控件渲染、`lambda`、`customeValidate`、`sub_form` 绑定等表单模板相关错误,再排查流程、权限、数据或缓存问题。
|
|
23
|
+
- 脚本最多只用于摸底、状态记录、接口回读、证据补充和首次抓请求骨架;即使用户明确接受“非页面路径”,也只能形成降级/诊断结论,不得写完整 E2E 通过。
|
|
24
|
+
- 浏览器 E2E 涉及多角色时,使用 [$bpmax-user-mock-operator](../../bpmax-user-mock-operator/SKILL.md) 切换当前浏览器身份;该能力只用于浏览器页面测试,不用于 API Key 冒充或 CLI 业务命令身份切换。
|
|
25
|
+
- 测试 H5 界面时,必须打开 `/m/#/...` H5 路由,并把页面可视区域(viewport)设置为 `412x844`;只允许调整页面 viewport,不要修改 Chrome/浏览器整个窗口的外层尺寸。
|
|
26
|
+
- 默认按“线上完整链路页面优先 / 非完整链路接口优先”分层推进:
|
|
27
|
+
- 线上完整链路:页面优先,必须走真实运行页真实操作;接口与脚本只做辅助,不替代用户路径
|
|
28
|
+
- 非完整链路或离线摸底:接口优先,可用于列表查询、项目创建、详情回读、步骤审批/驳回、筛选字段发现
|
|
29
|
+
- 页面兜底:导航入口可见性、页面真实文案/按钮、截图取证、首次抓真实请求骨架
|
|
30
|
+
- 首次脚本编译前的只读探索、页面指纹变化、未支持控件或异常诊断时,优先使用 `chrome:control-chrome`,复用用户当前 Chrome 的标签页、登录态和扩展能力;正式 run 前禁止业务 mutation,不要默认先用 Chrome DevTools 或独立 Playwright 探索页面。
|
|
31
|
+
- `chrome:control-chrome` 不可用,或按其浏览器连接/Chrome 扩展排障流程处理后仍失败时,才允许降级到 Chrome DevTools。Chrome DevTools 再出现 `Network.enable timed out`、快照长期不可用或页面通道挂住时,允许切换到 AppleScript 作为真实浏览器 E2E 备用通道;备用通道只能做 DOM 文本读取、按钮点击、输入框填写、截图和页面提交,不得改用接口直调替代页面动作。
|
|
32
|
+
- 使用 AppleScript 备用通道时仍必须记录:
|
|
33
|
+
- 触发兜底的 DevTools 错误
|
|
34
|
+
- 当前浏览器 URL
|
|
35
|
+
- 关键 DOM 文案或按钮存在性
|
|
36
|
+
- 点击/填写/提交动作
|
|
37
|
+
- 提交后的页面 URL、项目 ID、step ID 或截图证据
|
|
38
|
+
- 发布后优先用“发布后新建”的项目样本做判断;旧项目可能仍绑定旧 step/runtime 快照,不能直接代表最新 live 行为。
|
|
39
|
+
- 如果本轮先改了 live flow 的草稿,复测前必须确认该修复已经正式发布;不要拿“仅保存草稿”的版本去跑线上结论。默认顺序是:保存草稿 -> 回读确认 -> 正式发布 -> 用新样本复测。
|
|
40
|
+
- 如果本轮修复涉及节点级条件节点,回测必须覆盖所有分支下标路径;不要只验证默认分支或只验证画布显示。
|
|
41
|
+
- 如果本轮修复涉及“审批后才落库”的延后副作用,回测必须同时验证:
|
|
42
|
+
- 审批前无库存副作用
|
|
43
|
+
- 最终审批通过后才落库
|
|
44
|
+
- 除非用户明确要求把线上结果回写本地配置仓库,否则默认只做线上验证、状态记录和记忆沉淀;配置镜像可由后续统一同步链路回收。
|
|
45
|
+
- 只加载本次必需的 skill。常见顺序:
|
|
46
|
+
- 先用本 skill 编排
|
|
47
|
+
- 再按需要调用:
|
|
48
|
+
- [$bpmax-flow-template-editor](../../bpmax-flow-template-editor/SKILL.md)
|
|
49
|
+
- [$bpmax-form-template-editor](../../bpmax-form-template-editor/SKILL.md)
|
|
50
|
+
- [$bpmax-dataset-field-template-editor](../../bpmax-dataset-field-template-editor/SKILL.md)
|
|
51
|
+
- [$bpmax-dataset-template-editor](../../bpmax-dataset-template-editor/SKILL.md)
|
|
52
|
+
- [$bpmax-list-template-editor](../../bpmax-list-template-editor/SKILL.md)
|
|
53
|
+
- [$bpmax-filter-template-editor](../../bpmax-filter-template-editor/SKILL.md)
|
|
54
|
+
- [$bpmax-nav-config-editor](../../bpmax-nav-config-editor/SKILL.md)
|
|
55
|
+
- [$form-control-library](../../form-control-library/SKILL.md)
|
|
56
|
+
- [$bpmax-user-mock-operator](../../bpmax-user-mock-operator/SKILL.md)
|
|
57
|
+
- `feishu-doc-ops`
|
|
58
|
+
- 优先把测试过程写入本地状态文件,而不是在对话里反复长篇复述。
|
|
59
|
+
- 每发现一个“可复现、可复用”的坑,优先更新对应来源 skill 的 `references/`,不要只记在当前会话里。
|
|
60
|
+
- 只要用户要求“给出报告”“证明一下”“留测试结论”,默认产出带截图的测试报告;不要只给纯文字结论。
|
|
61
|
+
- 报告生成完成后,不要默认直接转飞书;先向用户确认是否需要生成飞书文档(若生成则通常要上传图片到图床),并追问需要授权给谁。
|
|
62
|
+
|
|
63
|
+
## 默认样板 Profile
|
|
64
|
+
- Profile 目录:`skills/bpmax-e2e-flow-test-operator/profiles/`
|
|
65
|
+
- 默认样板:`profiles/negative_sale.json`
|
|
66
|
+
- 通用脚本优先读 `--profile <name>`;若场景还未收进目录,改用 `--profile-file <path>`
|
|
67
|
+
|
|
68
|
+
## 重复操作加速模式
|
|
69
|
+
- E2E 加速分两层:`bpmax-cli e2e` 提供稳定、可复用、可审计的执行能力;本 skill 负责把这些能力编排成标准打法。不要每次靠 Agent 临场拼 shell、临场写浏览器点击步骤。
|
|
70
|
+
- 首次运行一条流程或一个复杂 step 前,必须先生成、审查并编译覆盖完整场景的 `automation.json`;`scenario plan`、`data profile` 和 reusable step template 只作为补充资产,不能替代正式脚本。
|
|
71
|
+
- 哪怕本轮只跑一次,也要把 handoff、step-run、浏览器截图、DOM/URL、console/network、submit/readback 证据落到稳定目录,便于下一次直接复用或从失败点恢复。
|
|
72
|
+
- `bpmax-cli test-suite lint` 会检查每条非 deprecated E2E 用例是否具备正式运行所需的确定性脚本覆盖;仍存在 `browser` 或缺少 automation 映射时,不要直接判业务失败,而是读取输出中的 `e2e_acceleration.bootstrap_required=true` 和 `missing_cases`。`e2e_create_page`、`e2e_step_run` 已退出正式 schema,只允许 automation init/compile 读取旧草稿并迁为 `browser_action`。
|
|
73
|
+
- 稳定浏览器步骤应升级为 `runner=browser_action`,场景目录提供 `automation.json`。lint 会逐步校验动作映射、页面指纹、语义选择器、断言、动态 ID、mutation 重试策略和 `operation_flow` 的修复/续跑策略,并输出 `automation_coverage`。
|
|
74
|
+
- 正常复跑只使用一次 `bpmax-cli e2e scenario execute` 作为场景主入口;公开 `browser-run` 直接调用会硬阻断,任何正式页面步骤都不能由 Agent 组合成逐步执行循环。每个 case step 最多一个远端 mutation。首次脚本准备、`cache_stale`、未支持控件和异常诊断优先使用 `chrome:control-chrome`。
|
|
75
|
+
- mutation 前异常会写 operation-flow checkpoint 和 repair request,manifest 当前步骤保持 `planned`。真正 dispatch mutation 前,CLI 先把同一尝试和目标 checkpoint 写入 manifest `mutation_attempt_guard`,再保存 checkpoint,并让 runner 的 `mutation-state.json` 使用同一 attempt ID;checkpoint 或 evidence 被删除也不能绕过该 guard。每个 mutation 步骤必须为 committed/not_committed 分别声明强 `resolution_checks`。每个浏览器步骤必须以首个 `navigation.open` 或 `page_fingerprint.route` 提供可在新进程恢复的步骤起点,并把恢复本步所需的幂等前置动作写进当前步骤;不得依赖上一进程的 `{{context.*}}`。在 draft 修复当前或未来脚本并重新 compile/review 后,先用 `test-suite automation repair` 应用到本轮副本;CLI 会先把 source/review/checkpoint/旧新脚本和 receipt hash 写入 manifest repair guard,再替换脚本,因此进程中断只能恢复同一笔修复。execute、resolve、repair 共用 manifest operation lock,已通过步骤由哈希锁定,不能修改或重放。
|
|
76
|
+
- mutation intent 已记录但结果不确定时禁止 resume,也不能通过更换 report root 新建同 scenario/case/profile run。证据必须区分 `mutation_attempted`、`mutation_request_observed` 和 `remote_submitted`,不能因为写入 guard 已建立就声称远端已提交。`e2e scenario resolve` 使用两个独立页面分别执行 committed/not_committed 的只读 `resolution_checks`,必须且只能有一个分支通过;未观察到目标写请求时,可以在 not_committed 分支用 `mutation.assert_no_request` 核对本轮网络证据,但还必须有实时路由、环节或列表记录检查。`--outcome` 只用于核对预期,不能选择最终结论。CLI 生成本轮截图、DOM、trace、source evidence、`resolution-receipt.json` 和 `evidence-files.json`,并把 receipt/source/file-manifest SHA-256 锚定到 manifest guard。证据必须绑定当前 run nonce、checkpoint revision、mutation attempt ID、case/step 和 automation step hash;手写或仅文件内自洽的 resolution bundle 不能形成结论。只有明确 `not_committed` 才能重试,明确 `committed` 则由正式证据推进步骤。
|
|
77
|
+
- `--resume` 仅继续当前未完成 run。用户要求重新运行、全量重跑或当前 manifest 已完成时,必须新建 run;历史 pass、status matrix 或缓存不能跳过本轮 case。
|
|
78
|
+
- 发现 `bootstrap_required=true` 时,先执行 `test-suite automation init`,依据平台源码和 Chrome Control 只读探索补齐脚本,再执行 `test-suite automation compile`。不得先手工跑一次正式用例;`record-from-evidence` 只用于确定性运行后细化 reusable step template。
|
|
79
|
+
- 缓存执行不是无条件信任旧模板。每个 reusable step template 必须包含 `expected_checks`,复用时 `bpmax-cli e2e step-run --data-profile @...` 会先检查当前运行态模式是否仍符合预期,例如处理人可处理、step 未结束、必填字段集合、缺失字段范围、动作仍存在。
|
|
80
|
+
- 处理人判定必须优先使用当前有效 owner/assignee;`step.user_id` 只能作为辅助字段。若它与 owner 冲突,或只有 `user_id` 没有权威 owner 证明,step-run 必须阻断,不能生成可提交计划。
|
|
81
|
+
- 如果 `expected_checks` 缺失、失败,或没有拿到预期范围内的结果,必须把该 step 判为 `cache_stale`,停止继续提交后续步骤;不要把缓存失效误判为业务失败,也不要继续用旧 payload 硬推。
|
|
82
|
+
- 缓存失效时优先自动重建当前步骤缓存:
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
bpmax-cli e2e step-run \
|
|
86
|
+
--project-id <project_id> \
|
|
87
|
+
--data-profile @.codex/e2e-templates/<scenario-step>.json \
|
|
88
|
+
--auto-refresh-cache \
|
|
89
|
+
--cache-out .codex/e2e-templates/<scenario-step>.json \
|
|
90
|
+
--evidence-dir .codex/tmp/e2e/<run> \
|
|
91
|
+
--format json
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
- 自动刷新后的模板只能说明“当前运行态模式已重新采样”。如果新模板显示新增必填字段、处理人不可处理、动作消失或 step 已结束,必须先补数据/换样本/修配置,再复跑;不得把刷新后的缓存当作通过结论。
|
|
95
|
+
- 成功通过一次的复杂 step,必须沉淀模板:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
bpmax-cli e2e record-from-evidence \
|
|
99
|
+
--project-id <project_id> \
|
|
100
|
+
--step-id <step_id> \
|
|
101
|
+
--evidence-dir .codex/tmp/e2e/<run> \
|
|
102
|
+
--out .codex/e2e-templates/<scenario-step>.json \
|
|
103
|
+
--format json
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
- 推进审批/处理节点时优先使用批量安全链路,而不是反复手跑 `step context/actions/requirements/submit`:
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
bpmax-cli e2e step-run \
|
|
110
|
+
--project-id <project_id> \
|
|
111
|
+
--data-profile @.codex/e2e-templates/<scenario-step>.json \
|
|
112
|
+
--evidence-dir .codex/tmp/e2e/<run> \
|
|
113
|
+
--format json
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
- 页面提交类操作仍然必须走真实浏览器。优先使用:
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
bpmax-cli project create --flow-id <flow_id> --json @payload.json --handoff-only --format json
|
|
120
|
+
bpmax-cli e2e create-page-submit \
|
|
121
|
+
--handoff-json @handoff.json \
|
|
122
|
+
--assert-fields "字段A,字段B" \
|
|
123
|
+
--evidence-dir .codex/tmp/e2e/<run>/browser \
|
|
124
|
+
--format json
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
- `e2e create-page-submit` / `e2e browser-template create-form` 生成的是页面自动化模板,不是 raw API 创建。必须执行生成的 Playwright 脚本或等价真实浏览器操作,并保存截图、URL、DOM 摘要、console/network 错误和 `project_id` 解析结果,才能写“页面回归通过”。
|
|
128
|
+
- `test-suite run start` 后先核对真实样本、测试身份、入口、主数据和依赖状态,把至少一条命名明确且 `passed=true` 的检查写入本轮结构化 precondition evidence,再运行 `test-suite run precondition`。只有返回 `state=passed` 才能开始正式页面执行;文件名含本轮 run 但记录不存在、仍为 pending、引用旧证据或登记后哈希变化都必须阻断。
|
|
129
|
+
- 批量场景优先声明 `.codex/e2e-plans/<scenario>.json`,前置检查通过后再运行:
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
bpmax-cli e2e scenario execute \
|
|
133
|
+
--plan .codex/e2e-plans/<scenario>.json \
|
|
134
|
+
--automation .ai_test/report/<run>/automation.json \
|
|
135
|
+
--execution-manifest .ai_test/report/<run>/execution-manifest.json \
|
|
136
|
+
--format json
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
其中 automation 路径必须直接使用 `test-suite run start` 返回的本轮副本,不得改回 suite/draft 文件。命令返回 `functional_complete` 只表示功能步骤完成,正式结论仍需 UX 审计和 `lint-report`;`formal_conclusion_ready=false` 时不得宣布通过。命令返回 `paused_repairable` 时,先在 reviewed draft 完成修复,再执行:
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
bpmax-cli test-suite automation repair \
|
|
143
|
+
--checkpoint .ai_test/report/<run>/operation-flow-state.json \
|
|
144
|
+
--automation .ai_test/suite_draft/<scenario>/automation.json \
|
|
145
|
+
--format json
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
确认返回 `repair_receipt` 后,才对同一 execute 命令增加 `--resume`。`paused_external_action` 需先完成对应外部动作;`paused_write_state_unknown` 必须先 resolve,不能直接 repair 或 resume。
|
|
149
|
+
|
|
150
|
+
- 旧 `scenario run` 只保留 dry-run/status matrix 兼容用途,不能执行页面,也禁止使用 `--resume` 表示真实复跑。
|
|
151
|
+
- 确定性 runner 仍必须逐步骤产生本轮真实截图和运行态证据;没有这些证据时不得把执行计划当成完整链路通过。
|
|
152
|
+
- 对表单 schema、字段 options、step requirements 反复探测时,先使用 runtime cache:
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
bpmax-cli e2e cache inspect --flow-id <flow_id> --profile <profile> --format json
|
|
156
|
+
bpmax-cli e2e cache refresh --flow-id <flow_id> --profile <profile> --format json
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
- 所有加速命令仍必须遵守本 skill 的页面证据门禁:创建页、选择器、自动回填、详情页展示、列表可见性等用户路径结论必须来自真实浏览器,不得把接口提交伪装成页面回归。
|
|
160
|
+
|
|
161
|
+
## `.ai_test` 用例资产管理
|
|
162
|
+
- 可复用测试用例统一放在项目目录 `.ai_test/`,运行状态仍放在 `.codex/tmp/e2e_states/`;不要把二者混用。
|
|
163
|
+
- 生成、检查、更新用例资产前,必须先运行当前仓库对应的 latest sync,并显式使用允许脏工作区的安全参数,再把证明写入 `.codex/tmp/ai_test_suite/latest-<env>-proof.json`。缺少 `--latest-proof` 时,CLI 必须拒绝 lint/index/draft-update/promote。
|
|
164
|
+
- `.ai_test` suite 的 lint、review init/repair/explain、draft-update、promote 都使用 `bpmax-cli test-suite` 的 TypeScript 实现;不要新增或调用旧 Python suite 脚本作为主路径。
|
|
165
|
+
- 固定目录:
|
|
166
|
+
- 正式用例:`.ai_test/suite/<scenario_id>/`
|
|
167
|
+
- 待确认草稿:`.ai_test/suite_draft/<scenario_id>/`
|
|
168
|
+
- 执行报告:`.ai_test/report/<YYYYMMDD-NNN>/`
|
|
169
|
+
- 每个场景目录必须包含 `README.md`、`cases.csv` 和 `case_steps.csv`;`cases.csv` 不再保存聚合 steps,`case_steps.csv` 必须一行一个动作。promote 前还必须包含合格 `review.json`,且 execution_operability 逐步 review、未解决 P0/P1 为 0。
|
|
170
|
+
- `review.json` 不要凭记忆手写结构。优先运行:
|
|
171
|
+
- `bpmax-cli test-suite review explain --format json` 查看完整 schema。
|
|
172
|
+
- `bpmax-cli test-suite review init --scenario <scenario_id> --draft-root .ai_test/suite_draft --latest-proof <proof.json> --format json` 生成最小合法草稿。
|
|
173
|
+
- `bpmax-cli test-suite review repair --scenario <scenario_id> --draft-root .ai_test/suite_draft --latest-proof <proof.json> --format json` 修补已有 review 缺失字段。
|
|
174
|
+
- `review.json` 最小结构必须包含:
|
|
175
|
+
- 顶层:`scenario_id`、`reviewed_at`、`status`、`latest_proof`、`perspectives`、`unresolved`、`fixes`。
|
|
176
|
+
- `perspectives` 必须有 `structure_lint`、`business_coverage`、`execution_operability`、`config_consistency`。
|
|
177
|
+
- `config_consistency` 必须有 `case_judgments` 和 `missing_case_review`;每条 judgment 必须含 `case_id`、`status`、`config_basis_checked`、`evidence`。
|
|
178
|
+
- `unresolved.P0` 和 `unresolved.P1` 必须都是 `0`。
|
|
179
|
+
- `cases.csv` 字段必须固定为:`case_id,priority,type,title,preconditions,config_basis,prep_data,expected_result,test_data,roles,evidence_required,tags,status,updated_at`。
|
|
180
|
+
- `case_steps.csv` 字段必须固定为:`case_id,step_id,step_no,actor,runner,action,target,input_data,expected_result,evidence_required`。禁止把多个动作聚合在一行。
|
|
181
|
+
- `config_basis` 必须指向真实存在的配置或能力依据,并说明覆盖原因。配置仓库使用 `think_*`、`.ai_test/`、`.codex/skills/`;`bpmax-cli` 包内能力可引用 `skills/`。
|
|
182
|
+
- 每条正式 E2E 用例的 `prep_data` 必须包含执行前置证据:`precondition_check=`、`browser_tool=`、`live_draft=`、`state_file=` 或 `report_run=`,并必须声明 `resume_policy=full_rerun|checkpoint|evidence_only`。默认重新运行使用 `resume_policy=full_rerun`;`precondition_check` 必须最终落到 `run start` 生成且 manifest 锚定的本轮 canonical record,没有记录、记录 pending 或 checks 未全部通过时不能执行正式步骤。
|
|
183
|
+
- `state_file=` / `report_run=` 不得写死历史 run 或历史日期。正式用例模板应使用 `<run_id>` / `<date>` 占位,执行时再生成本轮独立状态文件和报告目录;历史状态、历史报告、历史截图只能作为“历史对照”,不能作为本轮 pass evidence。
|
|
184
|
+
- 用例内容必须可读,`title`、`preconditions`、`config_basis`、`prep_data`、`steps`、`expected_result`、`test_data` 不得出现乱码、异常编码片段、`???`、`xxx`、`占位`、`待补`、`暂无`、`略` 这类空洞内容;`steps` 必须是可执行步骤,不得是一句泛泛备注。
|
|
185
|
+
- 负向、边界、异常、错误提示、扫码错误 SN 等用例必须在 `expected_result`、`steps` 或 `evidence_required` 中写明 `expected_error_text` 或 `error_capture_required`,并要求真实错误提示截图。没拿到提示文案时,结论写“提示文案未取到”,不要直接判业务失败。
|
|
186
|
+
- 涉及人工介入、手工补救、续跑、`dirty_resumed` 的用例,必须在 `prep_data` 或步骤中声明 `resume_policy=full_rerun|checkpoint|evidence_only`,并说明是从头重跑、检查点重跑还是仅补证据;局部续跑只能给局部结论。
|
|
187
|
+
- 多角色用例必须在 `prep_data`/`roles`/`evidence_required` 中记录 `login_profile`、`mock_user`、`unmock_done` 或 `bpmax-user-mock-operator`,并要求每个角色单独截图,不能复用一个角色的截图。
|
|
188
|
+
- `test_data` 不是占位字段,必须说明客户真实业务场景和业务逻辑,且必须写成结构化 `key=value`:
|
|
189
|
+
- `业务场景=`:说明客户实际会发生的业务动作或业务对象,例如客户换货、采购审批、库存调拨、费用报销。
|
|
190
|
+
- `业务逻辑=`:说明这组数据为什么能验证流程逻辑,例如一退一发、金额分级审批、库存占用后释放、审批矩阵命中。
|
|
191
|
+
- `样本数据=`:说明可复测样本的真实业务属性,不得写 `sample`、`test`、`mock`、`xxx`、`占位`、`待补`。
|
|
192
|
+
- `合理性=`:说明这组样本为什么符合客户业务规则、权限边界、主数据关系或上下游约束。
|
|
193
|
+
- `bpmax-cli test-suite lint` 会硬检查 `test_data` 是否包含 `业务场景=`、`业务逻辑=`、`样本数据=`、`合理性=`,且 `样本数据=` 不得是泛化占位值,不得包含 token、cookie、手机号、密码、Authorization 或完整 payload。
|
|
194
|
+
- `bpmax-cli test-suite lint` 还会硬检查前置证据、错误提示截图要求、人工介入续跑策略、多角色证据隔离和内容乱码/占位文本。新增 lint 文案使用中文说明,机器字段仍保持稳定英文 code/rule_id。
|
|
195
|
+
- 如果 `test_data` 语义对齐失败,先运行 `bpmax-cli test-suite lint --explain ...`,再按 CLI 输出的 title/preconditions/steps/expected 关键词重写 `业务场景=`。不要为了过 lint 把无关业务词塞进 `test_data`。
|
|
196
|
+
- 生成或更新用例必须先落到 `.ai_test/suite_draft/`,执行 lint 并向用户概要说明后,得到用户确认才允许 promote 到 `.ai_test/suite/`。
|
|
197
|
+
- 共享 suite 的单流程更新必须显式维护该流程的 `scenario_ids`,并用可重复的 `--scenario` 做隔离 lint。不要让其他流程的 case、review 或 acceleration gap 阻断当前流程,也不要把 scoped lint 描述成全仓 suite 通过。
|
|
198
|
+
- 一个流程有多个 scenario 时,先一次 lint 全部目标 scenario,再逐场景 review;全部通过后,在一次 promote 命令中重复传入同一 `flow_type` 的全部 `--scenario`。CLI 在任何复制前完成全组预检,禁止部分晋级。
|
|
199
|
+
- 从正式用例复制到草稿,或从草稿 promote 到正式用例时,如果目标场景目录已经存在,第一次 `--replace` 只生成 copy diff preview,不覆盖目标;必须审阅 diff 后第二次显式追加 `--diff-reviewed`。
|
|
200
|
+
- `draft-update` / `promote` 输出 `copy_diff_summary` 时,必须检查新增/删除/修改 case 数、`changed_case_ids`、`README.md` 和 `review.json` 是否变化;不能只看命令成功。
|
|
201
|
+
- 优先使用 `bpmax-cli test-suite` 原生命令:
|
|
202
|
+
|
|
203
|
+
```bash
|
|
204
|
+
bpmax-cli test-suite lint --root .ai_test/suite_draft --scenario <scenario_id> --latest-proof .codex/tmp/ai_test_suite/latest-<env>-proof.json
|
|
205
|
+
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
|
|
206
|
+
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
|
|
207
|
+
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
|
|
208
|
+
bpmax-cli test-suite index --root .ai_test/suite --latest-proof .codex/tmp/ai_test_suite/latest-<env>-proof.json
|
|
209
|
+
bpmax-cli test-suite draft-update --scenario <scenario_id> --replace --latest-proof .codex/tmp/ai_test_suite/latest-<env>-proof.json
|
|
210
|
+
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
|
|
211
|
+
bpmax-cli test-suite next-report-dir --root .ai_test/report --create
|
|
212
|
+
bpmax-cli test-suite lint-report --root .ai_test/report
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
`test-suite` 的 JSON 错误输出应使用稳定英文 `code/rule_id/path`,用户可见 `message/suggestion` 使用中文;普通文本输出也应可直接给实施人员阅读。
|
|
216
|
+
|
|
217
|
+
### 报告完整性门禁
|
|
218
|
+
- 单次执行报告必须位于 `.ai_test/report/<YYYYMMDD-NNN>/`,截图必须位于同一 run 的 `screenshots/` 下;`.codex/docs/` 只放复盘、长周期总结或交付版文档,并引用 `run_id` 和原始报告路径。
|
|
219
|
+
- 用 `bpmax-functional-test-design` 固化功能覆盖,用 `bpmax-ui-ux-audit` 审计本轮页面;报告必须引用同目录 `ux-findings.json`。UX 审计未完成时只能写 `partial` 或 `blocked`。
|
|
220
|
+
- 所有确认体验问题都按 BUG 管理:未解决 P0/P1 强制 `fail`;只有未解决 P2/P3 时用 `pass-with-warnings`;无未解决 UX BUG 且功能与证据门禁都通过才允许 `pass`。`verified` 必须保留原始证据和晚于原始证据的本轮 `retest_evidence`。
|
|
221
|
+
- 场景报告必须写 `planned_cases:`、`executed_cases:`、`planned_steps:`、`executed_steps:`、`execution_manifest:`、`precondition_check:`、`state_file:`、`report_run:`、`browser_tool:`、`rerun_policy:`。case 与 step 都必须逐条对账;有未执行步骤时只能写阶段/局部结论。
|
|
222
|
+
- `precondition_check:` 必须引用 execution manifest 锚定的本轮结构化记录,并校验 record/evidence SHA-256、run/scenario/case/profile 和全量 passed checks;仅靠路径文字、日期或旧状态文件不能通过。
|
|
223
|
+
- 报告出现 `not run`、`未执行`、`跳过` 时,`result:` 必须降级为 `partial`、`stage`、`blocked` 或明确“阶段/局部/不完整”。没有用户确认缩小范围时,不得把跳过用例合并进完整结论。
|
|
224
|
+
- 没有合规浏览器工具或页面证据时,必须使用浏览器阻塞模板:`browser_status: blocked`,并写“页面结论停止”;不得用 API/readback 证据冒充页面验证。
|
|
225
|
+
- 报告里写“页面通过 / 浏览器回归完成 / 真实页面已验证 / 完整链路通过”时,必须同时有 `browser_tool:`、本 run 的本地截图证据和结构化运行态字段:`runtime_url:`、`runtime_user:` 或 `runtime_profile:`、`browser_action_log:`、`visible_assertions:`、`project_id:` 或 `step_id:`。
|
|
226
|
+
- 接口回读、缓存命中、状态矩阵只能作为辅助证据;如果缺少真实浏览器动作日志和可见断言,只能写 `diagnostic` / `partial`,不能写完整页面通过。
|
|
227
|
+
- 用户明确要求“重新运行测试用例”“全量重跑”“重新回归”时,报告必须写 `rerun_policy: full_rerun`,并逐 case 重新执行。禁止直接查找旧结果、旧报告、旧状态文件或旧截图来填充本轮 `executed_cases`、pass 结论或页面证据。
|
|
228
|
+
- `full_rerun` 报告的 `run_id:` 必须等于当前 `.ai_test/report/<YYYYMMDD-NNN>/` 目录名;`state_file:`、`precondition_check:`、`report_run:` 必须指向本轮 run 或本轮日期;截图文件必须位于本轮 `screenshots/` 且修改时间落在本轮 `started_at` / `finished_at` 时间窗内。
|
|
229
|
+
- `checkpoint` / `evidence_only` 只能给局部或对照结论。若使用历史报告或历史截图,必须标成历史对照,不得声明“完整重新运行通过”。
|
|
230
|
+
- 每个 `executed_cases` 中的通过用例,都必须在结果表、截图 alt/path、项目 ID、step ID 或本轮证据路径中能定位到当前 case;缺少本轮 case evidence 时,不能写 pass。
|
|
231
|
+
|
|
232
|
+
### 测试资产与真实页面回归边界
|
|
233
|
+
- 更新 `.ai_test/suite_draft`、通过 lint、完成 review、promote 到 `.ai_test/suite`,只能证明“测试资产已更新”,不等于已经完成真实页面回归。
|
|
234
|
+
- 真实页面回归必须另行记录:浏览器 URL、当前用户/模拟用户、关键操作、截图、项目 ID/step ID、接口或数据回读证据。
|
|
235
|
+
- 最终输出必须显式区分:
|
|
236
|
+
- `已更新测试资产`
|
|
237
|
+
- `已执行浏览器回归`
|
|
238
|
+
- `发现需配置修复但尚未执行`
|
|
239
|
+
|
|
240
|
+
## 负卖配置样板流程
|
|
241
|
+
- 工作区:`store_mgr`
|
|
242
|
+
- `flow_type`:`flow288204142`
|
|
243
|
+
- 数据集:从 profile 的 `data_set_local_ref` 定位本地镜像;真实远端配置必须使用数字 ID 或 `data_set_key`
|
|
244
|
+
- 列表模板:从 profile 的 `list_template_local_ref` 定位本地镜像;真实远端配置必须使用数字页面模板 ID
|
|
245
|
+
- 筛选模板:从 profile 的 `filter_template_local_ref` 定位本地镜像;真实远端配置必须使用数字页面模板 ID
|
|
246
|
+
- 表单模板:`负卖配置表`
|
|
247
|
+
- 审批链:`经销商负责人审批 -> 修改配置 -> 区域经理审批 -> 零售业务部审批 -> 生效中`
|
|
248
|
+
- `*_local_ref` 只用于 E2E 脚本读取本地 sysconfig 镜像,不得作为 BPMAX 配置 ID 提交。
|
|
249
|
+
|
|
250
|
+
## 最小工作流
|
|
251
|
+
|
|
252
|
+
### 1. 先查记忆
|
|
253
|
+
- 任务开始前,先用 [$bpmax-memory-protocol](../../bpmax-memory-protocol/SKILL.md) 搜索:
|
|
254
|
+
- 业务名
|
|
255
|
+
- `flow_type`
|
|
256
|
+
- 关联 `form_template` / `data_set` / `flow_page_template`
|
|
257
|
+
- 当前目标动作:如“回归”“补录”“状态写回”“待接受”
|
|
258
|
+
- 不要把返回 JSON 全贴给用户,只提炼关键约束和已知坑点。
|
|
259
|
+
|
|
260
|
+
### 1.5 先充分准备前置依赖数据
|
|
261
|
+
- 在真正跑场景前,先把“能否发起 / 能否流转 / 能否看见结果”依赖的数据条件补齐,不要一边点页面一边碰运气。
|
|
262
|
+
- 测试数据必须像客户真实业务会产生的数据,而不是为了通过表单校验临时拼出来的数据。设计用例时要先问清或推导:
|
|
263
|
+
- 客户真实业务对象是什么,例如 SN、物料、供应商、合同、费用、门店、库存、审批人。
|
|
264
|
+
- 这些对象之间有什么业务关系,例如旧机和新机一一对应、采购金额决定审批层级、门店库存决定可申请数量。
|
|
265
|
+
- 哪些数据值是边界值或异常值,例如超库存、跨门店、金额阈值、无审批人、重复单据。
|
|
266
|
+
- 数据跑完后应产生什么业务后果,例如库存变化、列表可见、数据集落库、消息通知、子流程自动创建。
|
|
267
|
+
- 写 `.ai_test` 用例时,`prep_data` 负责说明“怎么准备”,`test_data` 负责说明“准备什么真实业务数据、为什么符合客户业务逻辑”。两者都必须能指导另一个 Agent 复测。
|
|
268
|
+
- 至少检查并准备这几类前置项:
|
|
269
|
+
- 发起账号是否在目标工作区、目标流程有可见和可提单权限
|
|
270
|
+
- 当前浏览器是否已经打开目标流程的真实运行页,而不是配置页、旧缓存页或其他流程页
|
|
271
|
+
- 发起表单依赖的主数据是否存在:
|
|
272
|
+
- 可选 SKU / 物料编码
|
|
273
|
+
- 关联库存货品
|
|
274
|
+
- 建议零售价来源数据
|
|
275
|
+
- 需要下拉或自动带出的引用值
|
|
276
|
+
- 若流程依赖 SN、库存、在库状态、原销售单、原库存单、关联项目等业务对象,必须先准备一组“可安全复测”的新样本,不要默认复用旧样本
|
|
277
|
+
- 若流程后续需要审批、自动发起子流程或数据集入索引,先确认:
|
|
278
|
+
- 审批人可达
|
|
279
|
+
- 自动触发链路已发布
|
|
280
|
+
- 列表模板 / 筛选器 / 数据集吃的是 live 最新配置
|
|
281
|
+
- 建议把前置依赖准备单独记一条状态,再进入正式场景,例如:
|
|
282
|
+
- 样本 SKU
|
|
283
|
+
- 样本 SN
|
|
284
|
+
- 预期目标环节
|
|
285
|
+
- 预期自动联动的项目类型
|
|
286
|
+
- 若发现依赖数据不足,优先补数据或重造样本,再开始场景;不要把“缺前置数据”误判成流程故障。
|
|
287
|
+
|
|
288
|
+
### 1.6 多角色浏览器身份切换
|
|
289
|
+
- 这一节只适用于浏览器 E2E 页面测试。不要把模拟用户身份用于 API Key、CLI 远端命令或非页面路径结论。
|
|
290
|
+
- 正式 `case_steps.csv` 只允许 `browser_action`、`identity`、`observe`;身份 status/mock/unmock 步骤必须使用 `runner=identity`,并在 `input_data` 声明 `identity_transport=chrome_bridge`。旧 `e2e_create_page`、`e2e_step_run` 只能在 draft 中作为待迁移输入,不能通过正式 lint/review/promote。
|
|
291
|
+
- 多角色场景必须先列出角色矩阵:
|
|
292
|
+
- 原始管理账号
|
|
293
|
+
- 目标角色
|
|
294
|
+
- 目标用户 id / 用户名
|
|
295
|
+
- 该角色要完成的浏览器动作
|
|
296
|
+
- 预期可见入口、按钮、表单或审批权限
|
|
297
|
+
- 切换角色时调用 [$bpmax-user-mock-operator](../../bpmax-user-mock-operator/SKILL.md):CLI 生成一次性 request,`chrome:control-chrome` 在独立 BPMAX 标签页真实操作用户管理页,CLI 再 complete 验收脱敏身份、截图和 lease。不得导出 Cookie,也不得在页面内执行 fetch 替代真实 UI。
|
|
298
|
+
- mock 前必须有本轮 status 步骤;每个 mock 必须有后续 unmock 步骤。helper 或 CLI 任一验证失败,都不得继续该角色的浏览器步骤。
|
|
299
|
+
- 完成该角色动作后,记录:
|
|
300
|
+
- role
|
|
301
|
+
- target_user_id / target_user_name
|
|
302
|
+
- mocked 状态
|
|
303
|
+
- workspace
|
|
304
|
+
- 页面截图或关键 UI 证据
|
|
305
|
+
- project_id / step_id 等运行时样本
|
|
306
|
+
- 测试结束必须在 finally 中执行 unmock,并确认 `identity-lease.json` 为 `released`;TTL 是过期阻断和恢复提醒,不是可替代 finally 的后台自动点击器。
|
|
307
|
+
|
|
308
|
+
### 2. 初始化本地测试状态
|
|
309
|
+
- 用脚本初始化或续写测试状态:
|
|
310
|
+
|
|
311
|
+
```bash
|
|
312
|
+
PYTHON_BIN=./venv/bin/python
|
|
313
|
+
[[ -x "$PYTHON_BIN" ]] || PYTHON_BIN=./.venv/bin/python
|
|
314
|
+
[[ -x "$PYTHON_BIN" ]] || PYTHON_BIN=python3
|
|
315
|
+
|
|
316
|
+
"$PYTHON_BIN" skills/bpmax-e2e-flow-test-operator/scripts/e2e_state.py init \
|
|
317
|
+
--id customer-exchange-retro \
|
|
318
|
+
--title "客户换货补录整链路回归" \
|
|
319
|
+
--workspace store_mgr \
|
|
320
|
+
--flow-type flow451422190
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
- 状态文件默认落在:
|
|
324
|
+
- `.codex/tmp/e2e_states/<id>.json`
|
|
325
|
+
- 只把这些信息写进去:
|
|
326
|
+
- 目标流程
|
|
327
|
+
- 关键依赖
|
|
328
|
+
- 场景矩阵
|
|
329
|
+
- 当前样本项目 ID
|
|
330
|
+
- 已知问题
|
|
331
|
+
- 接口证据、浏览器保留点、运行时绑定
|
|
332
|
+
- 下一步
|
|
333
|
+
|
|
334
|
+
### 3. 做最小依赖确认
|
|
335
|
+
- 先确认 4 件事,再开始点页面:
|
|
336
|
+
- 当前浏览器页是否就是目标流程/表单/列表
|
|
337
|
+
- live 和 draft 哪个在测
|
|
338
|
+
- 数据集/列表模板/筛选器是否吃的是最新配置
|
|
339
|
+
- 是否存在历史项目缓存影响复测
|
|
340
|
+
- 如果本轮刚发布过流程脚本或路由,额外确认当前待测项目是不是“发布后新建”的项目;不是的话,优先新建样本项目再测。
|
|
341
|
+
- 复测默认优先用新样本;只有用户明确要求时才在旧项目上“撤回后重测”。
|
|
342
|
+
|
|
343
|
+
### 3.5 接口诊断骨架
|
|
344
|
+
- 这一节只适用于“非完整链路验证 / 离线摸底 / 状态记录 / 接口取证”。如果目标是线上完整链路回归,本节脚本只能辅助,不得替代页面上的真实发起、流转和审批动作,也不得写完整 E2E 通过。
|
|
345
|
+
- 这组脚本是通用接口骨架,不为单一流程单独分叉;流程差异通过 profile 文件声明,CLI 只做少量覆盖。
|
|
346
|
+
- 可用于诊断的历史脚本:
|
|
347
|
+
- `scripts/bpmax_session.py`
|
|
348
|
+
- `scripts/flow_api_matrix.py`
|
|
349
|
+
- `scripts/flow_form_runtime.py`
|
|
350
|
+
- `scripts/flow_filter_fields.py`
|
|
351
|
+
- `scripts/flow_runner.py`
|
|
352
|
+
- 常用参数:
|
|
353
|
+
- `--profile <name>` 或 `--profile-file <path>`
|
|
354
|
+
- `--header-file <json>` 或环境变量 `BPMAX_EXTRA_HEADERS_JSON`
|
|
355
|
+
- `--flow-type` / `--data-set-uuid` / `--form-template-uuid` 等 CLI 覆盖
|
|
356
|
+
- 通用接口诊断闭环:
|
|
357
|
+
1. `flow_api_matrix.py --profile <name>` 输出对象映射、接口矩阵、fallback、浏览器保留点
|
|
358
|
+
2. `flow_form_runtime.py create-skeleton --profile <name>` 生成创建骨架
|
|
359
|
+
3. `flow_runner.py --profile <name> create` 创建项目,再用 `flow_runner.py --profile <name> detail --project-id <id>` 回读
|
|
360
|
+
4. `flow_runner.py --profile <name> approve` 或 `reject` 推进/退回流程
|
|
361
|
+
5. `flow_runner.py --profile <name> filter` 回列表并校验筛选字段,必要时用 `list` 做列表回查
|
|
362
|
+
- `flow_runner.py` 会自动把顶层场景结果写入 `e2e_state` 的 `scenarios/artifacts/endpoint_calls/runtime_bindings`;成功时状态只能是 `diagnostic`,不能写成 `pass` 或完整 E2E 通过。
|
|
363
|
+
- 场景差异默认落到 profile:
|
|
364
|
+
- 对象绑定、终态节点、筛选优先字段
|
|
365
|
+
- endpoint fallback
|
|
366
|
+
- 字段级 mapper
|
|
367
|
+
- 浏览器保留点
|
|
368
|
+
- 只有这些情况才考虑加 hook 或人工判定:
|
|
369
|
+
- 标准控件 mapper 无法生成合法请求值
|
|
370
|
+
- 节点审批 body 必须额外保留运行时特有字段
|
|
371
|
+
- 页面真实入口/文案/显隐需要截图验真
|
|
372
|
+
- 仅在以下情况退回浏览器:
|
|
373
|
+
- 需要截图证据
|
|
374
|
+
- 当前流程没有现成真实请求骨架
|
|
375
|
+
- 需要确认页面真实入口、文案或按钮显隐
|
|
376
|
+
|
|
377
|
+
### 4. 跑单个场景的标准回路
|
|
378
|
+
1. 写入场景开始记录
|
|
379
|
+
2. 核对前置数据
|
|
380
|
+
3. 按目标选择路径:
|
|
381
|
+
- 若为线上完整链路:优先走真实页面操作,接口脚本仅做辅助取证、回读和状态记录
|
|
382
|
+
- 若为非完整链路或离线摸底:优先走接口脚本,必要时浏览器兜底
|
|
383
|
+
4. 记录项目 ID / step ID / 关键接口结果
|
|
384
|
+
5. 记录结论:`pass` / `fail` / `blocked`
|
|
385
|
+
6. 若失败:
|
|
386
|
+
- 先定位是配置问题、环境问题、旧样本问题还是前端缓存问题
|
|
387
|
+
- 修复后必须用新样本或明确升级 flow 配置后再测
|
|
388
|
+
7. 把结果写回状态文件
|
|
389
|
+
|
|
390
|
+
接口证据建议同时写入:
|
|
391
|
+
- `artifact`
|
|
392
|
+
- `endpoint`
|
|
393
|
+
- `runtime-binding`
|
|
394
|
+
- `browser-step`
|
|
395
|
+
|
|
396
|
+
记录命令:
|
|
397
|
+
|
|
398
|
+
```bash
|
|
399
|
+
"$PYTHON_BIN" skills/bpmax-e2e-flow-test-operator/scripts/e2e_state.py record \
|
|
400
|
+
--id customer-exchange-retro \
|
|
401
|
+
--scenario S03 \
|
|
402
|
+
--status pass \
|
|
403
|
+
--sample "customer_exchange=7974,sales_outbound=7975,old_inventory=7976,new_inventory=7910" \
|
|
404
|
+
--note "旧机客户换货在库,新机客户换货出库"
|
|
405
|
+
|
|
406
|
+
"$PYTHON_BIN" skills/bpmax-e2e-flow-test-operator/scripts/e2e_state.py endpoint \
|
|
407
|
+
--id customer-exchange-retro \
|
|
408
|
+
--method POST \
|
|
409
|
+
--path /bpmax/project/list \
|
|
410
|
+
--status 200 \
|
|
411
|
+
--note "列表页回查样本项目"
|
|
412
|
+
```
|
|
413
|
+
|
|
414
|
+
### 5. 失败后的修复闭环
|
|
415
|
+
- 修配置时,回到对应 skill,不在本 skill 里重复定义实现细节。
|
|
416
|
+
- 修完后立刻复测当前失败场景,不要先跳去跑别的场景。
|
|
417
|
+
- 如果失败原因是 bpmax-cli、test-suite、E2E 命令、skill lint 或诊断文案自身的问题,而不是客户业务配置或运行态数据问题,按 [$bpmax-cli](../../bpmax-cli/SKILL.md) 的 “Issue 提报” 规则创建 bpmax-cli issue:先写精简描述文件,先跑 `bpmax-cli issue create ... --dry-run --format json`,确认无 token、API Key、cookie、手机号、密码、Authorization、完整 payload 或客户敏感数据后再正式创建,并在结论里记录 `issue.web_url`。
|
|
418
|
+
- 客户配置缺陷、流程运行态缺陷、业务数据不足或权限缺口,默认写入本轮 E2E 报告、任务书或修复清单;除非用户明确要求,不要把这类问题提成 bpmax-cli issue。
|
|
419
|
+
- 如果失败原因是稳定反模式,更新来源 skill:
|
|
420
|
+
- 流程脚本问题:更新 [$bpmax-flow-template-editor](../../bpmax-flow-template-editor/SKILL.md) 或其 `references/`
|
|
421
|
+
- 表单显隐/校验问题:更新 [$bpmax-form-template-editor](../../bpmax-form-template-editor/SKILL.md) 或其 `references/`
|
|
422
|
+
- 数据集/列表问题:更新对应 skill
|
|
423
|
+
|
|
424
|
+
### 6. 输出测试文档
|
|
425
|
+
- 单次执行报告默认写到 `.ai_test/report/<YYYYMMDD-NNN>/`;交付版或长周期总结可另写到 `.codex/docs/`
|
|
426
|
+
- 结构参考现有流程测试文档:
|
|
427
|
+
- 流程范围
|
|
428
|
+
- 执行结论与证据边界
|
|
429
|
+
- 已测场景/样本
|
|
430
|
+
- 已修复问题
|
|
431
|
+
- 尚存缺口
|
|
432
|
+
- 给测试人员的操作手册
|
|
433
|
+
- 只要报告里提到“页面真实报错 / 页面真实结果 / 运行态证明”,就应补截图证据:
|
|
434
|
+
- 优先截真实运行页,不要只截编辑器或接口返回
|
|
435
|
+
- 截图文件默认放到当前 run 的 `.ai_test/report/<YYYYMMDD-NNN>/screenshots/`
|
|
436
|
+
- 文档里要明确标注每张截图对应的场景、样本和结论
|
|
437
|
+
- 先从状态文件生成草稿,再人工补关键判断,避免重复组织材料。
|
|
438
|
+
- 报告完成后,默认收尾动作不是直接导飞书,而是先确认两件事:
|
|
439
|
+
- 是否需要生成飞书文档版
|
|
440
|
+
- 若需要授权协作者,授权给谁(手机号或邮箱)
|
|
441
|
+
- 若用户确认要飞书版,再调用 `feishu-doc-ops`:
|
|
442
|
+
- 若文档含本地截图,先把图片上传到图床并替换成公网 URL
|
|
443
|
+
- 再导入飞书文档
|
|
444
|
+
- 最后按用户指定手机号或邮箱授权
|
|
445
|
+
|
|
446
|
+
旧 `scripts/e2e_doc.py` 只允许生成接口/脚本诊断草稿,不能作为重新运行报告或完整 E2E 通过报告。正式报告必须创建 `.ai_test/report/<YYYYMMDD-NNN>/`,补齐 `run_id`、`rerun_policy`、case/step planned-executed 对账、`execution_manifest`、`started_at`、`finished_at`、本轮 `screenshots/`、双 skill 元数据和 `ux-findings.json`,并运行 `bpmax-cli test-suite lint-report`。
|
|
447
|
+
|
|
448
|
+
## 强制约束
|
|
449
|
+
- 不要一开始就同时打开太多配置面;按“流程/表单/数据集/列表/筛选器/导航/测试”最小闭环推进。
|
|
450
|
+
- 不要把草稿接口、画布显示、运行时行为混为一谈;测试以运行时行为为准。
|
|
451
|
+
- 若任务是线上完整链路实测,关键用户动作必须在真实运行页完成;不要用脚本、控制台或接口直调代替页面点击、输入、选择、提交和审批。
|
|
452
|
+
- H5 运行态测试必须用 `412x844` 页面 viewport 模拟移动端显示;不要通过拖拽或窗口级 resize 改变浏览器整个窗口尺寸。
|
|
453
|
+
- 如果判断必须用脚本绕过界面,先明确向用户说明原因、绕过范围和风险,并得到用户确认;未确认前不得执行这类脚本。
|
|
454
|
+
- 测试前必须对照需求、设计稿、流程说明或用户口头确认的字段清单,核对发起页、审批页、详情页中的表单字段是否符合设计;核对范围至少包括字段是否存在、中文名称、控件类型、必填/只读/隐藏/可编辑、默认值、自动回填、下拉/选择器数据源、校验提示、字段顺序或分组;如果无法取得设计依据,必须把“设计依据缺失”标成 `blocked` 或测试缺口,不得写成已验证通过。
|
|
455
|
+
- 测试前必须审计流程节点页模板和操作方式:
|
|
456
|
+
- 填写当前环节表单的节点,应绑定“项目详情 + 当前环节表单填写模块”模板。
|
|
457
|
+
- 审批/审核/确认/验收类节点,应绑定“项目详情”模板。
|
|
458
|
+
- 打回修改、发起人补充等关联项目表单节点,应绑定“只填写项目表单”模板,且不能同时挂独立环节表单模板。
|
|
459
|
+
- 带子流程联动的父流程节点应禁止人工直接处理;如果页面仍展示通过/驳回/提交等人工操作,要标为配置缺陷并修复后再回归。
|
|
460
|
+
- 测试项目列表页时,必须核对列表模板字段与当前表单、数据集一致:
|
|
461
|
+
- 列表业务列读取的 key 必须存在于发起表单、节点表单或当前流程数据集字段中。
|
|
462
|
+
- 列表模板绑定的数据集必须是当前流程实际使用的数据集。
|
|
463
|
+
- 页面验收要确认真实数据能渲染到对应列,不能只用接口回读模板成功作为通过依据。
|
|
464
|
+
- 列表字段要逐个检查并在报告中列出:列名、读取 key/脚本、对应字段来源、业务语义判断、页面渲染结论。
|
|
465
|
+
- 不要把同一个失败样本反复当成新结论;状态文件里要标记“是否旧样本”。
|
|
466
|
+
- 不要在没有截图证据的情况下,把“已验证 / 已证明 / 页面真实报错”写进最终测试报告。
|
|
467
|
+
- 不要在未确认用户意愿和授权对象前,直接创建飞书文档或默认分享给某个人。
|
|
468
|
+
- 只在这些时点写 mem0:
|
|
469
|
+
- 发现稳定约束
|
|
470
|
+
- 发现稳定反模式
|
|
471
|
+
- 完成一轮阶段性回归
|
|
472
|
+
- 会话即将结束
|
|
473
|
+
|
|
474
|
+
## 跨场景经验沉淀
|
|
475
|
+
|
|
476
|
+
### 1. 先准备样本池,不要边点边赌
|
|
477
|
+
- 只要任务涉及 SN 全周期、退换货、价格方案、负卖或样机,默认先准备一组可安全复测的新样本池。
|
|
478
|
+
- 最少要分开准备这些样本:
|
|
479
|
+
- `SAP 命中`
|
|
480
|
+
- `CRM 兜底`
|
|
481
|
+
- `名称兜底`
|
|
482
|
+
- `他经销商库存`
|
|
483
|
+
- `样机库存`
|
|
484
|
+
- `已售/已占用库存`
|
|
485
|
+
- `可通行价格方案样本`
|
|
486
|
+
- `负卖规则生效样本`
|
|
487
|
+
- 不要把“样本已被别的流程消费”“当前门店已存在同物料样机”“旧样本创建于修复前”误判成 live 新缺陷。
|
|
488
|
+
|
|
489
|
+
### 2. 先分清三类结论
|
|
490
|
+
- `本轮 current live 实测`
|
|
491
|
+
- `同环境既有浏览器证据复用`
|
|
492
|
+
- `仅接口/脚本结论,尚未补页面截图`
|
|
493
|
+
- 最终报告里必须把这三类分开写,不要混成一个“已通过”。
|
|
494
|
+
|
|
495
|
+
### 3. 浏览器页要优先看真实字段,而不是只看接口
|
|
496
|
+
- 页面上要强制核对:
|
|
497
|
+
- 自动回填字段是否正确
|
|
498
|
+
- 字段是否可见、隐藏、只读、可编辑
|
|
499
|
+
- 错误提示是否出现在真实控件下方
|
|
500
|
+
- 详情页是否和创建页口径一致
|
|
501
|
+
- 对选择器型字段,不要因为接口能查到数据就判定页面一定可用;必须真实选择一次并观察回填。
|
|
502
|
+
|
|
503
|
+
### 4. 价格和负卖都必须测“展示口径 + 校验口径 + 落库口径”
|
|
504
|
+
- 价格方案至少同时看三处:
|
|
505
|
+
- 创建页是否带价
|
|
506
|
+
- 提交后项目详情是否带价
|
|
507
|
+
- 下游库存/消费流程是否沿用同一价格
|
|
508
|
+
- 负卖至少同时看三处:
|
|
509
|
+
- 规则详情页显示值
|
|
510
|
+
- 销售出库创建页可卖数量
|
|
511
|
+
- 提交后占用/剩余是否与创建页口径一致
|
|
512
|
+
|
|
513
|
+
### 5. 终态样本和历史样本要单独处理
|
|
514
|
+
- 新逻辑发布后,旧样本详情页可能不会追溯修复。
|
|
515
|
+
- 若旧样本与新样本表现不一致,先区分:
|
|
516
|
+
- `旧样本不追溯`:不是新缺陷
|
|
517
|
+
- `发布后新样本仍失败`:才是当前 live 缺陷
|
|
518
|
+
- 报告里必须明确写“旧样本只做对照,不作为发布后闭环结论”。
|
|
519
|
+
|
|
520
|
+
### 6. 多角色测试不能共用 cookie
|
|
521
|
+
- 经销商负责人、门店店员、审批人、管理员默认都应使用独立登录态。
|
|
522
|
+
- 若要验证店员角色,必须补这两种证据:
|
|
523
|
+
- 门店是否自动带出
|
|
524
|
+
- 门店编辑按钮是否禁用
|
|
525
|
+
|
|
526
|
+
### 7. 每个场景都要单独收口问题和建议
|
|
527
|
+
- 报告里不要只给总问题清单。
|
|
528
|
+
- 每个场景组至少要有:
|
|
529
|
+
- 当前结论
|
|
530
|
+
- 问题摘要
|
|
531
|
+
- 修改建议
|
|
532
|
+
- 关键证据
|
|
533
|
+
|
|
534
|
+
## Lint 标准
|
|
535
|
+
|
|
536
|
+
### A. 前置数据 lint
|
|
537
|
+
- 没有准备样本池前,不要开始正式回归。
|
|
538
|
+
- 没有确认审批人可达前,不要宣称“整链路可跑通”。
|
|
539
|
+
- 没有确认当前页是 live 运行页前,不要记录页面结论。
|
|
540
|
+
- `.ai_test` 用例的 `test_data` 没有写清 `业务场景=`、`业务逻辑=`、`样本数据=`、`合理性=` 时,不得进入正式回归。
|
|
541
|
+
- `样本数据=` 只写 `sample`、`test`、`mock`、`xxx`、`占位`、`待补` 等占位内容时,必须判定为 lint 失败。
|
|
542
|
+
- `test_data` 出现 token、cookie、手机号、密码、Authorization、`payload=`、`headers=` 或完整请求体时,必须判定为 lint 失败。
|
|
543
|
+
- `业务场景=` 必须和用例标题、前置条件、执行步骤或预期结果中的业务对象对得上;不能写一个泛泛的“客户真实场景”糊弄通过。
|
|
544
|
+
|
|
545
|
+
### B. 页面证据 lint
|
|
546
|
+
- 没有截图,不得写“页面真实报错”“页面真实带出”“页面真实可见/不可见”。
|
|
547
|
+
- 只有接口返回,没有创建页或详情页证据,不得写“前端已修复”。
|
|
548
|
+
- 只截编辑器、接口响应、日志页,不足以证明运行态行为。
|
|
549
|
+
|
|
550
|
+
### C. 字段检查 lint
|
|
551
|
+
- 未核对“设计应有字段”与“运行态实际字段”的差异前,不得宣称表单验证完成。
|
|
552
|
+
- 发现多字段、少字段、字段名称不一致、控件类型不一致、必填/只读/显隐不一致,必须记录为问题或明确标注为已由用户确认接受。
|
|
553
|
+
- 报告中涉及字段一致性结论时,应说明对照依据,例如需求描述、设计稿、配置页、表单模板或用户确认。
|
|
554
|
+
- 任何自动回填场景都必须核对:
|
|
555
|
+
- `名称类字段`
|
|
556
|
+
- `编码类字段`
|
|
557
|
+
- `价格/额度类字段`
|
|
558
|
+
- `关联项目ID/库存ID`
|
|
559
|
+
- 任何只读规则都必须核对:
|
|
560
|
+
- 值是否正确
|
|
561
|
+
- 是否真的不可编辑
|
|
562
|
+
- 任何异常后重录场景都必须核对脏值是否清空。
|
|
563
|
+
|
|
564
|
+
### D. 口径一致性 lint
|
|
565
|
+
- 价格类问题不允许只看创建页,不看详情页和下游消费页。
|
|
566
|
+
- 负卖类问题不允许只看规则详情,不看销售页和边界数量提示。
|
|
567
|
+
- 库存副作用问题不允许只看主项目终态,不看库存项目当前环节和业务状态。
|
|
568
|
+
|
|
569
|
+
### E. 新旧样本 lint
|
|
570
|
+
- 用修复前旧样本得出的失败结论,不能直接记成当前 live 失败。
|
|
571
|
+
- 修复发布后必须优先造一个新样本再复测。
|
|
572
|
+
- 如果只能复用旧样本,报告里必须显式标记为“旧样本对照”。
|
|
573
|
+
|
|
574
|
+
### F. 问题归因 lint
|
|
575
|
+
- 缺样本、错角色、旧 cookie、旧项目快照,这四类不能直接记成配置 bug。
|
|
576
|
+
- 如果页面报错和接口回读矛盾,优先保留双证据,再判断是前端显示层还是流程脚本问题。
|
|
577
|
+
- 如果一个问题只在某个角色下复现,必须写清角色和门店/经销商上下文。
|
|
578
|
+
|
|
579
|
+
## 推荐参考
|
|
580
|
+
- 最小测试回路与判定:`minimal-test-loop.md`
|
|
581
|
+
- 状态文件字段说明:`state-schema.md`
|
|
582
|
+
- Profile 规范:`profile-schema.md`
|
|
583
|
+
- 失败更新原则:`failure-update-loop.md`
|
|
584
|
+
- 旧项目快照与干净样本策略:`stale-runtime-and-clean-sample-rules.md`
|
|
585
|
+
- 负卖配置接口矩阵:`negative-sale-api-matrix.md`
|
|
586
|
+
- 浏览器保留点:`browser-only-checkpoints.md`
|
|
587
|
+
- 筛选字段发现规则:`filter-field-discovery.md`
|
|
588
|
+
- 经验教训覆盖矩阵:`skill-experience-coverage-matrix.md`
|
|
589
|
+
- `.ai_test` 用例资产规范:`ai-test-suite.md`
|
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
# 最小测试回路
|
|
2
2
|
|
|
3
|
+
稳定页面步骤必须先执行 `test-suite automation init`,依据平台源码和 Chrome Control 只读探索生成、review 并 compile 整个场景的 `automation.json`;完成 scoped lint/review/promote 后,才由 `test-suite run start` 创建本轮 run,并复制、绑定本轮专用 automation。先准备真实样本并用 `test-suite run precondition` 登记 manifest 锚定的本轮 passed checks,随后才用一次 `e2e scenario execute` 执行确定性操作流程。每个步骤最多一个远端 mutation,mutation 必须分别声明 committed/not_committed 的强 `resolution_checks`,并要能用自己的导航或页面路由在新浏览器进程中重建起点,不依赖上一进程的临时 context。Agent 不得反复读取 next step 后临场点击;所有正式 `browser_action` 都不得直接调用 `browser-run`。execute、resolve 和 automation repair 对同一 manifest 共用 operation lock。页面指纹失效或 mutation 前异常时停在当前步骤,只能在 reviewed draft 修脚本并通过 `test-suite automation repair` 应用到本轮副本;CLI 先在 manifest 锚定修复来源、旧新脚本和不可变 receipt,再更新本轮副本,异常中断后只恢复同一笔 repair。`functional_complete` 仍不是正式通过,必须完成 UX 审计并通过 `lint-report`。已完成 manifest 不得 resume,重新运行必须创建新 run 和新证据;但存在未决 mutation guard 时,必须先 resolve,不能新建 run 绕过。
|
|
4
|
+
|
|
3
5
|
每个 BPMAX 场景默认按这个顺序走:
|
|
4
6
|
|
|
5
7
|
1. 查记忆
|
|
6
|
-
2. 读当前 live/draft
|
|
7
|
-
3.
|
|
8
|
-
4.
|
|
9
|
-
5.
|
|
10
|
-
6.
|
|
11
|
-
7.
|
|
12
|
-
8.
|
|
13
|
-
9.
|
|
8
|
+
2. 读当前 live/draft 与平台源码,必要时只读探索浏览器页
|
|
9
|
+
3. 生成、review、compile 确定性脚本并通过 scoped lint/review/promote
|
|
10
|
+
4. 创建新的正式 run,确认前置数据
|
|
11
|
+
5. 若场景涉及多角色,由操作流程器在对应 identity 步骤暂停并完成受控身份切换
|
|
12
|
+
6. 一次执行场景操作流程,直到完成或受控暂停
|
|
13
|
+
7. 记录样本 ID、关键接口、当前环节、业务字段、当前角色
|
|
14
|
+
8. 判定 `pass / fail / blocked`
|
|
15
|
+
9. 多角色场景使用 Chrome Control 身份桥;mock 前先 status,结束后在 finally 中 unmock,并验证恢复原始身份和 lease released
|
|
16
|
+
10. 如果是 mutation 前可修复异常,按 repair request 修改当前/未来脚本,或修复 runner/控件/环境兼容,通过 manifest 锚定 receipt 后再从步骤断点续跑;如果 mutation 结果不确定,分别运行 committed/not_committed 两组只读检查并要求唯一命中,再生成 Playwright readback 和 manifest 锚定的 resolution receipt,禁止手写证据、调用方指定结论、直接重试或换 report root 新建同用例 run
|
|
17
|
+
11. 只有不可修复错误或明确 blocker 才终止 manifest;完整结束后再做报告 lint
|
|
14
18
|
|
|
15
19
|
判定优先级:
|
|
16
20
|
- 运行时真实行为
|