更新时间:2024-09-12 GMT+08:00
分享

统计特性用例数量

功能介绍

特性用例统计

URI

POST /v4/versions/{version_uri}/features/case-total

表1 路径参数

参数

是否必选

参数类型

描述

version_uri

String

版本uri

请求参数

表2 请求Body参数

参数

是否必选

参数类型

描述

contain_root

Boolean

包含根节点

contain_child

Boolean

包含子节点

task_uri

String

任务uri

filter_child

Boolean

过滤子节点

not_in_other_it

Boolean

是否不在其他迭代

condition_type

String

条件类型

condition_value

String

条件值

test_case_conditions

Array of SearchCondition objects

用例条件

feature_uris

Array of strings

特性uri数组

project_id

String

项目uuid

upward_recursion

Boolean

向上递归

表3 SearchCondition

参数

是否必选

参数类型

描述

field_name

String

字段名

field_value

String

字段值

operator

String

数据库字段操作

sour_value

String

源值

tar_value

String

目标值

field_type

String

字段类型

响应参数

状态码: 200

表4 响应Body参数

参数

参数类型

描述

status

String

success|error

result

ResultValueListTestItemCaseCountVo object

请求的返回的数据对象

error

ApiError object

失败时的error信息

request_id

String

由接口调用方传入,建议使用UUID保证请求的唯一性。

server_address

String

本次请求的受理的服务地址。

表5 ResultValueListTestItemCaseCountVo

参数

参数类型

描述

total

Integer

起始记录数 大于 实际总条数时, 值为0, 分页请求才有此值

value

Array of TestItemCaseCountVo objects

实际的数据类型:单个对象,集合 或 NULL

reason

String

业务失败的提示内容

page_size

Integer

每页展示条数

page_no

Integer

页码

has_more

Boolean

是否有更多

表6 TestItemCaseCountVo

参数

参数类型

描述

feature_uri

String

特性uri

case_count

Integer

用例数量

表7 ApiError

参数

参数类型

描述

code

String

业务失败的错误码

reason

String

业务失败的提示内容

状态码: 400

表8 响应Body参数

参数

参数类型

描述

error_code

String

接口调用失败错误码

error_msg

String

接口调用失败错误信息

状态码: 401

表9 响应Body参数

参数

参数类型

描述

error_code

String

接口调用失败错误码

error_msg

String

接口调用失败错误信息

状态码: 404

表10 响应Body参数

参数

参数类型

描述

error_code

String

接口调用失败错误码

error_msg

String

接口调用失败错误信息

状态码: 500

表11 响应Body参数

参数

参数类型

描述

error_code

String

接口调用失败错误码

error_msg

String

接口调用失败错误信息

请求示例

统计特性用例数量

post https://{endpoint}/v4/versions/v91k0000vr59f1cd/features/case-total

{
  "project_uuid" : "84b218bb1b504019bbeb64b8dc745a94",
  "upward_recursion" : true,
  "contain_root" : true,
  "feature_uris" : [ ],
  "test_case_conditions" : [ ]
}

响应示例

状态码: 200

OK

{
  "status" : "success",
  "result" : {
    "value" : [ {
      "feature_uri" : "v91i0000vrpquipi",
      "case_count" : 2
    } ]
  }
}

状态码

状态码

描述

200

OK

400

Bad Request

401

Unauthorized

404

Not Found

500

Internal Server Error

错误码

请参见错误码

相关文档