Loading...
Loading...
End-to-end functional testing framework for Huawei Cloud skills — three-tier pipeline covering single-skill unit testing, multi-skill orchestration, and end-to-end full flow testing. Each phase produces structured JSON output with chain verification. Supports skill installation validation, functional analysis, CLI→SDK→API feasibility research, test case generation, real-environment execution with resource lifecycle, resource cleanup, multi-skill scenario orchestration, trigger-conflict detection, and consolidated reporting. Triggers include: 测试技能, 执行技能测试, 跑测试流程, 技能回归测试, skill test, run skill tests, test huawei cloud skill, verify skill, 测试华为云skill, 全流程测试, 编排测试, 技能完整性检查, skill-tester, 跑测试, 回归测试, 组合测试, 多skill编排, verification, e2e.
npx skill4agent add huaweicloud/huaweicloud-skills huawei-cloud-skill-testerIndependent, repeatable Huawei Cloud Skill testing framework. Does not depend on skill-creator; can test any existing Huawei Cloud Skill. Focuses on real-environment functional testing and multi-skill orchestration scenarios.
| Tier | Phases | Goal |
|---|---|---|
| Tier 1: Single-Skill Unit Testing | Phase 0~4 | Verify each skill item by item: installation, feature extraction, technical research, test case generation, execution |
| Tier 2: Integration Testing | Phase 5~6 | Multi-skill orchestration scenario derivation + end-to-end real-environment flow verification |
| Tier 3: Final Report | Phase 7 | Consolidated report merging all phase outputs |
--skills "skill-a,skill-b"--all-installed--no-siblingsUser Input (--skills or --all-installed)
│
├── Tier 1 ──── Iterate over each skill ────
│ Phase 0 → 1 → 2 → 3 → 4
│ (phase-N-summary.json chain validation)
│
├── Tier 2 ──── Integration ────
│ Phase 5 (orchestration scenario derivation + real-environment execution)
│ Phase 6 (e2e full-flow: create→query→update→delete lifecycle)
│ Only 1 skill → Downgrade single-skill closed loop
│
└── Tier 3 ──── Final ────
Phase 7 (merge phase-0~6 JSON into consolidated report)huaweicloudsdkHUAWEIHWHWCreferences/agent-protocol.md$SKILL_INSTALL_DIR/~/.agents/skills/~/.hermes/skills/Tier 1: Single-Skill Unit Testing
Phase 0: Installation Verification (install/uninstall/reinstall)
Phase 1: Feature Extraction (metadata + commands + resource types + doc checks)
Phase 2: Technical Research (CLI→SDK→API three-level availability)
Phase 3: Test Case Generation (functional TC-F + boundary + negative + API TC-A)
Phase 4: Real-Environment Execution (read-only automatic + write ops require confirmation)
Tier 2: Integration Testing — Real-Environment Orchestration
Phase 5: Multi-Skill Orchestration (conflict scan / scenario derivation / self-check)
Phase 6: End-to-End Flow (resource lifecycle: create→query→update→delete)
Tier 3: Final Report
Phase 7: Consolidated Report (merge phase-0~6 JSON, verdict + issues + reasons)各 Phase 的完整实现规范(步骤、判定标准、JSON 字段)见。references/phase-details.md
| Phase | 名称 | 核心要点 | 判定 |
|---|---|---|---|
| 0 | 安装验证 | 目录完整性(SKILL.md + references/ + iam-policies.md 硬性, scripts/ 软性兼容纯 CLI skill); install/uninstall/reinstall(同路径/符号链接防护) | 目录四件套 + 生命周期 |
| 1 | 功能提取 | metadata/triggers/commands/capabilities/resource_types + doc_checks(引用一致性、禁用文件 .bak/.template) | 命令与触发词非空 |
| 2 | 技术调研 | CLI→SDK→API 三级可用性; 纯本地工具自动标记 not_applicable | 按可用性计数 |
| 3 | 用例生成 | 正向 + 边界(limit=1) + 负向(未知参数)用例; 占位符替换(/path/to、./xxx、{region}); 模板/交互命令过滤 | 用例数 > 0 |
| 4 | 执行 | 自动执行 + 输出质量判定(rc=0 空输出→warn); 负向用例报错质量; 文档缺口分析(doc_gap_issues); 依赖缺失标注 | pass/fail/warn/skip |
| 5 | 编排 | 多 skill: 触发词冲突扫描 + 数据流候选; 单 skill: 降级自检(内部歧义 + 写操作排序) | conflict scan |
| 6 | 全流程 | 多 skill: 场景派生; 单 skill: 降级完整功能闭环(create→query→update→delete) | scenario steps |
| 7 | 报告 | 合并 phase-0~6; verdict + pass_rate + issues_found + 各 phase reason; test-report.json/md | 汇总判定 |
详细步骤、链式验证规则、JSON schema 见与references/phase-details.md。references/output-schema-spec.md
bashhcloudhcloudhcloud <Service> <Operation> --cli-region={region} [--param1=value1 ...]| Rule | Description |
|---|---|
| Service name | Follows KooCLI Services (uppercase: ECS, VPC, OBS; title case: CloudPond, IAMAccessAnalyzer) |
| Operation name | PascalCase (e.g., ListServersDetails, ListBuckets) |
| Region | Always include |
| Parameters | Use |
| Read-only limit | Always append |
hcloud obshcloud obs <command> [args...] [options...]# Specify skills
bash scripts/run-test-pipeline.sh --skills "huawei-cloud-bss-voucher-manage"
# Specify multiple skills (comma-separated)
bash scripts/run-test-pipeline.sh --skills "huawei-cloud-bss-voucher-manage, huawei-cloud-ecs-manage"
# Scan all installed
bash scripts/run-test-pipeline.sh --all-installed
# Start from a specific phase (recovery scenarios only)
bash scripts/run-test-pipeline.sh --skills "bss-voucher" --phase 4
# Fresh mode
bash scripts/run-test-pipeline.sh --skills "bss-voucher" --freshbash scripts/tier1/phase-0-install-check.sh --skill "huawei-cloud-bss-voucher-manage"
bash scripts/tier1/phase-1-skill-analysis.sh --skill "huawei-cloud-bss-voucher-manage"
bash scripts/tier2/phase-5-orchestration.sh --skills "skill-a, skill-b"
bash scripts/tier3/phase-7-final-report.sh --skills "skill-a, skill-b"# Derive and execute orchestration scenarios for 3 skills
bash scripts/tier2/phase-5-orchestration.sh --skills "ecs-manage, vpc-manage, eip-manage"
# Run E2E lifecycle test for a single skill
bash scripts/tier2/phase-6-full-flow.sh --skill "huawei-cloud-rds-intelligent-service"| Parameter | Required | Description | Example |
|---|---|---|---|
| Mutually exclusive | Comma-separated skill names or directory names | |
| Mutually exclusive | Scan all | — |
| No | Start from a specific Phase (defaults to resume from missing phase) | |
| No | Archive (move, not delete) existing | — |
| No | Report output directory (default: reports/) | |
| No | Skill directory path. When set, | |
| No | Phase 5/6 不自动扫描同目录其他 huawei-cloud-* skill(默认: 开启扫描) | |
| No | 兄弟 skill 数量上限(默认 5; | |
| Variable | Default | Purpose |
|---|---|---|
| auto-detect: | Where skills are installed by the agent runtime |
| alias of | Legacy name, kept for back-compat |
| | Command for remote skill install/uninstall. Set to |
| | When |
| | Huawei Cloud region |
| — | Required for Phase 4/6 SDK/CLI execution; any |
references/architecture.mdreferences/output-schema-spec.mdreferences/phase-transition-rules.mdreferences/acceptance-criteria.mdreferences/verification-method.mdreferences/phase-details.mdreferences/agent-protocol.mdreferences/cli-installation-guide.mdreferences/iam-policies.mdtemplates/phase-report-schema.jsonphase-N-summary.jsontemplates/test-case-schema.jsonTC-F-*TC-A-*OF-*FF-*templates/scenario-template.json<skill-name>-test-files/skills/
├── huawei-cloud-rds-query/ ← skill source (untouched)
└── huawei-cloud-rds-query-test-files/ ← test artifacts (created on first run, kept across runs)
├── phases/
│ ├── phase-0-summary.json
│ ├── phase-1-summary.json
│ ├── ...
│ └── phase-7-summary.json
└── reports/
├── report-20260724-152309/ ← one subdir per run (timestamped)
│ ├── test-report.json
│ └── test-report.md
├── report-20260725-090000/
│ ├── test-report.json
│ └── test-report.md
└── ...phase-N-summary.json<skill-name>-test-files/phases/<skill-name>-test-files/reports/report-<timestamp>/test-report.{json,md}--freshphases/*.jsonphases/archive/<timestamp>/reports/$SKILL_INSTALL_DIR/references/output-schema-spec.md--fresh_http_inforeferences/agent-protocol.md| Scenario | Handling |
|---|---|
| Skill directory does not exist | Report error and terminate, output available skill list |
| AK/SK environment variables not set | Framework emits the env-var setup template (with |
| User specifies skill name but not installed in Hermes | |
| Some Phase JSON files deleted | Chain detection → Restart from the deleted Phase |
| Network interruption during Phase 4 execution | Already executed case results are not lost; on rerun, skip passed cases (via |
| User hits Ctrl+C mid-execution | Already output phase JSON is valid; next time |
| Only 1 skill under test | Phase 5 → |
| User unsatisfied with derived orchestration scenarios | Manually edit the derived scenario or skip it; Phase 5 derivation is metadata-only, not executed |
Phase 4 write op with no | Skipped with |
| Phase 4 hits missing business params (e.g. coupon_id) | Marked |
| Cross-skill data flow mismatch | Logged in Phase 5 as |
| Orphaned resources detected after E2E flow | Listed in |
__HUAWEI_SKILL_TESTER_CRED_REQUEST_v1__77<your-access-key-id><your-secret-access-key>完整协议(6 步响应流程、直接终端模式、示例行为)见。references/agent-protocol.md