查询用户已授权项目下测试任务列表
功能介绍
查询用户已授权项目下测试任务列表
调用方法
请参见如何调用API。
URI
POST /v4/{project_id}/authorized-tasks/batch-query
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
project_id |
是 |
String |
项目UUID,项目唯一标识,固定长度32位字符(字母和数字)。获取方式请参见获取项目ID |
请求参数
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
keyword |
否 |
String |
关键字查询,任务名或编号 |
service_type |
否 |
Integer |
服务类型 |
page_no |
否 |
Integer |
当前页数 |
page_size |
否 |
Integer |
每页条数 |
响应参数
状态码:200
参数 |
参数类型 |
描述 |
---|---|---|
status |
String |
success|error |
result |
ResultValueListTaskVo object |
请求返回的数据 |
error |
ApiError object |
错误信息 |
request_id |
String |
由接口调用方传入,建议使用UUID保证请求的唯一性。 |
server_address |
String |
本次请求的受理的服务地址 |
参数 |
参数类型 |
描述 |
---|---|---|
total |
Integer |
起始记录数 大于 实际总条数时, 值为0, 分页请求才有此值 |
value |
Array of TaskVo objects |
实际的数据类型:单个对象,集合 或 NULL |
reason |
String |
业务失败的提示内容 |
page_size |
Integer |
分页大小 |
page_no |
Integer |
分页编码 |
has_more |
Boolean |
是否有更多 |
参数 |
参数类型 |
描述 |
---|---|---|
uri |
String |
测试任务URI |
name |
String |
测试任务名称 |
stage |
String |
测试阶段 |
number |
String |
编号 |
tags |
String |
标签 |
description |
String |
描述 |
region |
String |
区域 |
author_id |
String |
创建人ID |
author_name |
String |
创建人名称 |
owner_id |
String |
责任人ID |
owner_name |
String |
责任人名称 |
parent_uri |
String |
父任务URI |
parent_path |
String |
父任务路径 |
origin_uri |
String |
源任务URI |
version_uri |
String |
版本URI |
branch_uri |
String |
分支URI |
version_name |
String |
版本名称 |
creation_date |
DateTime |
创建时间 |
create_date_timestamp |
Long |
创建时间时间戳 |
update_time |
DateTime |
更新时间 |
update_time_timestamp |
Long |
更新时间时间戳 |
relation_change_time |
DateTime |
关联关系修改时时间 |
relation_change_time_timestamp |
Long |
关联关系修改时间时间戳 |
test_case_condition |
String |
动态任务用例过滤条件 |
updator_id |
String |
修改人Id |
updator_name |
String |
修改人名称 |
relation_changer_id |
String |
关联关系修改人Id |
service_type |
Integer |
服务类型ID |
service_type_name |
String |
服务类型名称 |
tag_list |
Array of strings |
标签名称集合 |
module_id |
String |
模块ID |
module_name |
String |
模块名称 |
module_path |
String |
模块path |
module_path_name |
String |
模块路径名称 |
release_dev |
String |
发布版本号 |
ext_param |
String |
扩展参数 |
execute_way |
Integer |
执行方式(1:串行,2:并行) |
execute_type |
Integer |
执行类型(0:冒烟,1:定时) |
status_code |
Integer |
生命周期状态Code |
status_name |
String |
生命周期状态名称 |
result_code |
Integer |
执行结果Code |
result_name |
String |
执行状态名称 |
execute_status_code |
Integer |
Echo执行状态Code |
execute_status_name |
String |
Echo执行状态名称 |
executor_id |
String |
执行人ID |
executor_name |
String |
执行人名称 |
execute_latest_time |
DateTime |
最近执行时间 |
execute_latest_time_timestamp |
Long |
最近执行时间时间戳 |
execute_duration |
String |
执行时长 |
execute_times |
Integer |
执行次数 |
project_uuid |
String |
项目UUID,项目唯一标识,固定长度32位字符(字母和数字)。获取方式请参见获取项目ID |
case_operation_info |
CaseOperationVo object |
任务关联用例信息 |
assign_case_num |
Integer |
关联用例数 |
finish_case_num |
Integer |
已完成用例数量 |
assign_defect_num |
Integer |
关联缺陷数量 |
task_assign_msg |
String |
任务关联用例变更提示信息 |
iterator_version_uri |
String |
测试套所属迭代uri,非迭代下创建的测试套返回null |
result_number_list |
Array of NameAndValueAndCodeVo objects |
用户自定义结果对应的用例数目 |
finish_date |
DateTime |
测试套完成时间 |
finish_date_timestamp |
Long |
测试套完成时间戳 |
plan_start_date |
DateTime |
计划开始时间 |
plan_start_timestamp |
Long |
计划开始时间戳 |
plan_end_date |
DateTime |
计划结束时间 |
plan_end_timestamp |
Long |
计划结束时间戳 |
expiration_status |
Integer |
测试套超期状态值,分别为:无状态(null)、未超期(0)、即将超期(1)、已超期(2)、延期完成(3)、按期完成(4) |
expiration_status_name |
String |
测试套超期状态名称,分别为:无状态(不显示状态)、未超期(Unexpired)、即将超期(About to expire)、已超期(Expired)、延期完成(Delayed completion)、按期完成(On schedule completion) |
参数 |
参数类型 |
描述 |
---|---|---|
test_cases_info |
Array of TaskAssignCaseVo objects |
用例关联信息 |
set_up_cases_info |
Array of TaskAssignCaseVo objects |
前置用例关联信息 |
tear_down_cases_info |
Array of TaskAssignCaseVo objects |
后置用例关联信息 |
参数 |
参数类型 |
描述 |
---|---|---|
sort |
Integer |
排序顺序 |
case_uri |
String |
用例uri |
is_available |
Integer |
是否可用 |
test_case_name |
String |
用例名称 |
test_case_number |
String |
用例编号 |
状态码: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 |
参数解释: 接口调用失败错误信息 取值范围: 不涉及 |
请求示例
post https://{endpoint}/v4/2e8b14eb90d54b6c9bc4c0b5cde1f449/authorized-tasks/batch-query
{
"keyword" : "任务名",
"service_type" : 0,
"page_no" : 1,
"page_size" : 10
}
响应示例
状态码:200
OK
{
"status" : "string",
"result" : {
"total" : 1,
"value" : [ {
"uri" : "001s16gt6q5",
"name" : "名称01",
"stage" : "alpha",
"number" : "编号01",
"tags" : "e79798f0f4424f16b189558bad1206aa,6e3c9767092948f0bd15d4f1b479ee0c",
"description" : "描述",
"region" : "cn-north-7",
"author_id" : "b088303066476b9eaefdb44aa23bca",
"author_name" : "创建人名称",
"owner_id" : "efdb403066474ab08836b9eaa23bca",
"owner_name" : "责任人名称",
"parent_uri" : "00rt40cvpkq",
"parent_path" : "/d2017a1b4fbd4a8e995611c2d6e0c301/01hs9bgkr98/",
"origin_uri" : "d1j2f30cvpkq",
"version_uri" : "b9eaw1es2fdb12",
"branch_uri" : "b9eaw1es2fdb12",
"version_name" : "分支",
"creation_date" : "2025-06-20T06:23:44.922Z",
"create_date_timestamp" : 1660617231016,
"update_time" : "2025-06-20T06:23:44.922Z",
"update_time_timestamp" : 1660617231016,
"relation_change_time" : "2025-06-20T06:23:44.922Z",
"relation_change_time_timestamp" : 1660617231016,
"test_case_condition" : "[{\"fieldName\":\"autoType\",\"fieldValue\":\"0\",\"operator\":\"=\"}]",
"updator_id" : "b088303066476b9eaefdb44aa23bca",
"updator_name" : "名称01",
"relation_changer_id" : "b088303066476b9eaefdb44aa23bca",
"service_type" : 0,
"service_type_name" : "功能测试",
"tag_list" : [ "标签1" ],
"module_id" : "hyuiugifdso",
"module_name" : "模块名称01",
"module_path" : "id1/id2",
"module_path_name" : "模块1/模块2",
"release_dev" : "版本号01",
"ext_param" : "扩展参数",
"execute_way" : 1,
"execute_type" : 1,
"status_code" : 1,
"status_name" : "1",
"result_code" : 1,
"result_name" : "1",
"execute_status_code" : 1,
"execute_status_name" : "运行中",
"executor_id" : "11hj3qaw4jnkdsfts",
"executor_name" : "执行人名称",
"execute_latest_time" : "2025-06-20T06:23:44.922Z",
"execute_latest_time_timestamp" : 1660617231016,
"execute_duration" : "00:00:42",
"execute_times" : 1,
"project_uuid" : "klasier2dfj3qaw4jedfts",
"case_operation_info" : { },
"assign_case_num" : 2,
"finish_case_num" : 2,
"assign_defect_num" : 2,
"task_assign_msg" : "任务创建成功,%s条用例成功添加,%s条用例不存在无法添加。",
"iterator_version_uri" : "001ta94t35a",
"result_number_list" : [ {
"name" : "新建",
"value" : 22
} ],
"finish_date" : "2025-06-20T06:23:44.923Z",
"finish_date_timestamp" : 1660617231016,
"plan_start_date" : "2025-06-20T06:23:44.923Z",
"plan_start_timestamp" : 1660617231016,
"plan_end_date" : "2025-06-20T06:23:44.923Z",
"plan_end_timestamp" : 1660617261016,
"expiration_status" : 0,
"expiration_status_name" : "未超期"
} ],
"reason" : "string",
"page_size" : 0,
"page_no" : 0,
"has_more" : true
},
"error" : { },
"request_id" : "string",
"server_address" : "string"
}
状态码
状态码 |
描述 |
---|---|
200 |
OK |
400 |
Bad Request |
401 |
Unauthorized |
404 |
Not Found |
500 |
Internal Server Error |
错误码
请参见错误码。