tests

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Testany 测试执行

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未开始/排队中
RUNNING0执行中
SUCCESS1全部通过
FAILURE2有失败
SKIPPED3跳过(仅 Case)
FAIL_AS_EXPECTED4预期失败(仅 Case)
CANCELLED5已取消
ERROR99系统错误
StatusValueMeaningFinal State?
NOT_STARTED-1Not started / In queueNo
RUNNING0In executionNo
SUCCESS1All passedYes
FAILURE2Has failuresYes
SKIPPED3Skipped (Case only)Yes
FAIL_AS_EXPECTED4Expected failure (Case only)Yes
CANCELLED5CancelledYes
ERROR99System errorYes

执行流程

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

  1. 确认目标:用户想执行哪个 Pipeline?
  2. 查找资源
    testany_list_pipelines
    查找目标 Pipeline
  3. 触发执行
    testany_execute_pipeline
  4. 监控状态:轮询
    testany_get_execution
    直到终态
  5. 汇报结果:成功/失败数量,失败 case 列表
  1. Confirm Target: Which Pipeline does the user want to execute?
  2. Find Resources: Use
    testany_list_pipelines
    to find the target Pipeline
  3. Trigger Execution:
    testany_execute_pipeline
  4. Monitor Status: Poll
    testany_get_execution
    until final state
  5. 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