SuperAPI AI 工具集

pipeline

测试与质量

查看项目

更新于 10-16 08:45

技能介绍

用途:通过 Testany MCP 工具管理 Testany 平台上的测试流水线,所有操作均为对平台远程 API 的调用,不涉及本地文件系统。用于创建、查询、更新、删除流水线,编排用例(case)的执行顺序和变量传递。

主要能力(共 11 个 MCP 工具):Pipeline CRUD 7 个——testany_create_pipeline、testany_get_pipeline、testany_get_pipeline_yaml、testany_list_pipelines、testany_list_my_pipelines、testany_update_pipeline、testany_delete_pipeline;辅助 2 个——testany_verify_pipeline(验证 YAML 语法)、testany_get_pipeline_used_by(查询被引用情况);执行相关 2 个——testany_execute_pipeline、testany_get_pipeline_status(建议改用 /tests)。

使用方式:创建时可先并行调用 testany_list_cases / testany_list_my_cases 和 testany_get_my_workspaces 收集选项,再用 AskUserQuestion 确认名称、工作空间、包含的 case 与依赖顺序,最后用 definition(YAML)或 case_keys(简单顺序执行)二选一提交。更新时先读当前配置与 YAML,确认修改字段并重新验证 Relay 约束后提交。删除前须用 testany_get_pipeline_used_by 检查是否被 Plan 或 Gatekeeper 引用,有引用需先解除;删除不可撤销。列表支持按 workspace、keyword、owned_by、environments、pipeline_labels、case_keys、分页等过滤,workspace 为必填。

限制与注意:选择 cases 时禁止猜测,信息不足须用 AskUserQuestion 询问用户;Relay 配置需确认源 case 有 type='output' 变量、目标 case 有 type='env' 变量。YAML 第一行必须从第 1 列写 kind:(须为 rule/v1.2),行首不能有空格。creator 不可更新,owned_by 可转移。用户无 case 时建议先用 /case 创建;需要执行或查看执行状态用 /tests;需要创建门禁或定时计划用 /orchestrator。