
# 查询任务用例块执行过程 - ListTestcaseBlocksProcess
#### 功能介绍
查询指定的功能自动化任务下，用例块的执行过程
#### 调用方法
请参见[如何调用API](https://support.huaweicloud.com/api-testman/cloudtest_03_2000.html)。
#### URI
POST /v3/hutaf-ticc/tm/tasks/testcase_blocks/process
#### 请求参数
表1请求Header参数 
| 参数              | 是否必选 | 参数类型   | 描述                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
|:---|:---|:---|:---|
| x-auth-tenantid | 是    | String | **参数解释** 租户id **约束限制** 不涉及 **取值范围** 字符串长度不少于1，不超过100000 **默认取值** 不涉及 **获取方式** 从 GET /rest/me 的返回结果中对应的id字段获取。 |
| x-auth-groups   | 是    | String | **参数解释** 项目id **约束限制** 不涉及 **取值范围** 字符串长度不少于1，不超过100000 **默认取值** 不涉及 **获取方式** 从 GET /rest/me 的返回结果中对应的id字段获取。 |
| x-user-name     | 是    | String | **参数解释** 用户id **约束限制** 不涉及 **取值范围** 字符串长度不少于1，不超过100000 **默认取值** 不涉及 **获取方式** 从 GET /rest/me 的返回结果中对应的id字段获取。 |
| x-auth-token    | 是    | String | **参数解释：** 用户Token。 通过调用IAM服务[获取用户Token](https://support.huaweicloud.com/api-iam/iam_30_0001.html)接口获取（响应消息头中X-Subject-Token的值）。 **约束限制：** 必传。 **取值范围：** 字符串长度不少于1，不超过10万。 **默认取值：** 不涉及。                |
   
表2请求Body参数 
| 参数     | 是否必选 | 参数类型                                                                                  | 描述        |
|:---|:---|:---|:---|
| where  | 否    | Array of [WhereParameter] objects | 查询过滤参数    |
| option | 否    | [PageParameterV3] object         | 查询排序和分页参数 |
   
 表3WhereParameter 
| 参数    | 是否必选 | 参数类型   | 描述              |
|:---|:---|:---|:---|
| key   | 否    | String | 查询字段名           |
| type  | 否    | String | 条件 =、\>、like、in |
| value | 否    | String | 查询条件值可以数组、数字、字符 |
   
 表4PageParameterV3 
| 参数          | 是否必选 | 参数类型    | 描述                             |
|:---|:---|:---|:---|
| order_by    | 否    | String  | 排序字段                           |
| order_sort  | 否    | String  | 排序顺序，asc：升序；desc：降序            |
| order_limit | 否    | Integer | 分页：接口一次返回的结果数量                 |
| order_start | 否    | Integer | 分页：从第start+1条数据开始，最多返回limit条数据 |
   
#### 响应参数
**状态码：200**
表5响应Body参数 
| 参数       | 参数类型                                                         | 描述 |
|:---|:---|:---|
| status   | String                                                       | 状态 |
| result   | [result] object | 结果 |
| total    | String                                                       | 总共 |
| statusOK | Boolean                                                      | 状态 |
   
 表6result 
| 参数                          | 参数类型                                                                                     | 描述      |
|:---|:---|:---|
| task_id                     | String                                                                                   | 任务ID    |
| testcase_block_total        | Integer                                                                                  | 总用例块    |
| testcase_block_num          | Integer                                                                                  | 用例块数    |
| running_testcase_block_num  | Integer                                                                                  | 执行中用例块数 |
| complete_testcase_block_num | Integer                                                                                  | 未执行用例块数 |
| not_exec_testcase_block_num | Integer                                                                                  | 未执行用例块数 |
| testcase_blocks             | Array of [testcase_blocks] objects | 用例块数组   |
   
 表7testcase_blocks 
| 参数                | 参数类型                                                                     | 描述     |
|:---|:---|:---|
| id                | String                                                                   | ID     |
| round             | Integer                                                                  | 轮次     |
| process           | Array of [process] objects | 进度     |
| schedule_block_id | String                                                                   | 调度块ID  |
| topo_name         | String                                                                   | topo名称 |
| start_time        | Integer                                                                  | 开始时间   |
   
 表8process 
| 参数              | 参数类型   | 描述   |
|:---|:---|:---|
| title           | String | 标题   |
| state           | String | 状态   |
| step_name       | String | 步骤名称 |
| summary_message | String | 汇总消息 |
   
#### 请求示例
```
https://devcloud.cn-north-7.ulanqab.huawei.com/cloudtestportal/ticc/ctui/v3/hutaf-ticc/tm/tasks/testcase_blocks/process?_=1756781688571
{
  "where" : [ {
    "key" : "task_id",
    "type" : "=",
    "value" : "2886953459418398721"
  } ],
  "option" : {
    "order_by" : "create_time",
    "order_sort" : "desc",
    "order_limit" : 10,
    "order_start" : 0
  }
}
```
#### 响应示例
**状态码：200**
Success
```
{
  "status" : "ok",
  "result" : {
    "task_id" : "2886953459418398721",
    "testcase_block_total" : 1,
    "testcase_block_num" : 1,
    "running_testcase_block_num" : 0,
    "complete_testcase_block_num" : 1,
    "not_exec_testcase_block_num" : 0,
    "testcase_blocks" : [ {
      "id" : "2886953528137875459",
      "round" : 1,
      "process" : [ {
        "title" : "用例块ID:2886953528137875459\n用例块名称:TestCaseBlock[875457_0]",
        "state" : "complete",
        "step_name" : "init",
        "summary_message" : "匹配执行器和环境(轮次:1)"
      }, {
        "title" : "成功:0\n失败:0\n待核查:0\n不可用:2\n阻塞:0",
        "state" : "complete",
        "step_name" : "running",
        "summary_message" : "执行中(进度:100%)\n用例总数:2,已执行:2"
      }, {
        "title" : null,
        "state" : "complete",
        "step_name" : "complete",
        "summary_message" : "结束"
      } ],
      "schedule_block_id" : "2886953528137875457",
      "topo_name" : "",
      "start_time" : 0
    } ]
  },
  "total" : "1",
  "statusOK" : true
}
```
#### 状态码
| 状态码 | 描述      |
|:---|:---|
| 200 | Success |
   
#### 错误码
请参见[错误码](https://support.huaweicloud.com/api-testman/ErrorCode.html)。
