优化数据依赖处理方式

This commit is contained in:
zy7y 2020-11-19 01:27:15 +08:00
parent 7151aefa4f
commit 37aa251795
243 changed files with 945 additions and 2201 deletions

View File

@ -1,13 +0,0 @@
# 用例书写格式介绍
| 对应case_data.xlsx中的字段 | 描述|
| ------------------------ | ----------------------------------- |
| token操作 | 将选择headers中使用那个字典。 1. 写在能正常登录的接口中使用它将会提取响应中token的值并写入一个token_header字典中 2. 读在需要token依赖的接口中使用它将会使用token_header这个字典(里面会存留登录之后的token) 3. 不填写内容将使用一个no_token_header字典 |
| 请求方式 | 按道理支持目前所有的请求方式:get/post/put/delete..|
| 入参关键字 | 1. params可用于get/delete/head/options/请求中 2. datapost/put/patch请求可使用content-type是from表单类型。 3. jsonpost/put/patch请求可使用content-typeapplication/json。 |
| 文件对象参数 | 指接口中接受文件上传内容的请求参数变量 |
| 上传文件对象路径填写形式 | 1. 单个文件上传,直接使用地址,实例:/Users/zy7y/Desktop/vue.js 2. 多个文件上传,使用列表形式传递,如:["/Users/zy7y/Desktop/vue.js","/Users/zy7y/Desktop/jenkins.war"] |
| 路径参数提取 | 解决path参数(携带在url中的参数非查询参数?)依赖问题提取出来的字符串将与url进行拼接后在发送请求。 最终url请求的则是Host + 接口地址 + 路径参数提取解析后的地址 1. 接口path参数实例Excel 中书写形式:/{"用例编号":"jsonpath表达式"}/ 实例:{"case_002":"$.data.id"}/item/{"case_002":"$.meta.status"} 表示从用例case_002编号执行后的实际响应结果中使用jsonpath表达式提取到其中的id用例编号002实际响应结果中提取meta下面的status业务状态码内容 结果:上面表达式提取的结果大致如下:500/item/201。 |
| 依赖数据 | 该接口需要上个接口实际响应结果总某个数据提取出的字典会与请求数据进行合并实际发送请求的data使用了依赖数据返回的字典和本来的数据 1. Excel中书写形式{"用例编号":["提取表达式1","jsonpath提取表达式2"]} 2. 实例:{"case_002": ["$.data.id"], "case_001":["$.meta.msg","$.meta.status"]} 3. 实例2的结果从用例case_002实际响应中提取id从用例case_001中实际响应结果中提取msgstatus业务状态嘛,最后返回一个依赖数据字典:{'id': 500, 'msg': '参数错误', 'status': 400} ;如果需要以嵌套的形式放到data中请使用 需要嵌套的键 = {"用例编号":["提取表达式1","jsonpath提取表达式2"]}实例key={"case_002": ["$.data.id"],"case_001":["$.meta.msg","$.meta.status"]} 最终请求数据内容如下:{'key': {'id': 500, 'msg': '参数错误', 'status': 400}, 'pagenum': 1, 'pagesize': '12'}|
| 预期结果 | 这里的预期结果传入的是一个字典形式 |
# ⚠case_data.xlsx文件中sheet页'用例说明文档'中也有

View File

@ -1 +0,0 @@
{"uuid": "3cc1ab93-82e5-49e0-9a84-c8baec9f1442", "befores": [{"name": "expect", "status": "passed", "start": 1596442208773, "stop": 1596442208773}], "start": 1596442208773, "stop": 1596442208956}

View File

@ -0,0 +1 @@
{"uuid": "699248ab-ec1a-48cb-92ef-8d302e444355", "befores": [{"name": "method", "status": "passed", "start": 1605717898966, "stop": 1605717898966}], "start": 1605717898966, "stop": 1605717899027}

View File

@ -0,0 +1,118 @@
{
"case_002": {
"data": {
"id": 500,
"rid": 0,
"username": "admin",
"mobile": "12345678",
"email": "adsfad@qq.com",
"token": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOjUwMCwicmlkIjowLCJpYXQiOjE2MDU3MTc4OTgsImV4cCI6MTYwNTgwNDI5OH0.MTJVMRKW-f5g4PNHjSJPZhs4cZi6l2Rlgjil_IwPKN8"
},
"meta": {
"msg": "登录成功",
"status": 200
}
},
"case_003": {
"data": {
"total": 4,
"pagenum": 1,
"users": [
{
"id": 500,
"role_name": "超级管理员",
"username": "admin",
"create_time": 1486720211,
"mobile": "12345678",
"email": "adsfad@qq.com",
"mg_state": false
},
{
"id": 502,
"role_name": "测试角色2",
"username": "linken",
"create_time": 1486720211,
"mobile": "1213213123",
"email": "asdf@qq.com",
"mg_state": false
},
{
"id": 508,
"role_name": "主管",
"username": "asdf1",
"create_time": 1511853015,
"mobile": "123123",
"email": "adfsa@qq.com",
"mg_state": false
},
{
"id": 512,
"role_name": "超级管理员",
"username": "tester_zy7y1213",
"create_time": 1605717425,
"mobile": null,
"email": null,
"mg_state": false
}
]
},
"meta": {
"msg": "获取管理员列表成功",
"status": 200
}
},
"case_004": {
"data": null,
"meta": {
"msg": "pagenum 参数错误",
"status": 400
}
},
"case_005": {
"data": {
"id": 513,
"username": "tester_zy1213",
"role_id": -1,
"create_time": 1605717898
},
"meta": {
"msg": "创建成功",
"status": 201
}
},
"case_006": {
"data": {
"id": 513,
"rid": -1,
"username": "tester_zy1213",
"mobile": null,
"email": null,
"mg_state": 0
},
"meta": {
"msg": "设置状态成功",
"status": 200
}
},
"case_007": {
"data": {
"id": 513,
"rid": -1,
"username": "tester_zy1213",
"mobile": null,
"email": null,
"mg_state": 0
},
"meta": {
"msg": "设置状态成功",
"status": 200
}
},
"case_008": {
"data": null,
"meta": {
"msg": "删除成功",
"status": 200
}
}
}

View File

@ -1 +0,0 @@
{"uuid": "b355df85-5200-4aca-a77e-40f2a3643dca", "befores": [{"name": "file_var", "status": "passed", "start": 1596442208442, "stop": 1596442208442}], "start": 1596442208442, "stop": 1596442208557}

View File

@ -0,0 +1 @@
{"uuid": "760894d6-b58d-49fd-b5cf-5f8fd0f1369b", "befores": [{"name": "parametric_key", "status": "passed", "start": 1605717898621, "stop": 1605717898621}], "start": 1605717898621, "stop": 1605717898821}

View File

@ -0,0 +1,3 @@
{
"Authorization": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOjUwMCwicmlkIjowLCJpYXQiOjE2MDU3MTc4OTgsImV4cCI6MTYwNTgwNDI5OH0.MTJVMRKW-f5g4PNHjSJPZhs4cZi6l2Rlgjil_IwPKN8"
}

View File

@ -0,0 +1 @@
"http://www.ysqorz.top:8888/api/private/v1/users/513/state/2"

View File

@ -0,0 +1 @@
{"uuid": "995b5ac3-ec9a-4a69-8818-eb325bbc4634", "befores": [{"name": "path", "status": "passed", "start": 1605717898621, "stop": 1605717898621}], "start": 1605717898621, "stop": 1605717898826}

View File

@ -1 +0,0 @@
{"uuid": "1be071f3-8886-43d6-a59b-01189dae4d2e", "befores": [{"name": "actual", "status": "passed", "start": 1596442208443, "stop": 1596442208443}], "start": 1596442208443, "stop": 1596442208555}

View File

@ -1 +0,0 @@
{"uuid": "9e233be5-b435-4178-8e73-cc335b55a858", "befores": [{"name": "file_var", "status": "passed", "start": 1596442208772, "stop": 1596442208772}], "start": 1596442208772, "stop": 1596442208958}

View File

@ -0,0 +1 @@
"http://www.ysqorz.top:8888/api/private/v1/users/513/state/None"

View File

@ -0,0 +1 @@
{"uuid": "6bfa6478-674c-490d-87b7-ae906a58935b", "befores": [{"name": "case_title", "status": "passed", "start": 1605717898481, "stop": 1605717898481}], "start": 1605717898481, "stop": 1605717898621}

View File

@ -1 +0,0 @@
{"uuid": "2e0f1923-aa69-4ba6-86ab-42b742448e8f", "befores": [{"name": "method", "status": "passed", "start": 1596442208442, "stop": 1596442208442}], "start": 1596442208442, "stop": 1596442208558}

View File

@ -0,0 +1 @@
{"uuid": "a362b8df-c770-4451-8913-21a24ad9e4f7", "befores": [{"name": "method", "status": "passed", "start": 1605717898262, "stop": 1605717898262}], "start": 1605717898262, "stop": 1605717898465}

View File

@ -1 +0,0 @@
{"uuid": "7907d709-aa11-46e0-821a-61d5537ec19c", "befores": [{"name": "actual", "status": "passed", "start": 1596442208965, "stop": 1596442208965}], "start": 1596442208965, "stop": 1596442209184}

View File

@ -0,0 +1 @@
{"uuid": "f691c106-b950-4845-a364-eab4fc2bd33e", "befores": [{"name": "expect", "status": "passed", "start": 1605717898481, "stop": 1605717898481}], "start": 1605717898481, "stop": 1605717898606}

View File

@ -1 +0,0 @@
{"uuid": "a93caa2c-cf2e-488a-84eb-a6024b730741", "befores": [{"name": "method", "status": "passed", "start": 1596442208563, "stop": 1596442208563}], "start": 1596442208562, "stop": 1596442208766}

View File

@ -0,0 +1 @@
{"uuid": "833c56bb-9e32-4f6a-9dec-6d0bc97146c4", "befores": [{"name": "is_token", "status": "passed", "start": 1605717898481, "stop": 1605717898481}], "start": 1605717898481, "stop": 1605717898621}

View File

@ -0,0 +1 @@
{"uuid": "55c1e393-404e-43e0-af70-30dea48ef206", "befores": [{"name": "file_path", "status": "passed", "start": 1605717898835, "stop": 1605717898835}], "start": 1605717898835, "stop": 1605717898891}

View File

@ -0,0 +1 @@
true

View File

@ -0,0 +1,12 @@
{
"data": {
"id": 513,
"username": "tester_zy1213",
"role_id": -1,
"create_time": 1605717898
},
"meta": {
"msg": "创建成功",
"status": 201
}
}

View File

@ -0,0 +1 @@
false

View File

@ -0,0 +1 @@
{"name": "删除用户zy7y", "status": "passed", "steps": [{"name": "处理相关数据依赖header", "status": "passed", "attachments": [{"name": "请求头", "source": "cfd2ba7a-159c-4822-b6a7-3a08191dc76d-attachment.txt", "type": "text/plain"}, {"name": "请求数据", "source": "ea8bd402-42bf-4d35-8dc1-720b304c5304-attachment.txt", "type": "text/plain"}], "start": 1605717898968, "stop": 1605717898969}, {"name": "发送请求取得响应结果的json串", "status": "passed", "attachments": [{"name": "最终请求地址", "source": "e07b93a7-555a-4b23-9637-561cbb4930fc-attachment.txt", "type": "text/plain"}, {"name": "实际响应", "source": "c8d7b979-c5ed-41ef-b36e-29db330e46d8-attachment.txt", "type": "text/plain"}], "start": 1605717898969, "stop": 1605717899018}, {"name": "将响应结果的内容写入实际响应字典中", "status": "passed", "attachments": [{"name": "实际响应字典", "source": "02f07f8b-d2e5-4245-b6d1-e78538f5a871-attachment.txt", "type": "text/plain"}], "start": 1605717899018, "stop": 1605717899020}, {"name": "根据配置文件的提取响应规则提取实际数据", "status": "passed", "attachments": [{"name": "提取用于断言的实际响应部分数据", "source": "2caa9c38-08a8-42eb-b89a-b4c289da871b-attachment.txt", "type": "text/plain"}], "start": 1605717899020, "stop": 1605717899020}, {"name": "处理读取出来的预期结果响应", "status": "passed", "attachments": [{"name": "预期响应", "source": "f1af1e40-c0db-4520-a076-1478591f5232-attachment.txt", "type": "text/plain"}], "start": 1605717899020, "stop": 1605717899021}, {"name": "预期结果与实际响应进行断言操作", "status": "passed", "attachments": [{"name": "测试结果", "source": "f9f6997d-b5eb-4531-b957-96925a91876e-attachment.txt", "type": "text/plain"}], "start": 1605717899021, "stop": 1605717899023}], "attachments": [{"name": "stderr", "source": "67508b9a-d7c4-4f0a-9bc9-c9a93262f860-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "case_number", "value": "'case_008'"}, {"name": "case_title", "value": "'删除用户zy7y'"}, {"name": "path", "value": "'users/&$.case_005.data.id&'"}, {"name": "is_token", "value": "'读'"}, {"name": "method", "value": "'delete'"}, {"name": "parametric_key", "value": "'params'"}, {"name": "file_var", "value": "''"}, {"name": "file_path", "value": "''"}, {"name": "data", "value": "''"}, {"name": "expect", "value": "'{\"msg\": \"删除成功\", \"status\": 200}'"}], "start": 1605717898967, "stop": 1605717899023, "uuid": "d8248249-9560-44b7-b6b3-e70fdad341cb", "historyId": "d10148ab26863e827d277da84f30837d", "testCaseId": "c2b13641bbced8035cf0282bfb1839e4", "fullName": "test.test_api.TestApiAuto#test_main", "labels": [{"name": "parentSuite", "value": "test"}, {"name": "suite", "value": "test_api"}, {"name": "subSuite", "value": "TestApiAuto"}, {"name": "host", "value": "DESKTOP-0T59F1A"}, {"name": "thread", "value": "11680-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test.test_api"}]}

View File

@ -0,0 +1 @@
{"uuid": "32dcbf11-4d88-41a4-aa41-c6fb11f4e19c", "befores": [{"name": "parametric_key", "status": "passed", "start": 1605717898262, "stop": 1605717898262}], "start": 1605717898262, "stop": 1605717898465}

View File

@ -1 +0,0 @@
{"uuid": "c4975971-83df-49de-8d4a-88ff6ed5ce4a", "befores": [{"name": "actual", "status": "passed", "start": 1596442208564, "stop": 1596442208564}], "start": 1596442208564, "stop": 1596442208763}

View File

@ -1 +0,0 @@
{"uuid": "c07b1d9c-04eb-46d3-bd19-c49dab9542e4", "befores": [{"name": "file_var", "status": "passed", "start": 1596442208964, "stop": 1596442208964}], "start": 1596442208964, "stop": 1596442209186}

View File

@ -0,0 +1,11 @@
2020-11-19 00:44:58.621 | DEBUG  | test.test_api:test_main:61 - ⬇...执行用例编号:case_005...⬇️⬇️⬇️️
2020-11-19 00:44:58.621 | INFO  | tools.data_process:handle_path:42 - 提取出的路径地址: users
2020-11-19 00:44:58.621 | INFO  | tools.data_process:handle_data:72 - 最终的请求数据如下: {"username": "tester_zy1213","password": "123456"}
2020-11-19 00:44:58.800 | INFO  | api.base_requests:send_requests:63 - 请求方法:post请求路径:http://www.ysqorz.top:8888/api/private/v1/users, 请求参数:{'username': 'tester_zy1213', 'password': '123456'}, 请求文件:None, 请求头:{'Authorization': 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOjUwMCwicmlkIjowLCJpYXQiOjE2MDU3MTc4OTgsImV4cCI6MTYwNTgwNDI5OH0.MTJVMRKW-f5g4PNHjSJPZhs4cZi6l2Rlgjil_IwPKN8'})
2020-11-19 00:44:58.803 | INFO  | tools.data_process:save_response:29 - 添加key: case_005, 对应value: {'data': {'id': 513, 'username': 'tester_zy1213', 'role_id': -1, 'create_time': 1605717898}, 'meta': {'msg': '创建成功', 'status': 201}}
2020-11-19 00:44:58.809 | INFO  | test.test_api:test_main:102 - 完整的json响应: {'data': {'id': 513, 'username': 'tester_zy1213', 'role_id': -1, 'create_time': 1605717898}, 'meta': {'msg': '创建成功', 'status': 201}}
需要校验的数据字典: {'msg': '创建成功', 'status': 201} 预期校验的数据字典: {'msg': '创建成功', 'status': 201}
测试结果: True
2020-11-19 00:44:58.810 | DEBUG  | test.test_api:test_main:103 - ⬆⬆⬆...用例编号:case_005,执行完毕,日志查看...⬆⬆⬆


View File

@ -0,0 +1 @@
{"uuid": "ae743b5d-2f3b-47f5-a8fa-6dbb4863cbd6", "befores": [{"name": "case_title", "status": "passed", "start": 1605717898965, "stop": 1605717898965}], "start": 1605717898965, "stop": 1605717899030}

View File

@ -0,0 +1 @@
{"uuid": "6b1d9557-7cb9-4e2d-9a2a-7c73957c289d", "befores": [{"name": "is_token", "status": "passed", "start": 1605717898901, "stop": 1605717898901}], "start": 1605717898901, "stop": 1605717898958}

View File

@ -0,0 +1 @@
{"pagenum": 1, "pagesize": "12", "meta": None, "userId": 500}

View File

@ -0,0 +1 @@
{"uuid": "71542701-e7ec-477d-a011-b6cd51853f70", "befores": [{"name": "path", "status": "passed", "start": 1605717898028, "stop": 1605717898028}], "start": 1605717898028, "stop": 1605717898262}

View File

@ -0,0 +1 @@
"http://www.ysqorz.top:8888/api/private/v1/login"

View File

@ -0,0 +1,83 @@
{
"case_002": {
"data": {
"id": 500,
"rid": 0,
"username": "admin",
"mobile": "12345678",
"email": "adsfad@qq.com",
"token": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOjUwMCwicmlkIjowLCJpYXQiOjE2MDU3MTc4OTgsImV4cCI6MTYwNTgwNDI5OH0.MTJVMRKW-f5g4PNHjSJPZhs4cZi6l2Rlgjil_IwPKN8"
},
"meta": {
"msg": "登录成功",
"status": 200
}
},
"case_003": {
"data": {
"total": 4,
"pagenum": 1,
"users": [
{
"id": 500,
"role_name": "超级管理员",
"username": "admin",
"create_time": 1486720211,
"mobile": "12345678",
"email": "adsfad@qq.com",
"mg_state": false
},
{
"id": 502,
"role_name": "测试角色2",
"username": "linken",
"create_time": 1486720211,
"mobile": "1213213123",
"email": "asdf@qq.com",
"mg_state": false
},
{
"id": 508,
"role_name": "主管",
"username": "asdf1",
"create_time": 1511853015,
"mobile": "123123",
"email": "adfsa@qq.com",
"mg_state": false
},
{
"id": 512,
"role_name": "超级管理员",
"username": "tester_zy7y1213",
"create_time": 1605717425,
"mobile": null,
"email": null,
"mg_state": false
}
]
},
"meta": {
"msg": "获取管理员列表成功",
"status": 200
}
},
"case_004": {
"data": null,
"meta": {
"msg": "pagenum 参数错误",
"status": 400
}
},
"case_005": {
"data": {
"id": 513,
"username": "tester_zy1213",
"role_id": -1,
"create_time": 1605717898
},
"meta": {
"msg": "创建成功",
"status": 201
}
}
}

View File

@ -0,0 +1 @@
{"uuid": "3ed1d2a6-46e4-422a-b08b-53ed9bb8a541", "befores": [{"name": "file_path", "status": "passed", "start": 1605717898262, "stop": 1605717898262}], "start": 1605717898262, "stop": 1605717898465}

View File

@ -1 +0,0 @@
{"uuid": "539bf780-4f07-4381-aba8-1a5dac9ea70d", "befores": [{"name": "case_number", "status": "passed", "start": 1596442208562, "stop": 1596442208562}], "start": 1596442208562, "stop": 1596442208768}

View File

@ -0,0 +1,4 @@
{
"msg": "删除成功",
"status": 200
}

View File

@ -1 +0,0 @@
{"uuid": "3c7daedf-6626-4f43-b880-7060ab0c2f99", "befores": [{"name": "case_number", "status": "passed", "start": 1596442208963, "stop": 1596442208963}], "start": 1596442208963, "stop": 1596442209188}

View File

@ -0,0 +1,4 @@
{
"msg": "pagenum 参数错误",
"status": 400
}

View File

@ -0,0 +1,3 @@
{
"Authorization": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOjUwMCwicmlkIjowLCJpYXQiOjE2MDU3MTc4OTgsImV4cCI6MTYwNTgwNDI5OH0.MTJVMRKW-f5g4PNHjSJPZhs4cZi6l2Rlgjil_IwPKN8"
}

View File

@ -0,0 +1 @@
{"uuid": "a85a7491-33a9-4b04-82a5-0cba6968e7cf", "befores": [{"name": "file_var", "status": "passed", "start": 1605717898835, "stop": 1605717898835}], "start": 1605717898835, "stop": 1605717898892}

View File

@ -0,0 +1,12 @@
2020-11-19 00:44:58.480 | DEBUG  | test.test_api:test_main:61 - ⬇...执行用例编号:case_004...⬇️⬇️⬇️️
2020-11-19 00:44:58.480 | INFO  | tools.data_process:handle_path:42 - 提取出的路径地址: users
2020-11-19 00:44:58.480 | ERROR  | tools:extractor:23 - 提取不到内容丢给你一个错误'bool' object is not subscriptable
2020-11-19 00:44:58.480 | INFO  | tools.data_process:handle_data:72 - 最终的请求数据如下: {"pagenum": 1, "pagesize": "12", "msg": None}
2020-11-19 00:44:58.511 | INFO  | api.base_requests:send_requests:63 - 请求方法:get请求路径:http://www.ysqorz.top:8888/api/private/v1/users, 请求参数:{'pagenum': 1, 'pagesize': '12', 'msg': None}, 请求文件:None, 请求头:{'Authorization': 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOjUwMCwicmlkIjowLCJpYXQiOjE2MDU3MTc4OTgsImV4cCI6MTYwNTgwNDI5OH0.MTJVMRKW-f5g4PNHjSJPZhs4cZi6l2Rlgjil_IwPKN8'})
2020-11-19 00:44:58.527 | INFO  | tools.data_process:save_response:29 - 添加key: case_004, 对应value: {'data': None, 'meta': {'msg': 'pagenum 参数错误', 'status': 400}}
2020-11-19 00:44:58.527 | INFO  | test.test_api:test_main:102 - 完整的json响应: {'data': None, 'meta': {'msg': 'pagenum 参数错误', 'status': 400}}
需要校验的数据字典: {'msg': 'pagenum 参数错误', 'status': 400} 预期校验的数据字典: {'msg': '获取管理员列表成功', 'status': 200}
测试结果: False
2020-11-19 00:44:58.527 | DEBUG  | test.test_api:test_main:103 - ⬆⬆⬆...用例编号:case_004,执行完毕,日志查看...⬆⬆⬆


View File

@ -0,0 +1 @@
{"uuid": "dc8bd666-2a65-4d42-8c14-f58eca98bf38", "befores": [{"name": "is_token", "status": "passed", "start": 1605717898835, "stop": 1605717898835}], "start": 1605717898835, "stop": 1605717898894}

View File

@ -0,0 +1 @@
{"uuid": "26dd5b2c-257c-4dd4-b1de-3ed1c9e5727e", "befores": [{"name": "file_path", "status": "passed", "start": 1605717898966, "stop": 1605717898966}], "start": 1605717898966, "stop": 1605717899025}

View File

@ -1 +0,0 @@
{"uuid": "38956d76-b9f2-43a0-9e3d-c9c252b896bb", "befores": [{"name": "is_token", "status": "passed", "start": 1596442208771, "stop": 1596442208771}], "start": 1596442208771, "stop": 1596442208959}

View File

@ -1 +0,0 @@
{"uuid": "95dab294-6c51-4d67-8beb-050d8361f6ac", "befores": [{"name": "path", "status": "passed", "start": 1596442208441, "stop": 1596442208441}], "start": 1596442208441, "stop": 1596442208559}

View File

@ -0,0 +1,11 @@
2020-11-19 00:44:58.836 | DEBUG  | test.test_api:test_main:61 - ⬇...执行用例编号:case_006...⬇️⬇️⬇️️
2020-11-19 00:44:58.837 | ERROR  | tools:extractor:23 - 提取不到内容丢给你一个错误'bool' object is not subscriptable
2020-11-19 00:44:58.837 | INFO  | tools.data_process:handle_path:42 - 提取出的路径地址: users/513/state/None
2020-11-19 00:44:58.882 | INFO  | api.base_requests:send_requests:63 - 请求方法:put请求路径:http://www.ysqorz.top:8888/api/private/v1/users/513/state/None, 请求参数:None, 请求文件:None, 请求头:{'Authorization': 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOjUwMCwicmlkIjowLCJpYXQiOjE2MDU3MTc4OTgsImV4cCI6MTYwNTgwNDI5OH0.MTJVMRKW-f5g4PNHjSJPZhs4cZi6l2Rlgjil_IwPKN8'})
2020-11-19 00:44:58.883 | INFO  | tools.data_process:save_response:29 - 添加key: case_006, 对应value: {'data': {'id': 513, 'rid': -1, 'username': 'tester_zy1213', 'mobile': None, 'email': None, 'mg_state': 0}, 'meta': {'msg': '设置状态成功', 'status': 200}}
2020-11-19 00:44:58.886 | INFO  | test.test_api:test_main:102 - 完整的json响应: {'data': {'id': 513, 'rid': -1, 'username': 'tester_zy1213', 'mobile': None, 'email': None, 'mg_state': 0}, 'meta': {'msg': '设置状态成功', 'status': 200}}
需要校验的数据字典: {'msg': '设置状态成功', 'status': 200} 预期校验的数据字典: {'msg': '设置状态成功', 'status': 200}
测试结果: True
2020-11-19 00:44:58.887 | DEBUG  | test.test_api:test_main:103 - ⬆⬆⬆...用例编号:case_006,执行完毕,日志查看...⬆⬆⬆


View File

@ -0,0 +1,10 @@
2020-11-19 00:44:58.902 | DEBUG  | test.test_api:test_main:61 - ⬇...执行用例编号:case_007...⬇️⬇️⬇️️
2020-11-19 00:44:58.903 | INFO  | tools.data_process:handle_path:42 - 提取出的路径地址: users/513/state/2
2020-11-19 00:44:58.945 | INFO  | api.base_requests:send_requests:63 - 请求方法:put请求路径:http://www.ysqorz.top:8888/api/private/v1/users/513/state/2, 请求参数:None, 请求文件:None, 请求头:{'Authorization': 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOjUwMCwicmlkIjowLCJpYXQiOjE2MDU3MTc4OTgsImV4cCI6MTYwNTgwNDI5OH0.MTJVMRKW-f5g4PNHjSJPZhs4cZi6l2Rlgjil_IwPKN8'})
2020-11-19 00:44:58.947 | INFO  | tools.data_process:save_response:29 - 添加key: case_007, 对应value: {'data': {'id': 513, 'rid': -1, 'username': 'tester_zy1213', 'mobile': None, 'email': None, 'mg_state': 0}, 'meta': {'msg': '设置状态成功', 'status': 200}}
2020-11-19 00:44:58.950 | INFO  | test.test_api:test_main:102 - 完整的json响应: {'data': {'id': 513, 'rid': -1, 'username': 'tester_zy1213', 'mobile': None, 'email': None, 'mg_state': 0}, 'meta': {'msg': '设置状态成功', 'status': 200}}
需要校验的数据字典: {'msg': '设置状态成功', 'status': 200} 预期校验的数据字典: {'msg': '设置状态成功', 'status': 200}
测试结果: True
2020-11-19 00:44:58.950 | DEBUG  | test.test_api:test_main:103 - ⬆⬆⬆...用例编号:case_007,执行完毕,日志查看...⬆⬆⬆


View File

@ -0,0 +1 @@
{"uuid": "524bdcff-d35f-421e-b2bf-2eae7a7c0fa6", "befores": [{"name": "is_token", "status": "passed", "start": 1605717898262, "stop": 1605717898262}], "start": 1605717898262, "stop": 1605717898465}

View File

@ -0,0 +1,3 @@
{
"Authorization": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOjUwMCwicmlkIjowLCJpYXQiOjE2MDU3MTc4OTgsImV4cCI6MTYwNTgwNDI5OH0.MTJVMRKW-f5g4PNHjSJPZhs4cZi6l2Rlgjil_IwPKN8"
}

View File

@ -0,0 +1,71 @@
{
"case_002": {
"data": {
"id": 500,
"rid": 0,
"username": "admin",
"mobile": "12345678",
"email": "adsfad@qq.com",
"token": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOjUwMCwicmlkIjowLCJpYXQiOjE2MDU3MTc4OTgsImV4cCI6MTYwNTgwNDI5OH0.MTJVMRKW-f5g4PNHjSJPZhs4cZi6l2Rlgjil_IwPKN8"
},
"meta": {
"msg": "登录成功",
"status": 200
}
},
"case_003": {
"data": {
"total": 4,
"pagenum": 1,
"users": [
{
"id": 500,
"role_name": "超级管理员",
"username": "admin",
"create_time": 1486720211,
"mobile": "12345678",
"email": "adsfad@qq.com",
"mg_state": false
},
{
"id": 502,
"role_name": "测试角色2",
"username": "linken",
"create_time": 1486720211,
"mobile": "1213213123",
"email": "asdf@qq.com",
"mg_state": false
},
{
"id": 508,
"role_name": "主管",
"username": "asdf1",
"create_time": 1511853015,
"mobile": "123123",
"email": "adfsa@qq.com",
"mg_state": false
},
{
"id": 512,
"role_name": "超级管理员",
"username": "tester_zy7y1213",
"create_time": 1605717425,
"mobile": null,
"email": null,
"mg_state": false
}
]
},
"meta": {
"msg": "获取管理员列表成功",
"status": 200
}
},
"case_004": {
"data": null,
"meta": {
"msg": "pagenum 参数错误",
"status": 400
}
}
}

View File

@ -0,0 +1,3 @@
{
"Authorization": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOjUwMCwicmlkIjowLCJpYXQiOjE2MDU3MTc4OTgsImV4cCI6MTYwNTgwNDI5OH0.MTJVMRKW-f5g4PNHjSJPZhs4cZi6l2Rlgjil_IwPKN8"
}

View File

@ -0,0 +1 @@
{"uuid": "9daf9d55-1994-401d-a9ba-d4c1b20f7308", "befores": [{"name": "case_title", "status": "passed", "start": 1605717898621, "stop": 1605717898621}], "start": 1605717898621, "stop": 1605717898827}

View File

@ -0,0 +1 @@
{"uuid": "a4465725-c5b7-4e32-ace0-83380550db8e", "befores": [{"name": "data", "status": "passed", "start": 1605717898966, "stop": 1605717898966}], "start": 1605717898966, "stop": 1605717899024}

View File

@ -1 +0,0 @@
{"uuid": "f946f66f-0997-4096-bdaa-581392ada5f1", "befores": [{"name": "dependent", "status": "passed", "start": 1596442208563, "stop": 1596442208563}], "start": 1596442208563, "stop": 1596442208765}

View File

@ -1 +0,0 @@
{"uuid": "48fba118-1f8d-4c6e-99ab-790a9fb9fb5c", "befores": [{"name": "path", "status": "passed", "start": 1596442208963, "stop": 1596442208963}], "start": 1596442208963, "stop": 1596442209187}

View File

@ -1,7 +0,0 @@
2020-08-03 16:10:08.965 | INFO  | test.test_api:treating_data:59 - 处理依赖时data的数据:{"pagenum": 1, "pagesize": "12"}
2020-08-03 16:10:08.966 | DEBUG  | test.test_api:treating_data:78 - data有数据依赖无数据 {'pagenum': 1, 'pagesize': '12'}
2020-08-03 16:10:09.051 | INFO  | api.base_requests:base_requests:41 - 请求方法:get请求路径:http://47.115.124.102:8888/api/private/v1/users, 请求参数:{'pagenum': 1, 'pagesize': '12'}, 请求文件:None, 请求头:{})
2020-08-03 16:10:09.056 | INFO  | tools.read_data:write_result:65 - 开始回写实际响应结果到用例数据中.
2020-08-03 16:10:09.060 | INFO  | tools.read_data:write_result:72 - 写入完毕:-写入文件: ../data/case_data.xlsx, 行号: 5, 列号: 11, 写入值: {"data": null, "meta": {"msg": "无效token", "status": 400}}
2020-08-03 16:10:09.061 | INFO  | test.test_api:test_main:98 - token_header: {'Authorization': 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOjUwMCwicmlkIjowLCJpYXQiOjE1OTY0NDIyMDgsImV4cCI6MTU5NjUyODYwOH0.EevDrEh-EQEYfU8G1J6J7_Ab_AaqqDb3adcb_IWgdfM'},
no_token_header: {}

View File

@ -0,0 +1 @@
"http://www.ysqorz.top:8888/api/private/v1/users"

View File

@ -0,0 +1,14 @@
{
"data": {
"id": 513,
"rid": -1,
"username": "tester_zy1213",
"mobile": null,
"email": null,
"mg_state": 0
},
"meta": {
"msg": "设置状态成功",
"status": 200
}
}

View File

@ -0,0 +1 @@
{"uuid": "561766de-5515-4d58-acf6-a82929935813", "befores": [{"name": "case_number", "status": "passed", "start": 1605717898965, "stop": 1605717898965}], "start": 1605717898965, "stop": 1605717899030}

View File

@ -0,0 +1 @@
{"uuid": "44e4a0fb-4737-400c-afc8-812421c800c1", "befores": [{"name": "case_number", "status": "passed", "start": 1605717898621, "stop": 1605717898621}], "start": 1605717898621, "stop": 1605717898829}

View File

@ -1 +0,0 @@
{"uuid": "e86c77f2-de49-44a0-b1f1-be41cc67e6c8", "befores": [{"name": "method", "status": "passed", "start": 1596442208772, "stop": 1596442208772}], "start": 1596442208772, "stop": 1596442208958}

View File

@ -0,0 +1,4 @@
{
"msg": "登录成功",
"status": 200
}

View File

@ -0,0 +1 @@
{"uuid": "e0d4a436-9b54-4264-9ddd-0c42fd38db19", "befores": [{"name": "parametric_key", "status": "passed", "start": 1605717898966, "stop": 1605717898966}], "start": 1605717898966, "stop": 1605717899026}

View File

@ -0,0 +1 @@
{"uuid": "3ef82300-fdb1-4948-a8b5-655ba29431ed", "befores": [{"name": "data", "status": "passed", "start": 1605717898836, "stop": 1605717898836}], "start": 1605717898836, "stop": 1605717898890}

View File

@ -1 +0,0 @@
{"uuid": "4a5ccd91-f34c-472c-926c-75480ba8a828", "befores": [{"name": "file_path", "status": "passed", "start": 1596442208563, "stop": 1596442208563}], "start": 1596442208563, "stop": 1596442208765}

View File

@ -0,0 +1 @@
true

View File

@ -0,0 +1,4 @@
{
"msg": "获取管理员列表成功",
"status": 200
}

View File

@ -0,0 +1,97 @@
{
"case_002": {
"data": {
"id": 500,
"rid": 0,
"username": "admin",
"mobile": "12345678",
"email": "adsfad@qq.com",
"token": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOjUwMCwicmlkIjowLCJpYXQiOjE2MDU3MTc4OTgsImV4cCI6MTYwNTgwNDI5OH0.MTJVMRKW-f5g4PNHjSJPZhs4cZi6l2Rlgjil_IwPKN8"
},
"meta": {
"msg": "登录成功",
"status": 200
}
},
"case_003": {
"data": {
"total": 4,
"pagenum": 1,
"users": [
{
"id": 500,
"role_name": "超级管理员",
"username": "admin",
"create_time": 1486720211,
"mobile": "12345678",
"email": "adsfad@qq.com",
"mg_state": false
},
{
"id": 502,
"role_name": "测试角色2",
"username": "linken",
"create_time": 1486720211,
"mobile": "1213213123",
"email": "asdf@qq.com",
"mg_state": false
},
{
"id": 508,
"role_name": "主管",
"username": "asdf1",
"create_time": 1511853015,
"mobile": "123123",
"email": "adfsa@qq.com",
"mg_state": false
},
{
"id": 512,
"role_name": "超级管理员",
"username": "tester_zy7y1213",
"create_time": 1605717425,
"mobile": null,
"email": null,
"mg_state": false
}
]
},
"meta": {
"msg": "获取管理员列表成功",
"status": 200
}
},
"case_004": {
"data": null,
"meta": {
"msg": "pagenum 参数错误",
"status": 400
}
},
"case_005": {
"data": {
"id": 513,
"username": "tester_zy1213",
"role_id": -1,
"create_time": 1605717898
},
"meta": {
"msg": "创建成功",
"status": 201
}
},
"case_006": {
"data": {
"id": 513,
"rid": -1,
"username": "tester_zy1213",
"mobile": null,
"email": null,
"mg_state": 0
},
"meta": {
"msg": "设置状态成功",
"status": 200
}
}
}

View File

@ -0,0 +1,6 @@
{
"pagenum": 1,
"pagesize": "12",
"meta": null,
"userId": 500
}

View File

@ -0,0 +1 @@
{"uuid": "ded22c15-f329-455a-b0e6-c952372d02ed", "befores": [{"name": "case_number", "status": "passed", "start": 1605717898481, "stop": 1605717898481}], "start": 1605717898481, "stop": 1605717898621}

View File

@ -0,0 +1,4 @@
{
"msg": "创建成功",
"status": 201
}

View File

@ -1 +0,0 @@
{"uuid": "f7ac17af-d0e1-40db-9077-4b0fe43b7308", "befores": [{"name": "expect", "status": "passed", "start": 1596442208965, "stop": 1596442208965}], "start": 1596442208965, "stop": 1596442209184}

View File

@ -1 +0,0 @@
{"uuid": "5f9ed7f7-10d7-46e8-94ef-e69c7b4ef5df", "befores": [{"name": "dependent", "status": "passed", "start": 1596442208964, "stop": 1596442208964}], "start": 1596442208964, "stop": 1596442209185}

View File

@ -0,0 +1 @@
null

View File

@ -0,0 +1 @@
{"uuid": "fb085f46-b9e4-4ebf-8abe-0ecdaf8b9143", "befores": [{"name": "case_number", "status": "passed", "start": 1605717898262, "stop": 1605717898262}], "start": 1605717898262, "stop": 1605717898465}

View File

@ -0,0 +1,4 @@
{
"msg": "设置状态成功",
"status": 200
}

View File

@ -0,0 +1 @@
{"uuid": "8d00368f-32ce-4241-ae88-e891eb63bae2", "befores": [{"name": "is_token", "status": "passed", "start": 1605717898028, "stop": 1605717898028}], "start": 1605717898028, "stop": 1605717898246}

View File

@ -1 +0,0 @@
{"uuid": "b7aee513-0c74-4544-9591-4e8730eaf746", "befores": [{"name": "case_number", "status": "passed", "start": 1596442208441, "stop": 1596442208441}], "start": 1596442208441, "stop": 1596442208559}

View File

@ -0,0 +1,10 @@
2020-11-19 00:44:58.966 | DEBUG  | test.test_api:test_main:61 - ⬇...执行用例编号:case_008...⬇️⬇️⬇️️
2020-11-19 00:44:58.967 | INFO  | tools.data_process:handle_path:42 - 提取出的路径地址: users/513
2020-11-19 00:44:59.016 | INFO  | api.base_requests:send_requests:63 - 请求方法:delete请求路径:http://www.ysqorz.top:8888/api/private/v1/users/513, 请求参数:None, 请求文件:None, 请求头:{'Authorization': 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOjUwMCwicmlkIjowLCJpYXQiOjE2MDU3MTc4OTgsImV4cCI6MTYwNTgwNDI5OH0.MTJVMRKW-f5g4PNHjSJPZhs4cZi6l2Rlgjil_IwPKN8'})
2020-11-19 00:44:59.017 | INFO  | tools.data_process:save_response:29 - 添加key: case_008, 对应value: {'data': None, 'meta': {'msg': '删除成功', 'status': 200}}
2020-11-19 00:44:59.020 | INFO  | test.test_api:test_main:102 - 完整的json响应: {'data': None, 'meta': {'msg': '删除成功', 'status': 200}}
需要校验的数据字典: {'msg': '删除成功', 'status': 200} 预期校验的数据字典: {'msg': '删除成功', 'status': 200}
测试结果: True
2020-11-19 00:44:59.021 | DEBUG  | test.test_api:test_main:103 - ⬆⬆⬆...用例编号:case_008,执行完毕,日志查看...⬆⬆⬆


View File

@ -1 +0,0 @@
{"uuid": "e6268c15-d060-4eb8-bd01-e77f53746517", "befores": [{"name": "file_path", "status": "passed", "start": 1596442208442, "stop": 1596442208442}], "start": 1596442208442, "stop": 1596442208557}

View File

@ -0,0 +1 @@
{"uuid": "ee7d98c9-3a47-4030-950e-1103c28459fa", "befores": [{"name": "file_path", "status": "passed", "start": 1605717898481, "stop": 1605717898481}], "start": 1605717898481, "stop": 1605717898606}

View File

@ -1 +0,0 @@
{"uuid": "2c8ea1ce-7f6f-4c64-943d-898f357fb9a3", "befores": [{"name": "dependent", "status": "passed", "start": 1596442208772, "stop": 1596442208772}], "start": 1596442208772, "stop": 1596442208957}

View File

@ -0,0 +1 @@
{"uuid": "49fc942e-b5b5-47bb-b426-9255bf2b4f9f", "befores": [{"name": "file_var", "status": "passed", "start": 1605717898028, "stop": 1605717898028}], "start": 1605717898028, "stop": 1605717898246}

View File

@ -0,0 +1 @@
"http://www.ysqorz.top:8888/api/private/v1/users"

View File

@ -0,0 +1 @@
{"name": "get请求查询用户数据列表", "status": "passed", "steps": [{"name": "处理相关数据依赖header", "status": "passed", "attachments": [{"name": "请求头", "source": "f17d2afd-81e5-40d7-a3cd-15c6c9319430-attachment.txt", "type": "text/plain"}, {"name": "请求数据", "source": "56ec19cb-d5ad-41e6-a1e7-63c3435f6b0e-attachment.txt", "type": "text/plain"}], "start": 1605717898262, "stop": 1605717898262}, {"name": "发送请求取得响应结果的json串", "status": "passed", "attachments": [{"name": "最终请求地址", "source": "6fd54efc-46d7-4f48-beca-a1498eb1bc6e-attachment.txt", "type": "text/plain"}, {"name": "实际响应", "source": "b8afd4ca-8d8e-41ed-9fdf-465ca6e7faff-attachment.txt", "type": "text/plain"}], "start": 1605717898262, "stop": 1605717898449}, {"name": "将响应结果的内容写入实际响应字典中", "status": "passed", "attachments": [{"name": "实际响应字典", "source": "c0b3c41d-90c6-4106-a306-aac51319c55f-attachment.txt", "type": "text/plain"}], "start": 1605717898449, "stop": 1605717898449}, {"name": "根据配置文件的提取响应规则提取实际数据", "status": "passed", "attachments": [{"name": "提取用于断言的实际响应部分数据", "source": "c867c34c-acdd-45cb-9118-e7eb5781ea0d-attachment.txt", "type": "text/plain"}], "start": 1605717898449, "stop": 1605717898449}, {"name": "处理读取出来的预期结果响应", "status": "passed", "attachments": [{"name": "预期响应", "source": "55bb6db0-d43e-4419-be35-478bb42eabf4-attachment.txt", "type": "text/plain"}], "start": 1605717898449, "stop": 1605717898449}, {"name": "预期结果与实际响应进行断言操作", "status": "passed", "attachments": [{"name": "测试结果", "source": "17467a46-c5a0-4574-b632-541d2c33a0ac-attachment.txt", "type": "text/plain"}], "start": 1605717898449, "stop": 1605717898449}], "attachments": [{"name": "stdout", "source": "23cfbefe-44f3-4e9f-a9df-58b3bd813be2-attachment.txt", "type": "text/plain"}, {"name": "stderr", "source": "c82671ea-5ce0-421a-a4f7-6248f7b534b1-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "case_number", "value": "'case_003'"}, {"name": "case_title", "value": "'get请求查询用户数据列表'"}, {"name": "path", "value": "'users'"}, {"name": "is_token", "value": "'读'"}, {"name": "method", "value": "'get'"}, {"name": "parametric_key", "value": "'params'"}, {"name": "file_var", "value": "''"}, {"name": "file_path", "value": "''"}, {"name": "data", "value": "'{\"pagenum\": 1, \"pagesize\": \"12\", \"meta\": &$.case_002.data.meta&, \"userId\": &$.case_002.data.id&}'"}, {"name": "expect", "value": "'{\"msg\": \"获取管理员列表成功\", \"status\": 200}'"}], "start": 1605717898262, "stop": 1605717898449, "uuid": "9edc8d38-605e-4c68-b70d-5dbe542270c2", "historyId": "b17354d2e2969aba85040835eb478f82", "testCaseId": "c2b13641bbced8035cf0282bfb1839e4", "fullName": "test.test_api.TestApiAuto#test_main", "labels": [{"name": "parentSuite", "value": "test"}, {"name": "suite", "value": "test_api"}, {"name": "subSuite", "value": "TestApiAuto"}, {"name": "host", "value": "DESKTOP-0T59F1A"}, {"name": "thread", "value": "11680-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test.test_api"}]}

View File

@ -0,0 +1 @@
true

View File

@ -1 +0,0 @@
{"uuid": "117646ec-ff06-4af8-b8bc-17c840fca8c4", "befores": [{"name": "is_token", "status": "passed", "start": 1596442208963, "stop": 1596442208963}], "start": 1596442208963, "stop": 1596442209187}

View File

@ -1,11 +0,0 @@
2020-08-03 16:10:08.564 | INFO  | test.test_api:treating_data:59 - 处理依赖时data的数据:{"username": "admin", "password": "123456"}
2020-08-03 16:10:08.564 | DEBUG  | test.test_api:treating_data:78 - data有数据依赖无数据 {'username': 'admin', 'password': '123456'}
2020-08-03 16:10:08.750 | INFO  | api.base_requests:base_requests:41 - 请求方法:post请求路径:http://47.115.124.102:8888/api/private/v1/login, 请求参数:{'username': 'admin', 'password': '123456'}, 请求文件:None, 请求头:{})
2020-08-03 16:10:08.755 | INFO  | tools.read_data:write_result:65 - 开始回写实际响应结果到用例数据中.
2020-08-03 16:10:08.761 | INFO  | tools.read_data:write_result:72 - 写入完毕:-写入文件: ../data/case_data.xlsx, 行号: 3, 列号: 11, 写入值: {"data": {"id": 500, "rid": 0, "username": "admin", "mobile": "18487984889", "email": "18401782588@qq.com", "token": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOjUwMCwicmlkIjowLCJpYXQiOjE1OTY0NDIyMDgsImV4cCI6MTU5NjUyODYwOH0.EevDrEh-EQEYfU8G1J6J7_Ab_AaqqDb3adcb_IWgdfM"}, "meta": {"msg": "登录成功", "status": 200}}
2020-08-03 16:10:08.761 | INFO  | test.test_api:test_main:98 - token_header: {'Authorization': 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOjUwMCwicmlkIjowLCJpYXQiOjE1OTY0NDIyMDgsImV4cCI6MTU5NjUyODYwOH0.EevDrEh-EQEYfU8G1J6J7_Ab_AaqqDb3adcb_IWgdfM'},
no_token_header: {}
2020-08-03 16:10:08.762 | INFO  | test.test_api:test_main:105 - 完整的json响应: {'data': {'id': 500, 'rid': 0, 'username': 'admin', 'mobile': '18487984889', 'email': '18401782588@qq.com', 'token': 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOjUwMCwicmlkIjowLCJpYXQiOjE1OTY0NDIyMDgsImV4cCI6MTU5NjUyODYwOH0.EevDrEh-EQEYfU8G1J6J7_Ab_AaqqDb3adcb_IWgdfM'}, 'meta': {'msg': '登录成功', 'status': 200}}
需要校验的数据字典: {'msg': '登录成功', 'status': 200}
预期校验的数据字典: {'msg': '登录成功', 'status': 200}
测试结果: True

View File

@ -0,0 +1 @@
{"uuid": "4f76360c-ab9c-4efe-b76c-7ad5dd83280c", "befores": [{"name": "case_number", "status": "passed", "start": 1605717898901, "stop": 1605717898901}], "start": 1605717898901, "stop": 1605717898960}

View File

@ -1 +0,0 @@
{"uuid": "4e42afda-7abc-4d77-ab42-31c82fe307b7", "befores": [{"name": "case_number", "status": "passed", "start": 1596442208771, "stop": 1596442208771}], "start": 1596442208771, "stop": 1596442208960}

View File

@ -0,0 +1 @@
{"uuid": "cc44e518-079b-4690-97a3-e67f12a366df", "befores": [{"name": "data", "status": "passed", "start": 1605717898028, "stop": 1605717898028}], "start": 1605717898028, "stop": 1605717898246}

View File

@ -0,0 +1 @@
"http://www.ysqorz.top:8888/api/private/v1/users"

View File

@ -0,0 +1 @@
{"uuid": "457ca88f-1cec-48eb-9a78-7b936fcc5d37", "befores": [{"name": "path", "status": "passed", "start": 1605717898481, "stop": 1605717898481}], "start": 1605717898481, "stop": 1605717898621}

View File

@ -0,0 +1 @@
{"uuid": "3369ab9a-c135-4371-ad7e-d377788925ad", "befores": [{"name": "method", "status": "passed", "start": 1605717898902, "stop": 1605717898902}], "start": 1605717898902, "stop": 1605717898957}

View File

@ -0,0 +1,4 @@
{
"msg": "设置状态成功",
"status": 200
}

View File

@ -1,11 +0,0 @@
2020-08-03 16:10:08.443 | INFO  | test.test_api:treating_data:59 - 处理依赖时data的数据:{"username": "admin", "password": ""}
2020-08-03 16:10:08.444 | DEBUG  | test.test_api:treating_data:78 - data有数据依赖无数据 {'username': 'admin', 'password': ''}
2020-08-03 16:10:08.539 | INFO  | api.base_requests:base_requests:41 - 请求方法:get请求路径:http://47.115.124.102:8888/api/private/v1/login, 请求参数:{'username': 'admin', 'password': ''}, 请求文件:None, 请求头:{})
2020-08-03 16:10:08.544 | INFO  | tools.read_data:write_result:65 - 开始回写实际响应结果到用例数据中.
2020-08-03 16:10:08.551 | INFO  | tools.read_data:write_result:72 - 写入完毕:-写入文件: ../data/case_data.xlsx, 行号: 2, 列号: 11, 写入值: {"data": null, "meta": {"msg": "参数错误", "status": 400}}
2020-08-03 16:10:08.551 | INFO  | test.test_api:test_main:98 - token_header: {},
no_token_header: {}
2020-08-03 16:10:08.553 | INFO  | test.test_api:test_main:105 - 完整的json响应: {'data': None, 'meta': {'msg': '参数错误', 'status': 400}}
需要校验的数据字典: {'msg': '参数错误', 'status': 400}
预期校验的数据字典: {'msg': '参数错误', 'status': 400}
测试结果: True

View File

@ -1 +0,0 @@
{"uuid": "bc2389d7-9f71-465a-8bc1-3a5f7b141b39", "befores": [{"name": "data", "status": "passed", "start": 1596442208442, "stop": 1596442208442}], "start": 1596442208442, "stop": 1596442208556}

View File

@ -0,0 +1 @@
{"uuid": "254147d7-dca4-49e5-b6e4-f68d05ed5b01", "befores": [{"name": "case_title", "status": "passed", "start": 1605717898901, "stop": 1605717898901}], "start": 1605717898901, "stop": 1605717898959}

View File

@ -0,0 +1 @@
{"uuid": "9418ed03-516e-4c93-a21c-d941b232b1a2", "befores": [{"name": "case_number", "status": "passed", "start": 1605717898028, "stop": 1605717898028}], "start": 1605717898028, "stop": 1605717898262}

Some files were not shown because too many files have changed in this diff Show More