查询用例列表 - ListTestCaseUris
功能介绍
查询用例列表
调用方法
请参见如何调用API。
URI
POST /v4/{project_id}/testcases/batch-list
参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
project_id | 是 | String | 项目UUID,项目唯一标识,固定长度32位字符(字母和数字)。获取方式请参见获取项目ID |
请求参数
参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
keyword | 否 | String | 关键字查询,用例名或编号 |
exeplatforms | 否 | Array of strings | 执行平台 |
own | 否 | Boolean | 是否是我的 |
useOffset | 否 | Boolean | 是否使用offset分页 |
queryByDisplayCfg | 否 | Boolean | 是否表头配置查询,如果为true,则未设置展示的字段不返回 |
version_uri | 否 | String | 版本URI |
case_uris | 否 | Array of strings | 用例URI集合 |
owner_ids | 否 | Array of strings | 处理者ID集合 |
status_codes | 否 | Array of strings | 状态Code集合 |
rank_ids | 否 | Array of strings | 用例等级ID集合 |
module_ids | 否 | Array of strings | 模块ID集合 |
issue_id | 否 | String | 需求编号 |
creator_ids | 否 | Array of strings | 创建者ID集合 |
result_codes | 否 | Array of strings | 结果Code集合 |
iteration_ids | 否 | Array of strings | 归属迭代ID集合 |
create_start_time | 否 | String | 创建开始时间 |
create_end_time | 否 | String | 创建结束时间 |
associated_issue | 否 | Boolean | 是否关联需求(null:不限,false:未关联,true:已关联) |
associated_defects | 否 | Boolean | 是否关联缺陷(null:不限,false:未关联,true:已关联) |
include_sub_issue | 否 | Boolean | 是否查询子需求关联的用例,默认true |
include_sub_feature | 否 | Boolean | 是否查询子目录的用例,默认true |
label_ids | 否 | Array of strings | 标签ID集合 |
execute_start_time | 否 | String | 执行开始时间 |
execute_end_time | 否 | String | 执行结束时间 |
executor_ids | 否 | Array of strings | 执行者ID集合 |
test_types | 否 | Array of strings | 类型 |
is_keyword | 否 | Boolean | 是否组合关键字 |
issue_tree_search | 否 | Boolean | 是否是需求树单击的查询关联用例 |
service_type | 否 | Integer | 参数解释: 服务类型 约束限制: 不涉及 取值范围: 默认取值: 不涉及 |
service_types | 否 | Array of integers | 服务类型集合 |
stage_type | 否 | Integer | 阶段过程(2:测试设计,3:测试执行,4:质量报告) |
feature_uri | 否 | String | 目录URI |
sort_field | 否 | String | 排序字段 |
sort_type | 否 | String | 参数解释: 排序方式 约束限制: 不涉及 取值范围: 默认取值: 不涉及 |
page_no | 是 | Integer | 当前页数 |
page_size | 是 | Integer | 每页条数,取值1~50 |
case_type | 否 | Integer | 参数解释: 用例类型 约束限制: 不涉及 取值范围: 默认取值: 不涉及 |
custom_field_info | 否 | Array of QueryCustomFieldsInfo objects | 用例自定义字段信息 |
task_uri | 否 | String | 测试套uri |
associate_issue_detail | 否 | Boolean | 是否返回需求具体信息(返回需求名称,需求id) |
not_assign_task | 否 | Boolean | 该字段为false,则查询全量用例,为true表示查询未分配测试套的用例 |
test_designs | 否 | Array of booleans | 是否来自测试设计(null或者[true, false]:不限,[true]:来自测试设计,[false]:否来自测试设计) |
review_status | 否 | Integer | 参数解释: 用例评审状态 取值范围: 默认取值: 不涉及 |
just_return_id | 否 | Boolean | 部分字段是否仅返回ID,默认为false,为true时部分字段仅返回ID |
响应参数
状态码:200
参数 | 参数类型 | 描述 |
|---|---|---|
total | Integer | 参数解释 总数 取值范围 不涉及 |
page_no | String | 参数解释 分页编码 取值范围 不涉及 |
page_size | String | 参数解释 分页大小 取值范围 不涉及 |
value | Array of TestCaseListVo objects | 请求返回的数据 |
参数 | 参数类型 | 描述 |
|---|---|---|
uri | String | 参数解释: 用例URI 取值范围: 不涉及 |
name | String | 参数解释: 用例名称 取值范围: 不涉及 |
owner | NameAndIdVo object | 参数解释: 处理者 取值范围: 不涉及 |
status | NameAndIdVo object | 参数解释: 状态 取值范围: 不涉及 |
result | NameAndIdVo object | 参数解释: 结果 取值范围: 不涉及 |
module | NameAndIdVo object | 参数解释: 模块 取值范围: 不涉及 |
iteration | NameAndIdVo object | 参数解释: 迭代 取值范围: 不涉及 |
exeplatform | String | 参数解释: 执行平台 取值范围: apittest,其他三方执行平台 |
number | String | 参数解释: 用例编号 取值范围: 不涉及 |
description | String | 参数解释: 用例描述 取值范围: 不涉及 |
rank_id | String | 参数解释: 用例描述 取值范围: 0|1|2|3|4 |
feature_uri | String | 参数解释: 目录URI 取值范围: 不涉及 |
release_dev | String | 参数解释: 版本号 取值范围: 不涉及 |
is_keyword | Boolean | 参数解释: 是否组合关键字 取值范围: true: 组合关键字 false:不组合关键字 |
script_url | String | 参数解释: 脚本路径 取值范围: 不涉及 |
report_url | String | 参数解释: 实时报告地址 取值范围: 不涉及 |
project_uuid | String | 参数解释: 项目UUID,项目唯一标识,固定长度32位字符(字母和数字)。获取方式请参见获取项目ID 取值范围: 项目uuid应符合如下规则:长度等于32位,包含大小写字母、数字 |
service_type | NameAndIdVo object | 参数解释: 服务类型信息 取值范围: 不涉及 |
test_type | IntegerIdAndNameVo object | 参数解释: 测试类型信息 取值范围: 不涉及 |
create_info | CreateInfoVo object | 参数解释: 创建信息 取值范围: 不涉及 |
execute_info | ExecuteInfoVo object | 参数解释: 执行信息 取值范围: 不涉及 |
associate_issue_info | AssociateIssueInfoVo object | 参数解释: 关联需求信息 取值范围: 不涉及 |
associate_defect_info | AssociateDefectInfoVo object | 参数解释: 关联缺陷信息 取值范围: 不涉及 |
case_type | Integer | 参数解释: 用例类型 约束限制: 不涉及 取值范围: |
labels | String | 参数解释: 用例标签名称列表 取值范围: 不涉及 |
custom_field_info | Array of CustomFieldVo objects | 参数解释: 自定义字段信息 取值范围: 不涉及 |
is_test_design | Boolean | 参数解释: 是否来自测试设计 取值范围: null:不限,false:否来自测试设计,true:来自测试设计 |
last_modified | Long | 参数解释: 最后修改时间 取值范围: null:不限 |
review_status | Integer | 用例评审状态 取值范围: |
confidentiality_code | String | 参数解释 资源密级等级编码,只有在涉密开关打开时,且资源设置了密级等级,才会返回 约束限制 不涉及 取值范围 不涉及 默认取值 不涉及 |
参数 | 参数类型 | 描述 |
|---|---|---|
time | String | 参数解释: 创建时间 取值范围: 不涉及 |
timestamp | Long | 参数解释: 创建时间时间戳 取值范围: 不涉及 |
user_id | String | 参数解释: 用户ID 取值范围: 不涉及 |
user_name | String | 参数解释: 用户名称 取值范围: 不涉及 |
参数 | 参数类型 | 描述 |
|---|---|---|
time | String | 参数解释: 执行开始时间 取值范围: 不涉及 |
timestamp | Long | 参数解释: 执行开始时间时间戳 取值范围: 不涉及 |
duration | String | 参数解释: 执行时长 取值范围: 不涉及 |
user_id | String | 参数解释: 用户ID 取值范围: 不涉及 |
user_name | String | 参数解释: 用户名称 取值范围: 不涉及 |
execute_times | Integer | 参数解释: 执行次数 取值范围: 不涉及 |
参数 | 参数类型 | 描述 |
|---|---|---|
associate | Boolean | 参数解释: 是否已关联 取值范围: true: 已关联 false:未关联 |
issue_id | String | 参数解释: 需求ID 取值范围: 不涉及 |
tracker_id | String | 参数解释: 需求类型 取值范围: 不涉及 |
board_id | String | 参数解释: 工作项层级ID 取值范围: 不涉及 |
tracker_name | String | 参数解释: 需求类型名称 取值范围: 不涉及 |
参数 | 参数类型 | 描述 |
|---|---|---|
associate | Boolean | 参数解释: 是否已关联 取值范围: true:已关联 false:未关联 |
associate_count | Integer | 参数解释: 关联缺陷数 取值范围: 不涉及 |
参数 | 参数类型 | 描述 |
|---|---|---|
type | String | 参数解释: 字段类型 取值范围: 单行文本text、多行文本textArea、单选框radio、多选框checkBox、日期date、数字number、单选用户user |
value | String | 参数解释: 测试用例自定义字段值 取值范围: 不涉及 |
custom_field_param | String | 参数解释: 项目用例自定义字段入参或者返回参数名称 取值范围: 不涉及 |
user_name | String | 参数解释: 用户名 取值范围: user类型测试用例自定义字段对应用户名,其它类型字段不返回 |
状态码:400
参数 | 参数类型 | 描述 |
|---|---|---|
error_code | String | 参数解释: 接口调用失败错误码 取值范围: 不涉及 |
error_msg | String | 参数解释: 接口调用失败错误信息 取值范围: 不涉及 |
状态码:401
参数 | 参数类型 | 描述 |
|---|---|---|
error_code | String | 参数解释: 接口调用失败错误码 取值范围: 不涉及 |
error_msg | String | 参数解释: 接口调用失败错误信息 取值范围: 不涉及 |
状态码:404
参数 | 参数类型 | 描述 |
|---|---|---|
error_code | String | 参数解释: 接口调用失败错误码 取值范围: 不涉及 |
error_msg | String | 参数解释: 接口调用失败错误信息 取值范围: 不涉及 |
状态码:500
参数 | 参数类型 | 描述 |
|---|---|---|
error_code | String | 参数解释: 接口调用失败错误码 取值范围: 不涉及 |
error_msg | String | 参数解释: 接口调用失败错误信息 取值范围: 不涉及 |
请求示例
{
"page_no" : 1,
"page_size" : 15,
"feature_uri" : "42f27e960b6a41b89c093cbdc657a07d",
"service_type" : -1,
"stage_type" : "3",
"custom_field_info" : [ ],
"version_uri" : "v9020001099p8qk4",
"just_return_id" : true
} 响应示例
状态码:200
OK
{
"total" : 159,
"value" : [ {
"uri" : "v90200010scjm23o",
"name" : "hahaha139c",
"owner" : { },
"status" : {
"id" : "0",
"name" : "新建"
},
"result" : { },
"module" : {
"id" : "",
"name" : ""
},
"iteration" : { },
"number" : "TC1326",
"is_keyword" : false,
"report_url" : "",
"project_uuid" : "1b7179edc79a431f9711434124ac9f28",
"service_type" : {
"id" : "1",
"name" : "接口自动化"
},
"test_type" : {
"id" : 0
},
"create_info" : {
"time" : "2025-10-21 16:48:18",
"timestamp" : 1761036498000,
"user_id" : "da48b09775884920a3745ccbd4a66f1e",
"user_name" : "wldC0001"
},
"execute_info" : { },
"associate_issue_info" : {
"associate" : false
},
"associate_defect_info" : {
"associate" : false
},
"case_type" : 0,
"labels" : [ ],
"custom_field_info" : [ {
"type" : "text",
"value" : "222",
"custom_field_param" : "custom_field_23"
} ],
"is_test_design" : false,
"last_modified" : 1761036498000,
"review_status" : 0
}, {
"uri" : "v90100010scj7pkq",
"name" : "hahaha19c",
"owner" : { },
"status" : {
"id" : "0",
"name" : "新建"
},
"result" : { },
"module" : {
"id" : "",
"name" : ""
},
"iteration" : { },
"number" : "TC1325",
"is_keyword" : false,
"report_url" : "",
"project_uuid" : "1b7179edc79a431f9711434124ac9f28",
"service_type" : {
"id" : "1",
"name" : "接口自动化"
},
"test_type" : {
"id" : 0
},
"create_info" : {
"time" : "2025-10-21 16:40:30",
"timestamp" : 1761036030000,
"user_id" : "da48b09775884920a3745ccbd4a66f1e",
"user_name" : "wldC0001"
},
"execute_info" : { },
"associate_issue_info" : {
"associate" : false
},
"associate_defect_info" : {
"associate" : false
},
"case_type" : 0,
"labels" : [ ],
"custom_field_info" : [ {
"type" : "text",
"value" : "222",
"custom_field_param" : "custom_field_23"
} ],
"is_test_design" : false,
"last_modified" : 1761036030000,
"review_status" : 0
}, {
"uri" : "v90200010scj6vf1",
"name" : "hahaha1c",
"owner" : { },
"status" : {
"id" : "0",
"name" : "新建"
},
"result" : { },
"module" : {
"id" : "",
"name" : ""
},
"iteration" : { },
"number" : "TC1324",
"is_keyword" : false,
"report_url" : "",
"project_uuid" : "1b7179edc79a431f9711434124ac9f28",
"service_type" : {
"id" : "1",
"name" : "接口自动化"
},
"test_type" : {
"id" : 0
},
"create_info" : {
"time" : "2025-10-21 16:40:03",
"timestamp" : 1761036003000,
"user_id" : "da48b09775884920a3745ccbd4a66f1e",
"user_name" : "wldC0001"
},
"execute_info" : { },
"associate_issue_info" : {
"associate" : false
},
"associate_defect_info" : {
"associate" : false
},
"case_type" : 0,
"labels" : [ ],
"custom_field_info" : [ {
"type" : "text",
"value" : "222",
"custom_field_param" : "custom_field_23"
} ],
"is_test_design" : false,
"last_modified" : 1761036003000,
"review_status" : 0
}, {
"uri" : "v90100010scj618m",
"name" : "3wer432",
"owner" : {
"id" : ""
},
"status" : {
"id" : "0",
"name" : "新建"
},
"result" : { },
"module" : {
"id" : "",
"name" : ""
},
"iteration" : { },
"number" : "TC1323",
"rank_id" : "2",
"is_keyword" : false,
"script_url" : "ApiTest/wldIPD-系统设备类1017_alpha/src/scripts/user/Case_c1dc177717374d2684540b81b979a710_1.java",
"report_url" : "",
"project_uuid" : "1b7179edc79a431f9711434124ac9f28",
"service_type" : {
"id" : "1",
"name" : "接口自动化"
},
"test_type" : {
"id" : 1,
"name" : "功能性测试"
},
"create_info" : {
"time" : "2025-10-21 16:39:32",
"timestamp" : 1761035972000,
"user_id" : "da48b09775884920a3745ccbd4a66f1e",
"user_name" : "wldC0001"
},
"execute_info" : { },
"associate_issue_info" : {
"associate" : false
},
"associate_defect_info" : {
"associate" : false
},
"case_type" : 0,
"labels" : [ ],
"custom_field_info" : [ {
"type" : "text",
"value" : "33",
"custom_field_param" : "custom_field_20"
}, {
"type" : "text",
"value" : "222",
"custom_field_param" : "custom_field_23"
} ],
"is_test_design" : false,
"last_modified" : 1761035972000,
"review_status" : 0
}, {
"uri" : "v90100010scfv57e",
"name" : "aaa",
"owner" : {
"id" : ""
},
"status" : {
"id" : "0",
"name" : "新建"
},
"result" : { },
"module" : {
"id" : "",
"name" : ""
},
"iteration" : { },
"number" : "TC1321",
"rank_id" : "2",
"is_keyword" : false,
"script_url" : "ApiTest/wldIPD-系统设备类1017_alpha/src/scripts/user/Case_903485a6fa27452399909273dfc89a36_1.java",
"report_url" : "",
"project_uuid" : "1b7179edc79a431f9711434124ac9f28",
"service_type" : {
"id" : "1",
"name" : "接口自动化"
},
"test_type" : {
"id" : 21,
"name" : "可服务性测试"
},
"create_info" : {
"time" : "2025-10-21 15:43:21",
"timestamp" : 1761032601000,
"user_id" : "da48b09775884920a3745ccbd4a66f1e",
"user_name" : "wldC0001"
},
"execute_info" : { },
"associate_issue_info" : {
"associate" : false
},
"associate_defect_info" : {
"associate" : false
},
"case_type" : 0,
"labels" : [ ],
"custom_field_info" : [ {
"type" : "text",
"value" : "33",
"custom_field_param" : "custom_field_20"
}, {
"type" : "text",
"value" : "222",
"custom_field_param" : "custom_field_23"
} ],
"is_test_design" : false,
"last_modified" : 1761032601000,
"review_status" : 0
}, {
"uri" : "v90200010sbu3pfq",
"name" : "作为管理员进行订单管理",
"owner" : { },
"status" : {
"id" : "0",
"name" : "新建"
},
"result" : { },
"module" : {
"id" : "",
"name" : ""
},
"iteration" : { },
"number" : "005",
"rank_id" : "2",
"is_keyword" : false,
"report_url" : "",
"project_uuid" : "1b7179edc79a431f9711434124ac9f28",
"service_type" : {
"id" : "0",
"name" : "手工测试"
},
"test_type" : {
"id" : 1,
"name" : "功能性测试"
},
"create_info" : {
"time" : "2025-10-21 10:31:19",
"timestamp" : 1761013879000,
"user_id" : "a17801c5d15f46e28112eec8a880683d",
"user_name" : "wangluodan1"
},
"execute_info" : { },
"associate_issue_info" : {
"associate" : false
},
"associate_defect_info" : {
"associate" : false
},
"case_type" : 0,
"labels" : [ ],
"is_test_design" : false,
"last_modified" : 1761013879000,
"review_status" : 0
}, {
"uri" : "v90200010sbu3peh",
"name" : "作为管理员进行积分管理",
"owner" : { },
"status" : {
"id" : "0",
"name" : "新建"
},
"result" : { },
"module" : {
"id" : "",
"name" : ""
},
"iteration" : { },
"number" : "004",
"rank_id" : "2",
"is_keyword" : false,
"report_url" : "",
"project_uuid" : "1b7179edc79a431f9711434124ac9f28",
"service_type" : {
"id" : "0",
"name" : "手工测试"
},
"test_type" : {
"id" : 1,
"name" : "功能性测试"
},
"create_info" : {
"time" : "2025-10-21 10:31:19",
"timestamp" : 1761013879000,
"user_id" : "a17801c5d15f46e28112eec8a880683d",
"user_name" : "wangluodan1"
},
"execute_info" : { },
"associate_issue_info" : {
"associate" : false
},
"associate_defect_info" : {
"associate" : false
},
"case_type" : 0,
"labels" : [ ],
"is_test_design" : false,
"last_modified" : 1761013879000,
"review_status" : 0
}, {
"uri" : "v90200010sbu3pd8",
"name" : "作为管理员添加优惠活动",
"owner" : { },
"status" : {
"id" : "0",
"name" : "新建"
},
"result" : { },
"module" : {
"id" : "",
"name" : ""
},
"iteration" : { },
"number" : "003",
"rank_id" : "2",
"is_keyword" : false,
"report_url" : "",
"project_uuid" : "1b7179edc79a431f9711434124ac9f28",
"service_type" : {
"id" : "0",
"name" : "手工测试"
},
"test_type" : {
"id" : 1,
"name" : "功能性测试"
},
"create_info" : {
"time" : "2025-10-21 10:31:19",
"timestamp" : 1761013879000,
"user_id" : "a17801c5d15f46e28112eec8a880683d",
"user_name" : "wangluodan1"
},
"execute_info" : { },
"associate_issue_info" : {
"associate" : false
},
"associate_defect_info" : {
"associate" : false
},
"case_type" : 0,
"labels" : [ ],
"is_test_design" : false,
"last_modified" : 1761013879000,
"review_status" : 0
}, {
"uri" : "v90200010sbu3pbf",
"name" : "作为管理员添加团购活动",
"owner" : { },
"status" : {
"id" : "0",
"name" : "新建"
},
"result" : { },
"module" : {
"id" : "",
"name" : ""
},
"iteration" : { },
"number" : "002",
"rank_id" : "2",
"is_keyword" : false,
"report_url" : "",
"project_uuid" : "1b7179edc79a431f9711434124ac9f28",
"service_type" : {
"id" : "0",
"name" : "手工测试"
},
"test_type" : {
"id" : 1,
"name" : "功能性测试"
},
"create_info" : {
"time" : "2025-10-21 10:31:19",
"timestamp" : 1761013879000,
"user_id" : "a17801c5d15f46e28112eec8a880683d",
"user_name" : "wangluodan1"
},
"execute_info" : { },
"associate_issue_info" : {
"associate" : false
},
"associate_defect_info" : {
"associate" : false
},
"case_type" : 0,
"labels" : [ ],
"is_test_design" : false,
"last_modified" : 1761013879000,
"review_status" : 0
}, {
"uri" : "v90200010sbu3p81",
"name" : "作为管理员添加限时打折",
"owner" : { },
"status" : {
"id" : "0",
"name" : "新建"
},
"result" : { },
"module" : {
"id" : "",
"name" : ""
},
"iteration" : { },
"number" : "001",
"rank_id" : "2",
"is_keyword" : false,
"report_url" : "",
"project_uuid" : "1b7179edc79a431f9711434124ac9f28",
"service_type" : {
"id" : "0",
"name" : "手工测试"
},
"test_type" : {
"id" : 1,
"name" : "功能性测试"
},
"create_info" : {
"time" : "2025-10-21 10:31:19",
"timestamp" : 1761013879000,
"user_id" : "a17801c5d15f46e28112eec8a880683d",
"user_name" : "wangluodan1"
},
"execute_info" : { },
"associate_issue_info" : {
"associate" : false
},
"associate_defect_info" : {
"associate" : false
},
"case_type" : 0,
"labels" : [ ],
"is_test_design" : false,
"last_modified" : 1761013879000,
"review_status" : 0
} ],
"page_size" : 10,
"page_no" : 1
} 状态码
状态码 | 描述 |
|---|---|
200 | OK |
400 | Bad Request |
401 | Unauthorized |
404 | Not Found |
500 | Internal Server Error |
错误码
请参见错误码。

