一键导入
x4-test-run
Run change-scoped tests, apply result updates, and maintain run sedimentation docs. Trigger with /x4:test-run <change-name>.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Run change-scoped tests, apply result updates, and maintain run sedimentation docs. Trigger with /x4:test-run <change-name>.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when x4-e2e-test-doc-details needs fixture patch rules or helper guidance for X4 E2E test data.
Use when refining X4 `e2e_tests.md` into detailed E2E task, fixture, and implementation knowledge documents before Playwright implementation.
Use when creating or updating only the high-level X4 E2E test plan `e2e_tests.md` before detail expansion.
Review X4 E2E test documentation draft and gate x4-e2e-test-doc completion. Must run in a dedicated isolated subagent. Trigger with /x4:e2e-test-doc-viewer <change-name>.
Implement Playwright E2E tests for X4 changes from `e2e_test_tasks.md` and validate task-to-test mapping. Trigger with /x4:e2e-test-impl <change-name>.
Run change-scoped X4 Playwright E2E tests and validate implementation coverage against `e2e_test_tasks.md`. Trigger with /x4:e2e-test-run <change-name>.
| name | x4-test-run |
| description | Run change-scoped tests, apply result updates, and maintain run sedimentation docs. Trigger with /x4:test-run <change-name>. |
| metadata | {"version":"1.0"} |
This skill executes test batches for a change and applies run-result updates.
User invokes /x4:test-run <change_name>
Run tests, classify failures, apply result updates to test_tasks.md via script, and maintain agent-side experience sedimentation in knowledge.md.
<change_name>: target change under openspec/changes/.openspec/changes/<change-name> target before any action.Resolved change: <change-name>.openspec/changes/<change-name>/test_tasks.mdopenspec/changes/<change-name>/knowledge.mdopenspec/test_experience.mdtests/unit/<change-name>/ and tests/e2e/<change-name>/knowledge.md and global discoveries in test_experience.md.npm run build before Playwright.状态:)切换:)test_defectproduct_bugFailure classification rules (MANDATORY):
test_defect when failures are caused by test implementation issues, including:
product_bug when failures are caused by product behavior defects, including:
test_defect with minimal test-side checks/fixesproduct_bugproduct_bug and hand off to bug workflow for reproduction confirmationtest_tasks.md; test_tasks.md updates are script-only.经验沉淀 in knowledge.md.# 测试运行 with task-tree style entries.[✓][✗]knowledge.md anchor structure unchanged; # 测试运行 is additive.test_experience.md.test_tasks.md only.Each batch must provide:
x.x.x or x.x.x.n)Unmentioned cases remain unchanged.
For failed case:
[✗][✓][ ][✗]For passed case:
[✓][✓]On apply failure, script supports --json and returns:
[{"case":"1"|"1.1"|"1.1.1"|"1.1.1.1"|"global","desc":"Desc","error_code":"CODE","error_msg":"Message"}]
Apply Test Results to test_tasks.md:
# Apply success cases only
python3 skill-scripts/apply_test_results.py <change-name> \
--successes "1.1,1.2,2.1"
# Apply failure cases with fail markers
python3 skill-scripts/apply_test_results.py <change-name> \
--failures "1.1" \
--fail-steps "1.1.1"
# Apply mixed success and failure cases
python3 skill-scripts/apply_test_results.py <change-name> \
--successes "1.2,2.1" \
--failures "1.1" \
--fail-steps "1.1.2"
# Apply with JSON output for error handling
python3 skill-scripts/apply_test_results.py <change-name> \
--successes "1.1" \
--failures "1.2" \
--fail-steps "1.2.1" \
--json
Parameter Description:
<change-name>: target change directory name (e.g., storage-auto-fill)--successes: comma-separated case IDs that passed (format: x.x)--failures: comma-separated case IDs that failed (format: x.x)--fail-steps: comma-separated failure marker IDs (format: x.x.x or x.x.x.n)--json: output errors in JSON format for programmatic parsingtest_tasks.md apply summary (script result)knowledge.mdtest_experience.md/x4:test-run storage-auto-fill