更新时间:2025-06-26 GMT+08:00
分享

获取用例执行日志

功能介绍

获取用例执行日志

调用方法

请参见如何调用API

URI

GET /v2/testcase/logdata

表1 Query参数

参数

是否必选

参数类型

描述

fulltask_id

String

任务唯一标识

testcase_id

String

测试用例唯一标识

project_id

String

项目唯一标识

请求参数

表2 请求Header参数

参数

是否必选

参数类型

描述

X-Auth-Token

String

参数解释:

用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。

约束限制:

必传。

取值范围:

字符串长度不少于1,不超过10万。

默认取值:

不涉及。

响应参数

状态码:200

表3 响应Body参数

参数

参数类型

描述

error

CommonResponseErrorOfobject object

统一错误返回

result

Object

结果

status

String

状态值,如success、error

表4 CommonResponseErrorOfobject

参数

参数类型

描述

code

String

错误码

reason

String

错误原因

状态码:201

表5 响应Body参数

参数

参数类型

描述

error

CommonResponseErrorOfobject object

统一错误返回

result

Object

结果

status

String

状态值,如success、error

表6 CommonResponseErrorOfobject

参数

参数类型

描述

code

String

错误码

reason

String

错误原因

状态码:401

表7 响应Body参数

参数

参数类型

描述

error_code

String

参数解释

接口调用失败错误码

取值范围

12-18个字符组成的字符串

error_msg

String

参数解释

接口调用失败错误信息

取值范围

3-1000个字符组成的字符串

状态码:403

表8 响应Body参数

参数

参数类型

描述

error_code

String

参数解释

接口调用失败错误码

取值范围

12-18个字符组成的字符串

error_msg

String

参数解释

接口调用失败错误信息

取值范围

3-1000个字符组成的字符串

状态码:404

表9 响应Body参数

参数

参数类型

描述

error_code

String

参数解释

接口调用失败错误码

取值范围

12-18个字符组成的字符串

error_msg

String

参数解释

接口调用失败错误信息

取值范围

3-1000个字符组成的字符串

请求示例

get https://{endpoint}/v2/testcase/logdata?fulltask_id=db556464568c42b1a07aeec7c97a38ba_roundnull&project_id=202802653fe94595aabc78da26fa2e6e&testcase_id=v92u00010i9kmjha

响应示例

状态码:200

OK

{
  "status" : "success",
  "result" : "{\"type\":\"node\",\"id\":\"d8b7ab3e88dc4c6e87b624a7d00db128\",\"parentId\":null,\"time\":1750145365514,\"cutoff\":false,\"name\":\"TC_241NUsMG\",\"status\":\"1\",\"business\":null,\"children\":[{\"type\":\"row\",\"id\":\"e164dcfb3db049f68b9a0bc4aa206f36\",\"parentId\":\"d8b7ab3e88dc4c6e87b624a7d00db128\",\"time\":1750145365515,\"cutoff\":false,\"label\":\"start\",\"value\":\"2025-06-17 15:29:24\"},{\"type\":\"row\",\"id\":\"b7423774c6614ea3887ff41df11863ef\",\"parentId\":\"d8b7ab3e88dc4c6e87b624a7d00db128\",\"time\":1750145365515,\"cutoff\":false,\"label\":\"end\",\"value\":\"2025-06-17 15:29:25\"},{\"type\":\"row\",\"id\":\"55d1f1041fe94d16a0a172d60f55dbb4\",\"parentId\":\"d8b7ab3e88dc4c6e87b624a7d00db128\",\"time\":1750145365515,\"cutoff\":false,\"label\":\"duration\",\"value\":\"1388\"},{\"type\":\"row\",\"id\":\"b4edf5cd95b24f6ea7ef6ff1daba78eb\",\"parentId\":\"d8b7ab3e88dc4c6e87b624a7d00db128\",\"time\":1750145365515,\"cutoff\":false,\"label\":\"totalBodySize\",\"value\":\"74 byte\"},{\"type\":\"node\",\"id\":\"38e85c6588ef4000b6cf983034f86459\",\"parentId\":\"d8b7ab3e88dc4c6e87b624a7d00db128\",\"time\":1750145365515,\"cutoff\":false,\"name\":\"setUp\",\"status\":\"0\",\"business\":null,\"children\":[{\"type\":\"row\",\"id\":\"0bfce6a6891247149d44e6b0c564e354\",\"parentId\":\"38e85c6588ef4000b6cf983034f86459\",\"time\":1750145365515,\"cutoff\":false,\"label\":\"start\",\"value\":\"2025-06-17 15:29:24\"},{\"type\":\"row\",\"id\":\"2d950633616f4b30936618b58af2c716\",\"parentId\":\"38e85c6588ef4000b6cf983034f86459\",\"time\":1750145365515,\"cutoff\":false,\"label\":\"end\",\"value\":\"2025-06-17 15:29:24\"},{\"type\":\"row\",\"id\":\"b840dcfd05ec47da82b826c579283a3f\",\"parentId\":\"38e85c6588ef4000b6cf983034f86459\",\"time\":1750145365515,\"cutoff\":false,\"label\":\"duration\",\"value\":\"28\"}],\"startTime\":1750145364224,\"endTime\":1750145364252},{\"type\":\"node\",\"id\":\"ab78a33da16b47fb8378fedd20861807\",\"parentId\":\"d8b7ab3e88dc4c6e87b624a7d00db128\",\"time\":1750145365515,\"cutoff\":false,\"name\":\"test\",\"status\":\"1\",\"business\":null,\"children\":[{\"type\":\"row\",\"id\":\"6102637d55e54ed1881e2f74092f1aa2\",\"parentId\":\"ab78a33da16b47fb8378fedd20861807\",\"time\":1750145365515,\"cutoff\":false,\"label\":\"start\",\"value\":\"2025-06-17 15:29:24\"},{\"type\":\"row\",\"id\":\"6c0e43aa9f284c248cefe252cf68263b\",\"parentId\":\"ab78a33da16b47fb8378fedd20861807\",\"time\":1750145365515,\"cutoff\":false,\"label\":\"end\",\"value\":\"2025-06-17 15:29:25\"},{\"type\":\"row\",\"id\":\"70bbb054ec074269b9a0ae5de1608362\",\"parentId\":\"ab78a33da16b47fb8378fedd20861807\",\"time\":1750145365516,\"cutoff\":false,\"label\":\"duration\",\"value\":\"1175\"},{\"type\":\"row\",\"id\":\"ec25840c17784d40816c7022f73d5522\",\"parentId\":\"83c217936eba4a8c8dbde653b60ca507\",\"time\":1750145364641,\"cutoff\":false,\"label\":\"AWProgress\",\"value\":\"0/1\"},{\"type\":\"row\",\"id\":\"d4ef87db20b04588b163bb9d0ba754c1\",\"parentId\":\"83c217936eba4a8c8dbde653b60ca507\",\"time\":1750145364649,\"cutoff\":false,\"label\":\"AWProgressCount\",\"value\":\"0\"},{\"type\":\"node\",\"id\":\"e8adac7dc40c434780e7c45eef2f5e62\",\"parentId\":\"83c217936eba4a8c8dbde653b60ca507\",\"time\":1750145364650,\"cutoff\":false,\"name\":\"1. 127.0.0.1\",\"status\":\"1\",\"business\":null,\"children\":[{\"type\":\"row\",\"id\":\"28bf250e76534cd1b64c6c2a8a88f2eb\",\"parentId\":\"e8adac7dc40c434780e7c45eef2f5e62\",\"time\":1750145364652,\"cutoff\":false,\"label\":\"awInsId\",\"value\":\"3bb415c082d640bcb94968cde49c61fc\"},{\"type\":\"row\",\"id\":\"7da00d3825fb46079cd696ad4d17f328\",\"parentId\":\"e8adac7dc40c434780e7c45eef2f5e62\",\"time\":1750145364658,\"cutoff\":false,\"label\":\"Time\",\"value\":\"2025-06-17 15:29:24 657\"},{\"type\":\"row\",\"id\":\"760f10a42a534bb7857380765908a81e\",\"parentId\":\"e8adac7dc40c434780e7c45eef2f5e62\",\"time\":1750145364658,\"cutoff\":false,\"label\":\"Url\",\"value\":\"https://100.95.163.120:7749/atservice/v1/25debe3629e14b8c903ed091cdc4a919/testcase/v92t00010i8172rd\"},{\"type\":\"row\",\"id\":\"fda78a734f1344909e0bb111761c8116\",\"parentId\":\"e8adac7dc40c434780e7c45eef2f5e62\",\"time\":1750145364659,\"cutoff\":false,\"label\":\"Method\",\"value\":\"get\"},{\"type\":\"row\",\"id\":\"25fbf0eec41d4a0ba2517ad9318a770e\",\"parentId\":\"e8adac7dc40c434780e7c45eef2f5e62\",\"time\":1750145364711,\"cutoff\":false,\"label\":\"RequestHeader\",\"value\":\"{}\"},{\"type\":\"row\",\"id\":\"ba654f8d5fa24aa18ee2594bea045389\",\"parentId\":\"e8adac7dc40c434780e7c45eef2f5e62\",\"time\":1750145364737,\"cutoff\":false,\"label\":\"RequestHeaders\",\"value\":\"Content-Type: application/json;charset=utf-8\\nAccept: */*\\n\"},{\"type\":\"row\",\"id\":\"70aeb7fee0a94947ae2e5e90648c7c02\",\"parentId\":\"e8adac7dc40c434780e7c45eef2f5e62\",\"time\":1750145365220,\"cutoff\":false,\"label\":\"ResponseCode\",\"value\":\"401\"},{\"type\":\"row\",\"id\":\"977141e9b8b84c4d96c3a23fb905e620\",\"parentId\":\"e8adac7dc40c434780e7c45eef2f5e62\",\"time\":1750145365226,\"cutoff\":false,\"label\":\"ResponseHeader\",\"value\":\"{\\\"cache-control\\\":\\\"no-cache, no-store, max-age=0, must-revalidate\\\",\\\"connection\\\":\\\"keep-alive\\\",\\\"content-type\\\":\\\"application/json;charset=UTF-8\\\",\\\"date\\\":\\\"Tue, 17 Jun 2025 07:31:45 GMT\\\",\\\"expires\\\":\\\"0\\\",\\\"keep-alive\\\":\\\"timeout=65\\\",\\\"lubanops-gtrace-id\\\":\\\"2001625-1750145423725-1969\\\",\\\"lubanops-nenv-id\\\":\\\"85539\\\",\\\"lubanops-ntrace-id\\\":\\\"2001625-1750145423725-1969\\\",\\\"pragma\\\":\\\"no-cache\\\",\\\"server\\\":\\\"Web Server\\\",\\\"strict-transport-security\\\":\\\"max-age=31536000 ; includeSubDomains\\\",\\\"transfer-encoding\\\":\\\"chunked\\\",\\\"x-content-type-options\\\":\\\"nosniff\\\",\\\"x-frame-options\\\":\\\"DENY\\\",\\\"x-request-id\\\":\\\"ffa72f27-fcde-43eb-ab39-e3b603760098-1750145423725-cnnorth7a-beta-cloudtest-apitest-atservice-ecs\\\",\\\"x-xss-protection\\\":\\\"0\\\"}\"},{\"type\":\"row\",\"id\":\"a3552c83f73f445b8623eebc3678cca8\",\"parentId\":\"e8adac7dc40c434780e7c45eef2f5e62\",\"time\":1750145365227,\"cutoff\":false,\"label\":\"ResponseBody\",\"value\":\"{\\\"error_code\\\":\\\"DEV.00000001\\\",\\\"error_msg\\\":\\\"未识别到用户认证信息\\\"}\"},{\"type\":\"row\",\"id\":\"ac01778fbdd74dd39825e6337be09a2f\",\"parentId\":\"e8adac7dc40c434780e7c45eef2f5e62\",\"time\":1750145365230,\"cutoff\":false,\"label\":\"EndTime\",\"value\":\"2025-06-17 15:29:25 230\"},{\"type\":\"row\",\"id\":\"4ba1e720a3ec40298ed586c075659c2b\",\"parentId\":\"e8adac7dc40c434780e7c45eef2f5e62\",\"time\":1750145365425,\"cutoff\":false,\"label\":\"exception\",\"value\":\"第1个检查点异常:期望结果:响应体 的 $.status 属性 等于(字符串、区分大小写)【error】, 实际结果:响应体的 $.status 属性获取失败\"}],\"startTime\":1750145364651,\"endTime\":null}],\"startTime\":1750145364255,\"endTime\":1750145365430},{\"type\":\"node\",\"id\":\"d71beafb70944b5c9d042f6d2e538025\",\"parentId\":\"d8b7ab3e88dc4c6e87b624a7d00db128\",\"time\":1750145365516,\"cutoff\":false,\"name\":\"tearDown\",\"status\":\"0\",\"business\":null,\"children\":[{\"type\":\"row\",\"id\":\"377756596b384ddc943df576e88ea249\",\"parentId\":\"d71beafb70944b5c9d042f6d2e538025\",\"time\":1750145365516,\"cutoff\":false,\"label\":\"start\",\"value\":\"2025-06-17 15:29:25\"},{\"type\":\"row\",\"id\":\"6d9a91cd9e74459d9bb79bb1eae8b622\",\"parentId\":\"d71beafb70944b5c9d042f6d2e538025\",\"time\":1750145365516,\"cutoff\":false,\"label\":\"end\",\"value\":\"2025-06-17 15:29:25\"},{\"type\":\"row\",\"id\":\"c7257b55edad4003aa2298273fff3e35\",\"parentId\":\"d71beafb70944b5c9d042f6d2e538025\",\"time\":1750145365516,\"cutoff\":false,\"label\":\"duration\",\"value\":\"2\"}],\"startTime\":1750145365432,\"endTime\":1750145365434}],\"startTime\":1750145364049,\"endTime\":1750145365437}",
  "error" : null
}

状态码

状态码

描述

200

OK

201

Created

401

Unauthorized

403

Forbidden

404

Not Found

错误码

请参见错误码

相关文档