查询任务详情 - TaskDetail
功能介绍
查询功能自动化任务或者任务组详情
调用方法
请参见如何调用API。
URI
POST /v3/task/detail
请求参数
参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
cida-productid | 是 | String | 租户id |
x-auth-tenantid | 是 | String | CLOUD_TEST租户 |
x-auth-groups | 是 | String | 项目id |
x-user-name | 是 | String | 用户名 |
x-auth-token | 是 | String | 参数解释: 用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 约束限制: 必传。 取值范围: 字符串长度不少于1,不超过10万。 默认取值: 不涉及。 |
requestId | 是 | String | 参数解释 请求id 约束限制 不涉及 取值范围 字符串长度不少于1,不超过100000 默认取值 不涉及 |
参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
testServiceId | 否 | String | 服务id |
taskType | 否 | String | 任务类型:template - 任务模板,task - 任务,“” - 先查任务模板,没查到再查任务 |
where | 否 | Array of objects | 查询条件 |
coldDataFlag | 否 | Boolean | 冷数据开关,默认关闭 |
响应参数
状态码:200
参数 | 参数类型 | 描述 |
|---|---|---|
result | result object | 结果对象 |
server_ip | String | 服务器IP |
request_id | String | 请求ID |
status | String | 状态码:"ok" - 成功 |
参数 | 参数类型 | 描述 |
|---|---|---|
isSetResultToTMSS | Boolean | 是否写入用例管理服务 |
platFromErrStrategy | String | 平台错误处理策略 |
completedTestcaseCount | Integer | 已完成用例数 |
testType | String | 测试类型:regression - 回归 |
simple | Boolean | 是否为简单任务 |
dependId | String | 依赖任务ID |
versionName | String | 用例库版本名称 |
type | String | 任务类型:executing - 测试任务,ticctaskproject - 任务组 |
elapseTime | Integer | 已耗时(秒) |
totalTestcaseCount | Integer | 总用例数 |
children | Array of TestSubTask objects | 子任务列表 |
envInfo | envInfo object | 环境信息 |
startTime | Integer | 任务开始时间(毫秒时间戳) |
state | Integer | 任务状态码 |
id | String | 任务ID |
blockedTestcaseCount | Integer | 阻塞用例数 |
taskGroupExeParam | String | 任务组扩展参数(Json字符串) |
tmssInfo | tmssInfo object | 用例管理服务 |
productId | String | 产品ID |
author | String | 任务创建人 |
investigatedTestcaseCount | Integer | 调查中用例数量 |
testServiceId | String | 测试服务ID |
remainTime | Integer | 剩余时间(秒) |
priority | String | 优先级 |
failedTestcaseCount | Integer | 失败用例数 |
analyser | String | 任务分析人 |
taskStrategy | Object | 任务调度策略 |
versionId | String | 版本ID |
testEnvironment | String | 测试环境 |
createTime | Integer | 创建时间(毫秒时间戳) |
passedTestcaseCount | Integer | 通过用例数 |
name | String | 任务名称 |
progress | Integer | 当前进度百分比 |
endTime | Integer | 结束时间(毫秒时间戳) |
circle | circle object | 循环执行信息 |
unavailableTestcaseCount | Integer | 不可执行用例数 |
taskPolicy | Integer | 任务分配策略 |
参数 | 参数类型 | 描述 |
|---|---|---|
taskMode | String | 子任务模式 |
completedTestcaseCount | Integer | 已完成用例数 |
tmssVersion | String | 用例库版本名称 |
type | String | 任务类型:executing - 测试任务,ticctaskproject - 任务组 |
elapseTime | Integer | 已耗时(秒) |
platform | Array of platform objects | 平台信息列表 |
userExtendContent | Object | 用户扩展参数 |
testbeds | Array of objects | 测试床信息 |
totalTestcaseCount | Integer | 总用例数 |
startTime | Integer | 子任务开始时间(毫秒时间戳) |
state | Integer | 状态码 |
id | String | 子任务ID |
blockedTestcaseCount | Integer | 阻塞用例数 |
resource | Object | 资源信息 |
investigatedTestcaseCount | Integer | 调查中用例数 |
author | String | 创建人 |
remainTime | Integer | 剩余时间 |
failedTestcaseCount | Integer | 失败用例数 |
taskStrategy | Object | 子任务调度策略 |
testEnvironment | String | 测试环境 |
needEnvVersion | Boolean | 是否需要环境版本 |
createTime | Integer | 创建时间 |
passedTestcaseCount | Integer | 通过用例数 |
name | String | 子任务名称 |
progress | Integer | 进度 |
location | String | 资源位置 |
endTime | Integer | 结束时间 |
unavailableTestcaseCount | Integer | 不可用用例数 |
taskPolicy | Integer | 任务分配策略 |
resourceType | String | 资源类型:"TestVersion" - 测试版本,"TestItem" - 测试项,"TaskFolder" - 任务目录,"TestCase" - 测试用例,"Task" - 任务,"UserDefined" - 用户定义 |
maxExecuteTime | Integer | 最大执行时间 |
参数 | 参数类型 | 描述 |
|---|---|---|
urlvpc | String | 用例管理服务 VPC访问地址 |
type | String | 用例管理服务类型:"CloudTMSS" - CloudTMSS |
url | String | 用例管理服务访问地址 |
参数 | 参数类型 | 描述 |
|---|---|---|
intervalTimeUnit | String | 重复间隔时间单位 |
startTime | String | 循环任务开始时间 |
endTime | String | 循环任务结束时间 |
intervalTime | Integer | 循环间隔时间 |
状态码:201
Created
状态码:401
参数 | 参数类型 | 描述 |
|---|---|---|
status | String | 请求状态:"failed" - 失败 |
request_id | String | 请求id |
server_ip | String | 服务节点IP |
error_msg | String | 错误信息 |
error_code | String | 错误码 |
error_cause | String | 错误原因 |
faq | String | faq内容 |
状态码:403
参数 | 参数类型 | 描述 |
|---|---|---|
status | String | 请求状态:"failed" - 失败 |
request_id | String | 请求id |
server_ip | String | 服务节点IP |
error_msg | String | 错误信息 |
error_code | String | 错误码 |
error_cause | String | 错误原因 |
faq | String | faq内容 |
状态码:404
参数 | 参数类型 | 描述 |
|---|---|---|
status | String | 请求状态:"failed" - 失败 |
request_id | String | 请求id |
server_ip | String | 服务节点IP |
error_msg | String | 错误信息 |
error_code | String | 错误码 |
error_cause | String | 错误原因 |
faq | String | faq内容 |
请求示例
post https://{endpoint}/v3/task/detail
{
"taskType" : "task",
"where" : [ {
"key" : "id",
"type" : "=",
"value" : "2593159691869093888"
} ],
"testServiceId" : "c2d63f9d3af34177ab62545d841c78d7"
} 响应示例
状态码:200
返回任务详情信息
{
"result" : {
"data" : [ {
"isSetResultToTMSS" : true,
"platFromErrStrategy" : "no",
"completedTestcaseCount" : 0,
"testType" : "regression",
"simple" : true,
"dependId" : "2607422110028529664",
"versionName" : "用例库",
"type" : "executing",
"elapseTime" : 57,
"totalTestcaseCount" : 0,
"children" : [ {
"taskMode" : "2+1",
"completedTestcaseCount" : 0,
"tmssVersion" : "用例管理服务版本",
"type" : "executing",
"elapseTime" : 57,
"platform" : [ {
"ip" : "tep_agaent",
"groupId" : "tep_agaent",
"id" : "tep_agaent"
} ],
"userExtendContent" : {
"serviceType" : "Single",
"platFromErrStrategy" : "no",
"pbiName" : "",
"ignoreEnv" : false,
"Env_Network_Area" : "networkArea",
"productName" : "productName",
"testActivityType" : "",
"serial_execution" : false,
"cloudTestType" : "cloudTestType",
"intervalTimeUnit" : "h",
"git_url" : "",
"envSystem" : "",
"downloadScriptUrl" : {
"api_host" : "apigw.huawei.com"
},
"branchId" : "v9050000tqu3e7e2",
"rgid" : "",
"releaseVersion" : "null-null",
"ip" : "",
"branchName" : "基线",
"pbiId" : "",
"exeParam" : "{\"executor\":\"efdb403066474ab08836b9eeaaa23bca\"}",
"env" : [ ],
"taskDesc" : "",
"isSelectAllTeps" : false,
"iteratorId" : "v9050000tqu3e7e2",
"iteratorName" : "用例库",
"exe_param_overridable" : false,
"excuteType" : "6",
"port" : "",
"jenkinsIds" : [ ],
"isPersonConfig" : "false",
"region" : { },
"git_username" : ""
},
"testbeds" : [ ],
"totalTestcaseCount" : 0,
"startTime" : 1748400338513,
"state" : 7,
"id" : "2607422110028005376",
"blockedTestcaseCount" : 0,
"resource" : {
"uris" : [ "v92n10g2nkgf0v3j" ],
"type" : "TestCase"
},
"investigatedTestcaseCount" : 0,
"author" : "efdb403066474ab08836b9eeaaa23bca",
"remainTime" : 0,
"failedTestcaseCount" : 0,
"taskStrategy" : {
"isDistributeByLastTimeCost" : false,
"caseExecType" : 2,
"checkEnvSwitch" : true,
"applyEnvFirst" : false,
"parallelSchedulerBlockFields" : "exeplatform,envType,mapRestrict",
"oneBlock" : false,
"parallelBatchSize" : 2500,
"testCaseBlockReRunType" : 2,
"blockSize" : 10
},
"testEnvironment" : "云化TICC",
"needEnvVersion" : false,
"createTime" : 1748400338494,
"passedTestcaseCount" : 0,
"name" : "test",
"progress" : 0,
"location" : "",
"endTime" : 1748400338570,
"unavailableTestcaseCount" : 0,
"taskPolicy" : 3,
"resourceType" : "TestCase",
"maxExecuteTime" : 0
} ],
"envInfo" : {
"lcmurl" : "",
"lcmurlvpc" : ""
},
"startTime" : 1748400338513,
"state" : 7,
"id" : "2607422110028005376",
"blockedTestcaseCount" : 0,
"taskGroupExeParam" : "{\"serviceType\":\"Single\",\"platFromErrStrategy\":\"no\",\"pbiName\":\"\",\"ignoreEnv\":false,\"Env_Network_Area\":\"networkArea\",\"productName\":\"productName\",\"testActivityType\":\"\",\"serial_execution\":false,\"cloudTestType\":\"cloudTestType\",\"intervalTimeUnit\":\"h\",\"git_url\":\"\",\"envSystem\":\"\",\"downloadScriptUrl\":{\"api_host\":\"apigw.huawei.com\"},\"branchId\":\"v9050000tqu3e7e2\",\"rgid\":\"\",\"releaseVersion\":\"null-null\",\"ip\":\"\",\"branchName\":\"基线\",\"pbiId\":\"\",\"exeParam\":\"{\\\"executor\\\":\\\"efdb403066474ab08836b9eeaaa23bca\\\"}\",\"env\":[],\"taskDesc\":\"\",\"isSelectAllTeps\":false,\"iteratorId\":\"v9050000tqu3e7e2\",\"iteratorName\":\"用例库\",\"exe_param_overridable\":false,\"excuteType\":\"6\",\"port\":\"\",\"jenkinsIds\":[],\"isPersonConfig\":\"false\",\"region\":\"{region}\",\"git_username\":\"\"}",
"tmssInfo" : {
"urlvpc" : "",
"type" : "CloudTMSS",
"url" : ""
},
"productId" : "c2d63f9d3af34177ab62545d841c78d7",
"author" : "efdb403066474ab08836b9eeaaa23bca",
"investigatedTestcaseCount" : 0,
"testServiceId" : "c2d63f9d3af34177ab62545d841c78d7",
"remainTime" : 0,
"priority" : "",
"failedTestcaseCount" : 0,
"analyser" : "efdb403066474ab08836b9eeaaa23bca",
"taskStrategy" : { },
"versionId" : "v9050000tqu3e7e2",
"testEnvironment" : "xxxxx",
"createTime" : 1748400338494,
"passedTestcaseCount" : 0,
"name" : "444444444444444444444",
"progress" : 0,
"endTime" : 1748400338570,
"circle" : {
"intervalTimeUnit" : "h",
"startTime" : "",
"endTime" : "",
"intervalTime" : 0
},
"unavailableTestcaseCount" : 0,
"taskPolicy" : 3
} ],
"pageInfo" : {
"total" : 1
}
},
"server_ip" : "",
"request_id" : "",
"status" : "ok"
} 状态码:401
Unauthorized
{
"error_code" : "DEV.00000003",
"error_msg" : "认证信息过期"
} 状态码
状态码 | 描述 |
|---|---|
200 | 返回任务详情信息 |
201 | Created |
401 | Unauthorized |
403 | Forbidden |
404 | Not Found |
错误码
请参见错误码。

