mirror of
https://github.com/httprunner/httprunner.git
synced 2026-09-01 21:47:41 +08:00
361 lines
17 KiB
JSON
361 lines
17 KiB
JSON
{
|
|
"success":true,
|
|
"stat":{
|
|
"testcases":{
|
|
"total":1,
|
|
"success":1,
|
|
"fail":0
|
|
},
|
|
"teststeps":{
|
|
"total":2,
|
|
"failures":0,
|
|
"errors":0,
|
|
"skipped":0,
|
|
"expectedFailures":0,
|
|
"unexpectedSuccesses":0,
|
|
"successes":2
|
|
}
|
|
},
|
|
"time":{
|
|
"start_at":1548560768.590071,
|
|
"duration":0.036631107330322266
|
|
},
|
|
"platform":{
|
|
"httprunner_version":"2.0.2",
|
|
"python_version":"CPython 3.7.0",
|
|
"platform":"Darwin-18.2.0-x86_64-i386-64bit"
|
|
},
|
|
"details":[
|
|
{
|
|
"success":true,
|
|
"stat":{
|
|
"total":2,
|
|
"failures":0,
|
|
"errors":0,
|
|
"skipped":0,
|
|
"expectedFailures":0,
|
|
"unexpectedSuccesses":0,
|
|
"successes":2
|
|
},
|
|
"time":{
|
|
"start_at":1548560768.590071,
|
|
"duration":0.036631107330322266
|
|
},
|
|
"records":[
|
|
{
|
|
"name":"/api/get-token",
|
|
"status":"success",
|
|
"attachment":"",
|
|
"meta_datas":{
|
|
"name":"/api/get-token",
|
|
"data":[
|
|
{
|
|
"request":{
|
|
"url":"http://127.0.0.1:5000/api/get-token",
|
|
"method":"POST",
|
|
"headers":{
|
|
"User-Agent":"python-requests/2.18.4",
|
|
"Accept-Encoding":"gzip, deflate",
|
|
"Accept":"*/*",
|
|
"Connection":"keep-alive",
|
|
"device_sn":"mmHBimjzK4Pk6mg",
|
|
"os_platform":"ios",
|
|
"app_version":"2.8.6",
|
|
"Content-Type":"application/json",
|
|
"Content-Length":"52"
|
|
},
|
|
"body":"{"sign": "57885427ba4f3d55b6bce51827c5152a0f0f850f"}"
|
|
},
|
|
"response":{
|
|
"ok":true,
|
|
"url":"http://127.0.0.1:5000/api/get-token",
|
|
"status_code":200,
|
|
"reason":"OK",
|
|
"cookies":{},
|
|
"encoding":"None",
|
|
"headers":{
|
|
"Content-Type":"application/json",
|
|
"Content-Length":"46",
|
|
"Server":"Werkzeug/0.14.1 Python/3.6.5+",
|
|
"Date":"Sun, 27 Jan 2019 03:46:08 GMT"
|
|
},
|
|
"content_type":"application/json",
|
|
"json":{
|
|
"success":true,
|
|
"token":"C3olNHYCMWfSQkCW"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"stat":{
|
|
"response_time_ms":11.42,
|
|
"elapsed_ms":3.71,
|
|
"content_size":46
|
|
},
|
|
"validators":[
|
|
{
|
|
"check":"status_code",
|
|
"expect":200,
|
|
"comparator":"eq",
|
|
"check_value":200,
|
|
"check_result":"pass"
|
|
},
|
|
{
|
|
"check":"headers.Content-Type",
|
|
"expect":"application/json",
|
|
"comparator":"eq",
|
|
"check_value":"application/json",
|
|
"check_result":"pass"
|
|
},
|
|
{
|
|
"check":"content.success",
|
|
"expect":true,
|
|
"comparator":"eq",
|
|
"check_value":true,
|
|
"check_result":"pass"
|
|
}
|
|
]
|
|
},
|
|
"meta_datas_expanded":[
|
|
{
|
|
"name":"/api/get-token",
|
|
"data":[
|
|
{
|
|
"request":{
|
|
"url":"http://127.0.0.1:5000/api/get-token",
|
|
"method":"POST",
|
|
"headers":{
|
|
"User-Agent":"python-requests/2.18.4",
|
|
"Accept-Encoding":"gzip, deflate",
|
|
"Accept":"*/*",
|
|
"Connection":"keep-alive",
|
|
"device_sn":"mmHBimjzK4Pk6mg",
|
|
"os_platform":"ios",
|
|
"app_version":"2.8.6",
|
|
"Content-Type":"application/json",
|
|
"Content-Length":"52"
|
|
},
|
|
"body":"{"sign": "57885427ba4f3d55b6bce51827c5152a0f0f850f"}"
|
|
},
|
|
"response":{
|
|
"ok":true,
|
|
"url":"http://127.0.0.1:5000/api/get-token",
|
|
"status_code":200,
|
|
"reason":"OK",
|
|
"cookies":{},
|
|
"encoding":"None",
|
|
"headers":{
|
|
"Content-Type":"application/json",
|
|
"Content-Length":"46",
|
|
"Server":"Werkzeug/0.14.1 Python/3.6.5+",
|
|
"Date":"Sun, 27 Jan 2019 03:46:08 GMT"
|
|
},
|
|
"content_type":"application/json",
|
|
"json":{
|
|
"success":true,
|
|
"token":"C3olNHYCMWfSQkCW"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"stat":{
|
|
"response_time_ms":11.42,
|
|
"elapsed_ms":3.71,
|
|
"content_size":46
|
|
},
|
|
"validators":[
|
|
{
|
|
"check":"status_code",
|
|
"expect":200,
|
|
"comparator":"eq",
|
|
"check_value":200,
|
|
"check_result":"pass"
|
|
},
|
|
{
|
|
"check":"headers.Content-Type",
|
|
"expect":"application/json",
|
|
"comparator":"eq",
|
|
"check_value":"application/json",
|
|
"check_result":"pass"
|
|
},
|
|
{
|
|
"check":"content.success",
|
|
"expect":true,
|
|
"comparator":"eq",
|
|
"check_value":true,
|
|
"check_result":"pass"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"response_time":"11.42"
|
|
},
|
|
{
|
|
"name":"/api/users/1548560768589",
|
|
"status":"success",
|
|
"attachment":"",
|
|
"meta_datas":{
|
|
"name":"/api/users/1548560768589",
|
|
"data":[
|
|
{
|
|
"request":{
|
|
"url":"http://127.0.0.1:5000/api/users/1548560768589",
|
|
"method":"POST",
|
|
"headers":{
|
|
"User-Agent":"python-requests/2.18.4",
|
|
"Accept-Encoding":"gzip, deflate",
|
|
"Accept":"*/*",
|
|
"Connection":"keep-alive",
|
|
"device_sn":"mmHBimjzK4Pk6mg",
|
|
"token":"C3olNHYCMWfSQkCW",
|
|
"Content-Type":"application/json",
|
|
"Content-Length":"39"
|
|
},
|
|
"body":"{"name": "user1", "password": "123456"}"
|
|
},
|
|
"response":{
|
|
"ok":true,
|
|
"url":"http://127.0.0.1:5000/api/users/1548560768589",
|
|
"status_code":201,
|
|
"reason":"CREATED",
|
|
"cookies":{},
|
|
"encoding":"None",
|
|
"headers":{
|
|
"Content-Type":"application/json",
|
|
"Content-Length":"54",
|
|
"Server":"Werkzeug/0.14.1 Python/3.6.5+",
|
|
"Date":"Sun, 27 Jan 2019 03:46:08 GMT"
|
|
},
|
|
"content_type":"application/json",
|
|
"json":{
|
|
"success":true,
|
|
"msg":"user created successfully."
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"stat":{
|
|
"response_time_ms":2.8,
|
|
"elapsed_ms":1.748,
|
|
"content_size":54
|
|
},
|
|
"validators":[
|
|
{
|
|
"check":"status_code",
|
|
"expect":201,
|
|
"comparator":"eq",
|
|
"check_value":201,
|
|
"check_result":"pass"
|
|
},
|
|
{
|
|
"check":"headers.Content-Type",
|
|
"expect":"application/json",
|
|
"comparator":"eq",
|
|
"check_value":"application/json",
|
|
"check_result":"pass"
|
|
},
|
|
{
|
|
"check":"content.success",
|
|
"expect":true,
|
|
"comparator":"eq",
|
|
"check_value":true,
|
|
"check_result":"pass"
|
|
},
|
|
{
|
|
"check":"content.msg",
|
|
"expect":"user created successfully.",
|
|
"comparator":"eq",
|
|
"check_value":"user created successfully.",
|
|
"check_result":"pass"
|
|
}
|
|
]
|
|
},
|
|
"meta_datas_expanded":[
|
|
{
|
|
"name":"/api/users/1548560768589",
|
|
"data":[
|
|
{
|
|
"request":{
|
|
"url":"http://127.0.0.1:5000/api/users/1548560768589",
|
|
"method":"POST",
|
|
"headers":{
|
|
"User-Agent":"python-requests/2.18.4",
|
|
"Accept-Encoding":"gzip, deflate",
|
|
"Accept":"*/*",
|
|
"Connection":"keep-alive",
|
|
"device_sn":"mmHBimjzK4Pk6mg",
|
|
"token":"C3olNHYCMWfSQkCW",
|
|
"Content-Type":"application/json",
|
|
"Content-Length":"39"
|
|
},
|
|
"body":"{"name": "user1", "password": "123456"}"
|
|
},
|
|
"response":{
|
|
"ok":true,
|
|
"url":"http://127.0.0.1:5000/api/users/1548560768589",
|
|
"status_code":201,
|
|
"reason":"CREATED",
|
|
"cookies":{},
|
|
"encoding":"None",
|
|
"headers":{
|
|
"Content-Type":"application/json",
|
|
"Content-Length":"54",
|
|
"Server":"Werkzeug/0.14.1 Python/3.6.5+",
|
|
"Date":"Sun, 27 Jan 2019 03:46:08 GMT"
|
|
},
|
|
"content_type":"application/json",
|
|
"json":{
|
|
"success":true,
|
|
"msg":"user created successfully."
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"stat":{
|
|
"response_time_ms":2.8,
|
|
"elapsed_ms":1.748,
|
|
"content_size":54
|
|
},
|
|
"validators":[
|
|
{
|
|
"check":"status_code",
|
|
"expect":201,
|
|
"comparator":"eq",
|
|
"check_value":201,
|
|
"check_result":"pass"
|
|
},
|
|
{
|
|
"check":"headers.Content-Type",
|
|
"expect":"application/json",
|
|
"comparator":"eq",
|
|
"check_value":"application/json",
|
|
"check_result":"pass"
|
|
},
|
|
{
|
|
"check":"content.success",
|
|
"expect":true,
|
|
"comparator":"eq",
|
|
"check_value":true,
|
|
"check_result":"pass"
|
|
},
|
|
{
|
|
"check":"content.msg",
|
|
"expect":"user created successfully.",
|
|
"comparator":"eq",
|
|
"check_value":"user created successfully.",
|
|
"check_result":"pass"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"response_time":"2.80"
|
|
}
|
|
],
|
|
"name":"testcase description",
|
|
"in_out":{
|
|
"in":{},
|
|
"out":{}
|
|
}
|
|
}
|
|
]
|
|
} |