更新测试管理用例和用例脚本
功能介绍
更新测试管理用例和用例脚本
调用方法
请参见如何调用API。
URI
PUT /v2/{project_id}/testcase/{tmss_case_uri}
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
project_id |
是 |
String |
参数解释 项目UUID,项目唯一标识,固定长度32位字符(字母和数字)。获取方式请参见获取项目唯一标识。 约束限制 不涉及 取值范围 32个字符组成的字符串 默认取值 不涉及 |
|
tmss_case_uri |
是 |
String |
测试管理用例uri |
请求参数
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
X-Auth-Token |
是 |
String |
参数解释: 用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 约束限制: 必传。 取值范围: 字符串长度不少于1,不超过10万。 默认取值: 不涉及。 |
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
UpdateTestCaseAndScriptTwoRequestBody |
否 |
String |
用例脚本信息 |
响应参数
状态码:200
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
error |
CommonResponseErrorOfobject object |
统一错误返回 |
|
reason |
String |
错误原因 |
|
result |
Object |
结果 |
|
status |
String |
状态值,如success、error |
请求示例
{
"id" : "459eccc1541e487aa7b20c8769865671",
"name" : "caseName02",
"changeSign" : 0,
"issueId" : null,
"addToPlan" : null,
"releaseDev" : null,
"copyFlag" : false,
"source" : null,
"region" : "{region}",
"status" : null,
"create_time_string" : "2022-04-19 08:54:14",
"update_time_string" : "2022-04-19 08:54:14",
"create_user" : "",
"create_time" : "2022-04-19T08:54:14+0800",
"update_user" : "",
"update_time" : "2022-04-19T08:54:14+0800",
"tmss_property" : {
"auto_type" : 1,
"creation_date" : "",
"test_feature" : "",
"package_name" : "scripts.user",
"name" : "caseName02",
"number" : "caseNumber02",
"description" : "",
"expect_output" : "",
"level" : 2,
"preparation" : "",
"testStep" : "",
"test_type" : 1,
"env_type" : "",
"exe_platform" : "apitest",
"author" : "",
"last_modifier" : "",
"labelId" : [ ],
"ownerId" : "",
"owner" : "",
"node_name" : "",
"label_id" : [ ]
},
"project_id" : "3efcc5e04c574266a35ebc02e7a72b12",
"logic_case_id" : null,
"activity_id" : "1",
"package_name" : "scripts.user",
"script_name" : "caseScriptName",
"script_path" : "caseScriptPath",
"tmss_case_uri" : "v92s10hrk3738ql1",
"aw_instance" : {
"setup_aw_list" : [ ],
"test_aw_list" : [ {
"all_variable_names" : [ ],
"custom_header" : [ ],
"param_type_and_value" : [ ],
"check_point_list" : [ {
"comparison" : "equals",
"property" : "$body.$.status",
"value" : "error"
} ],
"extra_info" : {
"http_method" : "get",
"http_url" : "https://100.93.1.72:8443/goserver/reflect"
},
"variable_list" : [ ],
"retry_interval" : "0",
"retry_times" : "0",
"is_basic" : 0,
"viewTab" : "requestHeader",
"body_param_type" : "text",
"show_url" : true,
"isClose" : false,
"condition_type" : null,
"show_method" : false,
"isCreate" : true,
"id" : null,
"description" : "127.0.0.1",
"aw_description" : "127.0.0.1"
} ],
"teardown_aw_list" : [ ]
},
"case_variable_list" : [ ],
"quality_check_result" : null,
"import_info_list" : [ ],
"IteratorCaseUri" : null,
"IsKeyWord" : 0,
"keyword_id" : null,
"variableGroupId" : null,
"error_step" : null,
"import_edit" : 5,
"user_id" : null,
"isSync" : false
}
响应示例
状态码:200
SUCCESS
{
"status" : "success",
"result" : "success",
"reason" : null,
"error" : null
}
状态码
|
状态码 |
描述 |
|---|---|
|
200 |
SUCCESS |
错误码
请参见错误码。