测试结果汇总
图表展示
详细信息
编号 | 测试类 | 测试方法 | 用例描述 | 执行时间 | 执行结果 | 详细信息 | ||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | TestCase0 | test_01_post | json-demo-1 | 0.511s | 成功 | |||||||||||||||||||||||||||
【INFO】| 2021-06-05 20:38:17.637756 |: 开始执行用例:【test_01_post (apin.core.basecase.TestCase0)】 【INFO】| 2021-06-05 20:38:17.638753 |: 当前全局变量: host:'http://api.lemonban.com/futureloan/3' dd:123 【INFO】| 2021-06-05 20:38:17.638753 |: 当前局部变量: user_mobile:'15598160557' admin_mobile:'15598160557' timestamp:1622896697.638754 【DEBUG】| 2021-06-05 20:38:18.146989 |: [POST]: http://httpbin.org/post 【DEBUG】| 2021-06-05 20:38:18.147986 |: 开始发送请求,请求信息如下: Request Headers: User-Agent:python-requests/2.24.0 Accept-Encoding:gzip, deflate Accept:*/* Connection:keep-alive X-Lemonban-Media-Type:lemonban.v2 Content-Length:50 Content-Type:application/json Request body: { "mobile_phone": "15598160557", "pwd": "lemonban" } 【DEBUG】| 2021-06-05 20:38:18.147986 |: 接收后台的响应结果,响应信息如下: Response Headers: User-Agent:python-requests/2.24.0 Accept-Encoding:gzip, deflate Accept:*/* Connection:keep-alive X-Lemonban-Media-Type:lemonban.v2 Content-Length:50 Content-Type:application/json Response body: { "args": {}, "data": "{\"mobile_phone\": \"15598160557\", \"pwd\": \"lemonban\"}", "files": {}, "form": {}, "headers": { "Accept": "*/*", "Accept-Encoding": "gzip, deflate", "Content-Length": "50", "Content-Type": "application/json", "Host": "httpbin.org", "User-Agent": "python-requests/2.24.0", "X-Amzn-Trace-Id": "Root=1-60bb7039-63947a3c0f6bb54d67c2e0ef", "X-Lemonban-Media-Type": "lemonban.v2" }, "json": { "mobile_phone": "15598160557", "pwd": "lemonban" }, "origin": "175.8.48.142", "url": "http://httpbin.org/post" } 【INFO】| 2021-06-05 20:38:18.147986 |: 从响应结果中开始提取数据 【INFO】| 2021-06-05 20:38:18.149003 |: 提取变量:token,提取方式【jsonpath】,提取表达式:$..json,提取值为:{'mobile_phone': '15598160557', 'pwd': 'lemonban'} 【INFO】| 2021-06-05 20:38:18.149003 |: 提取变量:member_id,提取方式【jsonpath】,提取表达式:$..headers,提取值为:{'Accept': '*/*', 'Accept-Encoding': 'gzip, deflate', 'Content-Length': '50', 'Content-Type': 'application/json', 'Host': 'httpbin.org', 'User-Agent': 'python-requests/2.24.0', 'X-Amzn-Trace-Id': 'Root=1-60bb7039-63947a3c0f6bb54d67c2e0ef', 'X-Lemonban-Media-Type': 'lemonban.v2'} 【INFO】| 2021-06-05 20:38:18.149003 |: 断言表达式:['eq', 200, 'status_code'] 【INFO】| 2021-06-05 20:38:18.149003 |: 断言http响应状态码是否和预期一致 【INFO】| 2021-06-05 20:38:18.149003 |: 预期结果:200 【INFO】| 2021-06-05 20:38:18.149003 |: 实际结果:200 【INFO】| 2021-06-05 20:38:18.149003 |: 断言通过! 【INFO】| 2021-06-05 20:38:18.149003 |: test_01_post (apin.core.basecase.TestCase0)执行——>【通过】 用例断言
全局变量
host:'http://api.lemonban.com/futureloan/3' dd:123 局部变量
user_mobile:'15598160557' admin_mobile:'15598160557' timestamp:1622896697.638754 响应数据提取
请求头
User-Agent:python-requests/2.24.0 Accept-Encoding:gzip, deflate Accept:*/* Connection:keep-alive X-Lemonban-Media-Type:lemonban.v2 Content-Length:50 Content-Type:application/json 请求体
{ "mobile_phone": "15598160557", "pwd": "lemonban" } 响应头
Date:Sat, 05 Jun 2021 12:38:17 GMT Content-Type:application/json Content-Length:601 Connection:keep-alive Server:gunicorn/19.9.0 Access-Control-Allow-Origin:* Access-Control-Allow-Credentials:true 响应体
{ "args": {}, "data": "{\"mobile_phone\": \"15598160557\", \"pwd\": \"lemonban\"}", "files": {}, "form": {}, "headers": { "Accept": "*/*", "Accept-Encoding": "gzip, deflate", "Content-Length": "50", "Content-Type": "application/json", "Host": "httpbin.org", "User-Agent": "python-requests/2.24.0", "X-Amzn-Trace-Id": "Root=1-60bb7039-63947a3c0f6bb54d67c2e0ef", "X-Lemonban-Media-Type": "lemonban.v2" }, "json": { "mobile_phone": "15598160557", "pwd": "lemonban" }, "origin": "175.8.48.142", "url": "http://httpbin.org/post" } |
||||||||||||||||||||||||||||||||
2 | TestCase0 | test_02_post | json-demo-2 | 0.373s | 成功 | |||||||||||||||||||||||||||
【INFO】| 2021-06-05 20:38:18.149003 |: 开始执行用例:【test_02_post (apin.core.basecase.TestCase0)】 【INFO】| 2021-06-05 20:38:18.150000 |: 当前全局变量: host:'http://api.lemonban.com/futureloan/3' dd:123 member_id:{'Accept': '*/*', 'Accept-Encoding': 'gzip, deflate', 'Content-Length': '50', 'Content-Type': 'application/json', 'Host': 'httpbin.org', 'User-Agent': 'python-requests/2.24.0', 'X-Amzn-Trace-Id': 'Root=1-60bb7039-63947a3c0f6bb54d67c2e0ef', 'X-Lemonban-Media-Type': 'lemonban.v2'} 【INFO】| 2021-06-05 20:38:18.150000 |: 当前局部变量: user_mobile:'15598160557' admin_mobile:'15598160557' timestamp:1622896698.15 token:{'mobile_phone': '15598160557', 'pwd': 'lemonban'} 【DEBUG】| 2021-06-05 20:38:18.521257 |: [POST]: http://httpbin.org/post 【DEBUG】| 2021-06-05 20:38:18.522014 |: 开始发送请求,请求信息如下: Request Headers: User-Agent:python-requests/2.24.0 Accept-Encoding:gzip, deflate Accept:*/* Connection:keep-alive X-Lemonban-Media-Type:lemonban.v2 Content-Length:61 Content-Type:application/json Request body: { "mobile_phone": "15598160557", "pwd": "lemonban", "type": 0 } 【DEBUG】| 2021-06-05 20:38:18.522014 |: 接收后台的响应结果,响应信息如下: Response Headers: User-Agent:python-requests/2.24.0 Accept-Encoding:gzip, deflate Accept:*/* Connection:keep-alive X-Lemonban-Media-Type:lemonban.v2 Content-Length:61 Content-Type:application/json Response body: { "args": {}, "data": "{\"mobile_phone\": \"15598160557\", \"pwd\": \"lemonban\", \"type\": 0}", "files": {}, "form": {}, "headers": { "Accept": "*/*", "Accept-Encoding": "gzip, deflate", "Content-Length": "61", "Content-Type": "application/json", "Host": "httpbin.org", "User-Agent": "python-requests/2.24.0", "X-Amzn-Trace-Id": "Root=1-60bb703a-70ea21987e135aba5a09ac87", "X-Lemonban-Media-Type": "lemonban.v2" }, "json": { "mobile_phone": "15598160557", "pwd": "lemonban", "type": 0 }, "origin": "175.8.48.142", "url": "http://httpbin.org/post" } 【INFO】| 2021-06-05 20:38:18.522014 |: 断言表达式:['eq', 200, 'status_code'] 【INFO】| 2021-06-05 20:38:18.522014 |: 断言http响应状态码是否和预期一致 【INFO】| 2021-06-05 20:38:18.522014 |: 预期结果:200 【INFO】| 2021-06-05 20:38:18.522014 |: 实际结果:200 【INFO】| 2021-06-05 20:38:18.522014 |: 断言通过! 【INFO】| 2021-06-05 20:38:18.522014 |: test_02_post (apin.core.basecase.TestCase0)执行——>【通过】 用例断言
全局变量
host:'http://api.lemonban.com/futureloan/3' dd:123 member_id:{'Accept': '*/*', 'Accept-Encoding': 'gzip, deflate', 'Content-Length': '50', 'Content-Type': 'application/json', 'Host': 'httpbin.org', 'User-Agent': 'python-requests/2.24.0', 'X-Amzn-Trace-Id': 'Root=1-60bb7039-63947a3c0f6bb54d67c2e0ef', 'X-Lemonban-Media-Type': 'lemonban.v2'} 局部变量
user_mobile:'15598160557' admin_mobile:'15598160557' timestamp:1622896698.15 token:{'mobile_phone': '15598160557', 'pwd': 'lemonban'} 请求头
User-Agent:python-requests/2.24.0 Accept-Encoding:gzip, deflate Accept:*/* Connection:keep-alive X-Lemonban-Media-Type:lemonban.v2 Content-Length:61 Content-Type:application/json 请求体
{ "mobile_phone": "15598160557", "pwd": "lemonban", "type": 0 } 响应头
Date:Sat, 05 Jun 2021 12:38:18 GMT Content-Type:application/json Content-Length:630 Connection:keep-alive Server:gunicorn/19.9.0 Access-Control-Allow-Origin:* Access-Control-Allow-Credentials:true 响应体
{ "args": {}, "data": "{\"mobile_phone\": \"15598160557\", \"pwd\": \"lemonban\", \"type\": 0}", "files": {}, "form": {}, "headers": { "Accept": "*/*", "Accept-Encoding": "gzip, deflate", "Content-Length": "61", "Content-Type": "application/json", "Host": "httpbin.org", "User-Agent": "python-requests/2.24.0", "X-Amzn-Trace-Id": "Root=1-60bb703a-70ea21987e135aba5a09ac87", "X-Lemonban-Media-Type": "lemonban.v2" }, "json": { "mobile_phone": "15598160557", "pwd": "lemonban", "type": 0 }, "origin": "175.8.48.142", "url": "http://httpbin.org/post" } |