tests
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseTestany 测试执行
Execute Testany Tests
执行 Testany 测试 Pipeline 并监控结果。
用户输入: $ARGUMENTS
Execute Testany test Pipelines and monitor results.
User Input: $ARGUMENTS
职责范围
Scope of Responsibilities
- 触发 Pipeline 执行
- 监控执行状态
- 汇报执行结果
- 获取执行日志链接
注意:Testany 只支持执行 Pipeline,不支持直接执行单个 Case。如需执行单个 Case,请先创建包含该 Case 的 Pipeline。
- Trigger Pipeline execution
- Monitor execution status
- Report execution results
- Obtain execution log links
Note: Testany only supports executing Pipelines, not individual Cases directly. To execute a single Case, please first create a Pipeline that includes the Case.
核心知识
Core Knowledge
执行状态
Execution Status
| 状态 | 值 | 含义 | 是否终态 |
|---|---|---|---|
| NOT_STARTED | -1 | 未开始/排队中 | 否 |
| RUNNING | 0 | 执行中 | 否 |
| SUCCESS | 1 | 全部通过 | 是 |
| FAILURE | 2 | 有失败 | 是 |
| SKIPPED | 3 | 跳过(仅 Case) | 是 |
| FAIL_AS_EXPECTED | 4 | 预期失败(仅 Case) | 是 |
| CANCELLED | 5 | 已取消 | 是 |
| ERROR | 99 | 系统错误 | 是 |
| Status | Value | Meaning | Final State? |
|---|---|---|---|
| NOT_STARTED | -1 | Not started / In queue | No |
| RUNNING | 0 | In execution | No |
| SUCCESS | 1 | All passed | Yes |
| FAILURE | 2 | Has failures | Yes |
| SKIPPED | 3 | Skipped (Case only) | Yes |
| FAIL_AS_EXPECTED | 4 | Expected failure (Case only) | Yes |
| CANCELLED | 5 | Cancelled | Yes |
| ERROR | 99 | System error | Yes |
执行流程
Execution Flow
1. testany_execute_pipeline → 触发执行,获取 execution_id
2. testany_get_execution → 轮询状态(每 5-10 秒)
3. 状态变为终态后 → 汇报结果
4. 如有失败 → testany_get_execution_case 获取详情1. testany_execute_pipeline → Trigger execution, get execution_id
2. testany_get_execution → Poll status (every 5-10 seconds)
3. After status becomes final → Report results
4. If there are failures → testany_get_execution_case to get details工作流程
Workflow
- 确认目标:用户想执行哪个 Pipeline?
- 查找资源:查找目标 Pipeline
testany_list_pipelines - 触发执行:
testany_execute_pipeline - 监控状态:轮询 直到终态
testany_get_execution - 汇报结果:成功/失败数量,失败 case 列表
- Confirm Target: Which Pipeline does the user want to execute?
- Find Resources: Use to find the target Pipeline
testany_list_pipelines - Trigger Execution:
testany_execute_pipeline - Monitor Status: Poll until final state
testany_get_execution - Report Results: Number of passed/failed cases, list of failed cases
轮询策略
Polling Strategy
- 初始间隔:5 秒
- 最大间隔:30 秒
- 超时上限:根据 Pipeline 复杂度,通常 10-30 分钟
- Initial interval: 5 seconds
- Maximum interval: 30 seconds
- Timeout limit: Depending on Pipeline complexity, usually 10-30 minutes
返回格式
Return Format
任务完成后,向用户汇报:
- 执行 ID(如 )
Y2K-0001A-0000B - 执行状态(成功/失败/超时)
- 通过 case 数量
- 失败 case 列表(如有)
- 执行耗时
- 下一步建议(如失败则建议"使用 /debug 排查失败原因")
After task completion, report to the user:
- Execution ID (e.g., )
Y2K-0001A-0000B - Execution status (Success/Failure/Timeout)
- Number of passed cases
- List of failed cases (if any)
- Execution duration
- Next steps suggestion (e.g., if failed, suggest "Use /debug to troubleshoot the cause of failure")
参考文档
Reference Documents
详细概念请参考:
- 核心概念
For detailed concepts, please refer to:
- Core Concepts