性能测试 CodeArts PerfTest
性能测试 CodeArts PerfTest
- 最新动态
- 功能总览
- 产品介绍
- 计费说明
- 快速入门
- 用户指南
- 最佳实践
- API参考
- SDK参考
-
常见问题
- 资源组管理
- 压测工程管理
- 压测报告管理
- 通用问题
-
JMeter工程使用
- 性能测试服务的JMeter引擎和开源JMeter有什么异同?
- 性能测试服务的JMeter引擎支持哪些脚本?
- 性能测试服务的JMeter引擎不支持脚本中哪些操作?
- JMeter测试工程中,jmx文件导入报错可能有哪些原因?
- 应用于性能测试服务的脚本,有哪些使用建议?
- 全局变量功能是如何使用的?
- 上传第三方jar包时需要注意什么?
- 上传CSV文件时需要注意什么?
- 上传自定义安装包时需注意什么?
- 为什么用JMeter软件设置请求头content-type为utf-8,请求返回正常,使用性能测试服务请求返回乱码?
- JMeter报告,日志各类报错的含义是什么?
- JMeter用例调试时,为什么在很短的时间(小于5秒)内失败,页面无数据?
- 视频帮助
- 文档下载
- 通用参考
链接复制成功!
查询事务
功能介绍
查询事务
调试
您可以在API Explorer中调试该接口,支持自动认证鉴权。API Explorer可以自动生成SDK代码示例,并提供SDK代码示例调试功能。
URI
GET /v1/{project_id}/templates/{template_id}
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
project_id |
是 |
String |
表示项目ID,参见获取方法说明。 |
template_id |
是 |
Integer |
事务ID |
请求参数
无
响应参数
状态码:200
参数 |
参数类型 |
描述 |
---|---|---|
code |
String |
响应码 |
message |
String |
响应消息 |
temp_info |
TempInfo object |
事务详情 |
参数 |
参数类型 |
描述 |
---|---|---|
id |
Integer |
事务ID |
project_id |
Integer |
工程ID |
name |
String |
事务名称 |
description |
String |
事务描述 |
variables |
String |
变量 |
contents |
Array of objects |
事务脚本信息 |
temp_type |
Integer |
事务类型(弃用) |
for_loop_params |
Array of objects |
旧版本逻辑控制器字段,当前已未使用 |
logic_controller |
LogicController object |
逻辑控制器信息 |
enable_pre |
Boolean |
是否启用预置事务,当前版本已未使用 |
状态码:501
参数 |
参数类型 |
描述 |
---|---|---|
- |
String |
response message |
请求示例
查询事务的详情信息,事务的id是1。
/v1/{project_id}/templates/1
{
"code" : "SVCSTG.CPTS.0000000",
"message" : "success",
"temp_info" : {
"id" : 155175,
"project_id" : 403931,
"name" : "test",
"description" : "",
"variables" : null,
"contents" : [ {
"content_id" : 155175,
"content" : [ {
"content_type" : 2,
"content" : {
"_adressValue" : "http://1.1.1.1",
"body_type" : 0,
"bodys" : [ ],
"check_end_length" : null,
"check_end_str" : null,
"check_end_type" : null,
"connect_timeout" : 5000,
"connect_type" : 1,
"headers" : [ {
"key" : "Content-Type",
"value" : "application/json"
} ],
"http_version" : "HTTP/1.1",
"method" : "GET",
"name" : "Msg-8015",
"protocol_type" : 1,
"return_timeout" : 5000,
"return_timeout_param" : null,
"url" : "http://1.1.1.1"
}
} ],
"index" : -1,
"selected_temp_name" : "",
"data" : null,
"data_type" : 0,
"conditions" : null,
"is_disabled" : false,
"is_continue" : false
} ],
"temp_type" : 0,
"for_loop_params" : [ ],
"logic_controller" : {
"for_loop_params" : null,
"condition" : null
},
"enable_pre" : false
}
}
响应示例
状态码:200
success
{
"code" : "SVCSTG.CPTS.0000000",
"message" : "success",
"temp_info" : {
"id" : 21531,
"project_id" : 17543,
"name" : "transaction",
"description" : "",
"variables" : null,
"contents" : [ {
"content_id" : 21531,
"content" : [ {
"content_type" : 2,
"content" : {
"body_type" : 0,
"bodys" : [ ],
"check_end_length" : null,
"check_end_str" : null,
"check_end_type" : null,
"connect_timeout" : 5000,
"connect_type" : 1,
"headers" : [ {
"key" : "Content-Type",
"value" : "application/json"
} ],
"http_version" : "HTTP/1.1",
"method" : "GET",
"name" : "Msg-73387",
"protocol_type" : 2,
"return_timeout" : 5000,
"return_timeout_param" : null,
"url" : "https://www.domain-example.com"
}
} ],
"index" : -1,
"selected_temp_name" : "",
"data" : null,
"data_type" : 0,
"conditions" : null,
"is_disabled" : false,
"is_continue" : false
} ],
"temp_type" : 0,
"for_loop_params" : [ ],
"logic_controller" : {
"for_loop_params" : null,
"condition" : null
},
"enable_pre" : false
}
}
状态码
状态码 |
描述 |
---|---|
200 |
success |
501 |
unknown error |
错误码
请参见错误码。
父主题: 事务管理