forked from DxvLwRYF/apiAutoTest
update
This commit is contained in:
parent
fa6345f939
commit
cb32ce6ae8
201
LICENSE
201
LICENSE
|
@ -1,201 +0,0 @@
|
|||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"case_001": {
|
||||
"data": null,
|
||||
"meta": {
|
||||
"msg": "参数错误",
|
||||
"status": 400
|
||||
}
|
||||
},
|
||||
"case_002": {
|
||||
"data": {
|
||||
"id": 500,
|
||||
"rid": 0,
|
||||
"username": "admin",
|
||||
"mobile": "12345678",
|
||||
"email": "adsfad@qq.com",
|
||||
"token": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOjUwMCwicmlkIjowLCJpYXQiOjE2MDYwNTU0NTksImV4cCI6MTYwNjE0MTg1OX0.1Ck1JiEfxadrEvrskgUnNaVxicEbAAVPqCLQqECcP_Y"
|
||||
},
|
||||
"meta": {
|
||||
"msg": "登录成功",
|
||||
"status": 200
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"data": null,
|
||||
"meta": {
|
||||
"msg": "无效token",
|
||||
"status": 400
|
||||
}
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
"http://www.ysqorz.top:8888/api/private/v1/users/594"
|
|
@ -0,0 +1 @@
|
|||
"实际结果:{'msg': '获取管理员列表成功', 'status': 200} = 预期结果:{'msg': '获取管理员列表成功', 'status': 200}"
|
|
@ -1 +0,0 @@
|
|||
{"uuid": "e7abbb3b-0eea-4f46-8ef6-f912b8807f2b", "befores": [{"name": "case_number", "status": "passed", "start": 1605868886257, "stop": 1605868886257}], "start": 1605868886257, "stop": 1605868886322}
|
|
@ -0,0 +1 @@
|
|||
0.043536
|
|
@ -0,0 +1 @@
|
|||
"http://www.ysqorz.top:8888/api/private/v1/login"
|
|
@ -0,0 +1 @@
|
|||
{"name": "post请求实现登录", "status": "passed", "steps": [{"name": "请求地址", "status": "passed", "attachments": [{"name": "请求地址", "source": "192dbba8-97ae-442f-9c6d-89f515d1874a-attachment.txt", "type": "text/plain"}], "start": 1606055459866, "stop": 1606055459866}, {"name": "请求头", "status": "passed", "attachments": [{"name": "请求头", "source": "ac2887d6-a2d4-492b-a67f-100e95304766-attachment.txt", "type": "text/plain"}], "start": 1606055459866, "stop": 1606055459867}, {"name": "请求参数", "status": "passed", "attachments": [{"name": "请求参数", "source": "793d54b6-a1e7-445d-affc-16bc3f9749a4-attachment.txt", "type": "text/plain"}], "start": 1606055459867, "stop": 1606055459868}, {"name": "上传文件", "status": "passed", "attachments": [{"name": "上传文件", "source": "a4fbcd9b-aa5b-4320-9dc4-3a5e34706a48-attachment.txt", "type": "text/plain"}], "start": 1606055459868, "stop": 1606055459869}, {"name": "响应耗时(s)", "status": "passed", "attachments": [{"name": "响应耗时(s)", "source": "56537832-4c05-40f4-b463-ccef48ed15c4-attachment.txt", "type": "text/plain"}], "start": 1606055460024, "stop": 1606055460025}, {"name": "响应内容", "status": "passed", "attachments": [{"name": "响应内容", "source": "7726eb6d-55e6-4815-bc09-8bd73a3d6189-attachment.txt", "type": "text/plain"}], "start": 1606055460025, "stop": 1606055460026}, {"name": "请求头中添加Token", "status": "passed", "attachments": [{"name": "请求头中添加Token", "source": "915dc959-b3e7-4afd-8897-50f79d033ef0-attachment.txt", "type": "text/plain"}], "start": 1606055460026, "stop": 1606055460027}, {"name": "存储实际响应", "status": "passed", "attachments": [{"name": "存储实际响应", "source": "02fb297e-afc9-4798-902f-1d9772e05ff2-attachment.txt", "type": "text/plain"}], "start": 1606055460028, "stop": 1606055460029}, {"name": "第1个断言", "status": "passed", "attachments": [{"name": "第1个断言", "source": "635c507b-c077-46ad-a0d8-1d6994b93c56-attachment.txt", "type": "text/plain"}], "start": 1606055460030, "stop": 1606055460031}], "attachments": [{"name": "stderr", "source": "5139701e-46c8-432e-8920-ec68ee1dde14-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "case", "value": "['case_002', 'post请求实现登录', 'login', '写', 'post', 'data', '', '{\"username\": \"admin\", \"password\": \"123456\"}', '{\"$.meta\":{ \"msg\": \"登录成功\", \"status\": 200 }}']"}], "start": 1606055459865, "stop": 1606055460031, "uuid": "5f63acfb-e2a1-41c2-bba4-b40a9025e05c", "historyId": "e37eee6749637e7e7e0c6b281657f72a", "testCaseId": "08d97ba530f9b18be2971da4c2ed1083", "fullName": "test.test_api.TestApi#test_main", "labels": [{"name": "parentSuite", "value": "test"}, {"name": "suite", "value": "test_api"}, {"name": "subSuite", "value": "TestApi"}, {"name": "host", "value": "DESKTOP-0T59F1A"}, {"name": "thread", "value": "7848-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test.test_api"}]}
|
|
@ -0,0 +1,9 @@
|
|||
[32m2020-11-22 22:30:59.854[0m | [1mINFO [0m | [36mapi.base_requests[0m:[36msend_api[0m:[36m80[0m - [1m
|
||||
请求地址:http://www.ysqorz.top:8888/api/private/v1/login
|
||||
请求方法:get
|
||||
请求头:{'Accept-Encoding': 'gzip, deflate', 'Accept-Language': 'zh-CN,zh;q=0.9', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36'}
|
||||
请求参数:{'username': 'admin', 'password': ''}
|
||||
响应数据:{'data': None, 'meta': {'msg': '参数错误', 'status': 400}}[0m
|
||||
[32m2020-11-22 22:30:59.857[0m | [1mINFO [0m | [36mtools.data_process[0m:[36msave_response[0m:[36m27[0m - [1m添加key: case_001, 对应value: {'data': None, 'meta': {'msg': '参数错误', 'status': 400}}[0m
|
||||
[32m2020-11-22 22:30:59.858[0m | [1mINFO [0m | [36mtools.data_process[0m:[36massert_result[0m:[36m93[0m - [1m第1个断言,实际结果:{'msg': '参数错误', 'status': 400} | 预期结果:{'msg': '参数错误', 'status': 400}
|
||||
断言结果 True[0m
|
|
@ -0,0 +1,10 @@
|
|||
[32m2020-11-22 22:31:00.041[0m | [31m[1mERROR [0m | [36mtools[0m:[36mextractor[0m:[36m29[0m - [31m[1m提取不到内容,丢给你一个错误!'bool' object is not subscriptable[0m
|
||||
[32m2020-11-22 22:31:00.215[0m | [1mINFO [0m | [36mapi.base_requests[0m:[36msend_api[0m:[36m80[0m - [1m
|
||||
请求地址:http://www.ysqorz.top:8888/api/private/v1/users
|
||||
请求方法:get
|
||||
请求头:{'Accept-Encoding': 'gzip, deflate', 'Accept-Language': 'zh-CN,zh;q=0.9', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36', 'Authorization': 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOjUwMCwicmlkIjowLCJpYXQiOjE2MDYwNTU0NTksImV4cCI6MTYwNjE0MTg1OX0.1Ck1JiEfxadrEvrskgUnNaVxicEbAAVPqCLQqECcP_Y'}
|
||||
请求参数:{'pagenum': 1, 'pagesize': '12', 'meta': None, 'userId': 500}
|
||||
响应数据:{'data': {'total': 5, 'pagenum': 1, 'users': [{'id': 500, 'role_name': '超级管理员', 'username': 'admin', 'create_time': 1486720211, 'mobile': '12345678', 'email': 'adsfad@qq.com', 'mg_state': True}, {'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': True}, {'id': 509, 'role_name': 'test', 'username': 'asdf123', 'create_time': 1511853353, 'mobile': '1111', 'email': 'asdf@qq.com', 'mg_state': True}, {'id': 510, 'role_name': '超级管理员', 'username': '123', 'create_time': 1606037001, 'mobile': '15515515555', 'email': '1213@qq.com', 'mg_state': True}]}, 'meta': {'msg': '获取管理员列表成功', 'status': 200}}[0m
|
||||
[32m2020-11-22 22:31:00.220[0m | [1mINFO [0m | [36mtools.data_process[0m:[36msave_response[0m:[36m27[0m - [1m添加key: case_003, 对应value: {'data': {'total': 5, 'pagenum': 1, 'users': [{'id': 500, 'role_name': '超级管理员', 'username': 'admin', 'create_time': 1486720211, 'mobile': '12345678', 'email': 'adsfad@qq.com', 'mg_state': True}, {'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': True}, {'id': 509, 'role_name': 'test', 'username': 'asdf123', 'create_time': 1511853353, 'mobile': '1111', 'email': 'asdf@qq.com', 'mg_state': True}, {'id': 510, 'role_name': '超级管理员', 'username': '123', 'create_time': 1606037001, 'mobile': '15515515555', 'email': '1213@qq.com', 'mg_state': True}]}, 'meta': {'msg': '获取管理员列表成功', 'status': 200}}[0m
|
||||
[32m2020-11-22 22:31:00.222[0m | [1mINFO [0m | [36mtools.data_process[0m:[36massert_result[0m:[36m93[0m - [1m第1个断言,实际结果:{'msg': '获取管理员列表成功', 'status': 200} | 预期结果:{'msg': '获取管理员列表成功', 'status': 200}
|
||||
断言结果 True[0m
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"Accept-Encoding": "gzip, deflate",
|
||||
"Accept-Language": "zh-CN,zh;q=0.9",
|
||||
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36",
|
||||
"Authorization": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOjUwMCwicmlkIjowLCJpYXQiOjE2MDYwNTU0NTksImV4cCI6MTYwNjE0MTg1OX0.1Ck1JiEfxadrEvrskgUnNaVxicEbAAVPqCLQqECcP_Y"
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
"http://www.ysqorz.top:8888/api/private/v1/users/594/state/2"
|
|
@ -1 +0,0 @@
|
|||
{"uuid": "512ea04d-92a1-4b13-94de-d23c7b322f67", "befores": [{"name": "expect", "status": "passed", "start": 1605868886258, "stop": 1605868886258}], "start": 1605868886258, "stop": 1605868886312}
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"data": {
|
||||
"id": 594,
|
||||
"rid": -1,
|
||||
"username": "testery",
|
||||
"mobile": null,
|
||||
"email": null,
|
||||
"mg_state": 0
|
||||
},
|
||||
"meta": {
|
||||
"msg": "设置状态成功",
|
||||
"status": 200
|
||||
}
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
{"name": "get请求实现登录", "status": "passed", "steps": [{"name": "请求地址", "status": "passed", "attachments": [{"name": "请求地址", "source": "bbed028e-149f-4eba-bbb3-981b7138f169-attachment.txt", "type": "text/plain"}], "start": 1606055459770, "stop": 1606055459771}, {"name": "请求头", "status": "passed", "attachments": [{"name": "请求头", "source": "99c33a1e-5dd7-4fe6-8fe1-b541e5ef55af-attachment.txt", "type": "text/plain"}], "start": 1606055459771, "stop": 1606055459772}, {"name": "请求参数", "status": "passed", "attachments": [{"name": "请求参数", "source": "544a7b0d-223f-4287-8359-3b2932d36943-attachment.txt", "type": "text/plain"}], "start": 1606055459772, "stop": 1606055459773}, {"name": "上传文件", "status": "passed", "attachments": [{"name": "上传文件", "source": "7bf61dd6-fe62-4c00-adec-6188d5ca73a3-attachment.txt", "type": "text/plain"}], "start": 1606055459773, "stop": 1606055459774}, {"name": "响应耗时(s)", "status": "passed", "attachments": [{"name": "响应耗时(s)", "source": "4ce9d002-81eb-47a3-83c0-27bfeed00c47-attachment.txt", "type": "text/plain"}], "start": 1606055459855, "stop": 1606055459856}, {"name": "响应内容", "status": "passed", "attachments": [{"name": "响应内容", "source": "cf4121c3-47c7-4246-9e60-0b3685515cf2-attachment.txt", "type": "text/plain"}], "start": 1606055459856, "stop": 1606055459856}, {"name": "存储实际响应", "status": "passed", "attachments": [{"name": "存储实际响应", "source": "6fcaef28-e28f-4469-b135-deb68c4e3fcb-attachment.txt", "type": "text/plain"}], "start": 1606055459857, "stop": 1606055459858}, {"name": "第1个断言", "status": "passed", "attachments": [{"name": "第1个断言", "source": "b14aa254-4fe9-47fb-a0f4-cbb00978c8ef-attachment.txt", "type": "text/plain"}], "start": 1606055459859, "stop": 1606055459859}], "attachments": [{"name": "stderr", "source": "2547a625-6158-4251-a902-f83f66fc27cb-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "case", "value": "['case_001', 'get请求实现登录', 'login', '', 'get', 'params', '', '{\"username\": \"admin\", \"password\": \"\"}', '{\"$.meta\":{ \"msg\": \"参数错误\", \"status\": 400 }}']"}], "start": 1606055459770, "stop": 1606055459860, "uuid": "8dce890d-afd8-410f-9f15-b9fe2b17d845", "historyId": "613f214da5e2528e663bdd8f906068d7", "testCaseId": "08d97ba530f9b18be2971da4c2ed1083", "fullName": "test.test_api.TestApi#test_main", "labels": [{"name": "parentSuite", "value": "test"}, {"name": "suite", "value": "test_api"}, {"name": "subSuite", "value": "TestApi"}, {"name": "host", "value": "DESKTOP-0T59F1A"}, {"name": "thread", "value": "7848-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test.test_api"}]}
|
|
@ -1 +0,0 @@
|
|||
{"uuid": "a292dce7-f337-44a7-8185-60226b8e6241", "befores": [{"name": "is_token", "status": "passed", "start": 1605868886327, "stop": 1605868886327}], "start": 1605868886327, "stop": 1605868886344}
|
|
@ -0,0 +1,10 @@
|
|||
[32m2020-11-22 22:31:00.550[0m | [31m[1mERROR [0m | [36mtools[0m:[36mextractor[0m:[36m29[0m - [31m[1m提取不到内容,丢给你一个错误!'bool' object is not subscriptable[0m
|
||||
[32m2020-11-22 22:31:00.599[0m | [1mINFO [0m | [36mapi.base_requests[0m:[36msend_api[0m:[36m80[0m - [1m
|
||||
请求地址:http://www.ysqorz.top:8888/api/private/v1/users/594/state/None
|
||||
请求方法:put
|
||||
请求头:{'Accept-Encoding': 'gzip, deflate', 'Accept-Language': 'zh-CN,zh;q=0.9', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36', 'Authorization': 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOjUwMCwicmlkIjowLCJpYXQiOjE2MDYwNTU0NTksImV4cCI6MTYwNjE0MTg1OX0.1Ck1JiEfxadrEvrskgUnNaVxicEbAAVPqCLQqECcP_Y'}
|
||||
请求参数:None
|
||||
响应数据:{'data': {'id': 594, 'rid': -1, 'username': 'testery', 'mobile': None, 'email': None, 'mg_state': 0}, 'meta': {'msg': '设置状态成功', 'status': 200}}[0m
|
||||
[32m2020-11-22 22:31:00.601[0m | [1mINFO [0m | [36mtools.data_process[0m:[36msave_response[0m:[36m27[0m - [1m添加key: case_006, 对应value: {'data': {'id': 594, 'rid': -1, 'username': 'testery', 'mobile': None, 'email': None, 'mg_state': 0}, 'meta': {'msg': '设置状态成功', 'status': 200}}[0m
|
||||
[32m2020-11-22 22:31:00.603[0m | [1mINFO [0m | [36mtools.data_process[0m:[36massert_result[0m:[36m93[0m - [1m第1个断言,实际结果:{'msg': '设置状态成功', 'status': 200} | 预期结果:{'msg': '设置状态成功', 'status': 200}
|
||||
断言结果 True[0m
|
|
@ -0,0 +1 @@
|
|||
"http://www.ysqorz.top:8888/api/private/v1/users/594/state/None"
|
|
@ -0,0 +1 @@
|
|||
0.163048
|
|
@ -0,0 +1 @@
|
|||
"http://www.ysqorz.top:8888/api/private/v1/users"
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"pagenum": 1,
|
||||
"pagesize": "12",
|
||||
"meta": null,
|
||||
"userId": 500
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"data": {
|
||||
"id": 594,
|
||||
"username": "testery",
|
||||
"role_id": -1,
|
||||
"create_time": 1606055460
|
||||
},
|
||||
"meta": {
|
||||
"msg": "创建成功",
|
||||
"status": 201
|
||||
}
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
{"uuid": "4f39d7f7-ef1d-459d-9591-774991cb0712", "befores": [{"name": "case", "status": "passed", "start": 1606055460371, "stop": 1606055460371}], "start": 1606055460371, "stop": 1606055460546}
|
|
@ -1 +0,0 @@
|
|||
"http://127.0.0.1:8000upload_file/"
|
|
@ -1 +0,0 @@
|
|||
{"uuid": "11b294bf-8ffd-41a3-a002-7f9c428e144b", "befores": [{"name": "file_var", "status": "passed", "start": 1605868886257, "stop": 1605868886257}], "start": 1605868886257, "stop": 1605868886314}
|
|
@ -0,0 +1,113 @@
|
|||
{
|
||||
"case_001": {
|
||||
"data": null,
|
||||
"meta": {
|
||||
"msg": "参数错误",
|
||||
"status": 400
|
||||
}
|
||||
},
|
||||
"case_002": {
|
||||
"data": {
|
||||
"id": 500,
|
||||
"rid": 0,
|
||||
"username": "admin",
|
||||
"mobile": "12345678",
|
||||
"email": "adsfad@qq.com",
|
||||
"token": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOjUwMCwicmlkIjowLCJpYXQiOjE2MDYwNTU0NTksImV4cCI6MTYwNjE0MTg1OX0.1Ck1JiEfxadrEvrskgUnNaVxicEbAAVPqCLQqECcP_Y"
|
||||
},
|
||||
"meta": {
|
||||
"msg": "登录成功",
|
||||
"status": 200
|
||||
}
|
||||
},
|
||||
"case_003": {
|
||||
"data": {
|
||||
"total": 5,
|
||||
"pagenum": 1,
|
||||
"users": [
|
||||
{
|
||||
"id": 500,
|
||||
"role_name": "超级管理员",
|
||||
"username": "admin",
|
||||
"create_time": 1486720211,
|
||||
"mobile": "12345678",
|
||||
"email": "adsfad@qq.com",
|
||||
"mg_state": true
|
||||
},
|
||||
{
|
||||
"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": true
|
||||
},
|
||||
{
|
||||
"id": 509,
|
||||
"role_name": "test",
|
||||
"username": "asdf123",
|
||||
"create_time": 1511853353,
|
||||
"mobile": "1111",
|
||||
"email": "asdf@qq.com",
|
||||
"mg_state": true
|
||||
},
|
||||
{
|
||||
"id": 510,
|
||||
"role_name": "超级管理员",
|
||||
"username": "123",
|
||||
"create_time": 1606037001,
|
||||
"mobile": "15515515555",
|
||||
"email": "1213@qq.com",
|
||||
"mg_state": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"meta": {
|
||||
"msg": "获取管理员列表成功",
|
||||
"status": 200
|
||||
}
|
||||
},
|
||||
"case_004": {
|
||||
"data": null,
|
||||
"meta": {
|
||||
"msg": "无效token",
|
||||
"status": 400
|
||||
}
|
||||
},
|
||||
"case_005": {
|
||||
"data": {
|
||||
"id": 594,
|
||||
"username": "testery",
|
||||
"role_id": -1,
|
||||
"create_time": 1606055460
|
||||
},
|
||||
"meta": {
|
||||
"msg": "创建成功",
|
||||
"status": 201
|
||||
}
|
||||
},
|
||||
"case_006": {
|
||||
"data": {
|
||||
"id": 594,
|
||||
"rid": -1,
|
||||
"username": "testery",
|
||||
"mobile": null,
|
||||
"email": null,
|
||||
"mg_state": 0
|
||||
},
|
||||
"meta": {
|
||||
"msg": "设置状态成功",
|
||||
"status": 200
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
"实际结果:{'msg': '设置状态成功', 'status': 200} = 预期结果:{'msg': '设置状态成功', 'status': 200}"
|
|
@ -0,0 +1,134 @@
|
|||
{
|
||||
"case_001": {
|
||||
"data": null,
|
||||
"meta": {
|
||||
"msg": "参数错误",
|
||||
"status": 400
|
||||
}
|
||||
},
|
||||
"case_002": {
|
||||
"data": {
|
||||
"id": 500,
|
||||
"rid": 0,
|
||||
"username": "admin",
|
||||
"mobile": "12345678",
|
||||
"email": "adsfad@qq.com",
|
||||
"token": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOjUwMCwicmlkIjowLCJpYXQiOjE2MDYwNTU0NTksImV4cCI6MTYwNjE0MTg1OX0.1Ck1JiEfxadrEvrskgUnNaVxicEbAAVPqCLQqECcP_Y"
|
||||
},
|
||||
"meta": {
|
||||
"msg": "登录成功",
|
||||
"status": 200
|
||||
}
|
||||
},
|
||||
"case_003": {
|
||||
"data": {
|
||||
"total": 5,
|
||||
"pagenum": 1,
|
||||
"users": [
|
||||
{
|
||||
"id": 500,
|
||||
"role_name": "超级管理员",
|
||||
"username": "admin",
|
||||
"create_time": 1486720211,
|
||||
"mobile": "12345678",
|
||||
"email": "adsfad@qq.com",
|
||||
"mg_state": true
|
||||
},
|
||||
{
|
||||
"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": true
|
||||
},
|
||||
{
|
||||
"id": 509,
|
||||
"role_name": "test",
|
||||
"username": "asdf123",
|
||||
"create_time": 1511853353,
|
||||
"mobile": "1111",
|
||||
"email": "asdf@qq.com",
|
||||
"mg_state": true
|
||||
},
|
||||
{
|
||||
"id": 510,
|
||||
"role_name": "超级管理员",
|
||||
"username": "123",
|
||||
"create_time": 1606037001,
|
||||
"mobile": "15515515555",
|
||||
"email": "1213@qq.com",
|
||||
"mg_state": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"meta": {
|
||||
"msg": "获取管理员列表成功",
|
||||
"status": 200
|
||||
}
|
||||
},
|
||||
"case_004": {
|
||||
"data": null,
|
||||
"meta": {
|
||||
"msg": "无效token",
|
||||
"status": 400
|
||||
}
|
||||
},
|
||||
"case_005": {
|
||||
"data": {
|
||||
"id": 594,
|
||||
"username": "testery",
|
||||
"role_id": -1,
|
||||
"create_time": 1606055460
|
||||
},
|
||||
"meta": {
|
||||
"msg": "创建成功",
|
||||
"status": 201
|
||||
}
|
||||
},
|
||||
"case_006": {
|
||||
"data": {
|
||||
"id": 594,
|
||||
"rid": -1,
|
||||
"username": "testery",
|
||||
"mobile": null,
|
||||
"email": null,
|
||||
"mg_state": 0
|
||||
},
|
||||
"meta": {
|
||||
"msg": "设置状态成功",
|
||||
"status": 200
|
||||
}
|
||||
},
|
||||
"case_007": {
|
||||
"data": {
|
||||
"id": 594,
|
||||
"rid": -1,
|
||||
"username": "testery",
|
||||
"mobile": null,
|
||||
"email": null,
|
||||
"mg_state": 0
|
||||
},
|
||||
"meta": {
|
||||
"msg": "设置状态成功",
|
||||
"status": 200
|
||||
}
|
||||
},
|
||||
"case_008": {
|
||||
"data": null,
|
||||
"meta": {
|
||||
"msg": "删除成功",
|
||||
"status": 200
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
{"uuid": "d4468899-97fe-43f6-9381-3107ca569130", "befores": [{"name": "case_number", "status": "passed", "start": 1605868886327, "stop": 1605868886327}], "start": 1605868886327, "stop": 1605868886346}
|
|
@ -0,0 +1,87 @@
|
|||
{
|
||||
"case_001": {
|
||||
"data": null,
|
||||
"meta": {
|
||||
"msg": "参数错误",
|
||||
"status": 400
|
||||
}
|
||||
},
|
||||
"case_002": {
|
||||
"data": {
|
||||
"id": 500,
|
||||
"rid": 0,
|
||||
"username": "admin",
|
||||
"mobile": "12345678",
|
||||
"email": "adsfad@qq.com",
|
||||
"token": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOjUwMCwicmlkIjowLCJpYXQiOjE2MDYwNTU0NTksImV4cCI6MTYwNjE0MTg1OX0.1Ck1JiEfxadrEvrskgUnNaVxicEbAAVPqCLQqECcP_Y"
|
||||
},
|
||||
"meta": {
|
||||
"msg": "登录成功",
|
||||
"status": 200
|
||||
}
|
||||
},
|
||||
"case_003": {
|
||||
"data": {
|
||||
"total": 5,
|
||||
"pagenum": 1,
|
||||
"users": [
|
||||
{
|
||||
"id": 500,
|
||||
"role_name": "超级管理员",
|
||||
"username": "admin",
|
||||
"create_time": 1486720211,
|
||||
"mobile": "12345678",
|
||||
"email": "adsfad@qq.com",
|
||||
"mg_state": true
|
||||
},
|
||||
{
|
||||
"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": true
|
||||
},
|
||||
{
|
||||
"id": 509,
|
||||
"role_name": "test",
|
||||
"username": "asdf123",
|
||||
"create_time": 1511853353,
|
||||
"mobile": "1111",
|
||||
"email": "asdf@qq.com",
|
||||
"mg_state": true
|
||||
},
|
||||
{
|
||||
"id": 510,
|
||||
"role_name": "超级管理员",
|
||||
"username": "123",
|
||||
"create_time": 1606037001,
|
||||
"mobile": "15515515555",
|
||||
"email": "1213@qq.com",
|
||||
"mg_state": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"meta": {
|
||||
"msg": "获取管理员列表成功",
|
||||
"status": 200
|
||||
}
|
||||
},
|
||||
"case_004": {
|
||||
"data": null,
|
||||
"meta": {
|
||||
"msg": "无效token",
|
||||
"status": 400
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,127 @@
|
|||
{
|
||||
"case_001": {
|
||||
"data": null,
|
||||
"meta": {
|
||||
"msg": "参数错误",
|
||||
"status": 400
|
||||
}
|
||||
},
|
||||
"case_002": {
|
||||
"data": {
|
||||
"id": 500,
|
||||
"rid": 0,
|
||||
"username": "admin",
|
||||
"mobile": "12345678",
|
||||
"email": "adsfad@qq.com",
|
||||
"token": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOjUwMCwicmlkIjowLCJpYXQiOjE2MDYwNTU0NTksImV4cCI6MTYwNjE0MTg1OX0.1Ck1JiEfxadrEvrskgUnNaVxicEbAAVPqCLQqECcP_Y"
|
||||
},
|
||||
"meta": {
|
||||
"msg": "登录成功",
|
||||
"status": 200
|
||||
}
|
||||
},
|
||||
"case_003": {
|
||||
"data": {
|
||||
"total": 5,
|
||||
"pagenum": 1,
|
||||
"users": [
|
||||
{
|
||||
"id": 500,
|
||||
"role_name": "超级管理员",
|
||||
"username": "admin",
|
||||
"create_time": 1486720211,
|
||||
"mobile": "12345678",
|
||||
"email": "adsfad@qq.com",
|
||||
"mg_state": true
|
||||
},
|
||||
{
|
||||
"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": true
|
||||
},
|
||||
{
|
||||
"id": 509,
|
||||
"role_name": "test",
|
||||
"username": "asdf123",
|
||||
"create_time": 1511853353,
|
||||
"mobile": "1111",
|
||||
"email": "asdf@qq.com",
|
||||
"mg_state": true
|
||||
},
|
||||
{
|
||||
"id": 510,
|
||||
"role_name": "超级管理员",
|
||||
"username": "123",
|
||||
"create_time": 1606037001,
|
||||
"mobile": "15515515555",
|
||||
"email": "1213@qq.com",
|
||||
"mg_state": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"meta": {
|
||||
"msg": "获取管理员列表成功",
|
||||
"status": 200
|
||||
}
|
||||
},
|
||||
"case_004": {
|
||||
"data": null,
|
||||
"meta": {
|
||||
"msg": "无效token",
|
||||
"status": 400
|
||||
}
|
||||
},
|
||||
"case_005": {
|
||||
"data": {
|
||||
"id": 594,
|
||||
"username": "testery",
|
||||
"role_id": -1,
|
||||
"create_time": 1606055460
|
||||
},
|
||||
"meta": {
|
||||
"msg": "创建成功",
|
||||
"status": 201
|
||||
}
|
||||
},
|
||||
"case_006": {
|
||||
"data": {
|
||||
"id": 594,
|
||||
"rid": -1,
|
||||
"username": "testery",
|
||||
"mobile": null,
|
||||
"email": null,
|
||||
"mg_state": 0
|
||||
},
|
||||
"meta": {
|
||||
"msg": "设置状态成功",
|
||||
"status": 200
|
||||
}
|
||||
},
|
||||
"case_007": {
|
||||
"data": {
|
||||
"id": 594,
|
||||
"rid": -1,
|
||||
"username": "testery",
|
||||
"mobile": null,
|
||||
"email": null,
|
||||
"mg_state": 0
|
||||
},
|
||||
"meta": {
|
||||
"msg": "设置状态成功",
|
||||
"status": 200
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"data": {
|
||||
"id": 594,
|
||||
"rid": -1,
|
||||
"username": "testery",
|
||||
"mobile": null,
|
||||
"email": null,
|
||||
"mg_state": 0
|
||||
},
|
||||
"meta": {
|
||||
"msg": "设置状态成功",
|
||||
"status": 200
|
||||
}
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
{"uuid": "2b65cb71-706c-4139-93d7-758d53376cc1", "befores": [{"name": "case", "status": "passed", "start": 1606055460235, "stop": 1606055460235}], "start": 1606055460235, "stop": 1606055460367}
|
|
@ -0,0 +1 @@
|
|||
0.076859
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"Accept-Encoding": "gzip, deflate",
|
||||
"Accept-Language": "zh-CN,zh;q=0.9",
|
||||
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36"
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
[32m2020-11-22 22:31:00.022[0m | [1mINFO [0m | [36mapi.base_requests[0m:[36msend_api[0m:[36m80[0m - [1m
|
||||
请求地址:http://www.ysqorz.top:8888/api/private/v1/login
|
||||
请求方法:post
|
||||
请求头:{'Accept-Encoding': 'gzip, deflate', 'Accept-Language': 'zh-CN,zh;q=0.9', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36'}
|
||||
请求参数:{'username': 'admin', 'password': '123456'}
|
||||
响应数据:{'data': {'id': 500, 'rid': 0, 'username': 'admin', 'mobile': '12345678', 'email': 'adsfad@qq.com', 'token': 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOjUwMCwicmlkIjowLCJpYXQiOjE2MDYwNTU0NTksImV4cCI6MTYwNjE0MTg1OX0.1Ck1JiEfxadrEvrskgUnNaVxicEbAAVPqCLQqECcP_Y'}, 'meta': {'msg': '登录成功', 'status': 200}}[0m
|
||||
[32m2020-11-22 22:31:00.027[0m | [1mINFO [0m | [36mtools.data_process[0m:[36msave_response[0m:[36m27[0m - [1m添加key: case_002, 对应value: {'data': {'id': 500, 'rid': 0, 'username': 'admin', 'mobile': '12345678', 'email': 'adsfad@qq.com', 'token': 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOjUwMCwicmlkIjowLCJpYXQiOjE2MDYwNTU0NTksImV4cCI6MTYwNjE0MTg1OX0.1Ck1JiEfxadrEvrskgUnNaVxicEbAAVPqCLQqECcP_Y'}, 'meta': {'msg': '登录成功', 'status': 200}}[0m
|
||||
[32m2020-11-22 22:31:00.029[0m | [1mINFO [0m | [36mtools.data_process[0m:[36massert_result[0m:[36m93[0m - [1m第1个断言,实际结果:{'msg': '登录成功', 'status': 200} | 预期结果:{'msg': '登录成功', 'status': 200}
|
||||
断言结果 True[0m
|
|
@ -1 +0,0 @@
|
|||
{"uuid": "044c1027-f079-49d1-a7fc-2da29d19f080", "befores": [{"name": "case_title", "status": "passed", "start": 1605868886327, "stop": 1605868886327}], "start": 1605868886327, "stop": 1605868886346}
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"username": "testery",
|
||||
"password": "123456"
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"username": "admin",
|
||||
"password": ""
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
0.151902
|
|
@ -1 +0,0 @@
|
|||
{"uuid": "6ab71114-e40b-4a30-8d3c-505a4e4b73bc", "befores": [{"name": "expect", "status": "passed", "start": 1605868886328, "stop": 1605868886328}], "start": 1605868886328, "stop": 1605868886342}
|
|
@ -1 +0,0 @@
|
|||
{"uuid": "7d9cff08-736f-4ac8-b352-0de96164225d", "befores": [{"name": "path", "status": "passed", "start": 1605868886327, "stop": 1605868886327}], "start": 1605868886327, "stop": 1605868886345}
|
|
@ -0,0 +1 @@
|
|||
0.169135
|
|
@ -1,3 +0,0 @@
|
|||
[32m2020-11-20 18:41:26.259[0m | [34m[1mDEBUG [0m | [36mtest.test_api[0m:[36mtest_main[0m:[36m61[0m - [34m[1m⬇️⬇️⬇️...执行用例编号:case_009...⬇️⬇️⬇️️[0m
|
||||
[32m2020-11-20 18:41:26.260[0m | [1mINFO [0m | [36mtools.data_process[0m:[36mhandle_path[0m:[36m40[0m - [1m提取出的路径地址: upload_file/[0m
|
||||
[32m2020-11-20 18:41:26.261[0m | [31m[1mERROR [0m | [36mtools.data_process[0m:[36mhandler_files[0m:[36m75[0m - [31m[1m{"file_excel":"/user/data/case_data - 副本.xls"}[0m
|
|
@ -0,0 +1 @@
|
|||
{"uuid": "48b80104-884b-4f29-a0e2-97f987792810", "befores": [{"name": "case", "status": "passed", "start": 1606055460550, "stop": 1606055460550}], "start": 1606055460550, "stop": 1606055460606}
|
|
@ -1 +0,0 @@
|
|||
{"uuid": "26526ae4-b912-40ac-b1ce-96dc51283fbf", "befores": [{"name": "data", "status": "passed", "start": 1605868886328, "stop": 1605868886328}], "start": 1605868886328, "stop": 1605868886342}
|
|
@ -0,0 +1 @@
|
|||
"实际结果:{'msg': '登录成功', 'status': 200} = 预期结果:{'msg': '登录成功', 'status': 200}"
|
|
@ -0,0 +1,57 @@
|
|||
{
|
||||
"data": {
|
||||
"total": 5,
|
||||
"pagenum": 1,
|
||||
"users": [
|
||||
{
|
||||
"id": 500,
|
||||
"role_name": "超级管理员",
|
||||
"username": "admin",
|
||||
"create_time": 1486720211,
|
||||
"mobile": "12345678",
|
||||
"email": "adsfad@qq.com",
|
||||
"mg_state": true
|
||||
},
|
||||
{
|
||||
"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": true
|
||||
},
|
||||
{
|
||||
"id": 509,
|
||||
"role_name": "test",
|
||||
"username": "asdf123",
|
||||
"create_time": 1511853353,
|
||||
"mobile": "1111",
|
||||
"email": "asdf@qq.com",
|
||||
"mg_state": true
|
||||
},
|
||||
{
|
||||
"id": 510,
|
||||
"role_name": "超级管理员",
|
||||
"username": "123",
|
||||
"create_time": 1606037001,
|
||||
"mobile": "15515515555",
|
||||
"email": "1213@qq.com",
|
||||
"mg_state": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"meta": {
|
||||
"msg": "获取管理员列表成功",
|
||||
"status": 200
|
||||
}
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
{"uuid": "7db03497-4167-4a71-a01a-43379fb6696c", "befores": [{"name": "case", "status": "passed", "start": 1606055459865, "stop": 1606055459865}], "start": 1606055459865, "stop": 1606055460032}
|
|
@ -1 +0,0 @@
|
|||
{"uuid": "75cc7635-9d70-448d-a2c3-2efdc6267c65", "befores": [{"name": "method", "status": "passed", "start": 1605868886328, "stop": 1605868886328}], "start": 1605868886328, "stop": 1605868886344}
|
|
@ -0,0 +1 @@
|
|||
"实际结果:{'msg': '删除成功', 'status': 200} = 预期结果:{'msg': '删除成功', 'status': 200}"
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"case_001": {
|
||||
"data": null,
|
||||
"meta": {
|
||||
"msg": "参数错误",
|
||||
"status": 400
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
{"uuid": "c92875eb-2301-4ec6-8e2f-2df4429d97fe", "befores": [{"name": "method", "status": "passed", "start": 1605868886257, "stop": 1605868886257}], "start": 1605868886257, "stop": 1605868886317}
|
|
@ -1,7 +0,0 @@
|
|||
[32m2020-11-20 18:41:26.328[0m | [34m[1mDEBUG [0m | [36mtest.test_api[0m:[36mtest_main[0m:[36m61[0m - [34m[1m⬇️⬇️⬇️...执行用例编号:case_009...⬇️⬇️⬇️️[0m
|
||||
[32m2020-11-20 18:41:26.329[0m | [1mINFO [0m | [36mtools.data_process[0m:[36mhandle_path[0m:[36m40[0m - [1m提取出的路径地址: upload_files/[0m
|
||||
[32m2020-11-20 18:41:26.331[0m | [31m[1mERROR [0m | [36mtools.data_process[0m:[36mhandler_files[0m:[36m75[0m - [31m[1m{"files":["D:\apiAutoTest\data\case_data - 副本.xls", "D:\apiAutoTest\data\case_data.xlsx"]}[0m
|
||||
[32m2020-11-20 18:41:26.332[0m | [31m[1mERROR [0m | [36mtools[0m:[36mconvert_json[0m:[36m45[0m - [31m[1mInvalid \escape: line 1 column 14 (char 13), json.loads转字典失败[0m
|
||||
[32m2020-11-20 18:41:26.332[0m | [1mINFO [0m | [36mtools.data_process[0m:[36mhandler_files[0m:[36m80[0m - [1mlist类型[0m
|
||||
[32m2020-11-20 18:41:26.332[0m | [1mINFO [0m | [36mtools.data_process[0m:[36mhandler_files[0m:[36m85[0m - [1m['D:\x07piAutoTest\\data\\case_data - 副本.xls', 'D:\x07piAutoTest\\data\\case_data.xlsx'][0m
|
||||
[32m2020-11-20 18:41:26.333[0m | [1mINFO [0m | [36mtools.data_process[0m:[36mhandler_files[0m:[36m86[0m - [1mD:\piAutoTest\data\case_data - 副本.xls[0m
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"data": {
|
||||
"id": 500,
|
||||
"rid": 0,
|
||||
"username": "admin",
|
||||
"mobile": "12345678",
|
||||
"email": "adsfad@qq.com",
|
||||
"token": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOjUwMCwicmlkIjowLCJpYXQiOjE2MDYwNTU0NTksImV4cCI6MTYwNjE0MTg1OX0.1Ck1JiEfxadrEvrskgUnNaVxicEbAAVPqCLQqECcP_Y"
|
||||
},
|
||||
"meta": {
|
||||
"msg": "登录成功",
|
||||
"status": 200
|
||||
}
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
{"uuid": "83413a14-fe48-45b4-a6d8-7960a95fa672", "befores": [{"name": "is_token", "status": "passed", "start": 1605868886257, "stop": 1605868886257}], "start": 1605868886257, "stop": 1605868886318}
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"username": "admin",
|
||||
"password": "123456"
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
"实际结果:{'msg': '创建成功', 'status': 201} = 预期结果:{'msg': '创建成功', 'status': 201}"
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"Accept-Encoding": "gzip, deflate",
|
||||
"Accept-Language": "zh-CN,zh;q=0.9",
|
||||
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36",
|
||||
"Authorization": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOjUwMCwicmlkIjowLCJpYXQiOjE2MDYwNTU0NTksImV4cCI6MTYwNjE0MTg1OX0.1Ck1JiEfxadrEvrskgUnNaVxicEbAAVPqCLQqECcP_Y"
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
{"name": "删除用户zy7y", "status": "passed", "steps": [{"name": "请求地址", "status": "passed", "attachments": [{"name": "请求地址", "source": "0fd5fda2-f709-4862-9ab8-9898f02c7a83-attachment.txt", "type": "text/plain"}], "start": 1606055460666, "stop": 1606055460666}, {"name": "请求头", "status": "passed", "attachments": [{"name": "请求头", "source": "8dd42d81-4893-4ad4-bdb2-5742ab8f07e9-attachment.txt", "type": "text/plain"}], "start": 1606055460666, "stop": 1606055460667}, {"name": "请求参数", "status": "passed", "attachments": [{"name": "请求参数", "source": "ee8ca11d-2c3e-4c2d-9ece-56a4f9e29bf4-attachment.txt", "type": "text/plain"}], "start": 1606055460667, "stop": 1606055460668}, {"name": "上传文件", "status": "passed", "attachments": [{"name": "上传文件", "source": "b174812b-b6b9-44f7-86ea-aba5ec790c1c-attachment.txt", "type": "text/plain"}], "start": 1606055460668, "stop": 1606055460669}, {"name": "响应耗时(s)", "status": "passed", "attachments": [{"name": "响应耗时(s)", "source": "f18ace6b-2ed5-47d1-860c-94f65972cc6d-attachment.txt", "type": "text/plain"}], "start": 1606055460716, "stop": 1606055460716}, {"name": "响应内容", "status": "passed", "attachments": [{"name": "响应内容", "source": "bc5c23ce-baf0-40d6-8d3d-7282cb62067f-attachment.txt", "type": "text/plain"}], "start": 1606055460717, "stop": 1606055460717}, {"name": "存储实际响应", "status": "passed", "attachments": [{"name": "存储实际响应", "source": "47f9d7ab-18f7-4f4c-8817-5de69cf7be9c-attachment.txt", "type": "text/plain"}], "start": 1606055460718, "stop": 1606055460719}, {"name": "第1个断言", "status": "passed", "attachments": [{"name": "第1个断言", "source": "6ced281b-f5b2-40b8-b222-a807155379ef-attachment.txt", "type": "text/plain"}], "start": 1606055460720, "stop": 1606055460721}], "attachments": [{"name": "stderr", "source": "fb3fcfed-ab6a-410f-bca4-c3e4af7b2d45-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "case", "value": "['case_008', '删除用户zy7y', 'users/&$.case_005.data.id&', '读', 'delete', 'params', '', '', '{\"$.meta\":{\"msg\": \"删除成功\", \"status\": 200}}']"}], "start": 1606055460665, "stop": 1606055460721, "uuid": "41832a6a-a9fc-4745-919e-e6a92ef82d51", "historyId": "a86ca099b0f3d8ed88fb7191ad51c143", "testCaseId": "08d97ba530f9b18be2971da4c2ed1083", "fullName": "test.test_api.TestApi#test_main", "labels": [{"name": "parentSuite", "value": "test"}, {"name": "suite", "value": "test_api"}, {"name": "subSuite", "value": "TestApi"}, {"name": "host", "value": "DESKTOP-0T59F1A"}, {"name": "thread", "value": "7848-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test.test_api"}]}
|
|
@ -1 +0,0 @@
|
|||
{"uuid": "0aa4a6da-dc2e-4e04-b7d9-7ed24ca97def", "befores": [{"name": "file_var", "status": "passed", "start": 1605868886328, "stop": 1605868886328}], "start": 1605868886328, "stop": 1605868886343}
|
|
@ -1 +0,0 @@
|
|||
{"uuid": "2eb4e3a5-c34b-47f9-820f-29ae6e3b1759", "befores": [{"name": "case_title", "status": "passed", "start": 1605868886257, "stop": 1605868886257}], "start": 1605868886257, "stop": 1605868886321}
|
|
@ -0,0 +1 @@
|
|||
null
|
|
@ -0,0 +1 @@
|
|||
null
|
|
@ -0,0 +1 @@
|
|||
{"name": "get请求查询用户数据列表", "status": "failed", "statusDetails": {"message": "AssertionError", "trace": "self = <test.test_api.TestApi object at 0x000001A9542ABD48>\ncase = ['case_004', 'get请求查询用户数据列表', 'users', '', 'get', 'data', ...]\n\n @pytest.mark.parametrize('case', cases)\n def test_main(self, case):\n response, expect = BaseRequest.send_request(case)\n # 断言操作\n> DataProcess.assert_result(response, expect)\n\ntest_api.py:43: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\n\ncls = <class 'tools.data_process.DataProcess'>\nresponse = {'data': None, 'meta': {'msg': '无效token', 'status': 400}}\nexpect_str = '{\"$.meta\":{\"msg\": \"获取管理员列表成功\", \"status\": 200}}'\n\n @classmethod\n def assert_result(cls, response: dict, expect_str: str):\n \"\"\" 预期结果实际结果断言方法\n :param response: 实际响应字典\n :param expect_str: 预期响应内容,从excel中读取\n return None\n \"\"\"\n expect_dict = convert_json(expect_str)\n index = 0\n for k, v in expect_dict.items():\n actual = extractor(response, k)\n index += 1\n logger.info(f'第{index}个断言,实际结果:{actual} | 预期结果:{v} \\n断言结果 {actual == v}')\n allure_step(f'第{index}个断言', f'实际结果:{actual} = 预期结果:{v}')\n> assert actual == v\nE AssertionError\n\n..\\tools\\data_process.py:95: AssertionError"}, "steps": [{"name": "请求地址", "status": "passed", "attachments": [{"name": "请求地址", "source": "b5253a05-da3c-415a-8ea0-bd00b18382f4-attachment.txt", "type": "text/plain"}], "start": 1606055460236, "stop": 1606055460237}, {"name": "请求头", "status": "passed", "attachments": [{"name": "请求头", "source": "4f3399e2-d32d-48b0-bbad-dd1a25aad929-attachment.txt", "type": "text/plain"}], "start": 1606055460237, "stop": 1606055460238}, {"name": "请求参数", "status": "passed", "attachments": [{"name": "请求参数", "source": "a3768f08-0980-4d45-983d-804e782344ee-attachment.txt", "type": "text/plain"}], "start": 1606055460239, "stop": 1606055460240}, {"name": "上传文件", "status": "passed", "attachments": [{"name": "上传文件", "source": "05f68f52-cdb2-4796-bec8-50723fc941b2-attachment.txt", "type": "text/plain"}], "start": 1606055460240, "stop": 1606055460241}, {"name": "响应耗时(s)", "status": "passed", "attachments": [{"name": "响应耗时(s)", "source": "d047fe0e-38d2-4704-8036-538f6dcab678-attachment.txt", "type": "text/plain"}], "start": 1606055460278, "stop": 1606055460279}, {"name": "响应内容", "status": "passed", "attachments": [{"name": "响应内容", "source": "0903dca6-53d4-4279-a63e-9ae875186313-attachment.txt", "type": "text/plain"}], "start": 1606055460279, "stop": 1606055460280}, {"name": "存储实际响应", "status": "passed", "attachments": [{"name": "存储实际响应", "source": "48ac09e5-cea8-4fa1-8166-2697d1b35169-attachment.txt", "type": "text/plain"}], "start": 1606055460280, "stop": 1606055460281}, {"name": "第1个断言", "status": "passed", "attachments": [{"name": "第1个断言", "source": "900c9b00-8335-42fd-89cf-3817d14937d3-attachment.txt", "type": "text/plain"}], "start": 1606055460282, "stop": 1606055460282}], "attachments": [{"name": "stderr", "source": "ba362366-259a-4027-a734-1d82b443b80b-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "case", "value": "['case_004', 'get请求查询用户数据列表', 'users', '', 'get', 'data', '', '{\"pagenum\": 1, \"pagesize\": \"12\", \"msg\": &$.msg&}', '{\"$.meta\":{\"msg\": \"获取管理员列表成功\", \"status\": 200}}']"}], "start": 1606055460236, "stop": 1606055460283, "uuid": "0ffd1a85-d223-4e87-9830-41613e3f9f60", "historyId": "5fa6656b8b1b28bc1fdd0eb962f2b477", "testCaseId": "08d97ba530f9b18be2971da4c2ed1083", "fullName": "test.test_api.TestApi#test_main", "labels": [{"name": "parentSuite", "value": "test"}, {"name": "suite", "value": "test_api"}, {"name": "subSuite", "value": "TestApi"}, {"name": "host", "value": "DESKTOP-0T59F1A"}, {"name": "thread", "value": "7848-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test.test_api"}]}
|
|
@ -0,0 +1 @@
|
|||
{"uuid": "5db68522-114d-4184-ab31-ff9240af493f", "befores": [{"name": "case", "status": "passed", "start": 1606055460665, "stop": 1606055460665}], "start": 1606055460665, "stop": 1606055460722}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"Accept-Encoding": "gzip, deflate",
|
||||
"Accept-Language": "zh-CN,zh;q=0.9",
|
||||
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36",
|
||||
"Authorization": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOjUwMCwicmlkIjowLCJpYXQiOjE2MDYwNTU0NTksImV4cCI6MTYwNjE0MTg1OX0.1Ck1JiEfxadrEvrskgUnNaVxicEbAAVPqCLQqECcP_Y"
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
{}
|
|
@ -0,0 +1 @@
|
|||
"实际结果:{'msg': '无效token', 'status': 400} = 预期结果:{'msg': '获取管理员列表成功', 'status': 200}"
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"Accept-Encoding": "gzip, deflate",
|
||||
"Accept-Language": "zh-CN,zh;q=0.9",
|
||||
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36",
|
||||
"Authorization": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOjUwMCwicmlkIjowLCJpYXQiOjE2MDYwNTU0NTksImV4cCI6MTYwNjE0MTg1OX0.1Ck1JiEfxadrEvrskgUnNaVxicEbAAVPqCLQqECcP_Y"
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
"http://127.0.0.1:8000upload_files/"
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"Accept-Encoding": "gzip, deflate",
|
||||
"Accept-Language": "zh-CN,zh;q=0.9",
|
||||
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36"
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
[32m2020-11-22 22:31:00.539[0m | [1mINFO [0m | [36mapi.base_requests[0m:[36msend_api[0m:[36m80[0m - [1m
|
||||
请求地址:http://www.ysqorz.top:8888/api/private/v1/users
|
||||
请求方法:post
|
||||
请求头:{'Accept-Encoding': 'gzip, deflate', 'Accept-Language': 'zh-CN,zh;q=0.9', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36', 'Authorization': 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOjUwMCwicmlkIjowLCJpYXQiOjE2MDYwNTU0NTksImV4cCI6MTYwNjE0MTg1OX0.1Ck1JiEfxadrEvrskgUnNaVxicEbAAVPqCLQqECcP_Y'}
|
||||
请求参数:{'username': 'testery', 'password': '123456'}
|
||||
响应数据:{'data': {'id': 594, 'username': 'testery', 'role_id': -1, 'create_time': 1606055460}, 'meta': {'msg': '创建成功', 'status': 201}}[0m
|
||||
[32m2020-11-22 22:31:00.541[0m | [1mINFO [0m | [36mtools.data_process[0m:[36msave_response[0m:[36m27[0m - [1m添加key: case_005, 对应value: {'data': {'id': 594, 'username': 'testery', 'role_id': -1, 'create_time': 1606055460}, 'meta': {'msg': '创建成功', 'status': 201}}[0m
|
||||
[32m2020-11-22 22:31:00.543[0m | [1mINFO [0m | [36mtools.data_process[0m:[36massert_result[0m:[36m93[0m - [1m第1个断言,实际结果:{'msg': '创建成功', 'status': 201} | 预期结果:{'msg': '创建成功', 'status': 201}
|
||||
断言结果 True[0m
|
|
@ -0,0 +1 @@
|
|||
null
|
|
@ -0,0 +1 @@
|
|||
{"uuid": "84f1503c-e798-4dc8-953e-88f804214b31", "befores": [{"name": "case", "status": "passed", "start": 1606055459768, "stop": 1606055459768}], "start": 1606055459768, "stop": 1606055459860}
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"pagenum": 1,
|
||||
"pagesize": "12",
|
||||
"msg": null
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
null
|
|
@ -0,0 +1 @@
|
|||
null
|
|
@ -1 +0,0 @@
|
|||
{"uuid": "b0576771-3fb6-421f-a24d-49443f4c1709", "befores": [{"name": "parametric_key", "status": "passed", "start": 1605868886328, "stop": 1605868886328}], "start": 1605868886328, "stop": 1605868886343}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"Accept-Encoding": "gzip, deflate",
|
||||
"Accept-Language": "zh-CN,zh;q=0.9",
|
||||
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36",
|
||||
"Authorization": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOjUwMCwicmlkIjowLCJpYXQiOjE2MDYwNTU0NTksImV4cCI6MTYwNjE0MTg1OX0.1Ck1JiEfxadrEvrskgUnNaVxicEbAAVPqCLQqECcP_Y"
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"Accept-Encoding": "gzip, deflate",
|
||||
"Accept-Language": "zh-CN,zh;q=0.9",
|
||||
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36"
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
{"name": "get请求查询用户数据列表", "status": "passed", "steps": [{"name": "请求地址", "status": "passed", "attachments": [{"name": "请求地址", "source": "ed915624-4087-4a5b-8240-f3495666b187-attachment.txt", "type": "text/plain"}], "start": 1606055460039, "stop": 1606055460040}, {"name": "请求头", "status": "passed", "attachments": [{"name": "请求头", "source": "bca58b7b-2f1e-4883-b78a-18ca66923c90-attachment.txt", "type": "text/plain"}], "start": 1606055460040, "stop": 1606055460041}, {"name": "请求参数", "status": "passed", "attachments": [{"name": "请求参数", "source": "3bab6be8-0c1e-4e3f-8ae9-ed68efed25d1-attachment.txt", "type": "text/plain"}], "start": 1606055460042, "stop": 1606055460043}, {"name": "上传文件", "status": "passed", "attachments": [{"name": "上传文件", "source": "86d5935c-52cc-461e-be1b-2596ed3b05a8-attachment.txt", "type": "text/plain"}], "start": 1606055460043, "stop": 1606055460044}, {"name": "响应耗时(s)", "status": "passed", "attachments": [{"name": "响应耗时(s)", "source": "5b80b057-de27-474a-bc90-e3b47096c5b3-attachment.txt", "type": "text/plain"}], "start": 1606055460216, "stop": 1606055460218}, {"name": "响应内容", "status": "passed", "attachments": [{"name": "响应内容", "source": "6366a5a8-3543-4949-9a24-32ea6b778ed8-attachment.txt", "type": "text/plain"}], "start": 1606055460218, "stop": 1606055460220}, {"name": "存储实际响应", "status": "passed", "attachments": [{"name": "存储实际响应", "source": "e179fec6-321c-4d6d-9b9b-6433e74eac9d-attachment.txt", "type": "text/plain"}], "start": 1606055460221, "stop": 1606055460223}, {"name": "第1个断言", "status": "passed", "attachments": [{"name": "第1个断言", "source": "12e5f154-abdc-4fd4-b3c3-502060080cfe-attachment.txt", "type": "text/plain"}], "start": 1606055460224, "stop": 1606055460226}], "attachments": [{"name": "stderr", "source": "255417c0-f581-4f44-bae8-6a3150578cb9-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "case", "value": "['case_003', 'get请求查询用户数据列表', 'users', '读', 'get', 'params', '', '{\"pagenum\": 1, \"pagesize\": \"12\", \"meta\": &$.case_002.data.meta&, \"userId\": &$.case_002.data.id&}', '{\"$.meta\":{\"msg\": \"获取管理员列表成功\", \"status\": 200}}']"}], "start": 1606055460038, "stop": 1606055460227, "uuid": "fd2582f6-db08-42f2-82dc-dc4e0dc20aec", "historyId": "e22e29a3736852b3693b6ddc60bd9936", "testCaseId": "08d97ba530f9b18be2971da4c2ed1083", "fullName": "test.test_api.TestApi#test_main", "labels": [{"name": "parentSuite", "value": "test"}, {"name": "suite", "value": "test_api"}, {"name": "subSuite", "value": "TestApi"}, {"name": "host", "value": "DESKTOP-0T59F1A"}, {"name": "thread", "value": "7848-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test.test_api"}]}
|
|
@ -0,0 +1 @@
|
|||
"实际结果:{'msg': '设置状态成功', 'status': 200} = 预期结果:{'msg': '设置状态成功', 'status': 200}"
|
|
@ -0,0 +1 @@
|
|||
"实际结果:{'msg': '参数错误', 'status': 400} = 预期结果:{'msg': '参数错误', 'status': 400}"
|
|
@ -0,0 +1 @@
|
|||
null
|
|
@ -1 +0,0 @@
|
|||
{"uuid": "b8216d4f-2b6e-472f-a673-084a0f2b5116", "befores": [{"name": "data", "status": "passed", "start": 1605868886258, "stop": 1605868886258}], "start": 1605868886258, "stop": 1605868886313}
|
|
@ -0,0 +1 @@
|
|||
"http://www.ysqorz.top:8888/api/private/v1/users"
|
|
@ -0,0 +1 @@
|
|||
{"name": "修改用户状态接口", "status": "passed", "steps": [{"name": "请求地址", "status": "passed", "attachments": [{"name": "请求地址", "source": "33924f87-7099-4700-ad39-b069cea0babf-attachment.txt", "type": "text/plain"}], "start": 1606055460552, "stop": 1606055460552}, {"name": "请求头", "status": "passed", "attachments": [{"name": "请求头", "source": "aa83df19-234f-47a2-a24c-f5855ab4ec64-attachment.txt", "type": "text/plain"}], "start": 1606055460552, "stop": 1606055460553}, {"name": "请求参数", "status": "passed", "attachments": [{"name": "请求参数", "source": "9f6a2865-78f7-46a0-a0e5-98821a9468e6-attachment.txt", "type": "text/plain"}], "start": 1606055460553, "stop": 1606055460554}, {"name": "上传文件", "status": "passed", "attachments": [{"name": "上传文件", "source": "705282d0-95c4-482b-befa-909b83f128f4-attachment.txt", "type": "text/plain"}], "start": 1606055460554, "stop": 1606055460555}, {"name": "响应耗时(s)", "status": "passed", "attachments": [{"name": "响应耗时(s)", "source": "15a70d01-e5a1-423b-8a57-904bed64847b-attachment.txt", "type": "text/plain"}], "start": 1606055460600, "stop": 1606055460601}, {"name": "响应内容", "status": "passed", "attachments": [{"name": "响应内容", "source": "4ad34788-5bf7-4d9f-a885-37105296ccdd-attachment.txt", "type": "text/plain"}], "start": 1606055460601, "stop": 1606055460602}, {"name": "存储实际响应", "status": "passed", "attachments": [{"name": "存储实际响应", "source": "43e373f9-9f05-4fa2-b952-68f57eb6bb5e-attachment.txt", "type": "text/plain"}], "start": 1606055460603, "stop": 1606055460604}, {"name": "第1个断言", "status": "passed", "attachments": [{"name": "第1个断言", "source": "ae969740-d8ff-48a2-8d87-c0fb304d917f-attachment.txt", "type": "text/plain"}], "start": 1606055460604, "stop": 1606055460605}], "attachments": [{"name": "stderr", "source": "303f20be-51bc-4a81-b83a-37dcc003effa-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "case", "value": "['case_006', '修改用户状态接口', 'users/&$.case_005.data.id&/state/&$.case_005.data.careate_time&', '读', 'put', 'data', '', '', '{\"$.meta\":{\"msg\": \"设置状态成功\", \"status\": 200}}']"}], "start": 1606055460551, "stop": 1606055460605, "uuid": "e51ebf70-720a-42f3-9745-6c1f7c2cecba", "historyId": "db9c6b492c2f49ac32bf1152d397b96f", "testCaseId": "08d97ba530f9b18be2971da4c2ed1083", "fullName": "test.test_api.TestApi#test_main", "labels": [{"name": "parentSuite", "value": "test"}, {"name": "suite", "value": "test_api"}, {"name": "subSuite", "value": "TestApi"}, {"name": "host", "value": "DESKTOP-0T59F1A"}, {"name": "thread", "value": "7848-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test.test_api"}]}
|
|
@ -0,0 +1 @@
|
|||
{"name": "修改用户状态为2", "status": "passed", "steps": [{"name": "请求地址", "status": "passed", "attachments": [{"name": "请求地址", "source": "297012f6-d1f9-4360-912e-832253b46196-attachment.txt", "type": "text/plain"}], "start": 1606055460611, "stop": 1606055460612}, {"name": "请求头", "status": "passed", "attachments": [{"name": "请求头", "source": "25c890eb-bf95-4148-af9e-cb2e91c98339-attachment.txt", "type": "text/plain"}], "start": 1606055460612, "stop": 1606055460613}, {"name": "请求参数", "status": "passed", "attachments": [{"name": "请求参数", "source": "84d06011-738b-48aa-be9f-e6876f144421-attachment.txt", "type": "text/plain"}], "start": 1606055460613, "stop": 1606055460613}, {"name": "上传文件", "status": "passed", "attachments": [{"name": "上传文件", "source": "a400f96f-4fc0-46d2-a9b1-524fcae19ed3-attachment.txt", "type": "text/plain"}], "start": 1606055460613, "stop": 1606055460614}, {"name": "响应耗时(s)", "status": "passed", "attachments": [{"name": "响应耗时(s)", "source": "bc71d271-32d9-44af-9b2b-db0234196222-attachment.txt", "type": "text/plain"}], "start": 1606055460655, "stop": 1606055460655}, {"name": "响应内容", "status": "passed", "attachments": [{"name": "响应内容", "source": "2f13b91b-e374-4a9a-91e0-2e2f3ba745ce-attachment.txt", "type": "text/plain"}], "start": 1606055460655, "stop": 1606055460656}, {"name": "存储实际响应", "status": "passed", "attachments": [{"name": "存储实际响应", "source": "4a247a77-4003-445a-af3c-ae5e13ccce42-attachment.txt", "type": "text/plain"}], "start": 1606055460657, "stop": 1606055460658}, {"name": "第1个断言", "status": "passed", "attachments": [{"name": "第1个断言", "source": "44699168-9b0a-46b9-85fd-35b31bc91475-attachment.txt", "type": "text/plain"}], "start": 1606055460659, "stop": 1606055460659}], "attachments": [{"name": "stderr", "source": "d5027eb4-6342-4a50-b7e9-69a4f35a0b72-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "case", "value": "['case_007', '修改用户状态为2', 'users/&$.case_005.data.id&/state/2', '读', 'put', 'data', '', '', '{\"$.meta\":{\"msg\": \"设置状态成功\", \"status\": 200}}']"}], "start": 1606055460611, "stop": 1606055460660, "uuid": "70d347e9-0959-478c-8816-4c34302a07f5", "historyId": "ff4c616539ac64f4683d87b3cf78fc56", "testCaseId": "08d97ba530f9b18be2971da4c2ed1083", "fullName": "test.test_api.TestApi#test_main", "labels": [{"name": "parentSuite", "value": "test"}, {"name": "suite", "value": "test_api"}, {"name": "subSuite", "value": "TestApi"}, {"name": "host", "value": "DESKTOP-0T59F1A"}, {"name": "thread", "value": "7848-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test.test_api"}]}
|
|
@ -0,0 +1,10 @@
|
|||
[32m2020-11-22 22:31:00.237[0m | [31m[1mERROR [0m | [36mtools[0m:[36mextractor[0m:[36m29[0m - [31m[1m提取不到内容,丢给你一个错误!'bool' object is not subscriptable[0m
|
||||
[32m2020-11-22 22:31:00.276[0m | [1mINFO [0m | [36mapi.base_requests[0m:[36msend_api[0m:[36m80[0m - [1m
|
||||
请求地址:http://www.ysqorz.top:8888/api/private/v1/users
|
||||
请求方法:get
|
||||
请求头:{'Accept-Encoding': 'gzip, deflate', 'Accept-Language': 'zh-CN,zh;q=0.9', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36'}
|
||||
请求参数:{'pagenum': 1, 'pagesize': '12', 'msg': None}
|
||||
响应数据:{'data': None, 'meta': {'msg': '无效token', 'status': 400}}[0m
|
||||
[32m2020-11-22 22:31:00.279[0m | [1mINFO [0m | [36mtools.data_process[0m:[36msave_response[0m:[36m27[0m - [1m添加key: case_004, 对应value: {'data': None, 'meta': {'msg': '无效token', 'status': 400}}[0m
|
||||
[32m2020-11-22 22:31:00.280[0m | [1mINFO [0m | [36mtools.data_process[0m:[36massert_result[0m:[36m93[0m - [1m第1个断言,实际结果:{'msg': '无效token', 'status': 400} | 预期结果:{'msg': '获取管理员列表成功', 'status': 200}
|
||||
断言结果 False[0m
|
|
@ -0,0 +1 @@
|
|||
"http://www.ysqorz.top:8888/api/private/v1/login"
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"data": null,
|
||||
"meta": {
|
||||
"msg": "删除成功",
|
||||
"status": 200
|
||||
}
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
0.037442
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"Accept-Encoding": "gzip, deflate",
|
||||
"Accept-Language": "zh-CN,zh;q=0.9",
|
||||
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36",
|
||||
"Authorization": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOjUwMCwicmlkIjowLCJpYXQiOjE2MDYwNTU0NTksImV4cCI6MTYwNjE0MTg1OX0.1Ck1JiEfxadrEvrskgUnNaVxicEbAAVPqCLQqECcP_Y"
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
{"uuid": "979a7ad6-6a14-4e9e-bedd-cb977238c35e", "befores": [{"name": "case", "status": "passed", "start": 1606055460610, "stop": 1606055460610}], "start": 1606055460610, "stop": 1606055460660}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue