├── .DS_Store ├── .gitignore ├── .idea ├── api4excel-master.iml ├── emacs.xml ├── misc.xml ├── modules.xml ├── vcs.xml └── workspace.xml ├── README.md ├── __init__.py ├── common ├── __init__.py ├── test_login.py └── test_request.py ├── config ├── __init__.py ├── pre │ ├── __init__.py │ └── config.yaml ├── prod │ ├── __init__.py │ └── config.yaml └── test │ ├── __init__.py │ └── config.yaml ├── data ├── .DS_Store ├── __init__.py ├── clue.xlsx ├── goods.xlsx ├── order.xlsx └── user.xlsx ├── json ├── cookie.json └── data.json ├── logs ├── __init__.py ├── test_log.py └── test_log2.py ├── report ├── app.js ├── data │ ├── attachments │ │ ├── 13cfe34c98ab0043.txt │ │ ├── 16877f5ddf2812f4.txt │ │ ├── 1900a44b184dd756.attach │ │ ├── 2104ebe3ad65dd6a.txt │ │ ├── 39544876017a8029.attach │ │ ├── 4dec5532152d5aba.attach │ │ ├── 6adf8744410896e8.attach │ │ ├── 7694e6a6c6a59c15.attach │ │ ├── 8a23a7917ddbdc7a.txt │ │ ├── 8eb8160f7e311fa7.txt │ │ ├── 939970f6063b942a.attach │ │ ├── 95dec0271a4609a3.attach │ │ ├── 9c446e3a36dc762a.txt │ │ ├── 9f8ce2e458f0cabe.txt │ │ ├── a726ac67d36d0231.txt │ │ ├── d955ff448179b9c7.txt │ │ ├── eca055a645193dec.txt │ │ └── f92fe9cf78d577f5.attach │ ├── behaviors.csv │ ├── behaviors.json │ ├── categories.csv │ ├── categories.json │ ├── packages.json │ ├── suites.csv │ ├── suites.json │ ├── test-cases │ │ ├── 12591a1c98e84698.json │ │ ├── 176e495baa84fcaa.json │ │ ├── 17e91ec538b76066.json │ │ ├── 18255ff100e2372d.json │ │ ├── 1c932995e15cdd22.json │ │ ├── 1d859f8cdd4c7370.json │ │ ├── 220419dcf78d5997.json │ │ ├── 27956cc7230c8b32.json │ │ ├── 2a33177c643fa836.json │ │ ├── 2b2962716fd2a906.json │ │ ├── 2ebc2ac08a1108fa.json │ │ ├── 3fc2cd08e46dee9b.json │ │ ├── 4083cee358707456.json │ │ ├── 41316ad671eb60f4.json │ │ ├── 475d40789888beca.json │ │ ├── 49d7bb48f42bdd84.json │ │ ├── 4da0e71b6e09d0b3.json │ │ ├── 532d96c83cf47f95.json │ │ ├── 538cfeddfb5f31b6.json │ │ ├── 58fae4c285d578a3.json │ │ ├── 5a3408bb3dc8afed.json │ │ ├── 5bf69d27b3b312aa.json │ │ ├── 5e1c85db0f39a2c8.json │ │ ├── 61346dfcedbdc435.json │ │ ├── 61cec4da8d27181e.json │ │ ├── 62b31596912a41c3.json │ │ ├── 6437fd141a5a617d.json │ │ ├── 69cdcdc93407a799.json │ │ ├── 6f32b3c6ea574bb.json │ │ ├── 76cf81ae9fabcf41.json │ │ ├── 7bd8e14f4552b6d2.json │ │ ├── 83fd4e7ddbbc2af5.json │ │ ├── 84e00a9051885f70.json │ │ ├── 86ee9880c2f7c5ad.json │ │ ├── 8858ebcf76e43ef.json │ │ ├── 8c55dcd0d369d0cc.json │ │ ├── 8c5b9682c8891265.json │ │ ├── 8cc610769ca1710.json │ │ ├── 8ea8af9bcd9d5303.json │ │ ├── 92a6eb1c79832438.json │ │ ├── 941547c0075f2af7.json │ │ ├── 942c7c7eb4bd7f0f.json │ │ ├── a0771d09db7e2428.json │ │ ├── a210e58f4277d8e9.json │ │ ├── a3456807aa400637.json │ │ ├── ada601898a483938.json │ │ ├── ae610584eb470c55.json │ │ ├── b0b3646c66b61cd9.json │ │ ├── b3ebdf08ab14408c.json │ │ ├── bc9a2a9552cab85e.json │ │ ├── bd9114b81d693e30.json │ │ ├── c5b8c681956bd7c7.json │ │ ├── cdfa8a44b2fc3e29.json │ │ ├── d04bb8ebfe78aa7a.json │ │ ├── d1466072977d24b1.json │ │ ├── d5851ea336847aed.json │ │ ├── da7c65d42c018464.json │ │ ├── dbdea8d8dcb63502.json │ │ ├── ddfa27fbcc34eda9.json │ │ ├── dea8cb3c4403bbd8.json │ │ ├── df4a90822723a38b.json │ │ ├── e55c687bf967544c.json │ │ ├── e6d94bf4b18ddb5d.json │ │ ├── e7d99bd19c9e544e.json │ │ ├── e81bdc2b1eeb211d.json │ │ ├── e8f5beff7e38cf17.json │ │ ├── eff2f0c883935f86.json │ │ ├── f4ff9fb1337d51a1.json │ │ ├── f7b15ae4edac58b5.json │ │ └── fe66e1f042b3545e.json │ └── timeline.json ├── export │ ├── influxDbData.txt │ ├── mail.html │ └── prometheusData.txt ├── favicon.ico ├── history │ ├── categories-trend.json │ ├── duration-trend.json │ ├── history-trend.json │ ├── history.json │ └── retry-trend.json ├── index.html ├── plugins │ ├── behaviors │ │ └── index.js │ ├── packages │ │ └── index.js │ └── screen-diff │ │ ├── index.js │ │ └── styles.css ├── styles.css └── widgets │ ├── behaviors.json │ ├── categories-trend.json │ ├── categories.json │ ├── duration-trend.json │ ├── duration.json │ ├── environment.json │ ├── executors.json │ ├── history-trend.json │ ├── launch.json │ ├── retry-trend.json │ ├── severity.json │ ├── status-chart.json │ ├── suites.json │ └── summary.json ├── result ├── 005c951e-54b5-489a-8604-bd41b2d53384-result.json ├── 0125fda6-499d-4df7-a406-db69d962b47e-result.json ├── 04c267e8-a1b3-4a86-9060-4191239833fa-result.json ├── 05fe35f3-91ca-49fc-b787-e821b58e8b46-result.json ├── 070c5b47-3e3d-4ff5-8c05-f13e332f94f1-container.json ├── 0aec122d-a707-4082-a241-a5ba549393f2-result.json ├── 0b7bc01f-0bcb-47a8-aecb-87dd8a1319f5-result.json ├── 11398093-a916-4943-9da6-c6a56d0c9a81-attachment.txt ├── 125135c4-e224-4472-a87e-2379031c5c85-container.json ├── 12761a21-75fa-4692-a518-0b88774b678f-result.json ├── 1847daa5-7af0-4a3e-8ed4-9bcdcbb65eed-result.json ├── 19df00b7-a5aa-4dc4-a775-356b4c329399-container.json ├── 1af901ee-3e81-4588-8b33-ea77c0730bfa-result.json ├── 1d17bd64-5441-4e06-b5de-216e4cecaeae-result.json ├── 1f5c1764-6f7a-40da-959c-407c118435ae-container.json ├── 206d9084-260d-40ef-8dff-2e97e46106b7-container.json ├── 2099ab8b-b706-4e7a-a9e0-9ba209b1610b-result.json ├── 2129bbaa-62be-4c53-bb91-fac839232133-result.json ├── 2285411c-a642-4c0f-bf2e-3b432880a8b7-result.json ├── 2549e766-e418-4289-a203-9972f8258aa6-result.json ├── 26085774-4467-43ab-bd26-4e31c1810ef9-result.json ├── 26e460dc-52b6-429b-b97e-b20a970d0440-container.json ├── 2b062f60-fc2c-4e6a-89cb-8a20a7c55ae9-attachment.txt ├── 2b94391c-e784-47d7-b9ca-ac4d3c681b8f-result.json ├── 2d0b5c8d-ecb5-4cb2-981d-e264cd6f5a7d-result.json ├── 3888b5ac-9191-406b-95cb-f1d6950f50c0-result.json ├── 3f046caa-f17b-4482-96f7-c5aba0527066-result.json ├── 3f18aaca-626c-439d-94dc-7080cdd5809c-container.json ├── 40acc8f2-4bff-45cc-bf18-946803602243-result.json ├── 44e6bc52-cb5e-4596-bce7-bf858f53b22d-attachment.txt ├── 488cf311-c631-408c-a7be-0132477830f8-result.json ├── 4a69954e-966d-4e63-9f59-4bdf25f4ca1c-container.json ├── 4b3a31b4-67e2-4b11-82a9-15b550b69839-result.json ├── 4b6ed420-2f43-478c-9c90-c4d50e21244c-container.json ├── 4d3b759f-d54e-4dad-8ff3-bc161303077d-result.json ├── 4dc9b4d8-8ba4-4dc5-8028-34c2f59f0bc0-result.json ├── 50994461-f29a-40e2-9769-f217c86639a7-attachment.attach ├── 528f4c4f-fcf5-4b6d-8d4b-1aadf005b54d-result.json ├── 5324fa6c-769e-4535-a5ea-410ea6e74db9-result.json ├── 535bacd2-a472-4422-9b01-19e767448462-result.json ├── 54627dba-247c-4add-a7af-72325fd2b863-result.json ├── 591315b2-b711-4618-b974-dae892f1af70-result.json ├── 5bf1bdd3-abc2-42c9-be68-e08006844c7a-result.json ├── 65bd1197-9def-49e1-acef-06735e332dec-result.json ├── 65c156f1-fd40-4f66-a343-e40e19d9f016-result.json ├── 662a1580-2f64-47b3-87b6-30ccfd5a1aa4-result.json ├── 664409d7-1171-4900-864a-6e75147d0637-container.json ├── 66f60244-3036-4ecd-a3dd-f42bd3a84d54-result.json ├── 6842a541-3066-4f88-a7ec-63b7a28c7633-result.json ├── 6b1af6dc-2a9e-4f74-b9b9-8e40babfb74b-container.json ├── 6bb7a76c-6259-455d-9698-423ce5547991-result.json ├── 6cb3a680-130b-4f37-8916-6c430fde0cbc-attachment.attach ├── 6cde41b2-45d4-486d-af74-78798c87fb99-container.json ├── 71fae1ea-db4a-4fb3-a4ba-13cccfe948de-result.json ├── 73a55e1b-77c4-4ea3-b249-15677e7498e8-container.json ├── 74926616-6f77-4502-9be7-43bd8ddbcfa8-attachment.attach ├── 76047527-a53c-4998-b040-e2cf12952950-result.json ├── 78160ab3-0ad2-4eb2-b88a-9793b853b708-container.json ├── 7a8e8cc5-ef08-4c10-94e5-1816e591e38b-result.json ├── 7c1f3956-9f1c-42b0-b35f-bf54d3f2348a-result.json ├── 7c9959de-272f-44e4-b5e3-00d745c64eab-result.json ├── 80e8b44b-788e-464c-bd68-6e86bf45c180-container.json ├── 81a07d7f-b8b3-4815-9acf-f073442a5591-attachment.attach ├── 87bf7d3f-6677-41a0-a99e-6187112dfdab-container.json ├── 892a085b-e24c-4f10-94d1-2010e1bce5ef-result.json ├── 8957f5c0-7306-4a52-9acf-644c482737e1-result.json ├── 8d95b5d5-9dae-460f-9ce1-944cd367862c-result.json ├── 94bfae5a-d13f-4c7e-9395-76bd845f033e-result.json ├── 95f2157a-f8f8-44ee-8279-badab1d158c6-container.json ├── 995eaa6b-6930-4e56-898d-40a308b35f19-container.json ├── 9aa41ce2-a71a-4a0a-8dc0-b448e9e11e49-result.json ├── a3a4e2af-1514-4cf9-ad3e-a126f86c8f95-container.json ├── a77a48db-2667-403e-a92f-5d2c9aa53e2d-result.json ├── aa39023b-0fc8-445a-af9e-4f0da74f658e-result.json ├── aab0626c-76f1-48f4-ac4d-b4f0bda66e21-attachment.txt ├── ab5ac7c8-692e-4197-addb-f4eea621fb09-result.json ├── abd44897-cb50-4aa5-bc67-e6731d153339-attachment.txt ├── ac108041-9f9e-4bb3-b2d3-65e28641b666-container.json ├── aca2f229-19c8-4941-84f5-905f3ed02aba-result.json ├── adbfee49-4964-4c49-9529-f3f5b3605773-container.json ├── adc49dd6-184b-4044-bb40-46462a4dc10e-attachment.attach ├── b2505f4d-0a34-4564-8426-b88078f2f637-result.json ├── b58d3e07-41a0-407d-825f-f2d1918aa38b-attachment.txt ├── b63539bf-a0ea-4ced-ba86-e018ef2904cb-attachment.attach ├── b8d1db43-43f7-45ae-b4e5-82d2bfb31590-container.json ├── bb835ea1-01a0-4308-967e-04aa2c646311-container.json ├── bbe6be9a-913d-4df2-9659-f77be06db3fc-result.json ├── bd2e0110-92a5-40df-9ee6-f3f5f4f1be02-result.json ├── be25fa85-1a11-4b33-a357-d1800abcb4e2-container.json ├── bf692c89-4be3-434a-b385-d1129bfb9a32-container.json ├── c118262c-e276-4369-818f-4fac32577906-result.json ├── c4b0e70d-8944-43db-b53d-6f333e977b0e-container.json ├── cb60cb66-73cd-4e7a-9bcc-54da49aa8083-result.json ├── cd8b586b-8985-4e67-b13c-01281e8b8c1e-result.json ├── cd982698-f996-4976-92f5-65f7104e656b-attachment.attach ├── cec1bd14-0f6a-4d72-9fb6-f3e77b93e9f5-container.json ├── d41c4fff-3411-4fea-8776-31480bce3c66-container.json ├── d9a313f8-d193-45b4-9d44-13d1a7dd9548-result.json ├── dee7ce5c-0c95-4a9f-93e8-bd66bc111483-attachment.txt ├── e07326c9-a990-4bea-a6a3-21a6688819d9-container.json ├── e11f572f-a8de-43bf-a322-24973ad59447-result.json ├── e3568663-12fc-473e-be26-30164e014f7e-container.json ├── e38b9cfa-d7be-4a08-933f-760e8bf110e8-attachment.attach ├── e3f93667-6ef4-45f7-b438-05c65aa2c9e1-result.json ├── e6f68867-2b27-4448-9ea2-ae0f3b94e02b-result.json ├── e8fdfd3f-138b-4ef3-83fa-a7e6f196f7dc-attachment.txt ├── ea9de2d3-6224-4c44-aed4-e2374cea5b31-result.json ├── eba26e6b-6193-4c41-aa93-9fbadc0f6a9c-attachment.txt ├── ebc4d12e-6e82-4c98-bf36-92109139959b-attachment.txt ├── eeba2bd8-155f-42ee-aea4-c9c9de3d1f76-result.json ├── f3e57fe7-6f9b-4c86-9a7e-c2e88a6b9488-container.json ├── f6833dbb-137a-47c8-989a-3e362a74bb52-result.json ├── f6e47e76-2adb-41dd-a132-e1cf9257a5f9-result.json ├── f74845d0-dd2e-4f5f-86db-b65960ef273a-result.json ├── f807eea4-446f-4607-b4f5-080449e823b0-result.json ├── f942d166-bb96-477f-9a8d-55792d395e8e-result.json ├── f977f865-63c4-4c7a-88c6-ee42c8d8a01c-result.json ├── fe61d06e-24bd-4f19-9b91-5dc4d6ba6b3f-result.json ├── fed5e1fd-fc71-45ed-af15-c1eaa004bc31-result.json └── ff93edf3-b12c-4495-907e-0c508dec9623-container.json ├── testcase ├── .DS_Store ├── __init__.py ├── goods │ ├── __init__.py │ ├── test_browsingGoodsList.py │ ├── test_favouriteAddGoods.py │ ├── test_favouriteCancelGoods.py │ └── test_favouriteGoodsList.py ├── order │ ├── __init__.py │ ├── test_deleteOrder.py │ ├── test_getBuyerOrderList.py │ ├── test_orderCancel.py │ └── test_refundSubmit.py └── user │ ├── __init__.py │ ├── test_accountPwdLogin.py │ ├── test_mobileCaptchaLogin.py │ ├── test_modifyCommon.py │ └── test_thirdPartyLogin.py └── utils ├── .DS_Store ├── data_enc.py ├── test_excel.py ├── test_excel1.py ├── test_excel2.py ├── test_json.py ├── test_response.py ├── test_response_extract.py └── test_result.py /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liumengjia/Web_Interface_Automation/30284556e4bd2d25e347d48858c9400a58baaeda/.DS_Store -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .idea/**https://github.com/TesterlifeRaymond/BeautifulReport 2 | .cache/** 3 | core/.cache/** 4 | *.pyc 5 | core/*.pyc -------------------------------------------------------------------------------- /.idea/api4excel-master.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 11 | 12 | 14 | -------------------------------------------------------------------------------- /.idea/emacs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 10 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Web_Interface_Automation 2 | 基于Pytest+Request+Allure的接口自动化开源框架(Excel篇) 3 | 4 | ---- 5 | #### 框架流程 6 | 读取Excel测试数据-生成测试用例-执行测试用例-生成Allure报告 7 | 8 | ---- 9 | #### 模块类的设计 10 | `common包` 存放公用模块,登录方法等;根据请求类型的不同执行不同的方法test_request.py; 11 | 12 | `config包` 存放测试环境,预发环境,生产环境等不同环境的配置信息; 13 | 14 | `data包` 存放测试用例数据,各模块接口用例,线索、工单、学员接口用例等; 15 | 16 | `testcase包` 存放测试接口脚本,各模块接口脚本,线索接口,学员接口,工单接口等; 17 | 18 | `json包` 存放请求中涉及到的data、cookies等json数据; 19 | 20 | `utils包` 存放公共函数的封装 21 | 22 | 获取Excel表格数据,test_excel.py; 23 | 24 | 获取Excel表格数据,方法二,test_excel1.py; 25 | 26 | 响应结果断言,期望结果和实际结果对比,test_response.py; 27 | 28 | 响应结果断言,期望结果和实际结果对比,方法二,test_result.py; 29 | 30 | 响应数据支持多层嵌套提取,test_response_extract.py 31 | 32 | 从json文件中获取想要的数据,test_json.py; 33 | 34 | `result包` 保存测试结果数据的目录 35 | 36 | `report包` 存放测试完成之后生成的测试报告,可以查看报告定位问题 37 | 38 | `logs包` 存放测试完成之后生成的日志文件,可以查看日志定位问题 39 | 40 | ---- 41 | 42 | 43 | -------------------------------------------------------------------------------- /__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | # -*- coding: UTF-8 -*- 3 | # @Time : 2019-09-01 23:01 4 | 5 | # @Author : liumengjia 6 | 7 | # @File : __init__.py 8 | 9 | # @Software: PyCharm -------------------------------------------------------------------------------- /common/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | # -*- coding: UTF-8 -*- 3 | # @Time : 2020-03-08 23:42 4 | 5 | # @Author : liumengjia 6 | 7 | # @File : __init__.py 8 | 9 | # @Software: PyCharm -------------------------------------------------------------------------------- /common/test_request.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | # -*- coding: UTF-8 -*- 3 | # @Time : 2020-02-12 22:53 4 | 5 | # @Author : liumengjia 6 | 7 | # @File : test_request.py 8 | 9 | # @Software: PyCharm 10 | 11 | import requests 12 | import json 13 | 14 | from common.test_login import TestLogin,s 15 | 16 | class TestRequest(): 17 | # 使用__init__方法实现:只要实例化类时候就会调用__init__方法 18 | def __init__(self,url,params,data,method): 19 | self.res = self.test_request(url,params,data,method) 20 | 21 | def test_post(self,url,data): 22 | res = s.post(url=url,data=data) 23 | return res.json() 24 | 25 | def test_get(self,url,params): 26 | res = s.get(url=url,params=params) 27 | return res.json() 28 | 29 | def test_request(self,url,params,data,method): 30 | res = None 31 | if method == "get": 32 | res = self.test_get(url,params) 33 | else: 34 | res = self.test_post(url,data) 35 | return res 36 | 37 | if __name__=="__main__": 38 | url = "http://crm-sea.neibu.com/" 39 | 40 | # 使用__init__方法实现:只要实例化类时候就会调用__init__方法 41 | res = TestRequest(url,params=None,data=None,method="post") 42 | print(type(res)) 43 | print(res) 44 | -------------------------------------------------------------------------------- /config/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | # -*- coding: UTF-8 -*- 3 | # @Time : 2020-05-25 11:54 4 | 5 | # @Author : liumengjia 6 | 7 | # @File : __init__.py 8 | 9 | # @Software: PyCharm 10 | 11 | # 配置包:存放测试环境,预发环境,生产环境等不同环境的配置信息 -------------------------------------------------------------------------------- /config/pre/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | # -*- coding: UTF-8 -*- 3 | # @Time : 2020-06-01 13:24 4 | 5 | # @Author : liumengjia 6 | 7 | # @File : __init__.py.py 8 | 9 | # @Software: PyCharm -------------------------------------------------------------------------------- /config/pre/config.yaml: -------------------------------------------------------------------------------- 1 | host: 2 | pre: https://pre.ke.yanxian.org -------------------------------------------------------------------------------- /config/prod/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | # -*- coding: UTF-8 -*- 3 | # @Time : 2020-06-01 13:14 4 | 5 | # @Author : liumengjia 6 | 7 | # @File : __init__.py.py 8 | 9 | # @Software: PyCharm -------------------------------------------------------------------------------- /config/prod/config.yaml: -------------------------------------------------------------------------------- 1 | host: 2 | prod: https://ke.yanxian.org -------------------------------------------------------------------------------- /config/test/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | # -*- coding: UTF-8 -*- 3 | # @Time : 2020-06-01 13:27 4 | 5 | # @Author : liumengjia 6 | 7 | # @File : __init__.py.py 8 | 9 | # @Software: PyCharm -------------------------------------------------------------------------------- /config/test/config.yaml: -------------------------------------------------------------------------------- 1 | host: 2 | test: http://test.ke.yanxian.org -------------------------------------------------------------------------------- /data/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liumengjia/Web_Interface_Automation/30284556e4bd2d25e347d48858c9400a58baaeda/data/.DS_Store -------------------------------------------------------------------------------- /data/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | # -*- coding: UTF-8 -*- 3 | # @Time : 2020-03-08 23:33 4 | 5 | # @Author : liumengjia 6 | 7 | # @File : __init__.py 8 | 9 | # @Software: PyCharm -------------------------------------------------------------------------------- /data/clue.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liumengjia/Web_Interface_Automation/30284556e4bd2d25e347d48858c9400a58baaeda/data/clue.xlsx -------------------------------------------------------------------------------- /data/goods.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liumengjia/Web_Interface_Automation/30284556e4bd2d25e347d48858c9400a58baaeda/data/goods.xlsx -------------------------------------------------------------------------------- /data/order.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liumengjia/Web_Interface_Automation/30284556e4bd2d25e347d48858c9400a58baaeda/data/order.xlsx -------------------------------------------------------------------------------- /data/user.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liumengjia/Web_Interface_Automation/30284556e4bd2d25e347d48858c9400a58baaeda/data/user.xlsx -------------------------------------------------------------------------------- /json/cookie.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liumengjia/Web_Interface_Automation/30284556e4bd2d25e347d48858c9400a58baaeda/json/cookie.json -------------------------------------------------------------------------------- /json/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "page": "1", 3 | "pageSize": "10", 4 | "userName": "", 5 | "realName": "", 6 | "studId": "", 7 | "qq": "", 8 | "weixin": "", 9 | "country": "CHN", 10 | "nationCode": "86", 11 | "phone": "", 12 | "productGroupIds": "", 13 | "productTypeName": "", 14 | "recycleReasonStr": "", 15 | "reasonStr": "", 16 | "secondIntentionSource": "", 17 | "productId": "", 18 | "intentionSource": "", 19 | "jobNumTag": "", 20 | "jobValidNumTag": "", 21 | "secondLabelIds": "", 22 | "lastFollowSysUid": "" 23 | } -------------------------------------------------------------------------------- /logs/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | # -*- coding: UTF-8 -*- 3 | # @Time : 2020-02-12 22:35 4 | 5 | # @Author : liumengjia 6 | 7 | # @File : __init__.py 8 | 9 | # @Software: PyCharm -------------------------------------------------------------------------------- /logs/test_log.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | # -*- coding: UTF-8 -*- 3 | # @Time : 2020-05-30 00:17 4 | 5 | # @Author : liumengjia 6 | 7 | # @File : test_log.py 8 | 9 | # @Software: PyCharm 10 | 11 | import logging 12 | 13 | def initLogging(logFilename,e): 14 | 15 | logging.basicConfig( 16 | level = logging.INFO, 17 | format ='%(asctime)s-%(levelname)s-%(message)s', 18 | datefmt = '%y-%m-%d %H:%M', 19 | filename = logFilename, 20 | filemode = 'a') 21 | ''' 22 | filename 指定日志文件名 23 | filemode 指定日志文件打开的模式,w 或 a 24 | level 指定日志级别,默认 logging.WARNING 25 | format 指定输出的格式和内容,format 的参考信息如下 26 | format 输出格式参数 27 | %(levelno)s: 打印日志级别的数值 28 | %(levelname)s: 打印日志级别名称 29 | %(pathname)s: 打印当前执行程序的路径,其实就是sys.argv[0] 30 | %(filename)s: 打印当前执行程序名 31 | %(funcName)s: 打印日志的当前函数 32 | %(lineno)d: 打印日志的当前行号 33 | %(asctime)s: 打印日志的时间 34 | %(thread)d: 打印线程ID 35 | %(threadName)s: 打印线程名称 36 | %(process)d: 打印进程ID 37 | %(message)s: 打印日志信息 38 | datefmt 使用指定的时间格式,format 参数中有 asctime 的话,需要使用 datefmt 指定格式 39 | ''' 40 | 41 | ''' 42 | logging.FileHandler 用于向一个文件输出日志信息 43 | 不过FileHandler会帮你打开这个文件 44 | 它的构造函数是:FileHandler(filename[,mode])filename是文件名,必须指定一个文件名;mode是文件的打开方式 45 | ''' 46 | fh = logging.FileHandler(logFilename,encoding='utf-8') 47 | logging.getLogger().addHandler(fh) 48 | log = logging.exception(e) 49 | return log 50 | -------------------------------------------------------------------------------- /logs/test_log2.py: -------------------------------------------------------------------------------- 1 | # _*_ coding:utf-8 _*_ 2 | import logging 3 | import os.path 4 | import time 5 | 6 | 7 | class Logger(object): 8 | 9 | def __init__(self,logger): 10 | ''' 11 | 指定保存日志的文件路径,日志界别,以及调用文件 12 | 将日志存入到指定的文件夹中 13 | ''' 14 | 15 | #创建一个logger 16 | self.logger = logging.getLogger(logger) 17 | self.logger.setLevel(logging.DEBUG) 18 | 19 | #创建一个handler,用于写入日志 20 | rq = time.strftime('%Y%m%d%H%M',time.localtime(time.time())) 21 | #log_path = os.path.dirname(os.getcwd()) + '/Logs/' #项目根目录下/Logs 保存日志 22 | log_path = os.path.dirname(os.path.abspath('.')) + '/Logs/' 23 | # /testsuit/featuremodel/xxx.py, 那么得到的相对路径就是项目根目录 24 | log_name = log_path + rq + '.log' 25 | fh = logging.FileHandler(log_name) 26 | fh.setLevel(logging.INFO) 27 | 28 | #再创建一个handler,用于输出到控制台 29 | ch = logging.StreamHandler() 30 | ch.setLevel(logging.INFO) 31 | 32 | #定义handler的输出格式 33 | formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s') 34 | fh.setFormatter(formatter) 35 | ch.setFormatter(formatter) 36 | 37 | #给logger添加handler 38 | self.logger.addHandler(fh) 39 | self.logger.addHandler(ch) 40 | 41 | def getlog(self): 42 | return self.logger -------------------------------------------------------------------------------- /report/data/attachments/13cfe34c98ab0043.txt: -------------------------------------------------------------------------------- 1 | user password 2 | -------------------------------------------------------------------------------- /report/data/attachments/16877f5ddf2812f4.txt: -------------------------------------------------------------------------------- 1 | /Users/liumengjia/Documents/Project/Interface_Automation/config/prod/config.yaml 2 | {'host': {'douban': 'http://api.douban.com'}} 3 | 在数据库中准备测试数据 4 | 清理测试数据 5 | -------------------------------------------------------------------------------- /report/data/attachments/1900a44b184dd756.attach: -------------------------------------------------------------------------------- 1 | 手机 -------------------------------------------------------------------------------- /report/data/attachments/2104ebe3ad65dd6a.txt: -------------------------------------------------------------------------------- 1 | teardown smtp 2 | -------------------------------------------------------------------------------- /report/data/attachments/39544876017a8029.attach: -------------------------------------------------------------------------------- 1 | 添加购物车成功 -------------------------------------------------------------------------------- /report/data/attachments/4dec5532152d5aba.attach: -------------------------------------------------------------------------------- 1 | 手机 -------------------------------------------------------------------------------- /report/data/attachments/6adf8744410896e8.attach: -------------------------------------------------------------------------------- 1 | 添加购物车失败 -------------------------------------------------------------------------------- /report/data/attachments/7694e6a6c6a59c15.attach: -------------------------------------------------------------------------------- 1 | 笔记本 -------------------------------------------------------------------------------- /report/data/attachments/8a23a7917ddbdc7a.txt: -------------------------------------------------------------------------------- 1 | [[{'category': 'reference', 'author': 'Nigel Rees', 'title': 'Sayings of the Century', 'price': 8.95}, {'category': 'fiction', 'author': 'Evelyn Waugh', 'title': 'Sword of Honour', 'price': 12.99}, {'category': 'fiction', 'author': 'Herman Melville', 'title': 'Moby Dick', 'isbn': '0-553-21311-3', 'price': 8.99}, {'category': 'fiction', 'author': 'J. R. R. Tolkien', 'title': 'The Lord of the Rings', 'isbn': '0-395-19395-8', 'price': 22.99}], {'color': 'red', 'price': 19.95}] 2 | -------------------------------------------------------------------------------- /report/data/attachments/8eb8160f7e311fa7.txt: -------------------------------------------------------------------------------- 1 | teardown smtp 2 | -------------------------------------------------------------------------------- /report/data/attachments/939970f6063b942a.attach: -------------------------------------------------------------------------------- 1 | 添加购物车成功 -------------------------------------------------------------------------------- /report/data/attachments/95dec0271a4609a3.attach: -------------------------------------------------------------------------------- 1 | 添加购物车失败 -------------------------------------------------------------------------------- /report/data/attachments/9c446e3a36dc762a.txt: -------------------------------------------------------------------------------- 1 | /Users/liumengjia/Documents/Project/Interface_Automation/config/prod/config.yaml 2 | {'host': {'douban': 'http://api.douban.com'}} 3 | 在数据库中准备测试数据 4 | 清理测试数据 5 | -------------------------------------------------------------------------------- /report/data/attachments/9f8ce2e458f0cabe.txt: -------------------------------------------------------------------------------- 1 | 在数据库中准备测试数据 2 | 清理测试数据 3 | -------------------------------------------------------------------------------- /report/data/attachments/a726ac67d36d0231.txt: -------------------------------------------------------------------------------- 1 | [[{'category': 'reference', 'author': 'Nigel Rees', 'title': 'Sayings of the Century', 'price': 8.95}, {'category': 'fiction', 'author': 'Evelyn Waugh', 'title': 'Sword of Honour', 'price': 12.99}, {'category': 'fiction', 'author': 'Herman Melville', 'title': 'Moby Dick', 'isbn': '0-553-21311-3', 'price': 8.99}, {'category': 'fiction', 'author': 'J. R. R. Tolkien', 'title': 'The Lord of the Rings', 'isbn': '0-395-19395-8', 'price': 22.99}], {'color': 'red', 'price': 19.95}] 2 | -------------------------------------------------------------------------------- /report/data/attachments/d955ff448179b9c7.txt: -------------------------------------------------------------------------------- 1 | user password 2 | -------------------------------------------------------------------------------- /report/data/attachments/eca055a645193dec.txt: -------------------------------------------------------------------------------- 1 | 在数据库中准备测试数据 2 | 清理测试数据 3 | -------------------------------------------------------------------------------- /report/data/attachments/f92fe9cf78d577f5.attach: -------------------------------------------------------------------------------- 1 | 笔记本 -------------------------------------------------------------------------------- /report/data/behaviors.csv: -------------------------------------------------------------------------------- 1 | "Epic","Feature","Story","FAILED","BROKEN","PASSED","SKIPPED","UNKNOWN" 2 | "","","","16","1","10","3","0" 3 | "","购物车功能","加入购物车","1","0","0","0","0" 4 | "","购物车功能","修改购物车","0","0","1","0","0" 5 | "","获取电影列表","获取电影列表","0","0","2","0","0" 6 | "","购物车功能","删除购物车中商品","0","0","0","1","0" 7 | -------------------------------------------------------------------------------- /report/data/categories.csv: -------------------------------------------------------------------------------- 1 | "Category","FAILED","BROKEN","PASSED","SKIPPED","UNKNOWN" 2 | "Product defects","17","0","0","0","0" 3 | "Test defects","0","1","0","0","0" 4 | -------------------------------------------------------------------------------- /report/data/test-cases/1c932995e15cdd22.json: -------------------------------------------------------------------------------- 1 | { 2 | "uid" : "1c932995e15cdd22", 3 | "name" : "test_slice_with_step", 4 | "fullName" : "tests.test_json_path#test_slice_with_step", 5 | "historyId" : "ed2c6ce4f1fc21fd68e0ff2d8e776174", 6 | "time" : { 7 | "start" : 1591177964253, 8 | "stop" : 1591177964254, 9 | "duration" : 1 10 | }, 11 | "status" : "passed", 12 | "flaky" : false, 13 | "newFailed" : false, 14 | "beforeStages" : [ ], 15 | "afterStages" : [ ], 16 | "labels" : [ { 17 | "name" : "parentSuite", 18 | "value" : "tests" 19 | }, { 20 | "name" : "suite", 21 | "value" : "test_json_path" 22 | }, { 23 | "name" : "host", 24 | "value" : "LIUMENGJIAdeMacBook-Pro.local" 25 | }, { 26 | "name" : "thread", 27 | "value" : "78362-MainThread" 28 | }, { 29 | "name" : "framework", 30 | "value" : "pytest" 31 | }, { 32 | "name" : "language", 33 | "value" : "cpython3" 34 | }, { 35 | "name" : "package", 36 | "value" : "tests.test_json_path" 37 | }, { 38 | "name" : "resultFormat", 39 | "value" : "allure2" 40 | } ], 41 | "parameters" : [ ], 42 | "links" : [ ], 43 | "hidden" : false, 44 | "retry" : false, 45 | "extra" : { 46 | "severity" : "normal", 47 | "retries" : [ { 48 | "uid" : "5e1c85db0f39a2c8", 49 | "status" : "passed", 50 | "time" : { 51 | "start" : 1591176793911, 52 | "stop" : 1591176793911, 53 | "duration" : 0 54 | } 55 | } ], 56 | "categories" : [ ], 57 | "tags" : [ ] 58 | }, 59 | "source" : "1c932995e15cdd22.json", 60 | "parameterValues" : [ ] 61 | } -------------------------------------------------------------------------------- /report/data/test-cases/220419dcf78d5997.json: -------------------------------------------------------------------------------- 1 | { 2 | "uid" : "220419dcf78d5997", 3 | "name" : "test_string_2", 4 | "fullName" : "tests.test_assertions.TestStringAssertions#test_string_2", 5 | "historyId" : "beecfaa6debd3672eebec86c96e2bfd8", 6 | "time" : { 7 | "start" : 1591176793745, 8 | "stop" : 1591176793745, 9 | "duration" : 0 10 | }, 11 | "status" : "failed", 12 | "statusMessage" : "AssertionError: assert 'foo 1 bar' == 'foo 2 bar'\n - foo 1 bar\n ? ^\n + foo 2 bar\n ? ^", 13 | "statusTrace" : "self = \n\n def test_string_2(self):\n> assert \"foo 1 bar\" == \"foo 2 bar\"\nE AssertionError: assert 'foo 1 bar' == 'foo 2 bar'\nE - foo 1 bar\nE ? ^\nE + foo 2 bar\nE ? ^\n\ntests/test_assertions.py:18: AssertionError", 14 | "flaky" : false, 15 | "newFailed" : false, 16 | "beforeStages" : [ ], 17 | "afterStages" : [ ], 18 | "labels" : [ { 19 | "name" : "parentSuite", 20 | "value" : "tests" 21 | }, { 22 | "name" : "suite", 23 | "value" : "test_assertions" 24 | }, { 25 | "name" : "subSuite", 26 | "value" : "TestStringAssertions" 27 | }, { 28 | "name" : "host", 29 | "value" : "LIUMENGJIAdeMacBook-Pro.local" 30 | }, { 31 | "name" : "thread", 32 | "value" : "78122-MainThread" 33 | }, { 34 | "name" : "framework", 35 | "value" : "pytest" 36 | }, { 37 | "name" : "language", 38 | "value" : "cpython3" 39 | }, { 40 | "name" : "package", 41 | "value" : "tests.test_assertions" 42 | }, { 43 | "name" : "resultFormat", 44 | "value" : "allure2" 45 | } ], 46 | "parameters" : [ ], 47 | "links" : [ ], 48 | "hidden" : true, 49 | "retry" : true, 50 | "extra" : { 51 | "categories" : [ ], 52 | "tags" : [ ] 53 | }, 54 | "source" : "220419dcf78d5997.json", 55 | "parameterValues" : [ ] 56 | } -------------------------------------------------------------------------------- /report/data/test-cases/27956cc7230c8b32.json: -------------------------------------------------------------------------------- 1 | { 2 | "uid" : "27956cc7230c8b32", 3 | "name" : "test_time_distance_v0[a1-b1-expected1]", 4 | "fullName" : "tests.test_time#test_time_distance_v0", 5 | "historyId" : "20dd453a94d0b086e6cdb13be07e43d0", 6 | "time" : { 7 | "start" : 1591176795261, 8 | "stop" : 1591176795261, 9 | "duration" : 0 10 | }, 11 | "status" : "passed", 12 | "flaky" : false, 13 | "newFailed" : false, 14 | "beforeStages" : [ ], 15 | "afterStages" : [ ], 16 | "labels" : [ { 17 | "name" : "parentSuite", 18 | "value" : "tests" 19 | }, { 20 | "name" : "suite", 21 | "value" : "test_time" 22 | }, { 23 | "name" : "host", 24 | "value" : "LIUMENGJIAdeMacBook-Pro.local" 25 | }, { 26 | "name" : "thread", 27 | "value" : "78122-MainThread" 28 | }, { 29 | "name" : "framework", 30 | "value" : "pytest" 31 | }, { 32 | "name" : "language", 33 | "value" : "cpython3" 34 | }, { 35 | "name" : "package", 36 | "value" : "tests.test_time" 37 | }, { 38 | "name" : "resultFormat", 39 | "value" : "allure2" 40 | } ], 41 | "parameters" : [ { 42 | "name" : "a", 43 | "value" : "datetime.datetime(2020, 12, 11, 0, 0)" 44 | }, { 45 | "name" : "b", 46 | "value" : "datetime.datetime(2020, 12, 12, 0, 0)" 47 | }, { 48 | "name" : "expected", 49 | "value" : "datetime.timedelta(days=-1)" 50 | } ], 51 | "links" : [ ], 52 | "hidden" : true, 53 | "retry" : true, 54 | "extra" : { 55 | "categories" : [ ], 56 | "tags" : [ ] 57 | }, 58 | "source" : "27956cc7230c8b32.json", 59 | "parameterValues" : [ "datetime.datetime(2020, 12, 11, 0, 0)", "datetime.datetime(2020, 12, 12, 0, 0)", "datetime.timedelta(days=-1)" ] 60 | } -------------------------------------------------------------------------------- /report/data/test-cases/2a33177c643fa836.json: -------------------------------------------------------------------------------- 1 | { 2 | "uid" : "2a33177c643fa836", 3 | "name" : "test_list", 4 | "fullName" : "tests.test_assertions.TestCollections#test_list", 5 | "historyId" : "d8ea34b0a2033a4c3ac0689500e3d865", 6 | "time" : { 7 | "start" : 1591176793769, 8 | "stop" : 1591176793769, 9 | "duration" : 0 10 | }, 11 | "status" : "failed", 12 | "statusMessage" : "AssertionError: assert [0, 1, 2] == [0, 1, 3]\n At index 2 diff: 2 != 3\n Use -v to get the full diff", 13 | "statusTrace" : "self = \n\n def test_list(self):\n list1 = [0,1,2]\n list2 = [0,1,3]\n> assert list1 == list2\nE assert [0, 1, 2] == [0, 1, 3]\nE At index 2 diff: 2 != 3\nE Use -v to get the full diff\n\ntests/test_assertions.py:47: AssertionError", 14 | "flaky" : false, 15 | "newFailed" : false, 16 | "beforeStages" : [ ], 17 | "afterStages" : [ ], 18 | "labels" : [ { 19 | "name" : "parentSuite", 20 | "value" : "tests" 21 | }, { 22 | "name" : "suite", 23 | "value" : "test_assertions" 24 | }, { 25 | "name" : "subSuite", 26 | "value" : "TestCollections" 27 | }, { 28 | "name" : "host", 29 | "value" : "LIUMENGJIAdeMacBook-Pro.local" 30 | }, { 31 | "name" : "thread", 32 | "value" : "78122-MainThread" 33 | }, { 34 | "name" : "framework", 35 | "value" : "pytest" 36 | }, { 37 | "name" : "language", 38 | "value" : "cpython3" 39 | }, { 40 | "name" : "package", 41 | "value" : "tests.test_assertions" 42 | }, { 43 | "name" : "resultFormat", 44 | "value" : "allure2" 45 | } ], 46 | "parameters" : [ ], 47 | "links" : [ ], 48 | "hidden" : true, 49 | "retry" : true, 50 | "extra" : { 51 | "categories" : [ ], 52 | "tags" : [ ] 53 | }, 54 | "source" : "2a33177c643fa836.json", 55 | "parameterValues" : [ ] 56 | } -------------------------------------------------------------------------------- /report/data/test-cases/2b2962716fd2a906.json: -------------------------------------------------------------------------------- 1 | { 2 | "uid" : "2b2962716fd2a906", 3 | "name" : "test_all_price", 4 | "fullName" : "tests.test_json_path#test_all_price", 5 | "historyId" : "28239e480d72964ebdc406c0c1eabf02", 6 | "time" : { 7 | "start" : 1591177964237, 8 | "stop" : 1591177964238, 9 | "duration" : 1 10 | }, 11 | "description" : "'$.store..price' 表示根节点的store属性下,递归查找price属性的值\n '$..price' 表示根节点下,递归查找price属性的值", 12 | "descriptionHtml" : "

'$.store..price' 表示根节点的store属性下,递归查找price属性的值\n'$..price' 表示根节点下,递归查找price属性的值

\n", 13 | "status" : "passed", 14 | "flaky" : false, 15 | "newFailed" : false, 16 | "beforeStages" : [ ], 17 | "afterStages" : [ ], 18 | "labels" : [ { 19 | "name" : "parentSuite", 20 | "value" : "tests" 21 | }, { 22 | "name" : "suite", 23 | "value" : "test_json_path" 24 | }, { 25 | "name" : "host", 26 | "value" : "LIUMENGJIAdeMacBook-Pro.local" 27 | }, { 28 | "name" : "thread", 29 | "value" : "78362-MainThread" 30 | }, { 31 | "name" : "framework", 32 | "value" : "pytest" 33 | }, { 34 | "name" : "language", 35 | "value" : "cpython3" 36 | }, { 37 | "name" : "package", 38 | "value" : "tests.test_json_path" 39 | }, { 40 | "name" : "resultFormat", 41 | "value" : "allure2" 42 | } ], 43 | "parameters" : [ ], 44 | "links" : [ ], 45 | "hidden" : false, 46 | "retry" : false, 47 | "extra" : { 48 | "severity" : "normal", 49 | "retries" : [ { 50 | "uid" : "61346dfcedbdc435", 51 | "status" : "passed", 52 | "time" : { 53 | "start" : 1591176793897, 54 | "stop" : 1591176793898, 55 | "duration" : 1 56 | } 57 | } ], 58 | "categories" : [ ], 59 | "tags" : [ ] 60 | }, 61 | "source" : "2b2962716fd2a906.json", 62 | "parameterValues" : [ ] 63 | } -------------------------------------------------------------------------------- /report/data/test-cases/2ebc2ac08a1108fa.json: -------------------------------------------------------------------------------- 1 | { 2 | "uid" : "2ebc2ac08a1108fa", 3 | "name" : "test_zero_divison", 4 | "fullName" : "tests.test_assertions#test_zero_divison", 5 | "historyId" : "a3f01f05f43e1c312d06cc3fb4e34b81", 6 | "time" : { 7 | "start" : 1591176793784, 8 | "stop" : 1591176793784, 9 | "duration" : 0 10 | }, 11 | "status" : "passed", 12 | "flaky" : false, 13 | "newFailed" : false, 14 | "beforeStages" : [ ], 15 | "afterStages" : [ ], 16 | "labels" : [ { 17 | "name" : "parentSuite", 18 | "value" : "tests" 19 | }, { 20 | "name" : "suite", 21 | "value" : "test_assertions" 22 | }, { 23 | "name" : "host", 24 | "value" : "LIUMENGJIAdeMacBook-Pro.local" 25 | }, { 26 | "name" : "thread", 27 | "value" : "78122-MainThread" 28 | }, { 29 | "name" : "framework", 30 | "value" : "pytest" 31 | }, { 32 | "name" : "language", 33 | "value" : "cpython3" 34 | }, { 35 | "name" : "package", 36 | "value" : "tests.test_assertions" 37 | }, { 38 | "name" : "resultFormat", 39 | "value" : "allure2" 40 | } ], 41 | "parameters" : [ ], 42 | "links" : [ ], 43 | "hidden" : true, 44 | "retry" : true, 45 | "extra" : { 46 | "categories" : [ ], 47 | "tags" : [ ] 48 | }, 49 | "source" : "2ebc2ac08a1108fa.json", 50 | "parameterValues" : [ ] 51 | } -------------------------------------------------------------------------------- /report/data/test-cases/4083cee358707456.json: -------------------------------------------------------------------------------- 1 | { 2 | "uid" : "4083cee358707456", 3 | "name" : "test_skip", 4 | "fullName" : "tests.test_marks.TestMarks#test_skip", 5 | "historyId" : "eb011bb6dddaca67825f907e6ca79aea", 6 | "time" : { 7 | "start" : 1591176793939, 8 | "stop" : 1591176793939, 9 | "duration" : 0 10 | }, 11 | "description" : "\n 低于Python3.7版本不执行此条测试用例\n :return:\n ", 12 | "descriptionHtml" : "
    低于Python3.7版本不执行此条测试用例\n    :return:\n
\n", 13 | "status" : "passed", 14 | "flaky" : false, 15 | "newFailed" : false, 16 | "beforeStages" : [ ], 17 | "afterStages" : [ ], 18 | "labels" : [ { 19 | "name" : "parentSuite", 20 | "value" : "tests" 21 | }, { 22 | "name" : "suite", 23 | "value" : "test_marks" 24 | }, { 25 | "name" : "subSuite", 26 | "value" : "TestMarks" 27 | }, { 28 | "name" : "host", 29 | "value" : "LIUMENGJIAdeMacBook-Pro.local" 30 | }, { 31 | "name" : "thread", 32 | "value" : "78122-MainThread" 33 | }, { 34 | "name" : "framework", 35 | "value" : "pytest" 36 | }, { 37 | "name" : "language", 38 | "value" : "cpython3" 39 | }, { 40 | "name" : "package", 41 | "value" : "tests.test_marks" 42 | }, { 43 | "name" : "resultFormat", 44 | "value" : "allure2" 45 | } ], 46 | "parameters" : [ ], 47 | "links" : [ ], 48 | "hidden" : true, 49 | "retry" : true, 50 | "extra" : { 51 | "categories" : [ ], 52 | "tags" : [ ] 53 | }, 54 | "source" : "4083cee358707456.json", 55 | "parameterValues" : [ ] 56 | } -------------------------------------------------------------------------------- /report/data/test-cases/41316ad671eb60f4.json: -------------------------------------------------------------------------------- 1 | { 2 | "uid" : "41316ad671eb60f4", 3 | "name" : "test_2books_cheap_than_10", 4 | "fullName" : "tests.test_json_path#test_2books_cheap_than_10", 5 | "historyId" : "93799719dae2347edf65381bc2104c04", 6 | "time" : { 7 | "start" : 1591177964256, 8 | "stop" : 1591177964257, 9 | "duration" : 1 10 | }, 11 | "description" : "\n '$..book[?(@.price<10)]'表示根节点下book属性的所有price小于10的元素\n ", 12 | "descriptionHtml" : "
'$..book[?(@.price<10)]'表示根节点下book属性的所有price小于10的元素\n
\n", 13 | "status" : "passed", 14 | "flaky" : false, 15 | "newFailed" : false, 16 | "beforeStages" : [ ], 17 | "afterStages" : [ ], 18 | "labels" : [ { 19 | "name" : "parentSuite", 20 | "value" : "tests" 21 | }, { 22 | "name" : "suite", 23 | "value" : "test_json_path" 24 | }, { 25 | "name" : "host", 26 | "value" : "LIUMENGJIAdeMacBook-Pro.local" 27 | }, { 28 | "name" : "thread", 29 | "value" : "78362-MainThread" 30 | }, { 31 | "name" : "framework", 32 | "value" : "pytest" 33 | }, { 34 | "name" : "language", 35 | "value" : "cpython3" 36 | }, { 37 | "name" : "package", 38 | "value" : "tests.test_json_path" 39 | }, { 40 | "name" : "resultFormat", 41 | "value" : "allure2" 42 | } ], 43 | "parameters" : [ ], 44 | "links" : [ ], 45 | "hidden" : false, 46 | "retry" : false, 47 | "extra" : { 48 | "severity" : "normal", 49 | "retries" : [ { 50 | "uid" : "f4ff9fb1337d51a1", 51 | "status" : "passed", 52 | "time" : { 53 | "start" : 1591176793913, 54 | "stop" : 1591176793913, 55 | "duration" : 0 56 | } 57 | } ], 58 | "categories" : [ ], 59 | "tags" : [ ] 60 | }, 61 | "source" : "41316ad671eb60f4.json", 62 | "parameterValues" : [ ] 63 | } -------------------------------------------------------------------------------- /report/data/test-cases/475d40789888beca.json: -------------------------------------------------------------------------------- 1 | { 2 | "uid" : "475d40789888beca", 3 | "name" : "test_edit_shopping_trolley", 4 | "fullName" : "tests.test_shopping_trolley.TestShoppingTrolley#test_edit_shopping_trolley", 5 | "historyId" : "475dede1bcbe6590f5f95f0d051ebc9a", 6 | "time" : { 7 | "start" : 1591176793995, 8 | "stop" : 1591176793995, 9 | "duration" : 0 10 | }, 11 | "status" : "passed", 12 | "flaky" : false, 13 | "newFailed" : false, 14 | "beforeStages" : [ ], 15 | "afterStages" : [ ], 16 | "labels" : [ { 17 | "name" : "story", 18 | "value" : "修改购物车" 19 | }, { 20 | "name" : "feature", 21 | "value" : "购物车功能" 22 | }, { 23 | "name" : "parentSuite", 24 | "value" : "tests" 25 | }, { 26 | "name" : "suite", 27 | "value" : "test_shopping_trolley" 28 | }, { 29 | "name" : "subSuite", 30 | "value" : "TestShoppingTrolley" 31 | }, { 32 | "name" : "host", 33 | "value" : "LIUMENGJIAdeMacBook-Pro.local" 34 | }, { 35 | "name" : "thread", 36 | "value" : "78122-MainThread" 37 | }, { 38 | "name" : "framework", 39 | "value" : "pytest" 40 | }, { 41 | "name" : "language", 42 | "value" : "cpython3" 43 | }, { 44 | "name" : "package", 45 | "value" : "tests.test_shopping_trolley" 46 | }, { 47 | "name" : "resultFormat", 48 | "value" : "allure2" 49 | } ], 50 | "parameters" : [ ], 51 | "links" : [ ], 52 | "hidden" : true, 53 | "retry" : true, 54 | "extra" : { 55 | "categories" : [ ], 56 | "tags" : [ ] 57 | }, 58 | "source" : "475d40789888beca.json", 59 | "parameterValues" : [ ] 60 | } -------------------------------------------------------------------------------- /report/data/test-cases/532d96c83cf47f95.json: -------------------------------------------------------------------------------- 1 | { 2 | "uid" : "532d96c83cf47f95", 3 | "name" : "test_all_goods", 4 | "fullName" : "tests.test_json_path#test_all_goods", 5 | "historyId" : "8028e6f4ac19ae14f86a77aea6c5cfb2", 6 | "time" : { 7 | "start" : 1591176793895, 8 | "stop" : 1591176793895, 9 | "duration" : 0 10 | }, 11 | "description" : "'$.store.*',表示根节点$下store属性下的所有对象,没写", 12 | "descriptionHtml" : "

'$.store.*',表示根节点$下store属性下的所有对象,没写

\n", 13 | "status" : "passed", 14 | "flaky" : false, 15 | "newFailed" : false, 16 | "beforeStages" : [ ], 17 | "testStage" : { 18 | "description" : "'$.store.*',表示根节点$下store属性下的所有对象,没写", 19 | "status" : "passed", 20 | "steps" : [ ], 21 | "attachments" : [ { 22 | "uid" : "8a23a7917ddbdc7a", 23 | "name" : "stdout", 24 | "source" : "8a23a7917ddbdc7a.txt", 25 | "type" : "text/plain", 26 | "size" : 479 27 | } ], 28 | "parameters" : [ ], 29 | "stepsCount" : 0, 30 | "attachmentsCount" : 1, 31 | "shouldDisplayMessage" : false, 32 | "hasContent" : true 33 | }, 34 | "afterStages" : [ ], 35 | "labels" : [ { 36 | "name" : "parentSuite", 37 | "value" : "tests" 38 | }, { 39 | "name" : "suite", 40 | "value" : "test_json_path" 41 | }, { 42 | "name" : "host", 43 | "value" : "LIUMENGJIAdeMacBook-Pro.local" 44 | }, { 45 | "name" : "thread", 46 | "value" : "78122-MainThread" 47 | }, { 48 | "name" : "framework", 49 | "value" : "pytest" 50 | }, { 51 | "name" : "language", 52 | "value" : "cpython3" 53 | }, { 54 | "name" : "package", 55 | "value" : "tests.test_json_path" 56 | }, { 57 | "name" : "resultFormat", 58 | "value" : "allure2" 59 | } ], 60 | "parameters" : [ ], 61 | "links" : [ ], 62 | "hidden" : true, 63 | "retry" : true, 64 | "extra" : { 65 | "categories" : [ ], 66 | "tags" : [ ] 67 | }, 68 | "source" : "532d96c83cf47f95.json", 69 | "parameterValues" : [ ] 70 | } -------------------------------------------------------------------------------- /report/data/test-cases/5bf69d27b3b312aa.json: -------------------------------------------------------------------------------- 1 | { 2 | "uid" : "5bf69d27b3b312aa", 3 | "name" : "test_12_books_price", 4 | "fullName" : "tests.test_json_path#test_12_books_price", 5 | "historyId" : "fe79a183ae7f53730e851b71fa2df5bd", 6 | "time" : { 7 | "start" : 1591177964251, 8 | "stop" : 1591177964252, 9 | "duration" : 1 10 | }, 11 | "description" : "\n '$..book[0,1]'表示根节点下递归查找所有的book属性值的第0个和第1个元素,\n ", 12 | "descriptionHtml" : "
'$..book[0,1]'表示根节点下递归查找所有的book属性值的第0个和第1个元素,\n
\n", 13 | "status" : "passed", 14 | "flaky" : false, 15 | "newFailed" : false, 16 | "beforeStages" : [ ], 17 | "afterStages" : [ ], 18 | "labels" : [ { 19 | "name" : "parentSuite", 20 | "value" : "tests" 21 | }, { 22 | "name" : "suite", 23 | "value" : "test_json_path" 24 | }, { 25 | "name" : "host", 26 | "value" : "LIUMENGJIAdeMacBook-Pro.local" 27 | }, { 28 | "name" : "thread", 29 | "value" : "78362-MainThread" 30 | }, { 31 | "name" : "framework", 32 | "value" : "pytest" 33 | }, { 34 | "name" : "language", 35 | "value" : "cpython3" 36 | }, { 37 | "name" : "package", 38 | "value" : "tests.test_json_path" 39 | }, { 40 | "name" : "resultFormat", 41 | "value" : "allure2" 42 | } ], 43 | "parameters" : [ ], 44 | "links" : [ ], 45 | "hidden" : false, 46 | "retry" : false, 47 | "extra" : { 48 | "severity" : "normal", 49 | "retries" : [ { 50 | "uid" : "941547c0075f2af7", 51 | "status" : "passed", 52 | "time" : { 53 | "start" : 1591176793909, 54 | "stop" : 1591176793909, 55 | "duration" : 0 56 | } 57 | } ], 58 | "categories" : [ ], 59 | "tags" : [ ] 60 | }, 61 | "source" : "5bf69d27b3b312aa.json", 62 | "parameterValues" : [ ] 63 | } -------------------------------------------------------------------------------- /report/data/test-cases/5e1c85db0f39a2c8.json: -------------------------------------------------------------------------------- 1 | { 2 | "uid" : "5e1c85db0f39a2c8", 3 | "name" : "test_slice_with_step", 4 | "fullName" : "tests.test_json_path#test_slice_with_step", 5 | "historyId" : "ed2c6ce4f1fc21fd68e0ff2d8e776174", 6 | "time" : { 7 | "start" : 1591176793911, 8 | "stop" : 1591176793911, 9 | "duration" : 0 10 | }, 11 | "status" : "passed", 12 | "flaky" : false, 13 | "newFailed" : false, 14 | "beforeStages" : [ ], 15 | "afterStages" : [ ], 16 | "labels" : [ { 17 | "name" : "parentSuite", 18 | "value" : "tests" 19 | }, { 20 | "name" : "suite", 21 | "value" : "test_json_path" 22 | }, { 23 | "name" : "host", 24 | "value" : "LIUMENGJIAdeMacBook-Pro.local" 25 | }, { 26 | "name" : "thread", 27 | "value" : "78122-MainThread" 28 | }, { 29 | "name" : "framework", 30 | "value" : "pytest" 31 | }, { 32 | "name" : "language", 33 | "value" : "cpython3" 34 | }, { 35 | "name" : "package", 36 | "value" : "tests.test_json_path" 37 | }, { 38 | "name" : "resultFormat", 39 | "value" : "allure2" 40 | } ], 41 | "parameters" : [ ], 42 | "links" : [ ], 43 | "hidden" : true, 44 | "retry" : true, 45 | "extra" : { 46 | "categories" : [ ], 47 | "tags" : [ ] 48 | }, 49 | "source" : "5e1c85db0f39a2c8.json", 50 | "parameterValues" : [ ] 51 | } -------------------------------------------------------------------------------- /report/data/test-cases/61346dfcedbdc435.json: -------------------------------------------------------------------------------- 1 | { 2 | "uid" : "61346dfcedbdc435", 3 | "name" : "test_all_price", 4 | "fullName" : "tests.test_json_path#test_all_price", 5 | "historyId" : "28239e480d72964ebdc406c0c1eabf02", 6 | "time" : { 7 | "start" : 1591176793897, 8 | "stop" : 1591176793898, 9 | "duration" : 1 10 | }, 11 | "description" : "'$.store..price' 表示根节点的store属性下,递归查找price属性的值\n '$..price' 表示根节点下,递归查找price属性的值", 12 | "descriptionHtml" : "

'$.store..price' 表示根节点的store属性下,递归查找price属性的值\n'$..price' 表示根节点下,递归查找price属性的值

\n", 13 | "status" : "passed", 14 | "flaky" : false, 15 | "newFailed" : false, 16 | "beforeStages" : [ ], 17 | "afterStages" : [ ], 18 | "labels" : [ { 19 | "name" : "parentSuite", 20 | "value" : "tests" 21 | }, { 22 | "name" : "suite", 23 | "value" : "test_json_path" 24 | }, { 25 | "name" : "host", 26 | "value" : "LIUMENGJIAdeMacBook-Pro.local" 27 | }, { 28 | "name" : "thread", 29 | "value" : "78122-MainThread" 30 | }, { 31 | "name" : "framework", 32 | "value" : "pytest" 33 | }, { 34 | "name" : "language", 35 | "value" : "cpython3" 36 | }, { 37 | "name" : "package", 38 | "value" : "tests.test_json_path" 39 | }, { 40 | "name" : "resultFormat", 41 | "value" : "allure2" 42 | } ], 43 | "parameters" : [ ], 44 | "links" : [ ], 45 | "hidden" : true, 46 | "retry" : true, 47 | "extra" : { 48 | "categories" : [ ], 49 | "tags" : [ ] 50 | }, 51 | "source" : "61346dfcedbdc435.json", 52 | "parameterValues" : [ ] 53 | } -------------------------------------------------------------------------------- /report/data/test-cases/61cec4da8d27181e.json: -------------------------------------------------------------------------------- 1 | { 2 | "uid" : "61cec4da8d27181e", 3 | "name" : "test_the_unknown", 4 | "fullName" : "tests.test_marks.TestMarks#test_the_unknown", 5 | "historyId" : "0f04f1214402bca66f5131dc06036b08", 6 | "time" : { 7 | "start" : 1591177964282, 8 | "stop" : 1591177964282, 9 | "duration" : 0 10 | }, 11 | "description" : "\n 跳过不执行,未实现\n :return:\n ", 12 | "descriptionHtml" : "
    跳过不执行,未实现\n    :return:\n
\n", 13 | "status" : "skipped", 14 | "statusMessage" : "Skipped: not implememtation", 15 | "statusTrace" : "('tests/test_marks.py', 16, 'Skipped: not implememtation')", 16 | "flaky" : false, 17 | "newFailed" : false, 18 | "beforeStages" : [ ], 19 | "afterStages" : [ ], 20 | "labels" : [ { 21 | "name" : "parentSuite", 22 | "value" : "tests" 23 | }, { 24 | "name" : "suite", 25 | "value" : "test_marks" 26 | }, { 27 | "name" : "subSuite", 28 | "value" : "TestMarks" 29 | }, { 30 | "name" : "host", 31 | "value" : "LIUMENGJIAdeMacBook-Pro.local" 32 | }, { 33 | "name" : "thread", 34 | "value" : "78362-MainThread" 35 | }, { 36 | "name" : "framework", 37 | "value" : "pytest" 38 | }, { 39 | "name" : "language", 40 | "value" : "cpython3" 41 | }, { 42 | "name" : "package", 43 | "value" : "tests.test_marks" 44 | }, { 45 | "name" : "resultFormat", 46 | "value" : "allure2" 47 | } ], 48 | "parameters" : [ ], 49 | "links" : [ ], 50 | "hidden" : false, 51 | "retry" : false, 52 | "extra" : { 53 | "severity" : "normal", 54 | "retries" : [ { 55 | "uid" : "b0b3646c66b61cd9", 56 | "status" : "skipped", 57 | "statusDetails" : "Skipped: not implememtation", 58 | "time" : { 59 | "start" : 1591176793936, 60 | "stop" : 1591176793936, 61 | "duration" : 0 62 | } 63 | } ], 64 | "categories" : [ ], 65 | "tags" : [ ] 66 | }, 67 | "source" : "61cec4da8d27181e.json", 68 | "parameterValues" : [ ] 69 | } -------------------------------------------------------------------------------- /report/data/test-cases/69cdcdc93407a799.json: -------------------------------------------------------------------------------- 1 | { 2 | "uid" : "69cdcdc93407a799", 3 | "name" : "test_string_3", 4 | "fullName" : "tests.test_assertions.TestStringAssertions#test_string_3", 5 | "historyId" : "a20113d4dc1fbffdc25108fbe291e249", 6 | "time" : { 7 | "start" : 1591176793749, 8 | "stop" : 1591176793749, 9 | "duration" : 0 10 | }, 11 | "status" : "failed", 12 | "statusMessage" : "AssertionError: assert 'foo\\nspam\\nbar' == 'foo\\neggs\\nbar'\n foo\n - spam\n + eggs\n bar", 13 | "statusTrace" : "self = \n\n def test_string_3(self):\n> assert \"foo\\nspam\\nbar\" == \"foo\\neggs\\nbar\"\nE AssertionError: assert 'foo\\nspam\\nbar' == 'foo\\neggs\\nbar'\nE foo\nE - spam\nE + eggs\nE bar\n\ntests/test_assertions.py:21: AssertionError", 14 | "flaky" : false, 15 | "newFailed" : false, 16 | "beforeStages" : [ ], 17 | "afterStages" : [ ], 18 | "labels" : [ { 19 | "name" : "parentSuite", 20 | "value" : "tests" 21 | }, { 22 | "name" : "suite", 23 | "value" : "test_assertions" 24 | }, { 25 | "name" : "subSuite", 26 | "value" : "TestStringAssertions" 27 | }, { 28 | "name" : "host", 29 | "value" : "LIUMENGJIAdeMacBook-Pro.local" 30 | }, { 31 | "name" : "thread", 32 | "value" : "78122-MainThread" 33 | }, { 34 | "name" : "framework", 35 | "value" : "pytest" 36 | }, { 37 | "name" : "language", 38 | "value" : "cpython3" 39 | }, { 40 | "name" : "package", 41 | "value" : "tests.test_assertions" 42 | }, { 43 | "name" : "resultFormat", 44 | "value" : "allure2" 45 | } ], 46 | "parameters" : [ ], 47 | "links" : [ ], 48 | "hidden" : true, 49 | "retry" : true, 50 | "extra" : { 51 | "categories" : [ ], 52 | "tags" : [ ] 53 | }, 54 | "source" : "69cdcdc93407a799.json", 55 | "parameterValues" : [ ] 56 | } -------------------------------------------------------------------------------- /report/data/test-cases/6f32b3c6ea574bb.json: -------------------------------------------------------------------------------- 1 | { 2 | "uid" : "6f32b3c6ea574bb", 3 | "name" : "test_time_distance_v0[a0-b0-expected0]", 4 | "fullName" : "tests.test_time#test_time_distance_v0", 5 | "historyId" : "9125daa121b6b5b4b58c5545ce0437f2", 6 | "time" : { 7 | "start" : 1591176795257, 8 | "stop" : 1591176795257, 9 | "duration" : 0 10 | }, 11 | "status" : "passed", 12 | "flaky" : false, 13 | "newFailed" : false, 14 | "beforeStages" : [ ], 15 | "afterStages" : [ ], 16 | "labels" : [ { 17 | "name" : "parentSuite", 18 | "value" : "tests" 19 | }, { 20 | "name" : "suite", 21 | "value" : "test_time" 22 | }, { 23 | "name" : "host", 24 | "value" : "LIUMENGJIAdeMacBook-Pro.local" 25 | }, { 26 | "name" : "thread", 27 | "value" : "78122-MainThread" 28 | }, { 29 | "name" : "framework", 30 | "value" : "pytest" 31 | }, { 32 | "name" : "language", 33 | "value" : "cpython3" 34 | }, { 35 | "name" : "package", 36 | "value" : "tests.test_time" 37 | }, { 38 | "name" : "resultFormat", 39 | "value" : "allure2" 40 | } ], 41 | "parameters" : [ { 42 | "name" : "a", 43 | "value" : "datetime.datetime(2020, 12, 12, 0, 0)" 44 | }, { 45 | "name" : "b", 46 | "value" : "datetime.datetime(2020, 12, 11, 0, 0)" 47 | }, { 48 | "name" : "expected", 49 | "value" : "datetime.timedelta(days=1)" 50 | } ], 51 | "links" : [ ], 52 | "hidden" : true, 53 | "retry" : true, 54 | "extra" : { 55 | "categories" : [ ], 56 | "tags" : [ ] 57 | }, 58 | "source" : "6f32b3c6ea574bb.json", 59 | "parameterValues" : [ "datetime.datetime(2020, 12, 12, 0, 0)", "datetime.datetime(2020, 12, 11, 0, 0)", "datetime.timedelta(days=1)" ] 60 | } -------------------------------------------------------------------------------- /report/data/test-cases/8858ebcf76e43ef.json: -------------------------------------------------------------------------------- 1 | { 2 | "uid" : "8858ebcf76e43ef", 3 | "name" : "test_edit_shopping_trolley", 4 | "fullName" : "tests.test_shopping_trolley.TestShoppingTrolley#test_edit_shopping_trolley", 5 | "historyId" : "475dede1bcbe6590f5f95f0d051ebc9a", 6 | "time" : { 7 | "start" : 1591177964350, 8 | "stop" : 1591177964350, 9 | "duration" : 0 10 | }, 11 | "status" : "passed", 12 | "flaky" : false, 13 | "newFailed" : false, 14 | "beforeStages" : [ ], 15 | "afterStages" : [ ], 16 | "labels" : [ { 17 | "name" : "story", 18 | "value" : "修改购物车" 19 | }, { 20 | "name" : "feature", 21 | "value" : "购物车功能" 22 | }, { 23 | "name" : "parentSuite", 24 | "value" : "tests" 25 | }, { 26 | "name" : "suite", 27 | "value" : "test_shopping_trolley" 28 | }, { 29 | "name" : "subSuite", 30 | "value" : "TestShoppingTrolley" 31 | }, { 32 | "name" : "host", 33 | "value" : "LIUMENGJIAdeMacBook-Pro.local" 34 | }, { 35 | "name" : "thread", 36 | "value" : "78362-MainThread" 37 | }, { 38 | "name" : "framework", 39 | "value" : "pytest" 40 | }, { 41 | "name" : "language", 42 | "value" : "cpython3" 43 | }, { 44 | "name" : "package", 45 | "value" : "tests.test_shopping_trolley" 46 | }, { 47 | "name" : "resultFormat", 48 | "value" : "allure2" 49 | } ], 50 | "parameters" : [ ], 51 | "links" : [ ], 52 | "hidden" : false, 53 | "retry" : false, 54 | "extra" : { 55 | "severity" : "normal", 56 | "retries" : [ { 57 | "uid" : "475d40789888beca", 58 | "status" : "passed", 59 | "time" : { 60 | "start" : 1591176793995, 61 | "stop" : 1591176793995, 62 | "duration" : 0 63 | } 64 | } ], 65 | "categories" : [ ], 66 | "tags" : [ ] 67 | }, 68 | "source" : "8858ebcf76e43ef.json", 69 | "parameterValues" : [ ] 70 | } -------------------------------------------------------------------------------- /report/data/test-cases/92a6eb1c79832438.json: -------------------------------------------------------------------------------- 1 | { 2 | "uid" : "92a6eb1c79832438", 3 | "name" : "test_string_1", 4 | "fullName" : "tests.test_assertions.TestStringAssertions#test_string_1", 5 | "historyId" : "9840158155a8e95498907c00567fd3f1", 6 | "time" : { 7 | "start" : 1591176793679, 8 | "stop" : 1591176793681, 9 | "duration" : 2 10 | }, 11 | "status" : "failed", 12 | "statusMessage" : "AssertionError: assert 'spam' == 'eggs'\n - spam\n + eggs", 13 | "statusTrace" : "self = \n\n def test_string_1(self):\n> assert \"spam\" == \"eggs\"\nE AssertionError: assert 'spam' == 'eggs'\nE - spam\nE + eggs\n\ntests/test_assertions.py:15: AssertionError", 14 | "flaky" : false, 15 | "newFailed" : false, 16 | "beforeStages" : [ ], 17 | "afterStages" : [ ], 18 | "labels" : [ { 19 | "name" : "parentSuite", 20 | "value" : "tests" 21 | }, { 22 | "name" : "suite", 23 | "value" : "test_assertions" 24 | }, { 25 | "name" : "subSuite", 26 | "value" : "TestStringAssertions" 27 | }, { 28 | "name" : "host", 29 | "value" : "LIUMENGJIAdeMacBook-Pro.local" 30 | }, { 31 | "name" : "thread", 32 | "value" : "78122-MainThread" 33 | }, { 34 | "name" : "framework", 35 | "value" : "pytest" 36 | }, { 37 | "name" : "language", 38 | "value" : "cpython3" 39 | }, { 40 | "name" : "package", 41 | "value" : "tests.test_assertions" 42 | }, { 43 | "name" : "resultFormat", 44 | "value" : "allure2" 45 | } ], 46 | "parameters" : [ ], 47 | "links" : [ ], 48 | "hidden" : true, 49 | "retry" : true, 50 | "extra" : { 51 | "categories" : [ ], 52 | "tags" : [ ] 53 | }, 54 | "source" : "92a6eb1c79832438.json", 55 | "parameterValues" : [ ] 56 | } -------------------------------------------------------------------------------- /report/data/test-cases/941547c0075f2af7.json: -------------------------------------------------------------------------------- 1 | { 2 | "uid" : "941547c0075f2af7", 3 | "name" : "test_12_books_price", 4 | "fullName" : "tests.test_json_path#test_12_books_price", 5 | "historyId" : "fe79a183ae7f53730e851b71fa2df5bd", 6 | "time" : { 7 | "start" : 1591176793909, 8 | "stop" : 1591176793909, 9 | "duration" : 0 10 | }, 11 | "description" : "\n '$..book[0,1]'表示根节点下递归查找所有的book属性值的第0个和第1个元素,\n ", 12 | "descriptionHtml" : "
'$..book[0,1]'表示根节点下递归查找所有的book属性值的第0个和第1个元素,\n
\n", 13 | "status" : "passed", 14 | "flaky" : false, 15 | "newFailed" : false, 16 | "beforeStages" : [ ], 17 | "afterStages" : [ ], 18 | "labels" : [ { 19 | "name" : "parentSuite", 20 | "value" : "tests" 21 | }, { 22 | "name" : "suite", 23 | "value" : "test_json_path" 24 | }, { 25 | "name" : "host", 26 | "value" : "LIUMENGJIAdeMacBook-Pro.local" 27 | }, { 28 | "name" : "thread", 29 | "value" : "78122-MainThread" 30 | }, { 31 | "name" : "framework", 32 | "value" : "pytest" 33 | }, { 34 | "name" : "language", 35 | "value" : "cpython3" 36 | }, { 37 | "name" : "package", 38 | "value" : "tests.test_json_path" 39 | }, { 40 | "name" : "resultFormat", 41 | "value" : "allure2" 42 | } ], 43 | "parameters" : [ ], 44 | "links" : [ ], 45 | "hidden" : true, 46 | "retry" : true, 47 | "extra" : { 48 | "categories" : [ ], 49 | "tags" : [ ] 50 | }, 51 | "source" : "941547c0075f2af7.json", 52 | "parameterValues" : [ ] 53 | } -------------------------------------------------------------------------------- /report/data/test-cases/942c7c7eb4bd7f0f.json: -------------------------------------------------------------------------------- 1 | { 2 | "uid" : "942c7c7eb4bd7f0f", 3 | "name" : "test_slow", 4 | "fullName" : "tests.test_marks.TestMarks#test_slow", 5 | "historyId" : "24b8435a3ca9cff8df9466c08f1734ab", 6 | "time" : { 7 | "start" : 1591176793983, 8 | "stop" : 1591176793984, 9 | "duration" : 1 10 | }, 11 | "description" : "\n 自定义标签\n :return:\n ", 12 | "descriptionHtml" : "
    自定义标签\n    :return:\n
\n", 13 | "status" : "failed", 14 | "statusMessage" : "AssertionError: assert 0", 15 | "statusTrace" : "self = \n\n @pytest.mark.slow\n def test_slow(self):\n \"\"\"\n 自定义标签\n :return:\n \"\"\"\n> assert 0\nE assert 0\n\ntests/test_marks.py:55: AssertionError", 16 | "flaky" : false, 17 | "newFailed" : false, 18 | "beforeStages" : [ ], 19 | "afterStages" : [ ], 20 | "labels" : [ { 21 | "name" : "tag", 22 | "value" : "slow" 23 | }, { 24 | "name" : "parentSuite", 25 | "value" : "tests" 26 | }, { 27 | "name" : "suite", 28 | "value" : "test_marks" 29 | }, { 30 | "name" : "subSuite", 31 | "value" : "TestMarks" 32 | }, { 33 | "name" : "host", 34 | "value" : "LIUMENGJIAdeMacBook-Pro.local" 35 | }, { 36 | "name" : "thread", 37 | "value" : "78122-MainThread" 38 | }, { 39 | "name" : "framework", 40 | "value" : "pytest" 41 | }, { 42 | "name" : "language", 43 | "value" : "cpython3" 44 | }, { 45 | "name" : "package", 46 | "value" : "tests.test_marks" 47 | }, { 48 | "name" : "resultFormat", 49 | "value" : "allure2" 50 | } ], 51 | "parameters" : [ ], 52 | "links" : [ ], 53 | "hidden" : true, 54 | "retry" : true, 55 | "extra" : { 56 | "categories" : [ ], 57 | "tags" : [ "slow" ] 58 | }, 59 | "source" : "942c7c7eb4bd7f0f.json", 60 | "parameterValues" : [ ] 61 | } -------------------------------------------------------------------------------- /report/data/test-cases/a3456807aa400637.json: -------------------------------------------------------------------------------- 1 | { 2 | "uid" : "a3456807aa400637", 3 | "name" : "test_time_distance_v0[a0-b0-expected0]", 4 | "fullName" : "tests.test_time#test_time_distance_v0", 5 | "historyId" : "9125daa121b6b5b4b58c5545ce0437f2", 6 | "time" : { 7 | "start" : 1591177965668, 8 | "stop" : 1591177965668, 9 | "duration" : 0 10 | }, 11 | "status" : "passed", 12 | "flaky" : false, 13 | "newFailed" : false, 14 | "beforeStages" : [ ], 15 | "afterStages" : [ ], 16 | "labels" : [ { 17 | "name" : "parentSuite", 18 | "value" : "tests" 19 | }, { 20 | "name" : "suite", 21 | "value" : "test_time" 22 | }, { 23 | "name" : "host", 24 | "value" : "LIUMENGJIAdeMacBook-Pro.local" 25 | }, { 26 | "name" : "thread", 27 | "value" : "78362-MainThread" 28 | }, { 29 | "name" : "framework", 30 | "value" : "pytest" 31 | }, { 32 | "name" : "language", 33 | "value" : "cpython3" 34 | }, { 35 | "name" : "package", 36 | "value" : "tests.test_time" 37 | }, { 38 | "name" : "resultFormat", 39 | "value" : "allure2" 40 | } ], 41 | "parameters" : [ { 42 | "name" : "a", 43 | "value" : "datetime.datetime(2020, 12, 12, 0, 0)" 44 | }, { 45 | "name" : "b", 46 | "value" : "datetime.datetime(2020, 12, 11, 0, 0)" 47 | }, { 48 | "name" : "expected", 49 | "value" : "datetime.timedelta(days=1)" 50 | } ], 51 | "links" : [ ], 52 | "hidden" : false, 53 | "retry" : false, 54 | "extra" : { 55 | "severity" : "normal", 56 | "retries" : [ { 57 | "uid" : "6f32b3c6ea574bb", 58 | "status" : "passed", 59 | "time" : { 60 | "start" : 1591176795257, 61 | "stop" : 1591176795257, 62 | "duration" : 0 63 | } 64 | } ], 65 | "categories" : [ ], 66 | "tags" : [ ] 67 | }, 68 | "source" : "a3456807aa400637.json", 69 | "parameterValues" : [ "datetime.datetime(2020, 12, 12, 0, 0)", "datetime.datetime(2020, 12, 11, 0, 0)", "datetime.timedelta(days=1)" ] 70 | } -------------------------------------------------------------------------------- /report/data/test-cases/ada601898a483938.json: -------------------------------------------------------------------------------- 1 | { 2 | "uid" : "ada601898a483938", 3 | "name" : "test_third_book", 4 | "fullName" : "tests.test_json_path#test_third_book", 5 | "historyId" : "bffa81c7bffb7ca85de23bee55c91547", 6 | "time" : { 7 | "start" : 1591176793900, 8 | "stop" : 1591176793900, 9 | "duration" : 0 10 | }, 11 | "description" : "\n '$..book[2]'表示根节点下递归查找所有book属性中第3个对象,\n\n ", 12 | "descriptionHtml" : "
'$..book[2]'表示根节点下递归查找所有book属性中第3个对象,\n
\n", 13 | "status" : "failed", 14 | "statusMessage" : "AssertionError: assert 'Moby Dick' == 'Moby Dick!'\n - Moby Dick\n + Moby Dick!\n ? +", 15 | "statusTrace" : "def test_third_book():\n \"\"\"\n '$..book[2]'表示根节点下递归查找所有book属性中第3个对象,\n \n \"\"\"\n book_3 = jsonpath.jsonpath(response, '$.store.book[2]')\n> assert book_3[0]['title'] == \"Moby Dick!\"\nE AssertionError: assert 'Moby Dick' == 'Moby Dick!'\nE - Moby Dick\nE + Moby Dick!\nE ? +\n\ntests/test_json_path.py:73: AssertionError", 16 | "flaky" : false, 17 | "newFailed" : false, 18 | "beforeStages" : [ ], 19 | "afterStages" : [ ], 20 | "labels" : [ { 21 | "name" : "parentSuite", 22 | "value" : "tests" 23 | }, { 24 | "name" : "suite", 25 | "value" : "test_json_path" 26 | }, { 27 | "name" : "host", 28 | "value" : "LIUMENGJIAdeMacBook-Pro.local" 29 | }, { 30 | "name" : "thread", 31 | "value" : "78122-MainThread" 32 | }, { 33 | "name" : "framework", 34 | "value" : "pytest" 35 | }, { 36 | "name" : "language", 37 | "value" : "cpython3" 38 | }, { 39 | "name" : "package", 40 | "value" : "tests.test_json_path" 41 | }, { 42 | "name" : "resultFormat", 43 | "value" : "allure2" 44 | } ], 45 | "parameters" : [ ], 46 | "links" : [ ], 47 | "hidden" : true, 48 | "retry" : true, 49 | "extra" : { 50 | "categories" : [ ], 51 | "tags" : [ ] 52 | }, 53 | "source" : "ada601898a483938.json", 54 | "parameterValues" : [ ] 55 | } -------------------------------------------------------------------------------- /report/data/test-cases/ae610584eb470c55.json: -------------------------------------------------------------------------------- 1 | { 2 | "uid" : "ae610584eb470c55", 3 | "name" : "test_delete_shopping_trolley", 4 | "fullName" : "tests.test_shopping_trolley.TestShoppingTrolley#test_delete_shopping_trolley", 5 | "historyId" : "b6da4bda0427c8126528f5b5f455beb8", 6 | "time" : { 7 | "start" : 1591177964351, 8 | "stop" : 1591177964351, 9 | "duration" : 0 10 | }, 11 | "status" : "skipped", 12 | "statusMessage" : "Skipped: 本次不执行", 13 | "statusTrace" : "('tests/test_shopping_trolley.py', 33, 'Skipped: 本次不执行')", 14 | "flaky" : false, 15 | "newFailed" : false, 16 | "beforeStages" : [ ], 17 | "afterStages" : [ ], 18 | "labels" : [ { 19 | "name" : "story", 20 | "value" : "删除购物车中商品" 21 | }, { 22 | "name" : "feature", 23 | "value" : "购物车功能" 24 | }, { 25 | "name" : "parentSuite", 26 | "value" : "tests" 27 | }, { 28 | "name" : "suite", 29 | "value" : "test_shopping_trolley" 30 | }, { 31 | "name" : "subSuite", 32 | "value" : "TestShoppingTrolley" 33 | }, { 34 | "name" : "host", 35 | "value" : "LIUMENGJIAdeMacBook-Pro.local" 36 | }, { 37 | "name" : "thread", 38 | "value" : "78362-MainThread" 39 | }, { 40 | "name" : "framework", 41 | "value" : "pytest" 42 | }, { 43 | "name" : "language", 44 | "value" : "cpython3" 45 | }, { 46 | "name" : "package", 47 | "value" : "tests.test_shopping_trolley" 48 | }, { 49 | "name" : "resultFormat", 50 | "value" : "allure2" 51 | } ], 52 | "parameters" : [ ], 53 | "links" : [ ], 54 | "hidden" : false, 55 | "retry" : false, 56 | "extra" : { 57 | "severity" : "normal", 58 | "retries" : [ { 59 | "uid" : "da7c65d42c018464", 60 | "status" : "skipped", 61 | "statusDetails" : "Skipped: 本次不执行", 62 | "time" : { 63 | "start" : 1591176793996, 64 | "stop" : 1591176793996, 65 | "duration" : 0 66 | } 67 | } ], 68 | "categories" : [ ], 69 | "tags" : [ ] 70 | }, 71 | "source" : "ae610584eb470c55.json", 72 | "parameterValues" : [ ] 73 | } -------------------------------------------------------------------------------- /report/data/test-cases/b0b3646c66b61cd9.json: -------------------------------------------------------------------------------- 1 | { 2 | "uid" : "b0b3646c66b61cd9", 3 | "name" : "test_the_unknown", 4 | "fullName" : "tests.test_marks.TestMarks#test_the_unknown", 5 | "historyId" : "0f04f1214402bca66f5131dc06036b08", 6 | "time" : { 7 | "start" : 1591176793936, 8 | "stop" : 1591176793936, 9 | "duration" : 0 10 | }, 11 | "description" : "\n 跳过不执行,未实现\n :return:\n ", 12 | "descriptionHtml" : "
    跳过不执行,未实现\n    :return:\n
\n", 13 | "status" : "skipped", 14 | "statusMessage" : "Skipped: not implememtation", 15 | "statusTrace" : "('tests/test_marks.py', 16, 'Skipped: not implememtation')", 16 | "flaky" : false, 17 | "newFailed" : false, 18 | "beforeStages" : [ ], 19 | "afterStages" : [ ], 20 | "labels" : [ { 21 | "name" : "parentSuite", 22 | "value" : "tests" 23 | }, { 24 | "name" : "suite", 25 | "value" : "test_marks" 26 | }, { 27 | "name" : "subSuite", 28 | "value" : "TestMarks" 29 | }, { 30 | "name" : "host", 31 | "value" : "LIUMENGJIAdeMacBook-Pro.local" 32 | }, { 33 | "name" : "thread", 34 | "value" : "78122-MainThread" 35 | }, { 36 | "name" : "framework", 37 | "value" : "pytest" 38 | }, { 39 | "name" : "language", 40 | "value" : "cpython3" 41 | }, { 42 | "name" : "package", 43 | "value" : "tests.test_marks" 44 | }, { 45 | "name" : "resultFormat", 46 | "value" : "allure2" 47 | } ], 48 | "parameters" : [ ], 49 | "links" : [ ], 50 | "hidden" : true, 51 | "retry" : true, 52 | "extra" : { 53 | "categories" : [ ], 54 | "tags" : [ ] 55 | }, 56 | "source" : "b0b3646c66b61cd9.json", 57 | "parameterValues" : [ ] 58 | } -------------------------------------------------------------------------------- /report/data/test-cases/b3ebdf08ab14408c.json: -------------------------------------------------------------------------------- 1 | { 2 | "uid" : "b3ebdf08ab14408c", 3 | "name" : "test_func", 4 | "fullName" : "tests.test_assertions#test_func", 5 | "historyId" : "c7deb80c02a641c44581a601d8aa78ec", 6 | "time" : { 7 | "start" : 1591176793757, 8 | "stop" : 1591176793757, 9 | "duration" : 0 10 | }, 11 | "status" : "failed", 12 | "statusMessage" : "AssertionError: assert [1, 2, 3] == [1, 2, 4]\n At index 2 diff: 3 != 4\n Use -v to get the full diff", 13 | "statusTrace" : "def test_func():\n def func():\n return [1,2,3]\n \n> assert func() == [1,2,4]\nE assert [1, 2, 3] == [1, 2, 4]\nE At index 2 diff: 3 != 4\nE Use -v to get the full diff\n\ntests/test_assertions.py:33: AssertionError", 14 | "flaky" : false, 15 | "newFailed" : false, 16 | "beforeStages" : [ ], 17 | "afterStages" : [ ], 18 | "labels" : [ { 19 | "name" : "parentSuite", 20 | "value" : "tests" 21 | }, { 22 | "name" : "suite", 23 | "value" : "test_assertions" 24 | }, { 25 | "name" : "host", 26 | "value" : "LIUMENGJIAdeMacBook-Pro.local" 27 | }, { 28 | "name" : "thread", 29 | "value" : "78122-MainThread" 30 | }, { 31 | "name" : "framework", 32 | "value" : "pytest" 33 | }, { 34 | "name" : "language", 35 | "value" : "cpython3" 36 | }, { 37 | "name" : "package", 38 | "value" : "tests.test_assertions" 39 | }, { 40 | "name" : "resultFormat", 41 | "value" : "allure2" 42 | } ], 43 | "parameters" : [ ], 44 | "links" : [ ], 45 | "hidden" : true, 46 | "retry" : true, 47 | "extra" : { 48 | "categories" : [ ], 49 | "tags" : [ ] 50 | }, 51 | "source" : "b3ebdf08ab14408c.json", 52 | "parameterValues" : [ ] 53 | } -------------------------------------------------------------------------------- /report/data/test-cases/bd9114b81d693e30.json: -------------------------------------------------------------------------------- 1 | { 2 | "uid" : "bd9114b81d693e30", 3 | "name" : "test_authors", 4 | "fullName" : "tests.test_json_path#test_authors", 5 | "historyId" : "6b7a3e10181021d4e6a1473e2305a905", 6 | "time" : { 7 | "start" : 1591176793891, 8 | "stop" : 1591176793892, 9 | "duration" : 1 10 | }, 11 | "description" : "\n '$.store.book[*].author'表示store节点下book结点下所有对象的author值\n ", 12 | "descriptionHtml" : "
'$.store.book[*].author'表示store节点下book结点下所有对象的author值\n
\n", 13 | "status" : "passed", 14 | "flaky" : false, 15 | "newFailed" : false, 16 | "beforeStages" : [ ], 17 | "afterStages" : [ ], 18 | "labels" : [ { 19 | "name" : "parentSuite", 20 | "value" : "tests" 21 | }, { 22 | "name" : "suite", 23 | "value" : "test_json_path" 24 | }, { 25 | "name" : "host", 26 | "value" : "LIUMENGJIAdeMacBook-Pro.local" 27 | }, { 28 | "name" : "thread", 29 | "value" : "78122-MainThread" 30 | }, { 31 | "name" : "framework", 32 | "value" : "pytest" 33 | }, { 34 | "name" : "language", 35 | "value" : "cpython3" 36 | }, { 37 | "name" : "package", 38 | "value" : "tests.test_json_path" 39 | }, { 40 | "name" : "resultFormat", 41 | "value" : "allure2" 42 | } ], 43 | "parameters" : [ ], 44 | "links" : [ ], 45 | "hidden" : true, 46 | "retry" : true, 47 | "extra" : { 48 | "categories" : [ ], 49 | "tags" : [ ] 50 | }, 51 | "source" : "bd9114b81d693e30.json", 52 | "parameterValues" : [ ] 53 | } -------------------------------------------------------------------------------- /report/data/test-cases/c5b8c681956bd7c7.json: -------------------------------------------------------------------------------- 1 | { 2 | "uid" : "c5b8c681956bd7c7", 3 | "name" : "test_has_color", 4 | "fullName" : "tests.test_json_path#test_has_color", 5 | "historyId" : "b6268ce8363224068bde8ea1a095e57d", 6 | "time" : { 7 | "start" : 1591176793915, 8 | "stop" : 1591176793915, 9 | "duration" : 0 10 | }, 11 | "description" : "\n '$..[?(@.color)]'表示根节点下具有color属性的对象\n ", 12 | "descriptionHtml" : "
'$..[?(@.color)]'表示根节点下具有color属性的对象\n
\n", 13 | "status" : "failed", 14 | "statusMessage" : "AssertionError: assert 'green' == 'red'\n - green\n + red", 15 | "statusTrace" : "def test_has_color():\n \"\"\"\n '$..[?(@.color)]'表示根节点下具有color属性的对象\n \"\"\"\n colorful_goods = jsonpath.jsonpath(response, '$.store..[?(@.color)]')\n> assert \"green\" == colorful_goods[0]['color']\nE AssertionError: assert 'green' == 'red'\nE - green\nE + red\n\ntests/test_json_path.py:110: AssertionError", 16 | "flaky" : false, 17 | "newFailed" : false, 18 | "beforeStages" : [ ], 19 | "afterStages" : [ ], 20 | "labels" : [ { 21 | "name" : "parentSuite", 22 | "value" : "tests" 23 | }, { 24 | "name" : "suite", 25 | "value" : "test_json_path" 26 | }, { 27 | "name" : "host", 28 | "value" : "LIUMENGJIAdeMacBook-Pro.local" 29 | }, { 30 | "name" : "thread", 31 | "value" : "78122-MainThread" 32 | }, { 33 | "name" : "framework", 34 | "value" : "pytest" 35 | }, { 36 | "name" : "language", 37 | "value" : "cpython3" 38 | }, { 39 | "name" : "package", 40 | "value" : "tests.test_json_path" 41 | }, { 42 | "name" : "resultFormat", 43 | "value" : "allure2" 44 | } ], 45 | "parameters" : [ ], 46 | "links" : [ ], 47 | "hidden" : true, 48 | "retry" : true, 49 | "extra" : { 50 | "categories" : [ ], 51 | "tags" : [ ] 52 | }, 53 | "source" : "c5b8c681956bd7c7.json", 54 | "parameterValues" : [ ] 55 | } -------------------------------------------------------------------------------- /report/data/test-cases/cdfa8a44b2fc3e29.json: -------------------------------------------------------------------------------- 1 | { 2 | "uid" : "cdfa8a44b2fc3e29", 3 | "name" : "test_skip", 4 | "fullName" : "tests.test_marks.TestMarks#test_skip", 5 | "historyId" : "eb011bb6dddaca67825f907e6ca79aea", 6 | "time" : { 7 | "start" : 1591177964284, 8 | "stop" : 1591177964284, 9 | "duration" : 0 10 | }, 11 | "description" : "\n 低于Python3.7版本不执行此条测试用例\n :return:\n ", 12 | "descriptionHtml" : "
    低于Python3.7版本不执行此条测试用例\n    :return:\n
\n", 13 | "status" : "passed", 14 | "flaky" : false, 15 | "newFailed" : false, 16 | "beforeStages" : [ ], 17 | "afterStages" : [ ], 18 | "labels" : [ { 19 | "name" : "parentSuite", 20 | "value" : "tests" 21 | }, { 22 | "name" : "suite", 23 | "value" : "test_marks" 24 | }, { 25 | "name" : "subSuite", 26 | "value" : "TestMarks" 27 | }, { 28 | "name" : "host", 29 | "value" : "LIUMENGJIAdeMacBook-Pro.local" 30 | }, { 31 | "name" : "thread", 32 | "value" : "78362-MainThread" 33 | }, { 34 | "name" : "framework", 35 | "value" : "pytest" 36 | }, { 37 | "name" : "language", 38 | "value" : "cpython3" 39 | }, { 40 | "name" : "package", 41 | "value" : "tests.test_marks" 42 | }, { 43 | "name" : "resultFormat", 44 | "value" : "allure2" 45 | } ], 46 | "parameters" : [ ], 47 | "links" : [ ], 48 | "hidden" : false, 49 | "retry" : false, 50 | "extra" : { 51 | "severity" : "normal", 52 | "retries" : [ { 53 | "uid" : "4083cee358707456", 54 | "status" : "passed", 55 | "time" : { 56 | "start" : 1591176793939, 57 | "stop" : 1591176793939, 58 | "duration" : 0 59 | } 60 | } ], 61 | "categories" : [ ], 62 | "tags" : [ ] 63 | }, 64 | "source" : "cdfa8a44b2fc3e29.json", 65 | "parameterValues" : [ ] 66 | } -------------------------------------------------------------------------------- /report/data/test-cases/d04bb8ebfe78aa7a.json: -------------------------------------------------------------------------------- 1 | { 2 | "uid" : "d04bb8ebfe78aa7a", 3 | "name" : "test_authors", 4 | "fullName" : "tests.test_json_path#test_authors", 5 | "historyId" : "6b7a3e10181021d4e6a1473e2305a905", 6 | "time" : { 7 | "start" : 1591177964233, 8 | "stop" : 1591177964233, 9 | "duration" : 0 10 | }, 11 | "description" : "\n '$.store.book[*].author'表示store节点下book结点下所有对象的author值\n ", 12 | "descriptionHtml" : "
'$.store.book[*].author'表示store节点下book结点下所有对象的author值\n
\n", 13 | "status" : "passed", 14 | "flaky" : false, 15 | "newFailed" : false, 16 | "beforeStages" : [ ], 17 | "afterStages" : [ ], 18 | "labels" : [ { 19 | "name" : "parentSuite", 20 | "value" : "tests" 21 | }, { 22 | "name" : "suite", 23 | "value" : "test_json_path" 24 | }, { 25 | "name" : "host", 26 | "value" : "LIUMENGJIAdeMacBook-Pro.local" 27 | }, { 28 | "name" : "thread", 29 | "value" : "78362-MainThread" 30 | }, { 31 | "name" : "framework", 32 | "value" : "pytest" 33 | }, { 34 | "name" : "language", 35 | "value" : "cpython3" 36 | }, { 37 | "name" : "package", 38 | "value" : "tests.test_json_path" 39 | }, { 40 | "name" : "resultFormat", 41 | "value" : "allure2" 42 | } ], 43 | "parameters" : [ ], 44 | "links" : [ ], 45 | "hidden" : false, 46 | "retry" : false, 47 | "extra" : { 48 | "severity" : "normal", 49 | "retries" : [ { 50 | "uid" : "bd9114b81d693e30", 51 | "status" : "passed", 52 | "time" : { 53 | "start" : 1591176793891, 54 | "stop" : 1591176793892, 55 | "duration" : 1 56 | } 57 | } ], 58 | "categories" : [ ], 59 | "tags" : [ ] 60 | }, 61 | "source" : "d04bb8ebfe78aa7a.json", 62 | "parameterValues" : [ ] 63 | } -------------------------------------------------------------------------------- /report/data/test-cases/da7c65d42c018464.json: -------------------------------------------------------------------------------- 1 | { 2 | "uid" : "da7c65d42c018464", 3 | "name" : "test_delete_shopping_trolley", 4 | "fullName" : "tests.test_shopping_trolley.TestShoppingTrolley#test_delete_shopping_trolley", 5 | "historyId" : "b6da4bda0427c8126528f5b5f455beb8", 6 | "time" : { 7 | "start" : 1591176793996, 8 | "stop" : 1591176793996, 9 | "duration" : 0 10 | }, 11 | "status" : "skipped", 12 | "statusMessage" : "Skipped: 本次不执行", 13 | "statusTrace" : "('tests/test_shopping_trolley.py', 33, 'Skipped: 本次不执行')", 14 | "flaky" : false, 15 | "newFailed" : false, 16 | "beforeStages" : [ ], 17 | "afterStages" : [ ], 18 | "labels" : [ { 19 | "name" : "story", 20 | "value" : "删除购物车中商品" 21 | }, { 22 | "name" : "feature", 23 | "value" : "购物车功能" 24 | }, { 25 | "name" : "parentSuite", 26 | "value" : "tests" 27 | }, { 28 | "name" : "suite", 29 | "value" : "test_shopping_trolley" 30 | }, { 31 | "name" : "subSuite", 32 | "value" : "TestShoppingTrolley" 33 | }, { 34 | "name" : "host", 35 | "value" : "LIUMENGJIAdeMacBook-Pro.local" 36 | }, { 37 | "name" : "thread", 38 | "value" : "78122-MainThread" 39 | }, { 40 | "name" : "framework", 41 | "value" : "pytest" 42 | }, { 43 | "name" : "language", 44 | "value" : "cpython3" 45 | }, { 46 | "name" : "package", 47 | "value" : "tests.test_shopping_trolley" 48 | }, { 49 | "name" : "resultFormat", 50 | "value" : "allure2" 51 | } ], 52 | "parameters" : [ ], 53 | "links" : [ ], 54 | "hidden" : true, 55 | "retry" : true, 56 | "extra" : { 57 | "categories" : [ ], 58 | "tags" : [ ] 59 | }, 60 | "source" : "da7c65d42c018464.json", 61 | "parameterValues" : [ ] 62 | } -------------------------------------------------------------------------------- /report/data/test-cases/dbdea8d8dcb63502.json: -------------------------------------------------------------------------------- 1 | { 2 | "uid" : "dbdea8d8dcb63502", 3 | "name" : "test_set", 4 | "fullName" : "tests.test_assertions.TestCollections#test_set", 5 | "historyId" : "ab5141e061250e4f2638fbbce67d3ff0", 6 | "time" : { 7 | "start" : 1591176793781, 8 | "stop" : 1591176793781, 9 | "duration" : 0 10 | }, 11 | "status" : "failed", 12 | "statusMessage" : "AssertionError: assert {0, 1, 11, 23} == {0, 2, 11}\n Extra items in the left set:\n 1\n 23\n Extra items in the right set:\n 2\n Use -v to get the full diff", 13 | "statusTrace" : "self = \n\n def test_set(self):\n> assert {0,1,11,23} == {0,11,2}\nE assert {0, 1, 11, 23} == {0, 2, 11}\nE Extra items in the left set:\nE 1\nE 23\nE Extra items in the right set:\nE 2\nE Use -v to get the full diff\n\ntests/test_assertions.py:56: AssertionError", 14 | "flaky" : false, 15 | "newFailed" : false, 16 | "beforeStages" : [ ], 17 | "afterStages" : [ ], 18 | "labels" : [ { 19 | "name" : "parentSuite", 20 | "value" : "tests" 21 | }, { 22 | "name" : "suite", 23 | "value" : "test_assertions" 24 | }, { 25 | "name" : "subSuite", 26 | "value" : "TestCollections" 27 | }, { 28 | "name" : "host", 29 | "value" : "LIUMENGJIAdeMacBook-Pro.local" 30 | }, { 31 | "name" : "thread", 32 | "value" : "78122-MainThread" 33 | }, { 34 | "name" : "framework", 35 | "value" : "pytest" 36 | }, { 37 | "name" : "language", 38 | "value" : "cpython3" 39 | }, { 40 | "name" : "package", 41 | "value" : "tests.test_assertions" 42 | }, { 43 | "name" : "resultFormat", 44 | "value" : "allure2" 45 | } ], 46 | "parameters" : [ ], 47 | "links" : [ ], 48 | "hidden" : true, 49 | "retry" : true, 50 | "extra" : { 51 | "categories" : [ ], 52 | "tags" : [ ] 53 | }, 54 | "source" : "dbdea8d8dcb63502.json", 55 | "parameterValues" : [ ] 56 | } -------------------------------------------------------------------------------- /report/data/test-cases/ddfa27fbcc34eda9.json: -------------------------------------------------------------------------------- 1 | { 2 | "uid" : "ddfa27fbcc34eda9", 3 | "name" : "test_list2", 4 | "fullName" : "tests.test_assertions.TestCollections#test_list2", 5 | "historyId" : "8799213a80221460c5a992f412a8b00c", 6 | "time" : { 7 | "start" : 1591176793772, 8 | "stop" : 1591176793773, 9 | "duration" : 1 10 | }, 11 | "status" : "failed", 12 | "statusMessage" : "AssertionError: assert [0, 1, 2] == [0, 1, [1, 2]]\n At index 2 diff: 2 != [1, 2]\n Use -v to get the full diff", 13 | "statusTrace" : "self = \n\n def test_list2(self):\n> assert [0,1,2] == [0,1,[1,2]]\nE assert [0, 1, 2] == [0, 1, [1, 2]]\nE At index 2 diff: 2 != [1, 2]\nE Use -v to get the full diff\n\ntests/test_assertions.py:50: AssertionError", 14 | "flaky" : false, 15 | "newFailed" : false, 16 | "beforeStages" : [ ], 17 | "afterStages" : [ ], 18 | "labels" : [ { 19 | "name" : "parentSuite", 20 | "value" : "tests" 21 | }, { 22 | "name" : "suite", 23 | "value" : "test_assertions" 24 | }, { 25 | "name" : "subSuite", 26 | "value" : "TestCollections" 27 | }, { 28 | "name" : "host", 29 | "value" : "LIUMENGJIAdeMacBook-Pro.local" 30 | }, { 31 | "name" : "thread", 32 | "value" : "78122-MainThread" 33 | }, { 34 | "name" : "framework", 35 | "value" : "pytest" 36 | }, { 37 | "name" : "language", 38 | "value" : "cpython3" 39 | }, { 40 | "name" : "package", 41 | "value" : "tests.test_assertions" 42 | }, { 43 | "name" : "resultFormat", 44 | "value" : "allure2" 45 | } ], 46 | "parameters" : [ ], 47 | "links" : [ ], 48 | "hidden" : true, 49 | "retry" : true, 50 | "extra" : { 51 | "categories" : [ ], 52 | "tags" : [ ] 53 | }, 54 | "source" : "ddfa27fbcc34eda9.json", 55 | "parameterValues" : [ ] 56 | } -------------------------------------------------------------------------------- /report/data/test-cases/dea8cb3c4403bbd8.json: -------------------------------------------------------------------------------- 1 | { 2 | "uid" : "dea8cb3c4403bbd8", 3 | "name" : "test_time_distance_v0[a1-b1-expected1]", 4 | "fullName" : "tests.test_time#test_time_distance_v0", 5 | "historyId" : "20dd453a94d0b086e6cdb13be07e43d0", 6 | "time" : { 7 | "start" : 1591177965672, 8 | "stop" : 1591177965673, 9 | "duration" : 1 10 | }, 11 | "status" : "passed", 12 | "flaky" : false, 13 | "newFailed" : false, 14 | "beforeStages" : [ ], 15 | "afterStages" : [ ], 16 | "labels" : [ { 17 | "name" : "parentSuite", 18 | "value" : "tests" 19 | }, { 20 | "name" : "suite", 21 | "value" : "test_time" 22 | }, { 23 | "name" : "host", 24 | "value" : "LIUMENGJIAdeMacBook-Pro.local" 25 | }, { 26 | "name" : "thread", 27 | "value" : "78362-MainThread" 28 | }, { 29 | "name" : "framework", 30 | "value" : "pytest" 31 | }, { 32 | "name" : "language", 33 | "value" : "cpython3" 34 | }, { 35 | "name" : "package", 36 | "value" : "tests.test_time" 37 | }, { 38 | "name" : "resultFormat", 39 | "value" : "allure2" 40 | } ], 41 | "parameters" : [ { 42 | "name" : "a", 43 | "value" : "datetime.datetime(2020, 12, 11, 0, 0)" 44 | }, { 45 | "name" : "b", 46 | "value" : "datetime.datetime(2020, 12, 12, 0, 0)" 47 | }, { 48 | "name" : "expected", 49 | "value" : "datetime.timedelta(days=-1)" 50 | } ], 51 | "links" : [ ], 52 | "hidden" : false, 53 | "retry" : false, 54 | "extra" : { 55 | "severity" : "normal", 56 | "retries" : [ { 57 | "uid" : "27956cc7230c8b32", 58 | "status" : "passed", 59 | "time" : { 60 | "start" : 1591176795261, 61 | "stop" : 1591176795261, 62 | "duration" : 0 63 | } 64 | } ], 65 | "categories" : [ ], 66 | "tags" : [ ] 67 | }, 68 | "source" : "dea8cb3c4403bbd8.json", 69 | "parameterValues" : [ "datetime.datetime(2020, 12, 11, 0, 0)", "datetime.datetime(2020, 12, 12, 0, 0)", "datetime.timedelta(days=-1)" ] 70 | } -------------------------------------------------------------------------------- /report/data/test-cases/df4a90822723a38b.json: -------------------------------------------------------------------------------- 1 | { 2 | "uid" : "df4a90822723a38b", 3 | "name" : "test_list3", 4 | "fullName" : "tests.test_assertions.TestCollections#test_list3", 5 | "historyId" : "f41f6d01134d681b0f77d0ee8debd4ef", 6 | "time" : { 7 | "start" : 1591176793776, 8 | "stop" : 1591176793777, 9 | "duration" : 1 10 | }, 11 | "status" : "failed", 12 | "statusMessage" : "AssertionError: assert 2 in [0, 1, [1, 2]]", 13 | "statusTrace" : "self = \n\n def test_list3(self):\n> assert 2 in [0,1,[1,2]]\nE assert 2 in [0, 1, [1, 2]]\n\ntests/test_assertions.py:53: AssertionError", 14 | "flaky" : false, 15 | "newFailed" : false, 16 | "beforeStages" : [ ], 17 | "afterStages" : [ ], 18 | "labels" : [ { 19 | "name" : "parentSuite", 20 | "value" : "tests" 21 | }, { 22 | "name" : "suite", 23 | "value" : "test_assertions" 24 | }, { 25 | "name" : "subSuite", 26 | "value" : "TestCollections" 27 | }, { 28 | "name" : "host", 29 | "value" : "LIUMENGJIAdeMacBook-Pro.local" 30 | }, { 31 | "name" : "thread", 32 | "value" : "78122-MainThread" 33 | }, { 34 | "name" : "framework", 35 | "value" : "pytest" 36 | }, { 37 | "name" : "language", 38 | "value" : "cpython3" 39 | }, { 40 | "name" : "package", 41 | "value" : "tests.test_assertions" 42 | }, { 43 | "name" : "resultFormat", 44 | "value" : "allure2" 45 | } ], 46 | "parameters" : [ ], 47 | "links" : [ ], 48 | "hidden" : true, 49 | "retry" : true, 50 | "extra" : { 51 | "categories" : [ ], 52 | "tags" : [ ] 53 | }, 54 | "source" : "df4a90822723a38b.json", 55 | "parameterValues" : [ ] 56 | } -------------------------------------------------------------------------------- /report/data/test-cases/e55c687bf967544c.json: -------------------------------------------------------------------------------- 1 | { 2 | "uid" : "e55c687bf967544c", 3 | "name" : "test_zero_divison", 4 | "fullName" : "tests.test_assertions#test_zero_divison", 5 | "historyId" : "a3f01f05f43e1c312d06cc3fb4e34b81", 6 | "time" : { 7 | "start" : 1591177964108, 8 | "stop" : 1591177964109, 9 | "duration" : 1 10 | }, 11 | "status" : "passed", 12 | "flaky" : false, 13 | "newFailed" : false, 14 | "beforeStages" : [ ], 15 | "afterStages" : [ ], 16 | "labels" : [ { 17 | "name" : "parentSuite", 18 | "value" : "tests" 19 | }, { 20 | "name" : "suite", 21 | "value" : "test_assertions" 22 | }, { 23 | "name" : "host", 24 | "value" : "LIUMENGJIAdeMacBook-Pro.local" 25 | }, { 26 | "name" : "thread", 27 | "value" : "78362-MainThread" 28 | }, { 29 | "name" : "framework", 30 | "value" : "pytest" 31 | }, { 32 | "name" : "language", 33 | "value" : "cpython3" 34 | }, { 35 | "name" : "package", 36 | "value" : "tests.test_assertions" 37 | }, { 38 | "name" : "resultFormat", 39 | "value" : "allure2" 40 | } ], 41 | "parameters" : [ ], 42 | "links" : [ ], 43 | "hidden" : false, 44 | "retry" : false, 45 | "extra" : { 46 | "severity" : "normal", 47 | "retries" : [ { 48 | "uid" : "2ebc2ac08a1108fa", 49 | "status" : "passed", 50 | "time" : { 51 | "start" : 1591176793784, 52 | "stop" : 1591176793784, 53 | "duration" : 0 54 | } 55 | } ], 56 | "categories" : [ ], 57 | "tags" : [ ] 58 | }, 59 | "source" : "e55c687bf967544c.json", 60 | "parameterValues" : [ ] 61 | } -------------------------------------------------------------------------------- /report/data/test-cases/f4ff9fb1337d51a1.json: -------------------------------------------------------------------------------- 1 | { 2 | "uid" : "f4ff9fb1337d51a1", 3 | "name" : "test_2books_cheap_than_10", 4 | "fullName" : "tests.test_json_path#test_2books_cheap_than_10", 5 | "historyId" : "93799719dae2347edf65381bc2104c04", 6 | "time" : { 7 | "start" : 1591176793913, 8 | "stop" : 1591176793913, 9 | "duration" : 0 10 | }, 11 | "description" : "\n '$..book[?(@.price<10)]'表示根节点下book属性的所有price小于10的元素\n ", 12 | "descriptionHtml" : "
'$..book[?(@.price<10)]'表示根节点下book属性的所有price小于10的元素\n
\n", 13 | "status" : "passed", 14 | "flaky" : false, 15 | "newFailed" : false, 16 | "beforeStages" : [ ], 17 | "afterStages" : [ ], 18 | "labels" : [ { 19 | "name" : "parentSuite", 20 | "value" : "tests" 21 | }, { 22 | "name" : "suite", 23 | "value" : "test_json_path" 24 | }, { 25 | "name" : "host", 26 | "value" : "LIUMENGJIAdeMacBook-Pro.local" 27 | }, { 28 | "name" : "thread", 29 | "value" : "78122-MainThread" 30 | }, { 31 | "name" : "framework", 32 | "value" : "pytest" 33 | }, { 34 | "name" : "language", 35 | "value" : "cpython3" 36 | }, { 37 | "name" : "package", 38 | "value" : "tests.test_json_path" 39 | }, { 40 | "name" : "resultFormat", 41 | "value" : "allure2" 42 | } ], 43 | "parameters" : [ ], 44 | "links" : [ ], 45 | "hidden" : true, 46 | "retry" : true, 47 | "extra" : { 48 | "categories" : [ ], 49 | "tags" : [ ] 50 | }, 51 | "source" : "f4ff9fb1337d51a1.json", 52 | "parameterValues" : [ ] 53 | } -------------------------------------------------------------------------------- /report/data/test-cases/fe66e1f042b3545e.json: -------------------------------------------------------------------------------- 1 | { 2 | "uid" : "fe66e1f042b3545e", 3 | "name" : "test_last_book_isbn", 4 | "fullName" : "tests.test_json_path#test_last_book_isbn", 5 | "historyId" : "5556f409e8149ad409291b5b9881416f", 6 | "time" : { 7 | "start" : 1591176793905, 8 | "stop" : 1591176793905, 9 | "duration" : 0 10 | }, 11 | "status" : "failed", 12 | "statusMessage" : "AssertionError: assert ['0-395-19395-8'] == '1-395-19395-8'", 13 | "statusTrace" : "def test_last_book_isbn():\n last_book_isbn = jsonpath.jsonpath(response, f'$.store.book[-1:].isbn')\n # last_book_isbn = jsonpath.jsonpath(response, f'$.store.book[(@.length-1)].isbn')\n> assert last_book_isbn == \"1-395-19395-8\"\nE AssertionError: assert ['0-395-19395-8'] == '1-395-19395-8'\n\ntests/test_json_path.py:79: AssertionError", 14 | "flaky" : false, 15 | "newFailed" : false, 16 | "beforeStages" : [ ], 17 | "afterStages" : [ ], 18 | "labels" : [ { 19 | "name" : "parentSuite", 20 | "value" : "tests" 21 | }, { 22 | "name" : "suite", 23 | "value" : "test_json_path" 24 | }, { 25 | "name" : "host", 26 | "value" : "LIUMENGJIAdeMacBook-Pro.local" 27 | }, { 28 | "name" : "thread", 29 | "value" : "78122-MainThread" 30 | }, { 31 | "name" : "framework", 32 | "value" : "pytest" 33 | }, { 34 | "name" : "language", 35 | "value" : "cpython3" 36 | }, { 37 | "name" : "package", 38 | "value" : "tests.test_json_path" 39 | }, { 40 | "name" : "resultFormat", 41 | "value" : "allure2" 42 | } ], 43 | "parameters" : [ ], 44 | "links" : [ ], 45 | "hidden" : true, 46 | "retry" : true, 47 | "extra" : { 48 | "categories" : [ ], 49 | "tags" : [ ] 50 | }, 51 | "source" : "fe66e1f042b3545e.json", 52 | "parameterValues" : [ ] 53 | } -------------------------------------------------------------------------------- /report/export/influxDbData.txt: -------------------------------------------------------------------------------- 1 | launch_status failed=17 1591178139000000000 2 | launch_status broken=1 1591178139000000000 3 | launch_status passed=13 1591178139000000000 4 | launch_status skipped=4 1591178139000000000 5 | launch_status unknown=0 1591178139000000000 6 | launch_time duration=1676 1591178139000000000 7 | launch_time min_duration=0 1591178139000000000 8 | launch_time max_duration=62 1591178139000000000 9 | launch_time sum_duration=162 1591178139000000000 10 | launch_problems product_defects=17 1591178139000000000 11 | launch_problems test_defects=1 1591178139000000000 12 | launch_retries retries=35 1591178139000000000 13 | launch_retries run=35 1591178139000000000 14 | -------------------------------------------------------------------------------- /report/export/mail.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Allure Report summary mail 6 | 7 | 8 | Mail body 9 | 10 | 11 | -------------------------------------------------------------------------------- /report/export/prometheusData.txt: -------------------------------------------------------------------------------- 1 | launch_status_failed 17 2 | launch_status_broken 1 3 | launch_status_passed 13 4 | launch_status_skipped 4 5 | launch_status_unknown 0 6 | launch_time_duration 1676 7 | launch_time_min_duration 0 8 | launch_time_max_duration 62 9 | launch_time_sum_duration 162 10 | launch_problems_product_defects 17 11 | launch_problems_test_defects 1 12 | launch_retries_retries 35 13 | launch_retries_run 35 14 | -------------------------------------------------------------------------------- /report/favicon.ico: -------------------------------------------------------------------------------- 1 | module.exports = __webpack_public_path__ + "favicon.ico"; -------------------------------------------------------------------------------- /report/history/categories-trend.json: -------------------------------------------------------------------------------- 1 | [ { 2 | "data" : { 3 | "Product defects" : 17, 4 | "Test defects" : 1 5 | } 6 | } ] -------------------------------------------------------------------------------- /report/history/duration-trend.json: -------------------------------------------------------------------------------- 1 | [ { 2 | "data" : { 3 | "duration" : 1676 4 | } 5 | } ] -------------------------------------------------------------------------------- /report/history/history-trend.json: -------------------------------------------------------------------------------- 1 | [ { 2 | "data" : { 3 | "failed" : 17, 4 | "broken" : 1, 5 | "skipped" : 4, 6 | "passed" : 13, 7 | "unknown" : 0, 8 | "total" : 35 9 | } 10 | } ] -------------------------------------------------------------------------------- /report/history/retry-trend.json: -------------------------------------------------------------------------------- 1 | [ { 2 | "data" : { 3 | "run" : 35, 4 | "retry" : 35 5 | } 6 | } ] -------------------------------------------------------------------------------- /report/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Allure Report 6 | 7 | 8 | 9 | 10 | 11 |
12 |
13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /report/plugins/packages/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | allure.api.addTranslation('en', { 4 | tab: { 5 | packages: { 6 | name: 'Packages' 7 | } 8 | } 9 | }); 10 | 11 | allure.api.addTranslation('ru', { 12 | tab: { 13 | packages: { 14 | name: 'Пакеты' 15 | } 16 | } 17 | }); 18 | 19 | allure.api.addTranslation('zh', { 20 | tab: { 21 | packages: { 22 | name: '包' 23 | } 24 | } 25 | }); 26 | 27 | allure.api.addTranslation('de', { 28 | tab: { 29 | packages: { 30 | name: 'Pakete' 31 | } 32 | } 33 | }); 34 | 35 | allure.api.addTranslation('he', { 36 | tab: { 37 | packages: { 38 | name: 'חבילות' 39 | } 40 | } 41 | }); 42 | 43 | allure.api.addTranslation('br', { 44 | tab: { 45 | packages: { 46 | name: 'Pacotes' 47 | } 48 | } 49 | }); 50 | 51 | allure.api.addTranslation('ja', { 52 | tab: { 53 | packages: { 54 | name: 'パッケージ' 55 | } 56 | } 57 | }); 58 | 59 | allure.api.addTranslation('es', { 60 | tab: { 61 | packages: { 62 | name: 'Paquetes' 63 | } 64 | } 65 | }); 66 | 67 | allure.api.addTranslation('kr', { 68 | tab: { 69 | packages: { 70 | name: '패키지' 71 | } 72 | } 73 | }); 74 | 75 | allure.api.addTab('packages', { 76 | title: 'tab.packages.name', icon: 'fa fa-align-left', 77 | route: 'packages(/)(:testGroup)(/)(:testResult)(/)(:testResultTab)(/)', 78 | onEnter: (function (testGroup, testResult, testResultTab) { 79 | return new allure.components.TreeLayout({ 80 | testGroup: testGroup, 81 | testResult: testResult, 82 | testResultTab: testResultTab, 83 | tabName: 'tab.packages.name', 84 | baseUrl: 'packages', 85 | url: 'data/packages.json' 86 | }); 87 | }) 88 | }); 89 | -------------------------------------------------------------------------------- /report/plugins/screen-diff/styles.css: -------------------------------------------------------------------------------- 1 | .screen-diff__switchers { 2 | margin-bottom: 1em; 3 | } 4 | 5 | .screen-diff__switchers label + label { 6 | margin-left: 1em; 7 | } 8 | 9 | .screen-diff__overlay { 10 | position: relative; 11 | cursor: col-resize; 12 | } 13 | 14 | .screen-diff__container { 15 | overflow-x: auto; 16 | } 17 | 18 | .screen-diff__image-over { 19 | top: 0; 20 | left: 0; 21 | bottom: 0; 22 | background: #fff; 23 | position: absolute; 24 | overflow: hidden; 25 | box-shadow: 2px 0 1px -1px #aaa; 26 | } 27 | -------------------------------------------------------------------------------- /report/widgets/behaviors.json: -------------------------------------------------------------------------------- 1 | { 2 | "total" : 32, 3 | "items" : [ { 4 | "uid" : "13107ad838d9e0b8da43e1b977ff0d34", 5 | "name" : "购物车功能", 6 | "statistic" : { 7 | "failed" : 1, 8 | "broken" : 0, 9 | "skipped" : 1, 10 | "passed" : 1, 11 | "unknown" : 0, 12 | "total" : 3 13 | } 14 | }, { 15 | "uid" : "ab5e9c410b7333d3e15b816094ba5c5c", 16 | "name" : "获取电影列表", 17 | "statistic" : { 18 | "failed" : 0, 19 | "broken" : 0, 20 | "skipped" : 0, 21 | "passed" : 1, 22 | "unknown" : 0, 23 | "total" : 1 24 | } 25 | } ] 26 | } -------------------------------------------------------------------------------- /report/widgets/categories-trend.json: -------------------------------------------------------------------------------- 1 | [ { 2 | "data" : { 3 | "Product defects" : 17, 4 | "Test defects" : 1 5 | } 6 | } ] -------------------------------------------------------------------------------- /report/widgets/categories.json: -------------------------------------------------------------------------------- 1 | { 2 | "total" : 2, 3 | "items" : [ { 4 | "uid" : "8fb3a91ba5aaf9de24cc8a92edc82b5d", 5 | "name" : "Product defects", 6 | "statistic" : { 7 | "failed" : 17, 8 | "broken" : 0, 9 | "skipped" : 0, 10 | "passed" : 0, 11 | "unknown" : 0, 12 | "total" : 17 13 | } 14 | }, { 15 | "uid" : "bdbf199525818fae7a8651db9eafe741", 16 | "name" : "Test defects", 17 | "statistic" : { 18 | "failed" : 0, 19 | "broken" : 1, 20 | "skipped" : 0, 21 | "passed" : 0, 22 | "unknown" : 0, 23 | "total" : 1 24 | } 25 | } ] 26 | } -------------------------------------------------------------------------------- /report/widgets/duration-trend.json: -------------------------------------------------------------------------------- 1 | [ { 2 | "data" : { 3 | "duration" : 1676 4 | } 5 | } ] -------------------------------------------------------------------------------- /report/widgets/environment.json: -------------------------------------------------------------------------------- 1 | [ ] -------------------------------------------------------------------------------- /report/widgets/executors.json: -------------------------------------------------------------------------------- 1 | [ ] -------------------------------------------------------------------------------- /report/widgets/history-trend.json: -------------------------------------------------------------------------------- 1 | [ { 2 | "data" : { 3 | "failed" : 17, 4 | "broken" : 1, 5 | "skipped" : 4, 6 | "passed" : 13, 7 | "unknown" : 0, 8 | "total" : 35 9 | } 10 | } ] -------------------------------------------------------------------------------- /report/widgets/launch.json: -------------------------------------------------------------------------------- 1 | [ ] -------------------------------------------------------------------------------- /report/widgets/retry-trend.json: -------------------------------------------------------------------------------- 1 | [ { 2 | "data" : { 3 | "run" : 35, 4 | "retry" : 35 5 | } 6 | } ] -------------------------------------------------------------------------------- /report/widgets/suites.json: -------------------------------------------------------------------------------- 1 | { 2 | "total" : 1, 3 | "items" : [ { 4 | "uid" : "e387fa4bb326b54ea8c19c2822aba374", 5 | "name" : "tests", 6 | "statistic" : { 7 | "failed" : 17, 8 | "broken" : 1, 9 | "skipped" : 4, 10 | "passed" : 13, 11 | "unknown" : 0, 12 | "total" : 35 13 | } 14 | } ] 15 | } -------------------------------------------------------------------------------- /report/widgets/summary.json: -------------------------------------------------------------------------------- 1 | { 2 | "reportName" : "Allure Report", 3 | "testRuns" : [ ], 4 | "statistic" : { 5 | "failed" : 17, 6 | "broken" : 1, 7 | "skipped" : 4, 8 | "passed" : 13, 9 | "unknown" : 0, 10 | "total" : 35 11 | }, 12 | "time" : { 13 | "start" : 1591177963997, 14 | "stop" : 1591177965673, 15 | "duration" : 1676, 16 | "minDuration" : 0, 17 | "maxDuration" : 62, 18 | "sumDuration" : 162 19 | } 20 | } -------------------------------------------------------------------------------- /result/005c951e-54b5-489a-8604-bd41b2d53384-result.json: -------------------------------------------------------------------------------- 1 | {"name": "test_skip", "status": "passed", "description": "\n 低于Python3.7版本不执行此条测试用例\n :return:\n ", "start": 1591177964284, "stop": 1591177964284, "uuid": "580c5b60-84dc-484a-b626-e2b295a682fe", "historyId": "eb011bb6dddaca67825f907e6ca79aea", "testCaseId": "5582c256a731465074f42c8727eca4dd", "fullName": "tests.test_marks.TestMarks#test_skip", "labels": [{"name": "parentSuite", "value": "tests"}, {"name": "suite", "value": "test_marks"}, {"name": "subSuite", "value": "TestMarks"}, {"name": "host", "value": "LIUMENGJIAdeMacBook-Pro.local"}, {"name": "thread", "value": "78362-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "tests.test_marks"}]} -------------------------------------------------------------------------------- /result/0125fda6-499d-4df7-a406-db69d962b47e-result.json: -------------------------------------------------------------------------------- 1 | {"name": "test_in_theaters[验证响应中start和count与请求中的参数一致]", "status": "passed", "attachments": [{"name": "stdout", "source": "eba26e6b-6193-4c41-aa93-9fbadc0f6a9c-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "case", "value": "'验证响应中start和count与请求中的参数一致'"}, {"name": "http", "value": "{'method': 'GET', 'path': '/v2/movie/in_theaters', 'params': {'apikey': '0df993c66c0c636e29ecbb5344252a4a', 'start': 0, 'count': 10}}"}, {"name": "expected", "value": "{'response': {'title': '正在上映的电影-上海', 'count': 10, 'start': 0}}"}], "start": 1591177964113, "stop": 1591177964175, "uuid": "0c4d5d2e-b7b6-4dc5-968d-d7faf6dc2293", "historyId": "74b92abf603adb79ad179aa3e68d1ddc", "testCaseId": "b507d08de39442fefc429b327c33fb39", "fullName": "tests.test_in_theaters.TestInTheaters#test_in_theaters", "labels": [{"name": "story", "value": "获取电影列表"}, {"name": "feature", "value": "获取电影列表"}, {"name": "parentSuite", "value": "tests"}, {"name": "suite", "value": "test_in_theaters"}, {"name": "subSuite", "value": "TestInTheaters"}, {"name": "host", "value": "LIUMENGJIAdeMacBook-Pro.local"}, {"name": "thread", "value": "78362-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "tests.test_in_theaters"}]} -------------------------------------------------------------------------------- /result/04c267e8-a1b3-4a86-9060-4191239833fa-result.json: -------------------------------------------------------------------------------- 1 | {"name": "test_12_books_price", "status": "passed", "description": "\n '$..book[0,1]'表示根节点下递归查找所有的book属性值的第0个和第1个元素,\n ", "start": 1591177964251, "stop": 1591177964252, "uuid": "78792c36-01fc-419c-9bce-bcd8bbd93d6c", "historyId": "fe79a183ae7f53730e851b71fa2df5bd", "testCaseId": "cdb6f3bab0a3e125945425846e0be2d8", "fullName": "tests.test_json_path#test_12_books_price", "labels": [{"name": "parentSuite", "value": "tests"}, {"name": "suite", "value": "test_json_path"}, {"name": "host", "value": "LIUMENGJIAdeMacBook-Pro.local"}, {"name": "thread", "value": "78362-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "tests.test_json_path"}]} -------------------------------------------------------------------------------- /result/05fe35f3-91ca-49fc-b787-e821b58e8b46-result.json: -------------------------------------------------------------------------------- 1 | {"name": "test_list2", "status": "failed", "statusDetails": {"message": "AssertionError: assert [0, 1, 2] == [0, 1, [1, 2]]\n At index 2 diff: 2 != [1, 2]\n Full diff:\n - [0, 1, 2]\n + [0, 1, [1, 2]]\n ? ++++ +", "trace": "self = \n\n def test_list2(self):\n> assert [0,1,2] == [0,1,[1,2]]\nE assert [0, 1, 2] == [0, 1, [1, 2]]\nE At index 2 diff: 2 != [1, 2]\nE Full diff:\nE - [0, 1, 2]\nE + [0, 1, [1, 2]]\nE ? ++++ +\n\ntests/test_assertions.py:50: AssertionError"}, "start": 1591177964095, "stop": 1591177964096, "uuid": "2f9192ba-09cf-42a2-a4d2-1b1db74186cb", "historyId": "8799213a80221460c5a992f412a8b00c", "testCaseId": "1000bd682931fe10d0b28d18f717caa4", "fullName": "tests.test_assertions.TestCollections#test_list2", "labels": [{"name": "parentSuite", "value": "tests"}, {"name": "suite", "value": "test_assertions"}, {"name": "subSuite", "value": "TestCollections"}, {"name": "host", "value": "LIUMENGJIAdeMacBook-Pro.local"}, {"name": "thread", "value": "78362-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "tests.test_assertions"}]} -------------------------------------------------------------------------------- /result/070c5b47-3e3d-4ff5-8c05-f13e332f94f1-container.json: -------------------------------------------------------------------------------- 1 | {"uuid": "82401e5b-b55d-408d-bf8c-15cc8583570e", "children": ["d257939d-06bd-4032-b108-74c646051507"], "befores": [{"name": "preparation", "status": "passed", "start": 1591176793788, "stop": 1591176793788}], "afters": [{"name": "preparation::0", "status": "passed", "start": 1591176793846, "stop": 1591176793846}], "start": 1591176793788, "stop": 1591176793846} -------------------------------------------------------------------------------- /result/0aec122d-a707-4082-a241-a5ba549393f2-result.json: -------------------------------------------------------------------------------- 1 | {"name": "test_list3", "status": "failed", "statusDetails": {"message": "AssertionError: assert 2 in [0, 1, [1, 2]]", "trace": "self = \n\n def test_list3(self):\n> assert 2 in [0,1,[1,2]]\nE assert 2 in [0, 1, [1, 2]]\n\ntests/test_assertions.py:53: AssertionError"}, "start": 1591177964100, "stop": 1591177964100, "uuid": "f2b685e7-53b4-4cfd-9de0-e3f94105af7f", "historyId": "f41f6d01134d681b0f77d0ee8debd4ef", "testCaseId": "23ffd3bd274984d6f5445e18db01bc4f", "fullName": "tests.test_assertions.TestCollections#test_list3", "labels": [{"name": "parentSuite", "value": "tests"}, {"name": "suite", "value": "test_assertions"}, {"name": "subSuite", "value": "TestCollections"}, {"name": "host", "value": "LIUMENGJIAdeMacBook-Pro.local"}, {"name": "thread", "value": "78362-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "tests.test_assertions"}]} -------------------------------------------------------------------------------- /result/0b7bc01f-0bcb-47a8-aecb-87dd8a1319f5-result.json: -------------------------------------------------------------------------------- 1 | {"name": "test_list", "status": "failed", "statusDetails": {"message": "AssertionError: assert [0, 1, 2] == [0, 1, 3]\n At index 2 diff: 2 != 3\n Full diff:\n - [0, 1, 2]\n ? ^\n + [0, 1, 3]\n ? ^", "trace": "self = \n\n def test_list(self):\n list1 = [0,1,2]\n list2 = [0,1,3]\n> assert list1 == list2\nE assert [0, 1, 2] == [0, 1, 3]\nE At index 2 diff: 2 != 3\nE Full diff:\nE - [0, 1, 2]\nE ? ^\nE + [0, 1, 3]\nE ? ^\n\ntests/test_assertions.py:47: AssertionError"}, "start": 1591177964091, "stop": 1591177964091, "uuid": "01b65507-a283-41e6-9237-f5db3c29ff10", "historyId": "d8ea34b0a2033a4c3ac0689500e3d865", "testCaseId": "1b659a55a44766095001c6cad525f2e7", "fullName": "tests.test_assertions.TestCollections#test_list", "labels": [{"name": "parentSuite", "value": "tests"}, {"name": "suite", "value": "test_assertions"}, {"name": "subSuite", "value": "TestCollections"}, {"name": "host", "value": "LIUMENGJIAdeMacBook-Pro.local"}, {"name": "thread", "value": "78362-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "tests.test_assertions"}]} -------------------------------------------------------------------------------- /result/11398093-a916-4943-9da6-c6a56d0c9a81-attachment.txt: -------------------------------------------------------------------------------- 1 | 在数据库中准备测试数据 2 | 清理测试数据 3 | -------------------------------------------------------------------------------- /result/125135c4-e224-4472-a87e-2379031c5c85-container.json: -------------------------------------------------------------------------------- 1 | {"uuid": "9afac473-4564-4e40-a0c8-e85d451ce94d", "befores": [{"name": "expected", "status": "passed", "start": 1591177965672, "stop": 1591177965672}], "start": 1591177965672, "stop": 1591177965673} -------------------------------------------------------------------------------- /result/12761a21-75fa-4692-a518-0b88774b678f-result.json: -------------------------------------------------------------------------------- 1 | {"name": "test_func", "status": "failed", "statusDetails": {"message": "AssertionError: assert [1, 2, 3] == [1, 2, 4]\n At index 2 diff: 3 != 4\n Full diff:\n - [1, 2, 3]\n ? ^\n + [1, 2, 4]\n ? ^", "trace": "def test_func():\n def func():\n return [1,2,3]\n \n> assert func() == [1,2,4]\nE assert [1, 2, 3] == [1, 2, 4]\nE At index 2 diff: 3 != 4\nE Full diff:\nE - [1, 2, 3]\nE ? ^\nE + [1, 2, 4]\nE ? ^\n\ntests/test_assertions.py:33: AssertionError"}, "start": 1591177964078, "stop": 1591177964078, "uuid": "80ca3c01-f997-4790-a671-9f6478d82f97", "historyId": "c7deb80c02a641c44581a601d8aa78ec", "testCaseId": "ab2a61770e0e2adc57d2cc47c52ef550", "fullName": "tests.test_assertions#test_func", "labels": [{"name": "parentSuite", "value": "tests"}, {"name": "suite", "value": "test_assertions"}, {"name": "host", "value": "LIUMENGJIAdeMacBook-Pro.local"}, {"name": "thread", "value": "78362-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "tests.test_assertions"}]} -------------------------------------------------------------------------------- /result/1847daa5-7af0-4a3e-8ed4-9bcdcbb65eed-result.json: -------------------------------------------------------------------------------- 1 | {"name": "test_string_1", "status": "failed", "statusDetails": {"message": "AssertionError: assert 'spam' == 'eggs'\n - spam\n + eggs", "trace": "self = \n\n def test_string_1(self):\n> assert \"spam\" == \"eggs\"\nE AssertionError: assert 'spam' == 'eggs'\nE - spam\nE + eggs\n\ntests/test_assertions.py:15: AssertionError"}, "start": 1591177963997, "stop": 1591177963999, "uuid": "198b0cba-a235-47f4-8e02-a0245de6362e", "historyId": "9840158155a8e95498907c00567fd3f1", "testCaseId": "740b3702079c293bcfbe128088da1afd", "fullName": "tests.test_assertions.TestStringAssertions#test_string_1", "labels": [{"name": "parentSuite", "value": "tests"}, {"name": "suite", "value": "test_assertions"}, {"name": "subSuite", "value": "TestStringAssertions"}, {"name": "host", "value": "LIUMENGJIAdeMacBook-Pro.local"}, {"name": "thread", "value": "78362-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "tests.test_assertions"}]} -------------------------------------------------------------------------------- /result/19df00b7-a5aa-4dc4-a775-356b4c329399-container.json: -------------------------------------------------------------------------------- 1 | {"uuid": "783652e4-8876-4f44-8d4a-5f75417a8b94", "children": ["bdc05319-bdbb-489b-b56c-6891c62d7d5a"], "befores": [{"name": "preparation", "status": "passed", "start": 1591176793851, "stop": 1591176793851}], "afters": [{"name": "preparation::0", "status": "passed", "start": 1591176793886, "stop": 1591176793886}], "start": 1591176793851, "stop": 1591176793886} -------------------------------------------------------------------------------- /result/1af901ee-3e81-4588-8b33-ea77c0730bfa-result.json: -------------------------------------------------------------------------------- 1 | {"name": "test_in_theaters[验证响应中title是\"正在上映的电影-北京\"]", "status": "passed", "attachments": [{"name": "stdout", "source": "2b062f60-fc2c-4e6a-89cb-8a20a7c55ae9-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "case", "value": "'验证响应中title是\"正在上映的电影-北京\"'"}, {"name": "http", "value": "{'method': 'GET', 'path': '/v2/movie/in_theaters', 'params': {'apikey': '0df993c66c0c636e29ecbb5344252a4a', 'start': 1, 'count': 5}}"}, {"name": "expected", "value": "{}"}], "start": 1591176793852, "stop": 1591176793885, "uuid": "bdc05319-bdbb-489b-b56c-6891c62d7d5a", "historyId": "ff5b0c9bad743a81d517ef724a45dfa5", "testCaseId": "b507d08de39442fefc429b327c33fb39", "fullName": "tests.test_in_theaters.TestInTheaters#test_in_theaters", "labels": [{"name": "feature", "value": "获取电影列表"}, {"name": "story", "value": "获取电影列表"}, {"name": "parentSuite", "value": "tests"}, {"name": "suite", "value": "test_in_theaters"}, {"name": "subSuite", "value": "TestInTheaters"}, {"name": "host", "value": "LIUMENGJIAdeMacBook-Pro.local"}, {"name": "thread", "value": "78122-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "tests.test_in_theaters"}]} -------------------------------------------------------------------------------- /result/1d17bd64-5441-4e06-b5de-216e4cecaeae-result.json: -------------------------------------------------------------------------------- 1 | {"name": "test_time_distance_v0[a1-b1-expected1]", "status": "passed", "parameters": [{"name": "a", "value": "datetime.datetime(2020, 12, 11, 0, 0)"}, {"name": "b", "value": "datetime.datetime(2020, 12, 12, 0, 0)"}, {"name": "expected", "value": "datetime.timedelta(days=-1)"}], "start": 1591177965672, "stop": 1591177965673, "uuid": "c778340d-ee72-4343-94a4-e1b30ca08e36", "historyId": "20dd453a94d0b086e6cdb13be07e43d0", "testCaseId": "49494df4c1d6a00360f4279d2871b188", "fullName": "tests.test_time#test_time_distance_v0", "labels": [{"name": "parentSuite", "value": "tests"}, {"name": "suite", "value": "test_time"}, {"name": "host", "value": "LIUMENGJIAdeMacBook-Pro.local"}, {"name": "thread", "value": "78362-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "tests.test_time"}]} -------------------------------------------------------------------------------- /result/1f5c1764-6f7a-40da-959c-407c118435ae-container.json: -------------------------------------------------------------------------------- 1 | {"uuid": "80a5ae26-3bf5-4332-9560-172e84ee6e19", "befores": [{"name": "b", "status": "passed", "start": 1591177965667, "stop": 1591177965668}], "start": 1591177965667, "stop": 1591177965669} -------------------------------------------------------------------------------- /result/206d9084-260d-40ef-8dff-2e97e46106b7-container.json: -------------------------------------------------------------------------------- 1 | {"uuid": "e92d65ce-e4e8-4872-a76a-afbe52463393", "children": ["9a47b21a-a8e8-4e4c-8548-0213032ce412"], "befores": [{"name": "smtp_connection", "status": "passed", "start": 1591176793998, "stop": 1591176795232}], "afters": [{"name": "smtp_connection::0", "status": "passed", "start": 1591176795253, "stop": 1591176795253}], "start": 1591176793998, "stop": 1591176795253} -------------------------------------------------------------------------------- /result/2099ab8b-b706-4e7a-a9e0-9ba209b1610b-result.json: -------------------------------------------------------------------------------- 1 | {"name": "test_slow", "status": "failed", "statusDetails": {"message": "AssertionError: assert 0", "trace": "self = \n\n @pytest.mark.slow\n def test_slow(self):\n \"\"\"\n 自定义标签\n :return:\n \"\"\"\n> assert 0\nE assert 0\n\ntests/test_marks.py:55: AssertionError"}, "description": "\n 自定义标签\n :return:\n ", "start": 1591176793983, "stop": 1591176793984, "uuid": "fd08a01e-9b20-4c7b-a900-da32d7a3c79d", "historyId": "24b8435a3ca9cff8df9466c08f1734ab", "testCaseId": "6e1337c8350864614010574c5fcd552d", "fullName": "tests.test_marks.TestMarks#test_slow", "labels": [{"name": "tag", "value": "slow"}, {"name": "parentSuite", "value": "tests"}, {"name": "suite", "value": "test_marks"}, {"name": "subSuite", "value": "TestMarks"}, {"name": "host", "value": "LIUMENGJIAdeMacBook-Pro.local"}, {"name": "thread", "value": "78122-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "tests.test_marks"}]} -------------------------------------------------------------------------------- /result/2129bbaa-62be-4c53-bb91-fac839232133-result.json: -------------------------------------------------------------------------------- 1 | {"name": "test_all_price", "status": "passed", "description": "'$.store..price' 表示根节点的store属性下,递归查找price属性的值\n '$..price' 表示根节点下,递归查找price属性的值", "start": 1591177964237, "stop": 1591177964238, "uuid": "ecd17352-0d1c-49a7-8e5e-d0fada023671", "historyId": "28239e480d72964ebdc406c0c1eabf02", "testCaseId": "74d4d75fe1dcb34dda3df74fb4236f47", "fullName": "tests.test_json_path#test_all_price", "labels": [{"name": "parentSuite", "value": "tests"}, {"name": "suite", "value": "test_json_path"}, {"name": "host", "value": "LIUMENGJIAdeMacBook-Pro.local"}, {"name": "thread", "value": "78362-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "tests.test_json_path"}]} -------------------------------------------------------------------------------- /result/2285411c-a642-4c0f-bf2e-3b432880a8b7-result.json: -------------------------------------------------------------------------------- 1 | {"name": "test_xfail", "status": "skipped", "statusDetails": {"message": "AssertionError: assert 0", "trace": "self = \n\n @pytest.mark.xfail\n def test_xfail(self):\n \"\"\"\n Indicate that you expect it to fail\n 这条用例执行失败时,测试结果被标记为xfail(expected to fail),并且不打印错误信息。\n 这条用例执行成功时,测试结果被标记为xpassed(unexpectedly passing)\n :return:\n \"\"\"\n> assert 0\nE assert 0\n\ntests/test_marks.py:40: AssertionError"}, "description": "\n Indicate that you expect it to fail\n 这条用例执行失败时,测试结果被标记为xfail(expected to fail),并且不打印错误信息。\n 这条用例执行成功时,测试结果被标记为xpassed(unexpectedly passing)\n :return:\n ", "start": 1591176793940, "stop": 1591176793940, "uuid": "58617fd8-dbe9-4a9b-947e-d438b906a11c", "historyId": "a44cab49732a0aa43a757be1adf99317", "testCaseId": "bddf35a14fb9223139b80ad1c562cbae", "fullName": "tests.test_marks.TestMarks#test_xfail", "labels": [{"name": "tag", "value": "xfail"}, {"name": "parentSuite", "value": "tests"}, {"name": "suite", "value": "test_marks"}, {"name": "subSuite", "value": "TestMarks"}, {"name": "host", "value": "LIUMENGJIAdeMacBook-Pro.local"}, {"name": "thread", "value": "78122-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "tests.test_marks"}]} -------------------------------------------------------------------------------- /result/2549e766-e418-4289-a203-9972f8258aa6-result.json: -------------------------------------------------------------------------------- 1 | {"name": "test_ehlo", "status": "failed", "statusDetails": {"message": "AssertionError: assert 0", "trace": "smtp_connection = \n\n def test_ehlo(smtp_connection):\n response,msg = smtp_connection.ehlo()\n assert response == 250\n> assert 0\nE assert 0\n\ntests/test_smtpsimple.py:24: AssertionError"}, "attachments": [{"name": "stdout", "source": "b58d3e07-41a0-407d-825f-f2d1918aa38b-attachment.txt", "type": "text/plain"}], "start": 1591177965618, "stop": 1591177965656, "uuid": "206f9f22-a401-4ceb-99bf-a6b19cb30df9", "historyId": "e29378b302cb3225908136a163d4aa84", "testCaseId": "a33a7f6037c14255030c2653c8b19a1e", "fullName": "tests.test_smtpsimple#test_ehlo", "labels": [{"name": "parentSuite", "value": "tests"}, {"name": "suite", "value": "test_smtpsimple"}, {"name": "host", "value": "LIUMENGJIAdeMacBook-Pro.local"}, {"name": "thread", "value": "78362-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "tests.test_smtpsimple"}]} -------------------------------------------------------------------------------- /result/26085774-4467-43ab-bd26-4e31c1810ef9-result.json: -------------------------------------------------------------------------------- 1 | {"name": "test_dict", "status": "failed", "statusDetails": {"message": "AssertionError: assert {'a': 0, 'b': 1, 'c': 0} == {'a': 0, 'b': 2, 'd': 0}\n Omitting 1 identical items, use -vv to show\n Differing items:\n {'b': 1} != {'b': 2}\n Left contains 1 more item:\n {'c': 0}\n Right contains 1 more item:\n {'d': 0}...\n \n ...Full output truncated (2 lines hidden), use '-vv' to show", "trace": "self = \n\n def test_dict(self):\n> assert {\"a\": 0, \"b\": 1, \"c\": 0} == {\"a\": 0, \"b\": 2, \"d\": 0}\nE AssertionError: assert {'a': 0, 'b': 1, 'c': 0} == {'a': 0, 'b': 2, 'd': 0}\nE Omitting 1 identical items, use -vv to show\nE Differing items:\nE {'b': 1} != {'b': 2}\nE Left contains 1 more item:\nE {'c': 0}\nE Right contains 1 more item:\nE {'d': 0}...\nE \nE ...Full output truncated (2 lines hidden), use '-vv' to show\n\ntests/test_assertions.py:37: AssertionError"}, "start": 1591176793760, "stop": 1591176793761, "uuid": "f87eaa65-fea9-482a-801b-7f6f88f242f2", "historyId": "fbadd6e85ac32000fe33ad71fd497919", "testCaseId": "b8a67e94a89b9286b2be1140b9ed1bb2", "fullName": "tests.test_assertions.TestCollections#test_dict", "labels": [{"name": "parentSuite", "value": "tests"}, {"name": "suite", "value": "test_assertions"}, {"name": "subSuite", "value": "TestCollections"}, {"name": "host", "value": "LIUMENGJIAdeMacBook-Pro.local"}, {"name": "thread", "value": "78122-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "tests.test_assertions"}]} -------------------------------------------------------------------------------- /result/26e460dc-52b6-429b-b97e-b20a970d0440-container.json: -------------------------------------------------------------------------------- 1 | {"uuid": "208cedd4-14f0-4323-80d7-163d6a024615", "befores": [{"name": "http", "status": "passed", "start": 1591176793788, "stop": 1591176793788}], "start": 1591176793788, "stop": 1591176793847} -------------------------------------------------------------------------------- /result/2b062f60-fc2c-4e6a-89cb-8a20a7c55ae9-attachment.txt: -------------------------------------------------------------------------------- 1 | 在数据库中准备测试数据 2 | 清理测试数据 3 | -------------------------------------------------------------------------------- /result/2b94391c-e784-47d7-b9ca-ac4d3c681b8f-result.json: -------------------------------------------------------------------------------- 1 | {"name": "test_third_book", "status": "failed", "statusDetails": {"message": "AssertionError: assert 'Moby Dick' == 'Moby Dick!'\n - Moby Dick\n + Moby Dick!\n ? +", "trace": "def test_third_book():\n \"\"\"\n '$..book[2]'表示根节点下递归查找所有book属性中第3个对象,\n \n \"\"\"\n book_3 = jsonpath.jsonpath(response, '$.store.book[2]')\n> assert book_3[0]['title'] == \"Moby Dick!\"\nE AssertionError: assert 'Moby Dick' == 'Moby Dick!'\nE - Moby Dick\nE + Moby Dick!\nE ? +\n\ntests/test_json_path.py:73: AssertionError"}, "description": "\n '$..book[2]'表示根节点下递归查找所有book属性中第3个对象,\n\n ", "start": 1591176793900, "stop": 1591176793900, "uuid": "16a8b1fd-eb27-402c-b78c-fd96b241801d", "historyId": "bffa81c7bffb7ca85de23bee55c91547", "testCaseId": "edde08b311e8ffa771aa55e2f7da9605", "fullName": "tests.test_json_path#test_third_book", "labels": [{"name": "parentSuite", "value": "tests"}, {"name": "suite", "value": "test_json_path"}, {"name": "host", "value": "LIUMENGJIAdeMacBook-Pro.local"}, {"name": "thread", "value": "78122-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "tests.test_json_path"}]} -------------------------------------------------------------------------------- /result/2d0b5c8d-ecb5-4cb2-981d-e264cd6f5a7d-result.json: -------------------------------------------------------------------------------- 1 | {"name": "test_zero_divison", "status": "passed", "start": 1591177964108, "stop": 1591177964109, "uuid": "d87b90bc-43fc-4d92-b4d5-532190bfa014", "historyId": "a3f01f05f43e1c312d06cc3fb4e34b81", "testCaseId": "63f32f761693db36c9b8bb5418661412", "fullName": "tests.test_assertions#test_zero_divison", "labels": [{"name": "parentSuite", "value": "tests"}, {"name": "suite", "value": "test_assertions"}, {"name": "host", "value": "LIUMENGJIAdeMacBook-Pro.local"}, {"name": "thread", "value": "78362-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "tests.test_assertions"}]} -------------------------------------------------------------------------------- /result/3888b5ac-9191-406b-95cb-f1d6950f50c0-result.json: -------------------------------------------------------------------------------- 1 | {"name": "test_slice_with_step", "status": "passed", "start": 1591177964253, "stop": 1591177964254, "uuid": "1f8f07dc-ed6c-49eb-80cc-d1404907cbbe", "historyId": "ed2c6ce4f1fc21fd68e0ff2d8e776174", "testCaseId": "2a7b3b4c4619230cb8617d5d62f97929", "fullName": "tests.test_json_path#test_slice_with_step", "labels": [{"name": "parentSuite", "value": "tests"}, {"name": "suite", "value": "test_json_path"}, {"name": "host", "value": "LIUMENGJIAdeMacBook-Pro.local"}, {"name": "thread", "value": "78362-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "tests.test_json_path"}]} -------------------------------------------------------------------------------- /result/3f046caa-f17b-4482-96f7-c5aba0527066-result.json: -------------------------------------------------------------------------------- 1 | {"name": "test_all_price", "status": "passed", "description": "'$.store..price' 表示根节点的store属性下,递归查找price属性的值\n '$..price' 表示根节点下,递归查找price属性的值", "start": 1591176793897, "stop": 1591176793898, "uuid": "62a8a3f2-3838-4bcc-9ac0-b1b63113d016", "historyId": "28239e480d72964ebdc406c0c1eabf02", "testCaseId": "74d4d75fe1dcb34dda3df74fb4236f47", "fullName": "tests.test_json_path#test_all_price", "labels": [{"name": "parentSuite", "value": "tests"}, {"name": "suite", "value": "test_json_path"}, {"name": "host", "value": "LIUMENGJIAdeMacBook-Pro.local"}, {"name": "thread", "value": "78122-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "tests.test_json_path"}]} -------------------------------------------------------------------------------- /result/3f18aaca-626c-439d-94dc-7080cdd5809c-container.json: -------------------------------------------------------------------------------- 1 | {"uuid": "2754f471-613a-49cd-86e8-1e459b4d8b94", "befores": [{"name": "http", "status": "passed", "start": 1591177964112, "stop": 1591177964112}], "start": 1591177964112, "stop": 1591177964177} -------------------------------------------------------------------------------- /result/40acc8f2-4bff-45cc-bf18-946803602243-result.json: -------------------------------------------------------------------------------- 1 | {"name": "test_the_unknown", "status": "skipped", "statusDetails": {"message": "Skipped: not implememtation", "trace": "('tests/test_marks.py', 16, 'Skipped: not implememtation')"}, "description": "\n 跳过不执行,未实现\n :return:\n ", "start": 1591177964282, "stop": 1591177964282, "uuid": "86f93db9-4bf8-43eb-9b8f-c2a6a052498f", "historyId": "0f04f1214402bca66f5131dc06036b08", "testCaseId": "dc0113295d3643e0f7b2d24c9c04201d", "fullName": "tests.test_marks.TestMarks#test_the_unknown", "labels": [{"name": "parentSuite", "value": "tests"}, {"name": "suite", "value": "test_marks"}, {"name": "subSuite", "value": "TestMarks"}, {"name": "host", "value": "LIUMENGJIAdeMacBook-Pro.local"}, {"name": "thread", "value": "78362-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "tests.test_marks"}]} -------------------------------------------------------------------------------- /result/44e6bc52-cb5e-4596-bce7-bf858f53b22d-attachment.txt: -------------------------------------------------------------------------------- 1 | teardown smtp 2 | -------------------------------------------------------------------------------- /result/488cf311-c631-408c-a7be-0132477830f8-result.json: -------------------------------------------------------------------------------- 1 | {"name": "test_slow", "status": "failed", "statusDetails": {"message": "AssertionError: assert 0", "trace": "self = \n\n @pytest.mark.slow\n def test_slow(self):\n \"\"\"\n 自定义标签\n :return:\n \"\"\"\n> assert 0\nE assert 0\n\ntests/test_marks.py:55: AssertionError"}, "description": "\n 自定义标签\n :return:\n ", "start": 1591177964336, "stop": 1591177964336, "uuid": "de8b336f-f508-4472-aaec-5437a84f3be7", "historyId": "24b8435a3ca9cff8df9466c08f1734ab", "testCaseId": "6e1337c8350864614010574c5fcd552d", "fullName": "tests.test_marks.TestMarks#test_slow", "labels": [{"name": "tag", "value": "slow"}, {"name": "parentSuite", "value": "tests"}, {"name": "suite", "value": "test_marks"}, {"name": "subSuite", "value": "TestMarks"}, {"name": "host", "value": "LIUMENGJIAdeMacBook-Pro.local"}, {"name": "thread", "value": "78362-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "tests.test_marks"}]} -------------------------------------------------------------------------------- /result/4a69954e-966d-4e63-9f59-4bdf25f4ca1c-container.json: -------------------------------------------------------------------------------- 1 | {"uuid": "8204e559-c230-46cd-a9c0-d7b1c41a9010", "befores": [{"name": "b", "status": "passed", "start": 1591176795256, "stop": 1591176795256}], "start": 1591176795256, "stop": 1591176795258} -------------------------------------------------------------------------------- /result/4b3a31b4-67e2-4b11-82a9-15b550b69839-result.json: -------------------------------------------------------------------------------- 1 | {"name": "test_the_unknown", "status": "skipped", "statusDetails": {"message": "Skipped: not implememtation", "trace": "('tests/test_marks.py', 16, 'Skipped: not implememtation')"}, "description": "\n 跳过不执行,未实现\n :return:\n ", "start": 1591176793936, "stop": 1591176793936, "uuid": "be3a11fe-afbc-4140-a3e5-3d6d11ac1c0d", "historyId": "0f04f1214402bca66f5131dc06036b08", "testCaseId": "dc0113295d3643e0f7b2d24c9c04201d", "fullName": "tests.test_marks.TestMarks#test_the_unknown", "labels": [{"name": "parentSuite", "value": "tests"}, {"name": "suite", "value": "test_marks"}, {"name": "subSuite", "value": "TestMarks"}, {"name": "host", "value": "LIUMENGJIAdeMacBook-Pro.local"}, {"name": "thread", "value": "78122-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "tests.test_marks"}]} -------------------------------------------------------------------------------- /result/4b6ed420-2f43-478c-9c90-c4d50e21244c-container.json: -------------------------------------------------------------------------------- 1 | {"uuid": "783a627b-27c2-4e28-a3c0-4091d58391cd", "children": ["0c4d5d2e-b7b6-4dc5-968d-d7faf6dc2293"], "befores": [{"name": "preparation", "status": "passed", "start": 1591177964112, "stop": 1591177964112}], "afters": [{"name": "preparation::0", "status": "passed", "start": 1591177964176, "stop": 1591177964176}], "start": 1591177964112, "stop": 1591177964176} -------------------------------------------------------------------------------- /result/4d3b759f-d54e-4dad-8ff3-bc161303077d-result.json: -------------------------------------------------------------------------------- 1 | {"name": "test_12_books_price", "status": "passed", "description": "\n '$..book[0,1]'表示根节点下递归查找所有的book属性值的第0个和第1个元素,\n ", "start": 1591176793909, "stop": 1591176793909, "uuid": "8554d0ff-c859-4bf1-bcca-591d5f364694", "historyId": "fe79a183ae7f53730e851b71fa2df5bd", "testCaseId": "cdb6f3bab0a3e125945425846e0be2d8", "fullName": "tests.test_json_path#test_12_books_price", "labels": [{"name": "parentSuite", "value": "tests"}, {"name": "suite", "value": "test_json_path"}, {"name": "host", "value": "LIUMENGJIAdeMacBook-Pro.local"}, {"name": "thread", "value": "78122-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "tests.test_json_path"}]} -------------------------------------------------------------------------------- /result/4dc9b4d8-8ba4-4dc5-8028-34c2f59f0bc0-result.json: -------------------------------------------------------------------------------- 1 | {"name": "test_skip", "status": "passed", "description": "\n 低于Python3.7版本不执行此条测试用例\n :return:\n ", "start": 1591176793939, "stop": 1591176793939, "uuid": "e183eea5-84fe-4ba1-b063-d681d4796a6d", "historyId": "eb011bb6dddaca67825f907e6ca79aea", "testCaseId": "5582c256a731465074f42c8727eca4dd", "fullName": "tests.test_marks.TestMarks#test_skip", "labels": [{"name": "parentSuite", "value": "tests"}, {"name": "suite", "value": "test_marks"}, {"name": "subSuite", "value": "TestMarks"}, {"name": "host", "value": "LIUMENGJIAdeMacBook-Pro.local"}, {"name": "thread", "value": "78122-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "tests.test_marks"}]} -------------------------------------------------------------------------------- /result/50994461-f29a-40e2-9769-f217c86639a7-attachment.attach: -------------------------------------------------------------------------------- 1 | 手机 -------------------------------------------------------------------------------- /result/528f4c4f-fcf5-4b6d-8d4b-1aadf005b54d-result.json: -------------------------------------------------------------------------------- 1 | {"name": "test_ehlo", "status": "failed", "statusDetails": {"message": "AssertionError: assert 0", "trace": "smtp_connection = \n\n def test_ehlo(smtp_connection):\n response,msg = smtp_connection.ehlo()\n assert response == 250\n> assert 0\nE assert 0\n\ntests/test_smtpsimple.py:24: AssertionError"}, "attachments": [{"name": "stdout", "source": "44e6bc52-cb5e-4596-bce7-bf858f53b22d-attachment.txt", "type": "text/plain"}], "start": 1591176795233, "stop": 1591176795248, "uuid": "9a47b21a-a8e8-4e4c-8548-0213032ce412", "historyId": "e29378b302cb3225908136a163d4aa84", "testCaseId": "a33a7f6037c14255030c2653c8b19a1e", "fullName": "tests.test_smtpsimple#test_ehlo", "labels": [{"name": "parentSuite", "value": "tests"}, {"name": "suite", "value": "test_smtpsimple"}, {"name": "host", "value": "LIUMENGJIAdeMacBook-Pro.local"}, {"name": "thread", "value": "78122-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "tests.test_smtpsimple"}]} -------------------------------------------------------------------------------- /result/535bacd2-a472-4422-9b01-19e767448462-result.json: -------------------------------------------------------------------------------- 1 | {"name": "test_delete_shopping_trolley", "status": "skipped", "statusDetails": {"message": "Skipped: 本次不执行", "trace": "('tests/test_shopping_trolley.py', 33, 'Skipped: 本次不执行')"}, "start": 1591177964351, "stop": 1591177964351, "uuid": "6e00256c-cee1-449d-9088-5933f8e95fa2", "historyId": "b6da4bda0427c8126528f5b5f455beb8", "testCaseId": "21da4ef705612d325d851b6a3ca55c62", "fullName": "tests.test_shopping_trolley.TestShoppingTrolley#test_delete_shopping_trolley", "labels": [{"name": "story", "value": "删除购物车中商品"}, {"name": "feature", "value": "购物车功能"}, {"name": "parentSuite", "value": "tests"}, {"name": "suite", "value": "test_shopping_trolley"}, {"name": "subSuite", "value": "TestShoppingTrolley"}, {"name": "host", "value": "LIUMENGJIAdeMacBook-Pro.local"}, {"name": "thread", "value": "78362-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "tests.test_shopping_trolley"}]} -------------------------------------------------------------------------------- /result/54627dba-247c-4add-a7af-72325fd2b863-result.json: -------------------------------------------------------------------------------- 1 | {"name": "test_time_distance_v0[a1-b1-expected1]", "status": "passed", "parameters": [{"name": "a", "value": "datetime.datetime(2020, 12, 11, 0, 0)"}, {"name": "b", "value": "datetime.datetime(2020, 12, 12, 0, 0)"}, {"name": "expected", "value": "datetime.timedelta(days=-1)"}], "start": 1591176795261, "stop": 1591176795261, "uuid": "4dea1cc1-0352-4466-9006-dcea48272db6", "historyId": "20dd453a94d0b086e6cdb13be07e43d0", "testCaseId": "49494df4c1d6a00360f4279d2871b188", "fullName": "tests.test_time#test_time_distance_v0", "labels": [{"name": "parentSuite", "value": "tests"}, {"name": "suite", "value": "test_time"}, {"name": "host", "value": "LIUMENGJIAdeMacBook-Pro.local"}, {"name": "thread", "value": "78122-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "tests.test_time"}]} -------------------------------------------------------------------------------- /result/591315b2-b711-4618-b974-dae892f1af70-result.json: -------------------------------------------------------------------------------- 1 | {"name": "test_time_distance_v0[a0-b0-expected0]", "status": "passed", "parameters": [{"name": "a", "value": "datetime.datetime(2020, 12, 12, 0, 0)"}, {"name": "b", "value": "datetime.datetime(2020, 12, 11, 0, 0)"}, {"name": "expected", "value": "datetime.timedelta(days=1)"}], "start": 1591176795257, "stop": 1591176795257, "uuid": "2e54a9a0-54d6-4c39-9fde-8688b3e66cc0", "historyId": "9125daa121b6b5b4b58c5545ce0437f2", "testCaseId": "49494df4c1d6a00360f4279d2871b188", "fullName": "tests.test_time#test_time_distance_v0", "labels": [{"name": "parentSuite", "value": "tests"}, {"name": "suite", "value": "test_time"}, {"name": "host", "value": "LIUMENGJIAdeMacBook-Pro.local"}, {"name": "thread", "value": "78122-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "tests.test_time"}]} -------------------------------------------------------------------------------- /result/5bf1bdd3-abc2-42c9-be68-e08006844c7a-result.json: -------------------------------------------------------------------------------- 1 | {"name": "test_string_3", "status": "failed", "statusDetails": {"message": "AssertionError: assert 'foo\\nspam\\nbar' == 'foo\\neggs\\nbar'\n foo\n - spam\n + eggs\n bar", "trace": "self = \n\n def test_string_3(self):\n> assert \"foo\\nspam\\nbar\" == \"foo\\neggs\\nbar\"\nE AssertionError: assert 'foo\\nspam\\nbar' == 'foo\\neggs\\nbar'\nE foo\nE - spam\nE + eggs\nE bar\n\ntests/test_assertions.py:21: AssertionError"}, "start": 1591177964069, "stop": 1591177964070, "uuid": "87a2e3bd-60f1-4935-9681-ed8a9234b4df", "historyId": "a20113d4dc1fbffdc25108fbe291e249", "testCaseId": "2bc215acf08ad0946da6911a0ddcf193", "fullName": "tests.test_assertions.TestStringAssertions#test_string_3", "labels": [{"name": "parentSuite", "value": "tests"}, {"name": "suite", "value": "test_assertions"}, {"name": "subSuite", "value": "TestStringAssertions"}, {"name": "host", "value": "LIUMENGJIAdeMacBook-Pro.local"}, {"name": "thread", "value": "78362-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "tests.test_assertions"}]} -------------------------------------------------------------------------------- /result/65bd1197-9def-49e1-acef-06735e332dec-result.json: -------------------------------------------------------------------------------- 1 | {"name": "test_string_4", "status": "failed", "statusDetails": {"message": "AssertionError: assert False\n + where False = ('S')\n + where = 'streaming'.startswith\n + where 'streaming' = .func at 0x10d82ac20>()", "trace": "self = \n\n def test_string_4(self):\n def func():\n return \"streaming\"\n \n> assert func().startswith(\"S\")\nE AssertionError: assert False\nE + where False = ('S')\nE + where = 'streaming'.startswith\nE + where 'streaming' = .func at 0x10d82ac20>()\n\ntests/test_assertions.py:27: AssertionError"}, "start": 1591177964074, "stop": 1591177964074, "uuid": "cd078bfc-b7b5-48d8-ab12-60b6b70dbeab", "historyId": "fb0432917f1af6b042493e5dfbbbb362", "testCaseId": "9f6e7aed8f0de1d1b3e1a828f66707dc", "fullName": "tests.test_assertions.TestStringAssertions#test_string_4", "labels": [{"name": "parentSuite", "value": "tests"}, {"name": "suite", "value": "test_assertions"}, {"name": "subSuite", "value": "TestStringAssertions"}, {"name": "host", "value": "LIUMENGJIAdeMacBook-Pro.local"}, {"name": "thread", "value": "78362-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "tests.test_assertions"}]} -------------------------------------------------------------------------------- /result/65c156f1-fd40-4f66-a343-e40e19d9f016-result.json: -------------------------------------------------------------------------------- 1 | {"name": "test_set", "status": "failed", "statusDetails": {"message": "AssertionError: assert {0, 1, 11, 23} == {0, 2, 11}\n Extra items in the left set:\n 1\n 23\n Extra items in the right set:\n 2\n Full diff:\n - {0, 1, 11, 23}...\n \n ...Full output truncated (4 lines hidden), use '-vv' to show", "trace": "self = \n\n def test_set(self):\n> assert {0,1,11,23} == {0,11,2}\nE AssertionError: assert {0, 1, 11, 23} == {0, 2, 11}\nE Extra items in the left set:\nE 1\nE 23\nE Extra items in the right set:\nE 2\nE Full diff:\nE - {0, 1, 11, 23}...\nE \nE ...Full output truncated (4 lines hidden), use '-vv' to show\n\ntests/test_assertions.py:56: AssertionError"}, "start": 1591177964104, "stop": 1591177964105, "uuid": "5435c97f-eb4e-4400-8275-0d5a0654b71a", "historyId": "ab5141e061250e4f2638fbbce67d3ff0", "testCaseId": "61b71ab9b43aa9e506f5b561e4436abb", "fullName": "tests.test_assertions.TestCollections#test_set", "labels": [{"name": "parentSuite", "value": "tests"}, {"name": "suite", "value": "test_assertions"}, {"name": "subSuite", "value": "TestCollections"}, {"name": "host", "value": "LIUMENGJIAdeMacBook-Pro.local"}, {"name": "thread", "value": "78362-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "tests.test_assertions"}]} -------------------------------------------------------------------------------- /result/664409d7-1171-4900-864a-6e75147d0637-container.json: -------------------------------------------------------------------------------- 1 | {"uuid": "783c1b2c-e5b5-4d8c-9932-a7979f94d7be", "befores": [{"name": "b", "status": "passed", "start": 1591176795260, "stop": 1591176795260}], "start": 1591176795260, "stop": 1591176795261} -------------------------------------------------------------------------------- /result/66f60244-3036-4ecd-a3dd-f42bd3a84d54-result.json: -------------------------------------------------------------------------------- 1 | {"name": "test_third_book", "status": "failed", "statusDetails": {"message": "AssertionError: assert 'Moby Dick' == 'Moby Dick!'\n - Moby Dick\n + Moby Dick!\n ? +", "trace": "def test_third_book():\n \"\"\"\n '$..book[2]'表示根节点下递归查找所有book属性中第3个对象,\n \n \"\"\"\n book_3 = jsonpath.jsonpath(response, '$.store.book[2]')\n> assert book_3[0]['title'] == \"Moby Dick!\"\nE AssertionError: assert 'Moby Dick' == 'Moby Dick!'\nE - Moby Dick\nE + Moby Dick!\nE ? +\n\ntests/test_json_path.py:73: AssertionError"}, "description": "\n '$..book[2]'表示根节点下递归查找所有book属性中第3个对象,\n\n ", "start": 1591177964240, "stop": 1591177964240, "uuid": "8b5b8083-6446-4386-b641-ff2f6db126a9", "historyId": "bffa81c7bffb7ca85de23bee55c91547", "testCaseId": "edde08b311e8ffa771aa55e2f7da9605", "fullName": "tests.test_json_path#test_third_book", "labels": [{"name": "parentSuite", "value": "tests"}, {"name": "suite", "value": "test_json_path"}, {"name": "host", "value": "LIUMENGJIAdeMacBook-Pro.local"}, {"name": "thread", "value": "78362-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "tests.test_json_path"}]} -------------------------------------------------------------------------------- /result/6b1af6dc-2a9e-4f74-b9b9-8e40babfb74b-container.json: -------------------------------------------------------------------------------- 1 | {"uuid": "dcb65b7f-6851-4edc-a874-573ec7d8a5e6", "befores": [{"name": "expected", "status": "passed", "start": 1591176795260, "stop": 1591176795260}], "start": 1591176795260, "stop": 1591176795261} -------------------------------------------------------------------------------- /result/6bb7a76c-6259-455d-9698-423ce5547991-result.json: -------------------------------------------------------------------------------- 1 | {"name": "test_time_distance_v0[a0-b0-expected0]", "status": "passed", "parameters": [{"name": "a", "value": "datetime.datetime(2020, 12, 12, 0, 0)"}, {"name": "b", "value": "datetime.datetime(2020, 12, 11, 0, 0)"}, {"name": "expected", "value": "datetime.timedelta(days=1)"}], "start": 1591177965668, "stop": 1591177965668, "uuid": "a710ec82-5af3-43ee-9457-5e5b18809577", "historyId": "9125daa121b6b5b4b58c5545ce0437f2", "testCaseId": "49494df4c1d6a00360f4279d2871b188", "fullName": "tests.test_time#test_time_distance_v0", "labels": [{"name": "parentSuite", "value": "tests"}, {"name": "suite", "value": "test_time"}, {"name": "host", "value": "LIUMENGJIAdeMacBook-Pro.local"}, {"name": "thread", "value": "78362-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "tests.test_time"}]} -------------------------------------------------------------------------------- /result/6cb3a680-130b-4f37-8916-6c430fde0cbc-attachment.attach: -------------------------------------------------------------------------------- 1 | 添加购物车成功 -------------------------------------------------------------------------------- /result/6cde41b2-45d4-486d-af74-78798c87fb99-container.json: -------------------------------------------------------------------------------- 1 | {"uuid": "bec5f227-5584-4b19-bbb2-4081b07ac50f", "befores": [{"name": "expected", "status": "passed", "start": 1591176793851, "stop": 1591176793851}], "start": 1591176793851, "stop": 1591176793887} -------------------------------------------------------------------------------- /result/71fae1ea-db4a-4fb3-a4ba-13cccfe948de-result.json: -------------------------------------------------------------------------------- 1 | {"name": "test_slice_with_step", "status": "passed", "start": 1591176793911, "stop": 1591176793911, "uuid": "b90cc3dd-174e-4a2c-9c85-d4f6eb7c0baa", "historyId": "ed2c6ce4f1fc21fd68e0ff2d8e776174", "testCaseId": "2a7b3b4c4619230cb8617d5d62f97929", "fullName": "tests.test_json_path#test_slice_with_step", "labels": [{"name": "parentSuite", "value": "tests"}, {"name": "suite", "value": "test_json_path"}, {"name": "host", "value": "LIUMENGJIAdeMacBook-Pro.local"}, {"name": "thread", "value": "78122-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "tests.test_json_path"}]} -------------------------------------------------------------------------------- /result/73a55e1b-77c4-4ea3-b249-15677e7498e8-container.json: -------------------------------------------------------------------------------- 1 | {"uuid": "5b51e77f-b4d6-45d7-8fda-606a1547c13d", "befores": [{"name": "expected", "status": "passed", "start": 1591177965668, "stop": 1591177965668}], "start": 1591177965668, "stop": 1591177965669} -------------------------------------------------------------------------------- /result/74926616-6f77-4502-9be7-43bd8ddbcfa8-attachment.attach: -------------------------------------------------------------------------------- 1 | 手机 -------------------------------------------------------------------------------- /result/76047527-a53c-4998-b040-e2cf12952950-result.json: -------------------------------------------------------------------------------- 1 | {"name": "test_list", "status": "failed", "statusDetails": {"message": "AssertionError: assert [0, 1, 2] == [0, 1, 3]\n At index 2 diff: 2 != 3\n Use -v to get the full diff", "trace": "self = \n\n def test_list(self):\n list1 = [0,1,2]\n list2 = [0,1,3]\n> assert list1 == list2\nE assert [0, 1, 2] == [0, 1, 3]\nE At index 2 diff: 2 != 3\nE Use -v to get the full diff\n\ntests/test_assertions.py:47: AssertionError"}, "start": 1591176793769, "stop": 1591176793769, "uuid": "a10d8a85-d075-4bbf-917c-71e4c8ea58c8", "historyId": "d8ea34b0a2033a4c3ac0689500e3d865", "testCaseId": "1b659a55a44766095001c6cad525f2e7", "fullName": "tests.test_assertions.TestCollections#test_list", "labels": [{"name": "parentSuite", "value": "tests"}, {"name": "suite", "value": "test_assertions"}, {"name": "subSuite", "value": "TestCollections"}, {"name": "host", "value": "LIUMENGJIAdeMacBook-Pro.local"}, {"name": "thread", "value": "78122-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "tests.test_assertions"}]} -------------------------------------------------------------------------------- /result/78160ab3-0ad2-4eb2-b88a-9793b853b708-container.json: -------------------------------------------------------------------------------- 1 | {"uuid": "948050df-db98-479d-a055-00f1d7df1ca1", "befores": [{"name": "a", "status": "passed", "start": 1591176795260, "stop": 1591176795260}], "start": 1591176795260, "stop": 1591176795262} -------------------------------------------------------------------------------- /result/7a8e8cc5-ef08-4c10-94e5-1816e591e38b-result.json: -------------------------------------------------------------------------------- 1 | {"name": "test_string_1", "status": "failed", "statusDetails": {"message": "AssertionError: assert 'spam' == 'eggs'\n - spam\n + eggs", "trace": "self = \n\n def test_string_1(self):\n> assert \"spam\" == \"eggs\"\nE AssertionError: assert 'spam' == 'eggs'\nE - spam\nE + eggs\n\ntests/test_assertions.py:15: AssertionError"}, "start": 1591176793679, "stop": 1591176793681, "uuid": "b9b3820d-b80e-4cd6-bc01-e0b8baad9a72", "historyId": "9840158155a8e95498907c00567fd3f1", "testCaseId": "740b3702079c293bcfbe128088da1afd", "fullName": "tests.test_assertions.TestStringAssertions#test_string_1", "labels": [{"name": "parentSuite", "value": "tests"}, {"name": "suite", "value": "test_assertions"}, {"name": "subSuite", "value": "TestStringAssertions"}, {"name": "host", "value": "LIUMENGJIAdeMacBook-Pro.local"}, {"name": "thread", "value": "78122-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "tests.test_assertions"}]} -------------------------------------------------------------------------------- /result/7c1f3956-9f1c-42b0-b35f-bf54d3f2348a-result.json: -------------------------------------------------------------------------------- 1 | {"name": "test_string_2", "status": "failed", "statusDetails": {"message": "AssertionError: assert 'foo 1 bar' == 'foo 2 bar'\n - foo 1 bar\n ? ^\n + foo 2 bar\n ? ^", "trace": "self = \n\n def test_string_2(self):\n> assert \"foo 1 bar\" == \"foo 2 bar\"\nE AssertionError: assert 'foo 1 bar' == 'foo 2 bar'\nE - foo 1 bar\nE ? ^\nE + foo 2 bar\nE ? ^\n\ntests/test_assertions.py:18: AssertionError"}, "start": 1591177964065, "stop": 1591177964065, "uuid": "0b7f9ca0-0843-4afe-82d2-36bdae644811", "historyId": "beecfaa6debd3672eebec86c96e2bfd8", "testCaseId": "fd19bfb61dbf7a1842574f9c88cb7d2b", "fullName": "tests.test_assertions.TestStringAssertions#test_string_2", "labels": [{"name": "parentSuite", "value": "tests"}, {"name": "suite", "value": "test_assertions"}, {"name": "subSuite", "value": "TestStringAssertions"}, {"name": "host", "value": "LIUMENGJIAdeMacBook-Pro.local"}, {"name": "thread", "value": "78362-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "tests.test_assertions"}]} -------------------------------------------------------------------------------- /result/80e8b44b-788e-464c-bd68-6e86bf45c180-container.json: -------------------------------------------------------------------------------- 1 | {"uuid": "6980720a-acd0-49f4-8248-1ce3378ca503", "befores": [{"name": "case", "status": "passed", "start": 1591177964112, "stop": 1591177964112}], "start": 1591177964112, "stop": 1591177964178} -------------------------------------------------------------------------------- /result/81a07d7f-b8b3-4815-9acf-f073442a5591-attachment.attach: -------------------------------------------------------------------------------- 1 | 笔记本 -------------------------------------------------------------------------------- /result/87bf7d3f-6677-41a0-a99e-6187112dfdab-container.json: -------------------------------------------------------------------------------- 1 | {"uuid": "a13e9931-e10c-423e-983f-05238c053df8", "befores": [{"name": "case", "status": "passed", "start": 1591177964181, "stop": 1591177964181}], "start": 1591177964181, "stop": 1591177964230} -------------------------------------------------------------------------------- /result/892a085b-e24c-4f10-94d1-2010e1bce5ef-result.json: -------------------------------------------------------------------------------- 1 | {"name": "test_all_goods", "status": "passed", "description": "'$.store.*',表示根节点$下store属性下的所有对象,没写", "attachments": [{"name": "stdout", "source": "abd44897-cb50-4aa5-bc67-e6731d153339-attachment.txt", "type": "text/plain"}], "start": 1591177964235, "stop": 1591177964235, "uuid": "bfc4c55b-eb71-4d1e-8785-5e0a5ecb7689", "historyId": "8028e6f4ac19ae14f86a77aea6c5cfb2", "testCaseId": "a1a11d4c50139c7b85b616bedd24c345", "fullName": "tests.test_json_path#test_all_goods", "labels": [{"name": "parentSuite", "value": "tests"}, {"name": "suite", "value": "test_json_path"}, {"name": "host", "value": "LIUMENGJIAdeMacBook-Pro.local"}, {"name": "thread", "value": "78362-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "tests.test_json_path"}]} -------------------------------------------------------------------------------- /result/8957f5c0-7306-4a52-9acf-644c482737e1-result.json: -------------------------------------------------------------------------------- 1 | {"name": "test_in_theaters[验证响应中title是\"正在上映的电影-北京\"]", "status": "passed", "attachments": [{"name": "stdout", "source": "11398093-a916-4943-9da6-c6a56d0c9a81-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "case", "value": "'验证响应中title是\"正在上映的电影-北京\"'"}, {"name": "http", "value": "{'method': 'GET', 'path': '/v2/movie/in_theaters', 'params': {'apikey': '0df993c66c0c636e29ecbb5344252a4a', 'start': 1, 'count': 5}}"}, {"name": "expected", "value": "{}"}], "start": 1591177964182, "stop": 1591177964228, "uuid": "6b7c7421-9bb4-49fd-8791-fd2255571214", "historyId": "ff5b0c9bad743a81d517ef724a45dfa5", "testCaseId": "b507d08de39442fefc429b327c33fb39", "fullName": "tests.test_in_theaters.TestInTheaters#test_in_theaters", "labels": [{"name": "story", "value": "获取电影列表"}, {"name": "feature", "value": "获取电影列表"}, {"name": "parentSuite", "value": "tests"}, {"name": "suite", "value": "test_in_theaters"}, {"name": "subSuite", "value": "TestInTheaters"}, {"name": "host", "value": "LIUMENGJIAdeMacBook-Pro.local"}, {"name": "thread", "value": "78362-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "tests.test_in_theaters"}]} -------------------------------------------------------------------------------- /result/8d95b5d5-9dae-460f-9ce1-944cd367862c-result.json: -------------------------------------------------------------------------------- 1 | {"name": "test_in_theaters[验证响应中start和count与请求中的参数一致]", "status": "passed", "attachments": [{"name": "stdout", "source": "dee7ce5c-0c95-4a9f-93e8-bd66bc111483-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "case", "value": "'验证响应中start和count与请求中的参数一致'"}, {"name": "http", "value": "{'method': 'GET', 'path': '/v2/movie/in_theaters', 'params': {'apikey': '0df993c66c0c636e29ecbb5344252a4a', 'start': 0, 'count': 10}}"}, {"name": "expected", "value": "{'response': {'title': '正在上映的电影-上海', 'count': 10, 'start': 0}}"}], "start": 1591176793789, "stop": 1591176793845, "uuid": "d257939d-06bd-4032-b108-74c646051507", "historyId": "74b92abf603adb79ad179aa3e68d1ddc", "testCaseId": "b507d08de39442fefc429b327c33fb39", "fullName": "tests.test_in_theaters.TestInTheaters#test_in_theaters", "labels": [{"name": "feature", "value": "获取电影列表"}, {"name": "story", "value": "获取电影列表"}, {"name": "parentSuite", "value": "tests"}, {"name": "suite", "value": "test_in_theaters"}, {"name": "subSuite", "value": "TestInTheaters"}, {"name": "host", "value": "LIUMENGJIAdeMacBook-Pro.local"}, {"name": "thread", "value": "78122-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "tests.test_in_theaters"}]} -------------------------------------------------------------------------------- /result/94bfae5a-d13f-4c7e-9395-76bd845f033e-result.json: -------------------------------------------------------------------------------- 1 | {"name": "test_authors", "status": "passed", "description": "\n '$.store.book[*].author'表示store节点下book结点下所有对象的author值\n ", "start": 1591177964233, "stop": 1591177964233, "uuid": "fbf37516-1845-406a-9e2a-75a074184e62", "historyId": "6b7a3e10181021d4e6a1473e2305a905", "testCaseId": "867a88c48f0be4c47f785ead61a440a5", "fullName": "tests.test_json_path#test_authors", "labels": [{"name": "parentSuite", "value": "tests"}, {"name": "suite", "value": "test_json_path"}, {"name": "host", "value": "LIUMENGJIAdeMacBook-Pro.local"}, {"name": "thread", "value": "78362-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "tests.test_json_path"}]} -------------------------------------------------------------------------------- /result/95f2157a-f8f8-44ee-8279-badab1d158c6-container.json: -------------------------------------------------------------------------------- 1 | {"uuid": "391c9941-2941-48f5-9a44-72763aed62fb", "befores": [{"name": "a", "status": "passed", "start": 1591176795256, "stop": 1591176795256}], "start": 1591176795256, "stop": 1591176795258} -------------------------------------------------------------------------------- /result/995eaa6b-6930-4e56-898d-40a308b35f19-container.json: -------------------------------------------------------------------------------- 1 | {"uuid": "bf6a3764-7874-4440-a020-1c77215cf71f", "befores": [{"name": "expected", "status": "passed", "start": 1591176793788, "stop": 1591176793788}], "start": 1591176793788, "stop": 1591176793847} -------------------------------------------------------------------------------- /result/9aa41ce2-a71a-4a0a-8dc0-b448e9e11e49-result.json: -------------------------------------------------------------------------------- 1 | {"name": "test_func", "status": "failed", "statusDetails": {"message": "AssertionError: assert [1, 2, 3] == [1, 2, 4]\n At index 2 diff: 3 != 4\n Use -v to get the full diff", "trace": "def test_func():\n def func():\n return [1,2,3]\n \n> assert func() == [1,2,4]\nE assert [1, 2, 3] == [1, 2, 4]\nE At index 2 diff: 3 != 4\nE Use -v to get the full diff\n\ntests/test_assertions.py:33: AssertionError"}, "start": 1591176793757, "stop": 1591176793757, "uuid": "cb94e919-0391-44d4-90d7-c4636589636c", "historyId": "c7deb80c02a641c44581a601d8aa78ec", "testCaseId": "ab2a61770e0e2adc57d2cc47c52ef550", "fullName": "tests.test_assertions#test_func", "labels": [{"name": "parentSuite", "value": "tests"}, {"name": "suite", "value": "test_assertions"}, {"name": "host", "value": "LIUMENGJIAdeMacBook-Pro.local"}, {"name": "thread", "value": "78122-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "tests.test_assertions"}]} -------------------------------------------------------------------------------- /result/a3a4e2af-1514-4cf9-ad3e-a126f86c8f95-container.json: -------------------------------------------------------------------------------- 1 | {"uuid": "981f2ee6-6980-421c-9cce-142a9d87990b", "befores": [{"name": "a", "status": "passed", "start": 1591177965672, "stop": 1591177965672}], "start": 1591177965672, "stop": 1591177965674} -------------------------------------------------------------------------------- /result/a77a48db-2667-403e-a92f-5d2c9aa53e2d-result.json: -------------------------------------------------------------------------------- 1 | {"name": "test_xfail", "status": "skipped", "statusDetails": {"message": "AssertionError: assert 0", "trace": "self = \n\n @pytest.mark.xfail\n def test_xfail(self):\n \"\"\"\n Indicate that you expect it to fail\n 这条用例执行失败时,测试结果被标记为xfail(expected to fail),并且不打印错误信息。\n 这条用例执行成功时,测试结果被标记为xpassed(unexpectedly passing)\n :return:\n \"\"\"\n> assert 0\nE assert 0\n\ntests/test_marks.py:40: AssertionError"}, "description": "\n Indicate that you expect it to fail\n 这条用例执行失败时,测试结果被标记为xfail(expected to fail),并且不打印错误信息。\n 这条用例执行成功时,测试结果被标记为xpassed(unexpectedly passing)\n :return:\n ", "start": 1591177964286, "stop": 1591177964286, "uuid": "37faf1d2-47c7-49bd-93c8-fd3f689c5ef2", "historyId": "a44cab49732a0aa43a757be1adf99317", "testCaseId": "bddf35a14fb9223139b80ad1c562cbae", "fullName": "tests.test_marks.TestMarks#test_xfail", "labels": [{"name": "tag", "value": "xfail"}, {"name": "parentSuite", "value": "tests"}, {"name": "suite", "value": "test_marks"}, {"name": "subSuite", "value": "TestMarks"}, {"name": "host", "value": "LIUMENGJIAdeMacBook-Pro.local"}, {"name": "thread", "value": "78362-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "tests.test_marks"}]} -------------------------------------------------------------------------------- /result/aab0626c-76f1-48f4-ac4d-b4f0bda66e21-attachment.txt: -------------------------------------------------------------------------------- 1 | [[{'category': 'reference', 'author': 'Nigel Rees', 'title': 'Sayings of the Century', 'price': 8.95}, {'category': 'fiction', 'author': 'Evelyn Waugh', 'title': 'Sword of Honour', 'price': 12.99}, {'category': 'fiction', 'author': 'Herman Melville', 'title': 'Moby Dick', 'isbn': '0-553-21311-3', 'price': 8.99}, {'category': 'fiction', 'author': 'J. R. R. Tolkien', 'title': 'The Lord of the Rings', 'isbn': '0-395-19395-8', 'price': 22.99}], {'color': 'red', 'price': 19.95}] 2 | -------------------------------------------------------------------------------- /result/ab5ac7c8-692e-4197-addb-f4eea621fb09-result.json: -------------------------------------------------------------------------------- 1 | {"name": "test_authors", "status": "passed", "description": "\n '$.store.book[*].author'表示store节点下book结点下所有对象的author值\n ", "start": 1591176793891, "stop": 1591176793892, "uuid": "30b248d2-e365-44af-a906-9ef25f4ec1ac", "historyId": "6b7a3e10181021d4e6a1473e2305a905", "testCaseId": "867a88c48f0be4c47f785ead61a440a5", "fullName": "tests.test_json_path#test_authors", "labels": [{"name": "parentSuite", "value": "tests"}, {"name": "suite", "value": "test_json_path"}, {"name": "host", "value": "LIUMENGJIAdeMacBook-Pro.local"}, {"name": "thread", "value": "78122-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "tests.test_json_path"}]} -------------------------------------------------------------------------------- /result/abd44897-cb50-4aa5-bc67-e6731d153339-attachment.txt: -------------------------------------------------------------------------------- 1 | [[{'category': 'reference', 'author': 'Nigel Rees', 'title': 'Sayings of the Century', 'price': 8.95}, {'category': 'fiction', 'author': 'Evelyn Waugh', 'title': 'Sword of Honour', 'price': 12.99}, {'category': 'fiction', 'author': 'Herman Melville', 'title': 'Moby Dick', 'isbn': '0-553-21311-3', 'price': 8.99}, {'category': 'fiction', 'author': 'J. R. R. Tolkien', 'title': 'The Lord of the Rings', 'isbn': '0-395-19395-8', 'price': 22.99}], {'color': 'red', 'price': 19.95}] 2 | -------------------------------------------------------------------------------- /result/ac108041-9f9e-4bb3-b2d3-65e28641b666-container.json: -------------------------------------------------------------------------------- 1 | {"uuid": "c2f1c0c4-e176-4866-b4d9-bdaeb8f5d6b0", "befores": [{"name": "a", "status": "passed", "start": 1591177965667, "stop": 1591177965667}], "start": 1591177965667, "stop": 1591177965670} -------------------------------------------------------------------------------- /result/aca2f229-19c8-4941-84f5-905f3ed02aba-result.json: -------------------------------------------------------------------------------- 1 | {"name": "test_has_color", "status": "failed", "statusDetails": {"message": "AssertionError: assert 'green' == 'red'\n - green\n + red", "trace": "def test_has_color():\n \"\"\"\n '$..[?(@.color)]'表示根节点下具有color属性的对象\n \"\"\"\n colorful_goods = jsonpath.jsonpath(response, '$.store..[?(@.color)]')\n> assert \"green\" == colorful_goods[0]['color']\nE AssertionError: assert 'green' == 'red'\nE - green\nE + red\n\ntests/test_json_path.py:110: AssertionError"}, "description": "\n '$..[?(@.color)]'表示根节点下具有color属性的对象\n ", "start": 1591177964259, "stop": 1591177964260, "uuid": "c0b595f7-59d0-4b0d-9389-ada1e076f205", "historyId": "b6268ce8363224068bde8ea1a095e57d", "testCaseId": "e6f6a6b23141cbec61b73e148ec8ed23", "fullName": "tests.test_json_path#test_has_color", "labels": [{"name": "parentSuite", "value": "tests"}, {"name": "suite", "value": "test_json_path"}, {"name": "host", "value": "LIUMENGJIAdeMacBook-Pro.local"}, {"name": "thread", "value": "78362-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "tests.test_json_path"}]} -------------------------------------------------------------------------------- /result/adbfee49-4964-4c49-9529-f3f5b3605773-container.json: -------------------------------------------------------------------------------- 1 | {"uuid": "3a31f8a0-2042-4c77-8438-b0567cd2e8f8", "children": ["0c4d5d2e-b7b6-4dc5-968d-d7faf6dc2293", "6b7c7421-9bb4-49fd-8791-fd2255571214"], "befores": [{"name": "env", "status": "passed", "start": 1591177964110, "stop": 1591177964111}], "start": 1591177964110, "stop": 1591177965674} -------------------------------------------------------------------------------- /result/adc49dd6-184b-4044-bb40-46462a4dc10e-attachment.attach: -------------------------------------------------------------------------------- 1 | 笔记本 -------------------------------------------------------------------------------- /result/b2505f4d-0a34-4564-8426-b88078f2f637-result.json: -------------------------------------------------------------------------------- 1 | {"name": "test_list3", "status": "failed", "statusDetails": {"message": "AssertionError: assert 2 in [0, 1, [1, 2]]", "trace": "self = \n\n def test_list3(self):\n> assert 2 in [0,1,[1,2]]\nE assert 2 in [0, 1, [1, 2]]\n\ntests/test_assertions.py:53: AssertionError"}, "start": 1591176793776, "stop": 1591176793777, "uuid": "96b51194-1ab1-45a0-8bdc-482c15fcb879", "historyId": "f41f6d01134d681b0f77d0ee8debd4ef", "testCaseId": "23ffd3bd274984d6f5445e18db01bc4f", "fullName": "tests.test_assertions.TestCollections#test_list3", "labels": [{"name": "parentSuite", "value": "tests"}, {"name": "suite", "value": "test_assertions"}, {"name": "subSuite", "value": "TestCollections"}, {"name": "host", "value": "LIUMENGJIAdeMacBook-Pro.local"}, {"name": "thread", "value": "78122-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "tests.test_assertions"}]} -------------------------------------------------------------------------------- /result/b58d3e07-41a0-407d-825f-f2d1918aa38b-attachment.txt: -------------------------------------------------------------------------------- 1 | teardown smtp 2 | -------------------------------------------------------------------------------- /result/b63539bf-a0ea-4ced-ba86-e018ef2904cb-attachment.attach: -------------------------------------------------------------------------------- 1 | 添加购物车失败 -------------------------------------------------------------------------------- /result/b8d1db43-43f7-45ae-b4e5-82d2bfb31590-container.json: -------------------------------------------------------------------------------- 1 | {"uuid": "adf51714-8ddc-4e0e-8c72-5c77e0d39baf", "befores": [{"name": "expected", "status": "passed", "start": 1591177964182, "stop": 1591177964182}], "start": 1591177964182, "stop": 1591177964229} -------------------------------------------------------------------------------- /result/bb835ea1-01a0-4308-967e-04aa2c646311-container.json: -------------------------------------------------------------------------------- 1 | {"uuid": "142046ed-2ad9-4fe2-9e90-dda8bee7ea49", "befores": [{"name": "case", "status": "passed", "start": 1591176793788, "stop": 1591176793788}], "start": 1591176793788, "stop": 1591176793848} -------------------------------------------------------------------------------- /result/bbe6be9a-913d-4df2-9659-f77be06db3fc-result.json: -------------------------------------------------------------------------------- 1 | {"name": "test_string_4", "status": "failed", "statusDetails": {"message": "AssertionError: assert False\n + where False = ('S')\n + where = 'streaming'.startswith\n + where 'streaming' = .func at 0x103526c20>()", "trace": "self = \n\n def test_string_4(self):\n def func():\n return \"streaming\"\n \n> assert func().startswith(\"S\")\nE AssertionError: assert False\nE + where False = ('S')\nE + where = 'streaming'.startswith\nE + where 'streaming' = .func at 0x103526c20>()\n\ntests/test_assertions.py:27: AssertionError"}, "start": 1591176793753, "stop": 1591176793753, "uuid": "cf63ee68-2f20-4eb8-8925-9b5273cca464", "historyId": "fb0432917f1af6b042493e5dfbbbb362", "testCaseId": "9f6e7aed8f0de1d1b3e1a828f66707dc", "fullName": "tests.test_assertions.TestStringAssertions#test_string_4", "labels": [{"name": "parentSuite", "value": "tests"}, {"name": "suite", "value": "test_assertions"}, {"name": "subSuite", "value": "TestStringAssertions"}, {"name": "host", "value": "LIUMENGJIAdeMacBook-Pro.local"}, {"name": "thread", "value": "78122-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "tests.test_assertions"}]} -------------------------------------------------------------------------------- /result/bd2e0110-92a5-40df-9ee6-f3f5f4f1be02-result.json: -------------------------------------------------------------------------------- 1 | {"name": "test_dict2", "status": "failed", "statusDetails": {"message": "AssertionError: assert {'a': 0, 'b': {'c': 0}} == {'a': 0, 'b': {'c': 2}}\n Omitting 1 identical items, use -vv to show\n Differing items:\n {'b': {'c': 0}} != {'b': {'c': 2}}\n Use -v to get the full diff", "trace": "self = \n\n def test_dict2(self):\n exp = {\"a\":0,\"b\":{\"c\":0}}\n act = {\"a\":0,\"b\":{\"c\":2}}\n> assert exp == act\nE AssertionError: assert {'a': 0, 'b': {'c': 0}} == {'a': 0, 'b': {'c': 2}}\nE Omitting 1 identical items, use -vv to show\nE Differing items:\nE {'b': {'c': 0}} != {'b': {'c': 2}}\nE Use -v to get the full diff\n\ntests/test_assertions.py:42: AssertionError"}, "start": 1591176793765, "stop": 1591176793765, "uuid": "f41e7a5c-5954-4d33-a95d-e170190f778b", "historyId": "f18de00a56d94fe7645c550bd93c6d0f", "testCaseId": "3254e09cf8abadf0fb4cc5fb91ab9c78", "fullName": "tests.test_assertions.TestCollections#test_dict2", "labels": [{"name": "parentSuite", "value": "tests"}, {"name": "suite", "value": "test_assertions"}, {"name": "subSuite", "value": "TestCollections"}, {"name": "host", "value": "LIUMENGJIAdeMacBook-Pro.local"}, {"name": "thread", "value": "78122-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "tests.test_assertions"}]} -------------------------------------------------------------------------------- /result/be25fa85-1a11-4b33-a357-d1800abcb4e2-container.json: -------------------------------------------------------------------------------- 1 | {"uuid": "76584e7a-7254-443c-94e2-6bc061bf5aa0", "children": ["d257939d-06bd-4032-b108-74c646051507", "bdc05319-bdbb-489b-b56c-6891c62d7d5a"], "befores": [{"name": "env", "status": "passed", "start": 1591176793786, "stop": 1591176793788}], "start": 1591176793786, "stop": 1591176795262} -------------------------------------------------------------------------------- /result/bf692c89-4be3-434a-b385-d1129bfb9a32-container.json: -------------------------------------------------------------------------------- 1 | {"uuid": "91be6c15-949f-4a17-b712-8b3b7ae18f38", "children": ["6b7c7421-9bb4-49fd-8791-fd2255571214"], "befores": [{"name": "preparation", "status": "passed", "start": 1591177964182, "stop": 1591177964182}], "afters": [{"name": "preparation::0", "status": "passed", "start": 1591177964229, "stop": 1591177964229}], "start": 1591177964182, "stop": 1591177964229} -------------------------------------------------------------------------------- /result/c118262c-e276-4369-818f-4fac32577906-result.json: -------------------------------------------------------------------------------- 1 | {"name": "test_edit_shopping_trolley", "status": "passed", "start": 1591177964350, "stop": 1591177964350, "uuid": "a603548e-53f3-44c5-9802-5ee1950c07de", "historyId": "475dede1bcbe6590f5f95f0d051ebc9a", "testCaseId": "07dfa431568181f6adfa911f60f1d62c", "fullName": "tests.test_shopping_trolley.TestShoppingTrolley#test_edit_shopping_trolley", "labels": [{"name": "story", "value": "修改购物车"}, {"name": "feature", "value": "购物车功能"}, {"name": "parentSuite", "value": "tests"}, {"name": "suite", "value": "test_shopping_trolley"}, {"name": "subSuite", "value": "TestShoppingTrolley"}, {"name": "host", "value": "LIUMENGJIAdeMacBook-Pro.local"}, {"name": "thread", "value": "78362-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "tests.test_shopping_trolley"}]} -------------------------------------------------------------------------------- /result/c4b0e70d-8944-43db-b53d-6f333e977b0e-container.json: -------------------------------------------------------------------------------- 1 | {"uuid": "9a3a6e9d-7deb-488d-9947-7bab9a7e6794", "befores": [{"name": "http", "status": "passed", "start": 1591177964181, "stop": 1591177964181}], "start": 1591177964181, "stop": 1591177964230} -------------------------------------------------------------------------------- /result/cb60cb66-73cd-4e7a-9bcc-54da49aa8083-result.json: -------------------------------------------------------------------------------- 1 | {"name": "test_2books_cheap_than_10", "status": "passed", "description": "\n '$..book[?(@.price<10)]'表示根节点下book属性的所有price小于10的元素\n ", "start": 1591176793913, "stop": 1591176793913, "uuid": "5bfc33da-3ac7-4091-8438-046f75784e32", "historyId": "93799719dae2347edf65381bc2104c04", "testCaseId": "576bfdad53247082bb70de2bef9e2c78", "fullName": "tests.test_json_path#test_2books_cheap_than_10", "labels": [{"name": "parentSuite", "value": "tests"}, {"name": "suite", "value": "test_json_path"}, {"name": "host", "value": "LIUMENGJIAdeMacBook-Pro.local"}, {"name": "thread", "value": "78122-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "tests.test_json_path"}]} -------------------------------------------------------------------------------- /result/cd8b586b-8985-4e67-b13c-01281e8b8c1e-result.json: -------------------------------------------------------------------------------- 1 | {"name": "test_dict", "status": "failed", "statusDetails": {"message": "AssertionError: assert {'a': 0, 'b': 1, 'c': 0} == {'a': 0, 'b': 2, 'd': 0}\n Omitting 1 identical items, use -vv to show\n Differing items:\n {'b': 1} != {'b': 2}\n Left contains 1 more item:\n {'c': 0}\n Right contains 1 more item:\n {'d': 0}...\n \n ...Full output truncated (6 lines hidden), use '-vv' to show", "trace": "self = \n\n def test_dict(self):\n> assert {\"a\": 0, \"b\": 1, \"c\": 0} == {\"a\": 0, \"b\": 2, \"d\": 0}\nE AssertionError: assert {'a': 0, 'b': 1, 'c': 0} == {'a': 0, 'b': 2, 'd': 0}\nE Omitting 1 identical items, use -vv to show\nE Differing items:\nE {'b': 1} != {'b': 2}\nE Left contains 1 more item:\nE {'c': 0}\nE Right contains 1 more item:\nE {'d': 0}...\nE \nE ...Full output truncated (6 lines hidden), use '-vv' to show\n\ntests/test_assertions.py:37: AssertionError"}, "start": 1591177964082, "stop": 1591177964082, "uuid": "169620a2-321e-4adc-a369-14247f6af1b1", "historyId": "fbadd6e85ac32000fe33ad71fd497919", "testCaseId": "b8a67e94a89b9286b2be1140b9ed1bb2", "fullName": "tests.test_assertions.TestCollections#test_dict", "labels": [{"name": "parentSuite", "value": "tests"}, {"name": "suite", "value": "test_assertions"}, {"name": "subSuite", "value": "TestCollections"}, {"name": "host", "value": "LIUMENGJIAdeMacBook-Pro.local"}, {"name": "thread", "value": "78362-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "tests.test_assertions"}]} -------------------------------------------------------------------------------- /result/cd982698-f996-4976-92f5-65f7104e656b-attachment.attach: -------------------------------------------------------------------------------- 1 | 添加购物车失败 -------------------------------------------------------------------------------- /result/cec1bd14-0f6a-4d72-9fb6-f3e77b93e9f5-container.json: -------------------------------------------------------------------------------- 1 | {"uuid": "c41fccba-d825-420f-b5ea-85e4ddaa3943", "befores": [{"name": "case", "status": "passed", "start": 1591176793851, "stop": 1591176793851}], "start": 1591176793851, "stop": 1591176793888} -------------------------------------------------------------------------------- /result/d41c4fff-3411-4fea-8776-31480bce3c66-container.json: -------------------------------------------------------------------------------- 1 | {"uuid": "3f802e45-c9e1-4c93-a386-e00fd71e9c41", "befores": [{"name": "b", "status": "passed", "start": 1591177965672, "stop": 1591177965672}], "start": 1591177965672, "stop": 1591177965673} -------------------------------------------------------------------------------- /result/d9a313f8-d193-45b4-9d44-13d1a7dd9548-result.json: -------------------------------------------------------------------------------- 1 | {"name": "test_delete_shopping_trolley", "status": "skipped", "statusDetails": {"message": "Skipped: 本次不执行", "trace": "('tests/test_shopping_trolley.py', 33, 'Skipped: 本次不执行')"}, "start": 1591176793996, "stop": 1591176793996, "uuid": "5fbee61b-19fe-40ce-9f2c-4168867a0175", "historyId": "b6da4bda0427c8126528f5b5f455beb8", "testCaseId": "21da4ef705612d325d851b6a3ca55c62", "fullName": "tests.test_shopping_trolley.TestShoppingTrolley#test_delete_shopping_trolley", "labels": [{"name": "story", "value": "删除购物车中商品"}, {"name": "feature", "value": "购物车功能"}, {"name": "parentSuite", "value": "tests"}, {"name": "suite", "value": "test_shopping_trolley"}, {"name": "subSuite", "value": "TestShoppingTrolley"}, {"name": "host", "value": "LIUMENGJIAdeMacBook-Pro.local"}, {"name": "thread", "value": "78122-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "tests.test_shopping_trolley"}]} -------------------------------------------------------------------------------- /result/dee7ce5c-0c95-4a9f-93e8-bd66bc111483-attachment.txt: -------------------------------------------------------------------------------- 1 | /Users/liumengjia/Documents/Project/Interface_Automation/config/prod/config.yaml 2 | {'host': {'douban': 'http://api.douban.com'}} 3 | 在数据库中准备测试数据 4 | 清理测试数据 5 | -------------------------------------------------------------------------------- /result/e07326c9-a990-4bea-a6a3-21a6688819d9-container.json: -------------------------------------------------------------------------------- 1 | {"uuid": "525848b2-91a7-4e25-9c11-cdb982d19729", "children": ["206f9f22-a401-4ceb-99bf-a6b19cb30df9"], "befores": [{"name": "smtp_connection", "status": "passed", "start": 1591177964354, "stop": 1591177965617}], "afters": [{"name": "smtp_connection::0", "status": "passed", "start": 1591177965663, "stop": 1591177965664}], "start": 1591177964354, "stop": 1591177965664} -------------------------------------------------------------------------------- /result/e11f572f-a8de-43bf-a322-24973ad59447-result.json: -------------------------------------------------------------------------------- 1 | {"name": "test_string_3", "status": "failed", "statusDetails": {"message": "AssertionError: assert 'foo\\nspam\\nbar' == 'foo\\neggs\\nbar'\n foo\n - spam\n + eggs\n bar", "trace": "self = \n\n def test_string_3(self):\n> assert \"foo\\nspam\\nbar\" == \"foo\\neggs\\nbar\"\nE AssertionError: assert 'foo\\nspam\\nbar' == 'foo\\neggs\\nbar'\nE foo\nE - spam\nE + eggs\nE bar\n\ntests/test_assertions.py:21: AssertionError"}, "start": 1591176793749, "stop": 1591176793749, "uuid": "e9f59c1a-5b98-4002-bcf9-d4c67cb59f6a", "historyId": "a20113d4dc1fbffdc25108fbe291e249", "testCaseId": "2bc215acf08ad0946da6911a0ddcf193", "fullName": "tests.test_assertions.TestStringAssertions#test_string_3", "labels": [{"name": "parentSuite", "value": "tests"}, {"name": "suite", "value": "test_assertions"}, {"name": "subSuite", "value": "TestStringAssertions"}, {"name": "host", "value": "LIUMENGJIAdeMacBook-Pro.local"}, {"name": "thread", "value": "78122-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "tests.test_assertions"}]} -------------------------------------------------------------------------------- /result/e3568663-12fc-473e-be26-30164e014f7e-container.json: -------------------------------------------------------------------------------- 1 | {"uuid": "d8d973f5-1c2a-403f-af7a-e3704f0f1a93", "befores": [{"name": "http", "status": "passed", "start": 1591176793851, "stop": 1591176793851}], "start": 1591176793851, "stop": 1591176793888} -------------------------------------------------------------------------------- /result/e38b9cfa-d7be-4a08-933f-760e8bf110e8-attachment.attach: -------------------------------------------------------------------------------- 1 | 添加购物车成功 -------------------------------------------------------------------------------- /result/e3f93667-6ef4-45f7-b438-05c65aa2c9e1-result.json: -------------------------------------------------------------------------------- 1 | {"name": "test_last_book_isbn", "status": "failed", "statusDetails": {"message": "AssertionError: assert ['0-395-19395-8'] == '1-395-19395-8'\n -['0-395-19395-8']\n +'1-395-19395-8'", "trace": "def test_last_book_isbn():\n last_book_isbn = jsonpath.jsonpath(response, f'$.store.book[-1:].isbn')\n # last_book_isbn = jsonpath.jsonpath(response, f'$.store.book[(@.length-1)].isbn')\n> assert last_book_isbn == \"1-395-19395-8\"\nE AssertionError: assert ['0-395-19395-8'] == '1-395-19395-8'\nE -['0-395-19395-8']\nE +'1-395-19395-8'\n\ntests/test_json_path.py:79: AssertionError"}, "start": 1591177964245, "stop": 1591177964246, "uuid": "790f7ae0-26f4-42e2-8cfe-5e06a716caed", "historyId": "5556f409e8149ad409291b5b9881416f", "testCaseId": "dbf4003456d78bfc8fb5278149c3d8fa", "fullName": "tests.test_json_path#test_last_book_isbn", "labels": [{"name": "parentSuite", "value": "tests"}, {"name": "suite", "value": "test_json_path"}, {"name": "host", "value": "LIUMENGJIAdeMacBook-Pro.local"}, {"name": "thread", "value": "78362-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "tests.test_json_path"}]} -------------------------------------------------------------------------------- /result/e6f68867-2b27-4448-9ea2-ae0f3b94e02b-result.json: -------------------------------------------------------------------------------- 1 | {"name": "test_set", "status": "failed", "statusDetails": {"message": "AssertionError: assert {0, 1, 11, 23} == {0, 2, 11}\n Extra items in the left set:\n 1\n 23\n Extra items in the right set:\n 2\n Use -v to get the full diff", "trace": "self = \n\n def test_set(self):\n> assert {0,1,11,23} == {0,11,2}\nE assert {0, 1, 11, 23} == {0, 2, 11}\nE Extra items in the left set:\nE 1\nE 23\nE Extra items in the right set:\nE 2\nE Use -v to get the full diff\n\ntests/test_assertions.py:56: AssertionError"}, "start": 1591176793781, "stop": 1591176793781, "uuid": "fb546629-db73-4430-9884-52613ca75a0b", "historyId": "ab5141e061250e4f2638fbbce67d3ff0", "testCaseId": "61b71ab9b43aa9e506f5b561e4436abb", "fullName": "tests.test_assertions.TestCollections#test_set", "labels": [{"name": "parentSuite", "value": "tests"}, {"name": "suite", "value": "test_assertions"}, {"name": "subSuite", "value": "TestCollections"}, {"name": "host", "value": "LIUMENGJIAdeMacBook-Pro.local"}, {"name": "thread", "value": "78122-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "tests.test_assertions"}]} -------------------------------------------------------------------------------- /result/e8fdfd3f-138b-4ef3-83fa-a7e6f196f7dc-attachment.txt: -------------------------------------------------------------------------------- 1 | user password 2 | -------------------------------------------------------------------------------- /result/ea9de2d3-6224-4c44-aed4-e2374cea5b31-result.json: -------------------------------------------------------------------------------- 1 | {"name": "test_zero_divison", "status": "passed", "start": 1591176793784, "stop": 1591176793784, "uuid": "bb8837ba-840d-4743-a04b-77ce84e9ca38", "historyId": "a3f01f05f43e1c312d06cc3fb4e34b81", "testCaseId": "63f32f761693db36c9b8bb5418661412", "fullName": "tests.test_assertions#test_zero_divison", "labels": [{"name": "parentSuite", "value": "tests"}, {"name": "suite", "value": "test_assertions"}, {"name": "host", "value": "LIUMENGJIAdeMacBook-Pro.local"}, {"name": "thread", "value": "78122-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "tests.test_assertions"}]} -------------------------------------------------------------------------------- /result/eba26e6b-6193-4c41-aa93-9fbadc0f6a9c-attachment.txt: -------------------------------------------------------------------------------- 1 | /Users/liumengjia/Documents/Project/Interface_Automation/config/prod/config.yaml 2 | {'host': {'douban': 'http://api.douban.com'}} 3 | 在数据库中准备测试数据 4 | 清理测试数据 5 | -------------------------------------------------------------------------------- /result/ebc4d12e-6e82-4c98-bf36-92109139959b-attachment.txt: -------------------------------------------------------------------------------- 1 | user password 2 | -------------------------------------------------------------------------------- /result/eeba2bd8-155f-42ee-aea4-c9c9de3d1f76-result.json: -------------------------------------------------------------------------------- 1 | {"name": "test_edit_shopping_trolley", "status": "passed", "start": 1591176793995, "stop": 1591176793995, "uuid": "8be41e09-5a27-4052-857e-f75d01b6f3c7", "historyId": "475dede1bcbe6590f5f95f0d051ebc9a", "testCaseId": "07dfa431568181f6adfa911f60f1d62c", "fullName": "tests.test_shopping_trolley.TestShoppingTrolley#test_edit_shopping_trolley", "labels": [{"name": "story", "value": "修改购物车"}, {"name": "feature", "value": "购物车功能"}, {"name": "parentSuite", "value": "tests"}, {"name": "suite", "value": "test_shopping_trolley"}, {"name": "subSuite", "value": "TestShoppingTrolley"}, {"name": "host", "value": "LIUMENGJIAdeMacBook-Pro.local"}, {"name": "thread", "value": "78122-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "tests.test_shopping_trolley"}]} -------------------------------------------------------------------------------- /result/f3e57fe7-6f9b-4c86-9a7e-c2e88a6b9488-container.json: -------------------------------------------------------------------------------- 1 | {"uuid": "209f7337-a4ef-4694-b6cc-084aa36f70ca", "befores": [{"name": "expected", "status": "passed", "start": 1591176795256, "stop": 1591176795256}], "start": 1591176795256, "stop": 1591176795257} -------------------------------------------------------------------------------- /result/f6833dbb-137a-47c8-989a-3e362a74bb52-result.json: -------------------------------------------------------------------------------- 1 | {"name": "test_last_book_isbn", "status": "failed", "statusDetails": {"message": "AssertionError: assert ['0-395-19395-8'] == '1-395-19395-8'", "trace": "def test_last_book_isbn():\n last_book_isbn = jsonpath.jsonpath(response, f'$.store.book[-1:].isbn')\n # last_book_isbn = jsonpath.jsonpath(response, f'$.store.book[(@.length-1)].isbn')\n> assert last_book_isbn == \"1-395-19395-8\"\nE AssertionError: assert ['0-395-19395-8'] == '1-395-19395-8'\n\ntests/test_json_path.py:79: AssertionError"}, "start": 1591176793905, "stop": 1591176793905, "uuid": "d0863dd7-2c7f-4ace-bfc9-89715af5125b", "historyId": "5556f409e8149ad409291b5b9881416f", "testCaseId": "dbf4003456d78bfc8fb5278149c3d8fa", "fullName": "tests.test_json_path#test_last_book_isbn", "labels": [{"name": "parentSuite", "value": "tests"}, {"name": "suite", "value": "test_json_path"}, {"name": "host", "value": "LIUMENGJIAdeMacBook-Pro.local"}, {"name": "thread", "value": "78122-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "tests.test_json_path"}]} -------------------------------------------------------------------------------- /result/f6e47e76-2adb-41dd-a132-e1cf9257a5f9-result.json: -------------------------------------------------------------------------------- 1 | {"name": "test_has_color", "status": "failed", "statusDetails": {"message": "AssertionError: assert 'green' == 'red'\n - green\n + red", "trace": "def test_has_color():\n \"\"\"\n '$..[?(@.color)]'表示根节点下具有color属性的对象\n \"\"\"\n colorful_goods = jsonpath.jsonpath(response, '$.store..[?(@.color)]')\n> assert \"green\" == colorful_goods[0]['color']\nE AssertionError: assert 'green' == 'red'\nE - green\nE + red\n\ntests/test_json_path.py:110: AssertionError"}, "description": "\n '$..[?(@.color)]'表示根节点下具有color属性的对象\n ", "start": 1591176793915, "stop": 1591176793915, "uuid": "b0b8968d-23ab-48c6-8432-2f9d15820204", "historyId": "b6268ce8363224068bde8ea1a095e57d", "testCaseId": "e6f6a6b23141cbec61b73e148ec8ed23", "fullName": "tests.test_json_path#test_has_color", "labels": [{"name": "parentSuite", "value": "tests"}, {"name": "suite", "value": "test_json_path"}, {"name": "host", "value": "LIUMENGJIAdeMacBook-Pro.local"}, {"name": "thread", "value": "78122-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "tests.test_json_path"}]} -------------------------------------------------------------------------------- /result/f74845d0-dd2e-4f5f-86db-b65960ef273a-result.json: -------------------------------------------------------------------------------- 1 | {"name": "test_string_2", "status": "failed", "statusDetails": {"message": "AssertionError: assert 'foo 1 bar' == 'foo 2 bar'\n - foo 1 bar\n ? ^\n + foo 2 bar\n ? ^", "trace": "self = \n\n def test_string_2(self):\n> assert \"foo 1 bar\" == \"foo 2 bar\"\nE AssertionError: assert 'foo 1 bar' == 'foo 2 bar'\nE - foo 1 bar\nE ? ^\nE + foo 2 bar\nE ? ^\n\ntests/test_assertions.py:18: AssertionError"}, "start": 1591176793745, "stop": 1591176793745, "uuid": "2f6e0b38-edf3-44cb-98ee-9b7b10dae080", "historyId": "beecfaa6debd3672eebec86c96e2bfd8", "testCaseId": "fd19bfb61dbf7a1842574f9c88cb7d2b", "fullName": "tests.test_assertions.TestStringAssertions#test_string_2", "labels": [{"name": "parentSuite", "value": "tests"}, {"name": "suite", "value": "test_assertions"}, {"name": "subSuite", "value": "TestStringAssertions"}, {"name": "host", "value": "LIUMENGJIAdeMacBook-Pro.local"}, {"name": "thread", "value": "78122-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "tests.test_assertions"}]} -------------------------------------------------------------------------------- /result/f807eea4-446f-4607-b4f5-080449e823b0-result.json: -------------------------------------------------------------------------------- 1 | {"name": "test_list2", "status": "failed", "statusDetails": {"message": "AssertionError: assert [0, 1, 2] == [0, 1, [1, 2]]\n At index 2 diff: 2 != [1, 2]\n Use -v to get the full diff", "trace": "self = \n\n def test_list2(self):\n> assert [0,1,2] == [0,1,[1,2]]\nE assert [0, 1, 2] == [0, 1, [1, 2]]\nE At index 2 diff: 2 != [1, 2]\nE Use -v to get the full diff\n\ntests/test_assertions.py:50: AssertionError"}, "start": 1591176793772, "stop": 1591176793773, "uuid": "c4060108-4e5b-489f-b614-47b3bd0fb7af", "historyId": "8799213a80221460c5a992f412a8b00c", "testCaseId": "1000bd682931fe10d0b28d18f717caa4", "fullName": "tests.test_assertions.TestCollections#test_list2", "labels": [{"name": "parentSuite", "value": "tests"}, {"name": "suite", "value": "test_assertions"}, {"name": "subSuite", "value": "TestCollections"}, {"name": "host", "value": "LIUMENGJIAdeMacBook-Pro.local"}, {"name": "thread", "value": "78122-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "tests.test_assertions"}]} -------------------------------------------------------------------------------- /result/f942d166-bb96-477f-9a8d-55792d395e8e-result.json: -------------------------------------------------------------------------------- 1 | {"name": "test_dict2", "status": "failed", "statusDetails": {"message": "AssertionError: assert {'a': 0, 'b': {'c': 0}} == {'a': 0, 'b': {'c': 2}}\n Omitting 1 identical items, use -vv to show\n Differing items:\n {'b': {'c': 0}} != {'b': {'c': 2}}\n Full diff:\n - {'a': 0, 'b': {'c': 0}}\n ? ^\n + {'a': 0, 'b': {'c': 2}}...\n \n ...Full output truncated (2 lines hidden), use '-vv' to show", "trace": "self = \n\n def test_dict2(self):\n exp = {\"a\":0,\"b\":{\"c\":0}}\n act = {\"a\":0,\"b\":{\"c\":2}}\n> assert exp == act\nE AssertionError: assert {'a': 0, 'b': {'c': 0}} == {'a': 0, 'b': {'c': 2}}\nE Omitting 1 identical items, use -vv to show\nE Differing items:\nE {'b': {'c': 0}} != {'b': {'c': 2}}\nE Full diff:\nE - {'a': 0, 'b': {'c': 0}}\nE ? ^\nE + {'a': 0, 'b': {'c': 2}}...\nE \nE ...Full output truncated (2 lines hidden), use '-vv' to show\n\ntests/test_assertions.py:42: AssertionError"}, "start": 1591177964086, "stop": 1591177964087, "uuid": "bc0d2166-5207-4121-b474-ef572c3afde7", "historyId": "f18de00a56d94fe7645c550bd93c6d0f", "testCaseId": "3254e09cf8abadf0fb4cc5fb91ab9c78", "fullName": "tests.test_assertions.TestCollections#test_dict2", "labels": [{"name": "parentSuite", "value": "tests"}, {"name": "suite", "value": "test_assertions"}, {"name": "subSuite", "value": "TestCollections"}, {"name": "host", "value": "LIUMENGJIAdeMacBook-Pro.local"}, {"name": "thread", "value": "78362-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "tests.test_assertions"}]} -------------------------------------------------------------------------------- /result/f977f865-63c4-4c7a-88c6-ee42c8d8a01c-result.json: -------------------------------------------------------------------------------- 1 | {"name": "test_all_goods", "status": "passed", "description": "'$.store.*',表示根节点$下store属性下的所有对象,没写", "attachments": [{"name": "stdout", "source": "aab0626c-76f1-48f4-ac4d-b4f0bda66e21-attachment.txt", "type": "text/plain"}], "start": 1591176793895, "stop": 1591176793895, "uuid": "07b41e8a-4ff2-4520-8c7d-ac9867d46a68", "historyId": "8028e6f4ac19ae14f86a77aea6c5cfb2", "testCaseId": "a1a11d4c50139c7b85b616bedd24c345", "fullName": "tests.test_json_path#test_all_goods", "labels": [{"name": "parentSuite", "value": "tests"}, {"name": "suite", "value": "test_json_path"}, {"name": "host", "value": "LIUMENGJIAdeMacBook-Pro.local"}, {"name": "thread", "value": "78122-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "tests.test_json_path"}]} -------------------------------------------------------------------------------- /result/fed5e1fd-fc71-45ed-af15-c1eaa004bc31-result.json: -------------------------------------------------------------------------------- 1 | {"name": "test_2books_cheap_than_10", "status": "passed", "description": "\n '$..book[?(@.price<10)]'表示根节点下book属性的所有price小于10的元素\n ", "start": 1591177964256, "stop": 1591177964257, "uuid": "9c09459a-f0cd-48d9-b0a9-89b266fa028d", "historyId": "93799719dae2347edf65381bc2104c04", "testCaseId": "576bfdad53247082bb70de2bef9e2c78", "fullName": "tests.test_json_path#test_2books_cheap_than_10", "labels": [{"name": "parentSuite", "value": "tests"}, {"name": "suite", "value": "test_json_path"}, {"name": "host", "value": "LIUMENGJIAdeMacBook-Pro.local"}, {"name": "thread", "value": "78362-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "tests.test_json_path"}]} -------------------------------------------------------------------------------- /result/ff93edf3-b12c-4495-907e-0c508dec9623-container.json: -------------------------------------------------------------------------------- 1 | {"uuid": "670a758a-cd66-4906-9aab-7da6fe7f74ba", "befores": [{"name": "expected", "status": "passed", "start": 1591177964112, "stop": 1591177964112}], "start": 1591177964112, "stop": 1591177964177} -------------------------------------------------------------------------------- /testcase/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liumengjia/Web_Interface_Automation/30284556e4bd2d25e347d48858c9400a58baaeda/testcase/.DS_Store -------------------------------------------------------------------------------- /testcase/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | # -*- coding: UTF-8 -*- 3 | # @Time : 2020-03-08 23:33 4 | 5 | # @Author : liumengjia 6 | 7 | # @File : __init__.py 8 | 9 | # @Software: PyCharm -------------------------------------------------------------------------------- /testcase/goods/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | # -*- coding: UTF-8 -*- 3 | # @Time : 2020-10-14 14:52 4 | 5 | # @Author : liumengjia 6 | 7 | # @File : __init__.py.py 8 | 9 | # @Software: PyCharm -------------------------------------------------------------------------------- /testcase/goods/test_browsingGoodsList.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | # -*- coding: UTF-8 -*- 3 | # @Time : 2020-09-28 10:17 4 | 5 | # @Author : liumengjia 6 | 7 | # @File : test_browsingGoodsList.py 8 | 9 | # @Software: PyCharm 10 | 11 | from utils import data_enc 12 | from utils.test_excel import TestExcel 13 | import pytest 14 | import requests 15 | import allure 16 | 17 | actual_result = [] 18 | 19 | s = requests.session() 20 | 21 | wb = TestExcel('../../data/goods.xlsx','browsingGoodsList') 22 | data = wb.test_get_data() 23 | data1 = [item['data'] for item in data] 24 | expect_result = [item['expect_result'] for item in data] 25 | status_code = [item['status_code'] for item in data] 26 | 27 | path,headers,data = data_enc.test_get_data() 28 | parametrize=[(path,headers,data)] 29 | print(parametrize) 30 | print(len(parametrize)) 31 | 32 | class Test_browsingGoodsList(): 33 | @allure.story("code==200时,检查code值和msg") 34 | 35 | @pytest.fixture(scope="class") 36 | @pytest.mark.parametrize('path,headers,data',parametrize) 37 | def test_browsingGoodsList(self,path,headers,data): 38 | 39 | r = s.post(path="path",headers="headers",data="data") 40 | actual_result.append(r.text) # 把响应内容写入Excel中 41 | response = r.json() 42 | 43 | if response["code"] != 200: 44 | assert response["code"] == status_code[0] # 预期结果code值 45 | assert response["error"]["msg"] == expect_result[2][1] # 预期结果error中msg值 46 | else: 47 | assert response["code"] == status_code[0] # 预期结果code值 48 | assert response["msg"] == expect_result[3] # 预期结果msg值 49 | assert response["data"]["uid"] == expect_result[2][1] # 预期结果data中uid值 50 | 51 | Test_browsingGoodsList().test_browsingGoodsList(path,headers,data) 52 | 53 | maxRow = wb.maxRow 54 | 55 | # 把响应内容写入Excel中 56 | for i,value in enumerate(actual_result,2): 57 | wb.sheet.cell(row=i,column=11,value=value) 58 | wb.test_save_data() 59 | 60 | if __name__=='__main__': 61 | t = Test_browsingGoodsList() 62 | t.test_browsingGoodsList(path,headers,data) 63 | -------------------------------------------------------------------------------- /testcase/goods/test_favouriteAddGoods.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | # -*- coding: UTF-8 -*- 3 | # @Time : 2020-09-28 10:17 4 | 5 | # @Author : liumengjia 6 | 7 | # @File : test_favouriteAddGoods.py 8 | 9 | # @Software: PyCharm 10 | 11 | from utils import data_enc 12 | from utils.test_excel import TestExcel 13 | import pytest 14 | import requests 15 | import allure 16 | 17 | actual_result = [] 18 | 19 | s = requests.session() 20 | 21 | wb = TestExcel('../../data/goods.xlsx','favouriteAddGoods') 22 | data = wb.test_get_data() 23 | data1 = [item['data'] for item in data] 24 | expect_result = [item['expect_result'] for item in data] 25 | status_code = [item['status_code'] for item in data] 26 | 27 | path,headers,data = data_enc.test_get_data() 28 | parametrize=[(path,headers,data)] 29 | print(parametrize) 30 | print(len(parametrize)) 31 | 32 | class Test_favouriteAddGoods(): 33 | @allure.story("code==200时,检查code值和msg") 34 | 35 | @pytest.fixture(scope="class") 36 | @pytest.mark.parametrize('path,headers,data',parametrize) 37 | def test_favouriteAddGoods(self,path,headers,data): 38 | 39 | r = s.post(path="path",headers="headers",data="data") 40 | actual_result.append(r.text) # 把响应内容写入Excel中 41 | response = r.json() 42 | 43 | if response["code"] != 200: 44 | assert response["code"] == status_code[0] # 预期结果code值 45 | assert response["error"]["msg"] == expect_result[2][1] # 预期结果error中msg值 46 | else: 47 | assert response["code"] == status_code[0] # 预期结果code值 48 | assert response["msg"] == expect_result[3] # 预期结果msg值 49 | assert response["data"]["uid"] == expect_result[2][1] # 预期结果data中uid值 50 | 51 | Test_favouriteAddGoods().test_favouriteAddGoods(path,headers,data) 52 | 53 | maxRow = wb.maxRow 54 | 55 | # 把响应内容写入Excel中 56 | for i,value in enumerate(actual_result,2): 57 | wb.sheet.cell(row=i,column=11,value=value) 58 | wb.test_save_data() 59 | 60 | if __name__=='__main__': 61 | t = Test_favouriteAddGoods() 62 | t.test_favouriteAddGoods(path,headers,data) 63 | -------------------------------------------------------------------------------- /testcase/goods/test_favouriteGoodsList.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | # -*- coding: UTF-8 -*- 3 | # @Time : 2020-09-28 10:17 4 | 5 | # @Author : liumengjia 6 | 7 | # @File : test_favouriteGoodsList.py 8 | 9 | # @Software: PyCharm 10 | 11 | from utils import data_enc 12 | from utils.test_excel import TestExcel 13 | import pytest 14 | import requests 15 | import allure 16 | 17 | actual_result = [] 18 | 19 | s = requests.session() 20 | 21 | wb = TestExcel('../../data/goods.xlsx','favouriteGoodsList') 22 | data = wb.test_get_data() 23 | data1 = [item['data'] for item in data] 24 | expect_result = [item['expect_result'] for item in data] 25 | status_code = [item['status_code'] for item in data] 26 | 27 | path,headers,data = data_enc.test_get_data() 28 | parametrize=[(path,headers,data)] 29 | print(parametrize) 30 | print(len(parametrize)) 31 | 32 | class Test_favouriteGoodsList(): 33 | @allure.story("code==200时,检查code值和msg") 34 | 35 | @pytest.fixture(scope="class") 36 | @pytest.mark.parametrize('path,headers,data',parametrize) 37 | def test_favouriteGoodsList(self,path,headers,data): 38 | 39 | r = s.post(path="path",headers="headers",data="data") 40 | actual_result.append(r.text) # 把响应内容写入Excel中 41 | response = r.json() 42 | 43 | if response["code"] != 200: 44 | assert response["code"] == status_code[0] # 预期结果code值 45 | assert response["error"]["msg"] == expect_result[2][1] # 预期结果error中msg值 46 | else: 47 | assert response["code"] == status_code[0] # 预期结果code值 48 | assert response["msg"] == expect_result[3] # 预期结果msg值 49 | assert response["data"]["uid"] == expect_result[2][1] # 预期结果data中uid值 50 | 51 | Test_favouriteGoodsList().test_favouriteGoodsList(path,headers,data) 52 | 53 | maxRow = wb.maxRow 54 | 55 | # 把响应内容写入Excel中 56 | for i,value in enumerate(actual_result,2): 57 | wb.sheet.cell(row=i,column=11,value=value) 58 | wb.test_save_data() 59 | 60 | if __name__=='__main__': 61 | t = Test_favouriteGoodsList() 62 | t.test_favouriteGoodsList(path,headers,data) 63 | -------------------------------------------------------------------------------- /testcase/order/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | # -*- coding: UTF-8 -*- 3 | # @Time : 2020-10-14 15:12 4 | 5 | # @Author : liumengjia 6 | 7 | # @File : __init__.py.py 8 | 9 | # @Software: PyCharm -------------------------------------------------------------------------------- /testcase/order/test_deleteOrder.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | # -*- coding: UTF-8 -*- 3 | # @Time : 2020-09-28 10:17 4 | 5 | # @Author : liumengjia 6 | 7 | # @File : test_deleteOrder.py 8 | 9 | # @Software: PyCharm 10 | 11 | from utils import data_enc 12 | from utils.test_excel import TestExcel 13 | import pytest 14 | import requests 15 | import allure 16 | 17 | actual_result = [] 18 | 19 | s = requests.session() 20 | 21 | wb = TestExcel('../../data/goods.xlsx','deleteOrder') 22 | data = wb.test_get_data() 23 | data1 = [item['data'] for item in data] 24 | expect_result = [item['expect_result'] for item in data] 25 | status_code = [item['status_code'] for item in data] 26 | 27 | path,headers,data = data_enc.test_get_data() 28 | parametrize=[(path,headers,data)] 29 | print(parametrize) 30 | print(len(parametrize)) 31 | 32 | class Test_deleteOrder(): 33 | @allure.story("code==200时,检查code值和msg") 34 | 35 | @pytest.fixture(scope="class") 36 | @pytest.mark.parametrize('path,headers,data',parametrize) 37 | def test_deleteOrder(self,path,headers,data): 38 | 39 | r = s.post(path="path",headers="headers",data="data") 40 | actual_result.append(r.text) # 把响应内容写入Excel中 41 | response = r.json() 42 | 43 | if response["code"] != 200: 44 | assert response["code"] == status_code[0] # 预期结果code值 45 | assert response["error"]["msg"] == expect_result[2][1] # 预期结果error中msg值 46 | else: 47 | assert response["code"] == status_code[0] # 预期结果code值 48 | assert response["msg"] == expect_result[3] # 预期结果msg值 49 | assert response["data"]["uid"] == expect_result[2][1] # 预期结果data中uid值 50 | 51 | Test_deleteOrder().test_deleteOrder(path,headers,data) 52 | 53 | maxRow = wb.maxRow 54 | 55 | # 把响应内容写入Excel中 56 | for i,value in enumerate(actual_result,2): 57 | wb.sheet.cell(row=i,column=11,value=value) 58 | wb.test_save_data() 59 | 60 | if __name__=='__main__': 61 | t = Test_deleteOrder() 62 | t.test_deleteOrder(path,headers,data) 63 | -------------------------------------------------------------------------------- /testcase/order/test_getBuyerOrderList.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | # -*- coding: UTF-8 -*- 3 | # @Time : 2020-09-28 10:17 4 | 5 | # @Author : liumengjia 6 | 7 | # @File : test_getBuyerOrderList.py 8 | 9 | # @Software: PyCharm 10 | 11 | from utils import data_enc 12 | from utils.test_excel import TestExcel 13 | import pytest 14 | import requests 15 | import allure 16 | 17 | actual_result = [] 18 | 19 | s = requests.session() 20 | 21 | wb = TestExcel('../../data/goods.xlsx','getBuyerOrderList') 22 | data = wb.test_get_data() 23 | data1 = [item['data'] for item in data] 24 | expect_result = [item['expect_result'] for item in data] 25 | status_code = [item['status_code'] for item in data] 26 | 27 | path,headers,data = data_enc.test_get_data() 28 | parametrize=[(path,headers,data)] 29 | print(parametrize) 30 | print(len(parametrize)) 31 | 32 | class Test_getBuyerOrderList(): 33 | @allure.story("code==200时,检查code值和msg") 34 | 35 | @pytest.fixture(scope="class") 36 | @pytest.mark.parametrize('path,headers,data',parametrize) 37 | def test_getBuyerOrderList(self,path,headers,data): 38 | 39 | r = s.post(path="path",headers="headers",data="data") 40 | actual_result.append(r.text) # 把响应内容写入Excel中 41 | response = r.json() 42 | 43 | if response["code"] != 200: 44 | assert response["code"] == status_code[0] # 预期结果code值 45 | assert response["error"]["msg"] == expect_result[2][1] # 预期结果error中msg值 46 | else: 47 | assert response["code"] == status_code[0] # 预期结果code值 48 | assert response["msg"] == expect_result[3] # 预期结果msg值 49 | assert response["data"]["uid"] == expect_result[2][1] # 预期结果data中uid值 50 | 51 | Test_getBuyerOrderList().test_getBuyerOrderList(path,headers,data) 52 | 53 | maxRow = wb.maxRow 54 | 55 | # 把响应内容写入Excel中 56 | for i,value in enumerate(actual_result,2): 57 | wb.sheet.cell(row=i,column=11,value=value) 58 | wb.test_save_data() 59 | 60 | if __name__=='__main__': 61 | t = Test_getBuyerOrderList() 62 | t.test_getBuyerOrderList(path,headers,data) 63 | -------------------------------------------------------------------------------- /testcase/order/test_orderCancel.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | # -*- coding: UTF-8 -*- 3 | # @Time : 2020-09-28 10:17 4 | 5 | # @Author : liumengjia 6 | 7 | # @File : test_orderCancel.py 8 | 9 | # @Software: PyCharm 10 | 11 | from utils import data_enc 12 | from utils.test_excel import TestExcel 13 | import pytest 14 | import requests 15 | import allure 16 | 17 | actual_result = [] 18 | 19 | s = requests.session() 20 | 21 | wb = TestExcel('../../data/goods.xlsx','orderCancel') 22 | data = wb.test_get_data() 23 | data1 = [item['data'] for item in data] 24 | expect_result = [item['expect_result'] for item in data] 25 | status_code = [item['status_code'] for item in data] 26 | 27 | path,headers,data = data_enc.test_get_data() 28 | parametrize=[(path,headers,data)] 29 | print(parametrize) 30 | print(len(parametrize)) 31 | 32 | class Test_orderCancel(): 33 | @allure.story("code==200时,检查code值和msg") 34 | 35 | @pytest.fixture(scope="class") 36 | @pytest.mark.parametrize('path,headers,data',parametrize) 37 | def test_orderCancel(self,path,headers,data): 38 | 39 | r = s.post(path="path",headers="headers",data="data") 40 | actual_result.append(r.text) # 把响应内容写入Excel中 41 | response = r.json() 42 | 43 | if response["code"] != 200: 44 | assert response["code"] == status_code[0] # 预期结果code值 45 | assert response["error"]["msg"] == expect_result[2][1] # 预期结果error中msg值 46 | else: 47 | assert response["code"] == status_code[0] # 预期结果code值 48 | assert response["msg"] == expect_result[3] # 预期结果msg值 49 | assert response["data"]["uid"] == expect_result[2][1] # 预期结果data中uid值 50 | 51 | Test_orderCancel().test_orderCancel(path,headers,data) 52 | 53 | maxRow = wb.maxRow 54 | 55 | # 把响应内容写入Excel中 56 | for i,value in enumerate(actual_result,2): 57 | wb.sheet.cell(row=i,column=11,value=value) 58 | wb.test_save_data() 59 | 60 | if __name__=='__main__': 61 | t = Test_orderCancel() 62 | t.test_orderCancel(path,headers,data) 63 | -------------------------------------------------------------------------------- /testcase/order/test_refundSubmit.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | # -*- coding: UTF-8 -*- 3 | # @Time : 2020-09-28 10:17 4 | 5 | # @Author : liumengjia 6 | 7 | # @File : test_refundSubmit.py 8 | 9 | # @Software: PyCharm 10 | 11 | from utils import data_enc 12 | from utils.test_excel import TestExcel 13 | import pytest 14 | import requests 15 | import allure 16 | 17 | actual_result = [] 18 | 19 | s = requests.session() 20 | 21 | wb = TestExcel('../../data/goods.xlsx','refundSubmit') 22 | data = wb.test_get_data() 23 | data1 = [item['data'] for item in data] 24 | expect_result = [item['expect_result'] for item in data] 25 | status_code = [item['status_code'] for item in data] 26 | 27 | path,headers,data = data_enc.test_get_data() 28 | parametrize=[(path,headers,data)] 29 | print(parametrize) 30 | print(len(parametrize)) 31 | 32 | class Test_refundSubmit(): 33 | @allure.story("code==200时,检查code值和msg") 34 | 35 | @pytest.fixture(scope="class") 36 | @pytest.mark.parametrize('path,headers,data',parametrize) 37 | def test_refundSubmit(self,path,headers,data): 38 | 39 | r = s.post(path="path",headers="headers",data="data") 40 | actual_result.append(r.text) # 把响应内容写入Excel中 41 | response = r.json() 42 | 43 | if response["code"] != 200: 44 | assert response["code"] == status_code[0] # 预期结果code值 45 | assert response["error"]["msg"] == expect_result[2][1] # 预期结果error中msg值 46 | else: 47 | assert response["code"] == status_code[0] # 预期结果code值 48 | assert response["msg"] == expect_result[3] # 预期结果msg值 49 | assert response["data"]["uid"] == expect_result[2][1] # 预期结果data中uid值 50 | 51 | Test_refundSubmit().test_refundSubmit(path,headers,data) 52 | 53 | maxRow = wb.maxRow 54 | 55 | # 把响应内容写入Excel中 56 | for i,value in enumerate(actual_result,2): 57 | wb.sheet.cell(row=i,column=11,value=value) 58 | wb.test_save_data() 59 | 60 | if __name__=='__main__': 61 | t = Test_refundSubmit() 62 | t.test_refundSubmit(path,headers,data) 63 | -------------------------------------------------------------------------------- /testcase/user/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | # -*- coding: UTF-8 -*- 3 | # @Time : 2020-09-28 10:12 4 | 5 | # @Author : liumengjia 6 | 7 | # @File : __init__.py.py 8 | 9 | # @Software: PyCharm -------------------------------------------------------------------------------- /testcase/user/test_accountPwdLogin.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | # -*- coding: UTF-8 -*- 3 | # @Time : 2020-09-28 10:17 4 | 5 | # @Author : liumengjia 6 | 7 | # @File : test_accountPwdLogin.py 8 | 9 | # @Software: PyCharm 10 | 11 | from utils import data_enc 12 | from utils.test_excel import TestExcel 13 | import pytest 14 | import requests 15 | import allure 16 | 17 | actual_result = [] 18 | 19 | s = requests.session() 20 | 21 | wb = TestExcel('../../data/user.xlsx','accountPwdLogin') 22 | data = wb.test_get_data() 23 | data1 = [item['data'] for item in data] 24 | expect_result = [item['expect_result'] for item in data] 25 | status_code = [item['status_code'] for item in data] 26 | 27 | path,headers,data = data_enc.test_get_data() 28 | parametrize=[(path,headers,data)] 29 | print(parametrize) 30 | print(len(parametrize)) 31 | 32 | class Test_accountPwdLogin(): 33 | @allure.story("code==200时,检查code值和msg") 34 | 35 | @pytest.fixture(scope="class") 36 | @pytest.mark.parametrize('path,headers,data',parametrize) 37 | def test_accountPwdLogin(self,path,headers,data): 38 | 39 | r = s.post(path="path",headers="headers",data="data") 40 | actual_result.append(r.text) # 把响应内容写入Excel中 41 | response = r.json() 42 | 43 | if response["code"] != 200: 44 | assert response["code"] == status_code[0] # 预期结果code值 45 | assert response["error"]["msg"] == expect_result[2][1] # 预期结果error中msg值 46 | else: 47 | assert response["code"] == status_code[0] # 预期结果code值 48 | assert response["msg"] == expect_result[3] # 预期结果msg值 49 | assert response["data"]["uid"] == expect_result[2][1] # 预期结果data中uid值 50 | 51 | Test_accountPwdLogin().test_accountPwdLogin(path,headers,data) 52 | 53 | maxRow = wb.maxRow 54 | 55 | # 把响应内容写入Excel中 56 | for i,value in enumerate(actual_result,2): 57 | wb.sheet.cell(row=i,column=11,value=value) 58 | wb.test_save_data() 59 | 60 | if __name__=='__main__': 61 | t = Test_accountPwdLogin() 62 | t.test_accountPwdLogin(path,headers,data) 63 | -------------------------------------------------------------------------------- /testcase/user/test_mobileCaptchaLogin.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | # -*- coding: UTF-8 -*- 3 | # @Time : 2020-09-28 10:17 4 | 5 | # @Author : liumengjia 6 | 7 | # @File : test_mobileCaptchaLogin.py 8 | 9 | # @Software: PyCharm 10 | 11 | from utils import data_enc 12 | from utils.test_excel import TestExcel 13 | import pytest 14 | import requests 15 | import allure 16 | 17 | actual_result = [] 18 | 19 | s = requests.session() 20 | 21 | wb = TestExcel('../../data/user.xlsx','mobileCaptchaLogin') 22 | data = wb.test_get_data() 23 | data1 = [item['data'] for item in data] 24 | expect_result = [item['expect_result'] for item in data] 25 | status_code = [item['status_code'] for item in data] 26 | 27 | path,headers,data = data_enc.test_get_data() 28 | parametrize=[(path,headers,data)] 29 | print(parametrize) 30 | print(len(parametrize)) 31 | 32 | class Test_mobileCaptchaLogin(): 33 | @allure.story("code==200时,检查code值和msg") 34 | 35 | @pytest.fixture(scope="class") 36 | @pytest.mark.parametrize('path,headers,data',parametrize) 37 | def test_mobileCaptchaLogin(self,path,headers,data): 38 | 39 | r = s.post(path="path",headers="headers",data="data") 40 | actual_result.append(r.text) # 把响应内容写入Excel中 41 | response = r.json() 42 | 43 | if response["code"] != 200: 44 | assert response["code"] == status_code[0] # 预期结果code值 45 | assert response["error"]["msg"] == expect_result[2][1] # 预期结果error中msg值 46 | else: 47 | assert response["code"] == status_code[0] # 预期结果code值 48 | assert response["msg"] == expect_result[3] # 预期结果msg值 49 | assert response["data"]["uid"] == expect_result[2][1] # 预期结果data中uid值 50 | 51 | Test_mobileCaptchaLogin().test_mobileCaptchaLogin(path,headers,data) 52 | 53 | maxRow = wb.maxRow 54 | 55 | # 把响应内容写入Excel中 56 | for i,value in enumerate(actual_result,2): 57 | wb.sheet.cell(row=i,column=11,value=value) 58 | wb.test_save_data() 59 | 60 | if __name__=='__main__': 61 | t = Test_mobileCaptchaLogin() 62 | t.test_mobileCaptchaLogin(path,headers,data) 63 | -------------------------------------------------------------------------------- /testcase/user/test_modifyCommon.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | # -*- coding: UTF-8 -*- 3 | # @Time : 2020-09-28 10:17 4 | 5 | # @Author : liumengjia 6 | 7 | # @File : test_modifyCommon.py 8 | 9 | # @Software: PyCharm 10 | 11 | from utils import data_enc 12 | from utils.test_excel import TestExcel 13 | import pytest 14 | import requests 15 | import allure 16 | 17 | actual_result = [] 18 | 19 | s = requests.session() 20 | 21 | wb = TestExcel('../../data/user.xlsx','modifyCommon') 22 | data = wb.test_get_data() 23 | data1 = [item['data'] for item in data] 24 | expect_result = [item['expect_result'] for item in data] 25 | status_code = [item['status_code'] for item in data] 26 | 27 | path,headers,data = data_enc.test_get_data() 28 | parametrize=[(path,headers,data)] 29 | print(parametrize) 30 | print(len(parametrize)) 31 | 32 | class Test_modifyCommon(): 33 | @allure.story("code==200时,检查code值和msg") 34 | 35 | @pytest.fixture(scope="class") 36 | @pytest.mark.parametrize('path,headers,data',parametrize) 37 | def test_modifyCommon(self,path,headers,data): 38 | 39 | r = s.post(path="path",headers="headers",data="data") 40 | actual_result.append(r.text) # 把响应内容写入Excel中 41 | response = r.json() 42 | 43 | if response["code"] != 200: 44 | assert response["code"] == status_code[0] # 预期结果code值 45 | assert response["error"]["msg"] == expect_result[2][1] # 预期结果error中msg值 46 | else: 47 | assert response["code"] == status_code[0] # 预期结果code值 48 | assert response["msg"] == expect_result[3] # 预期结果msg值 49 | assert response["data"]["uid"] == expect_result[2][1] # 预期结果data中uid值 50 | 51 | Test_modifyCommon().test_modifyCommon(path,headers,data) 52 | 53 | maxRow = wb.maxRow 54 | 55 | # 把响应内容写入Excel中 56 | for i,value in enumerate(actual_result,2): 57 | wb.sheet.cell(row=i,column=11,value=value) 58 | wb.test_save_data() 59 | 60 | if __name__=='__main__': 61 | t = Test_modifyCommon() 62 | t.test_modifyCommon(path,headers,data) 63 | -------------------------------------------------------------------------------- /testcase/user/test_thirdPartyLogin.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | # -*- coding: UTF-8 -*- 3 | # @Time : 2020-09-28 10:17 4 | 5 | # @Author : liumengjia 6 | 7 | # @File : test_thirdPartyLogin.py 8 | 9 | # @Software: PyCharm 10 | 11 | from utils import data_enc 12 | from utils.test_excel import TestExcel 13 | import pytest 14 | import requests 15 | import allure 16 | 17 | actual_result = [] 18 | 19 | s = requests.session() 20 | 21 | wb = TestExcel('../../data/user.xlsx','thirdPartyLogin') 22 | data = wb.test_get_data() 23 | data1 = [item['data'] for item in data] 24 | expect_result = [item['expect_result'] for item in data] 25 | status_code = [item['status_code'] for item in data] 26 | 27 | path,headers,data = data_enc.test_get_data() 28 | parametrize=[(path,headers,data)] 29 | print(parametrize) 30 | print(len(parametrize)) 31 | 32 | class Test_thirdPartyLogin(): 33 | @allure.story("code==200时,检查code值和msg") 34 | 35 | @pytest.fixture(scope="class") 36 | @pytest.mark.parametrize('path,headers,data',parametrize) 37 | def test_thirdPartyLogin(self,path,headers,data): 38 | 39 | r = s.post(path="path",headers="headers",data="data") 40 | actual_result.append(r.text) # 把响应内容写入Excel中 41 | response = r.json() 42 | 43 | if response["code"] != 200: 44 | assert response["code"] == status_code[0] # 预期结果code值 45 | assert response["error"]["msg"] == expect_result[2][1] # 预期结果error中msg值 46 | else: 47 | assert response["code"] == status_code[0] # 预期结果code值 48 | assert response["msg"] == expect_result[3] # 预期结果msg值 49 | assert response["data"]["uid"] == expect_result[2][1] # 预期结果data中uid值 50 | 51 | Test_thirdPartyLogin().test_thirdPartyLogin(path,headers,data) 52 | 53 | maxRow = wb.maxRow 54 | 55 | # 把响应内容写入Excel中 56 | for i,value in enumerate(actual_result,2): 57 | wb.sheet.cell(row=i,column=11,value=value) 58 | wb.test_save_data() 59 | 60 | if __name__=='__main__': 61 | t = Test_thirdPartyLogin() 62 | t.test_thirdPartyLogin(path,headers,data) 63 | -------------------------------------------------------------------------------- /utils/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liumengjia/Web_Interface_Automation/30284556e4bd2d25e347d48858c9400a58baaeda/utils/.DS_Store -------------------------------------------------------------------------------- /utils/data_enc.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | # -*- coding: UTF-8 -*- 3 | # @Time : 2020-09-28 14:12 4 | 5 | # @Author : liumengjia 6 | 7 | # @File : data_enc.py 8 | 9 | # @Software: PyCharm 10 | 11 | from utils.test_excel import TestExcel 12 | 13 | def test_get_data(): 14 | wb = TestExcel('../data/user.xlsx','accountPwdLogin') 15 | data = wb.test_get_data() 16 | 17 | path = [item['path'] for item in data] 18 | headers = [item['headers'] for item in data] 19 | data = [item['data'] for item in data] 20 | 21 | return path,headers,data 22 | 23 | if __name__=='__main__': 24 | print(test_get_data()) -------------------------------------------------------------------------------- /utils/test_excel.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | # -*- coding: UTF-8 -*- 3 | # @Time : 2020-02-25 23:20 4 | 5 | # @Author : liumengjia 6 | 7 | # @File : test_excel.py 8 | 9 | # @Software: PyCharm 10 | 11 | from openpyxl import load_workbook 12 | 13 | class TestExcel(): 14 | # 使用__init__方法实现:只要实例化类时候就会调用__init__方法 15 | def __init__(self,file_name,sheet_name): 16 | self.file_name = file_name 17 | self.sheet_name = sheet_name 18 | self.wb = load_workbook(self.file_name) 19 | self.sheet = self.wb[self.sheet_name] 20 | self.ws = self.wb.active # 激活sheet 21 | self.maxRow = self.ws.max_row 22 | self.maxCol = self.ws.max_column 23 | 24 | def test_get_title(self): 25 | ''' 26 | 获取表格第一行标题行 27 | ''' 28 | title = [] # 存储标题行 29 | for i in range(1,self.sheet.max_column+1): # 遍历每一列 30 | title.append(self.sheet.cell(1,i).value) 31 | 32 | return title 33 | 34 | def test_get_data(self): 35 | ''' 36 | 读取Excel表格数据 37 | ''' 38 | title = self.test_get_title() #返回标题行 39 | test_data = [] 40 | 41 | # 外层循环遍历每行,内层循环遍历每列 42 | for i in range(2,self.sheet.max_row+1): #外层循环遍历每一行,从第2行到最大行 43 | sub_data = {} 44 | for j in range(1,self.sheet.max_column+1): #内层循环遍历每一列,从第1列到最大列 45 | sub_data[title[j-1]] = self.sheet.cell(i,j).value # sub_data[key]=value ,title从0开始 46 | test_data.append(sub_data) 47 | 48 | return test_data 49 | 50 | def test_write_data(self,row,col,value): 51 | self.ws.cell(row,col,value) 52 | 53 | def test_save_data(self): 54 | self.wb.save(self.file_name) 55 | 56 | if __name__=='__main__': 57 | # 使用__init__方法实现:只要实例化类时候就会调用__init__方法 58 | 59 | '''写入数据,如(2,3,"test"),第二行第三列写入数据"test" ''' 60 | TestExcel('../data/user.xlsx','accountPwdLogin').test_write_data(2,3,'test') 61 | 62 | print(TestExcel('../data/user.xlsx','accountPwdLogin').test_get_data()) -------------------------------------------------------------------------------- /utils/test_excel1.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | # -*- coding: UTF-8 -*- 3 | # @Time : 2020-02-25 23:20 4 | 5 | # @Author : liumengjia 6 | 7 | # @File : test_excel.py 8 | 9 | # @Software: PyCharm 10 | 11 | from openpyxl import load_workbook 12 | 13 | class TestExcel(): 14 | # 使用__init__方法实现:只要实例化类时候就会调用__init__方法 15 | def __init__(self,file_name,sheet_name): 16 | self.file_name = file_name 17 | self.sheet_name = sheet_name 18 | self.wb = load_workbook(self.file_name) 19 | self.sheet = self.wb[self.sheet_name] 20 | self.ws = self.wb.active 21 | self.maxRow = self.ws.max_row 22 | self.maxCol = self.ws.max_column 23 | 24 | def test_get_data(self): 25 | data=[] 26 | ''' 27 | 根据传入的坐标来获取值 28 | :param i: 29 | :param j: 30 | :return: 31 | ''' 32 | for i in self.sheet["A"]: 33 | data.append(i.value) 34 | return data 35 | 36 | def test_write_data(self,row,col,value): 37 | self.ws.cell(row,col,value) 38 | self.wb.save(self.file_name) 39 | 40 | if __name__=='__main__': 41 | print(TestExcel('../data/test_addNewClue_data.xlsx','clue').test_get_data()) 42 | -------------------------------------------------------------------------------- /utils/test_excel2.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | # -*- coding: UTF-8 -*- 3 | # @Time : 2020-05-25 14:48 4 | 5 | # @Author : liumengjia 6 | 7 | # @File : test_excel2.py 8 | 9 | # @Software: PyCharm 10 | 11 | from openpyxl import load_workbook 12 | 13 | expect_data = [] 14 | actual_data = [] 15 | 16 | class TestExcel(): 17 | def __init__(self,file_name,sheet_name): 18 | self.file_name = file_name 19 | self.sheet_name = sheet_name 20 | self.wb = load_workbook(self.file_name) 21 | self.sheet = self.wb[self.sheet_name] 22 | 23 | def test_get_expc_data(self): 24 | for i in range(2,self.sheet.max_row+1): 25 | test_data = self.sheet.cell(i,7).value 26 | expect_data.append(test_data) 27 | return expect_data 28 | 29 | def test_get_actual_data(self): 30 | for j in range(2,self.sheet.max_row+1): 31 | sub_data = self.sheet.cell(j,9).value 32 | actual_data.append(sub_data) 33 | return actual_data 34 | 35 | TestExcel('../data/test_clue.xlsx','assignClue').test_get_expc_data() 36 | TestExcel('../data/test_clue.xlsx','assignClue').test_get_actual_data() 37 | 38 | def test_response(): 39 | # 预期结果列表,和实际结果列表断言 40 | assert expect_data == actual_data 41 | 42 | e = eval(expect_data[4]) 43 | print(e) 44 | print(type(e)) 45 | 46 | f = eval(actual_data[4]) 47 | print(f) 48 | print(type(f)) 49 | 50 | def test_result(): 51 | assert e == f 52 | -------------------------------------------------------------------------------- /utils/test_json.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | # -*- coding: UTF-8 -*- 3 | # @Time : 2020-05-02 23:13 4 | 5 | # @Author : liumengjia 6 | 7 | # @File : test_json.py 8 | 9 | # @Software: PyCharm 10 | 11 | import json 12 | 13 | # 从json文件中获取想要的数据test_json.py; 14 | 15 | class Test_json: 16 | 17 | def __init__(self,file_path): 18 | self.file_path = file_path 19 | self.data = self.read_data() 20 | 21 | #读取json文件 22 | def read_data(self): 23 | with open(self.file_path) as fp: 24 | data = json.load(fp) 25 | return data 26 | 27 | #根据关键字获取数据 28 | ''' 29 | dict['key']只能获取存在的值,如果不存在则触发KeyError 30 | dict.get(key, default=None),返回指定键的值,如果值不在字典中返回默认值None 31 | excel文件中请求数据有可能为空,所以用get方法获取 32 | ''' 33 | def get_data(self,key): 34 | # return self.data[key] 35 | return self.data.get(key) 36 | 37 | # 将cookies数据写入json文件 38 | def write_data(self, data): 39 | with open('../json/cookie.json', 'w') as fp: 40 | fp.write(json.dumps(data)) 41 | 42 | if __name__ == '__main__': 43 | json_data = Test_json() 44 | print(json_data.get_data('hotwords')) 45 | print(type(json_data.read_data())) 46 | 47 | -------------------------------------------------------------------------------- /utils/test_response_extract.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | # -*- coding: UTF-8 -*- 3 | # @Time : 2020-03-21 19:42 4 | 5 | # @Author : liumengjia 6 | 7 | # @File : test_response_extract.py 8 | 9 | # @Software: PyCharm 10 | 11 | response={ 12 | 'count_tab_4': 13, 13 | 'total': 13, 14 | 'list': [{ 15 | 'created_at': '2019-12-19 16:10:01', 16 | 'updated_at': '2019-12-19 16:15:01', 17 | 'company': { 18 | 'full_name': '项目', 19 | 'short_name': '项目简' 20 | }, 21 | 'task_sex': 1, 22 | 'task_user_id_card': '610523198806273676', 23 | 'task': { 24 | 'type_child_name': '软件开发', 25 | 'users_type_txt': '用户' 26 | } 27 | }, { 28 | 'created_at': '2019-12-17 11:25:02', 29 | 'updated_at': '2019-12-17 11:30:02', 30 | 'company': { 31 | 'full_name': '项目', 32 | 'short_name': '项目简'}, 33 | 'task_sex': 1, 34 | 'task_name': '任务1', 35 | 'task': { 36 | 'type_child_name': '软件开发', 37 | 'users_type_txt': '用户'} 38 | }], 39 | 'page_size': 10, 40 | 'page': 1 41 | } 42 | 43 | extract_data = [] 44 | 45 | def test_response_extract(response,keys=[]): 46 | 47 | if isinstance(response,list): 48 | for value in response: 49 | if isinstance(value,list) or isinstance(value,dict): 50 | test_response_extract(value,keys) 51 | 52 | elif isinstance(response,dict): 53 | for key,value in response.items(): 54 | if key in keys: 55 | extract_data.append(value) 56 | else: 57 | test_response_extract(value,keys) 58 | 59 | else: 60 | pass 61 | 62 | test_response_extract(response,['created_at','updated_at']) 63 | 64 | print(extract_data) --------------------------------------------------------------------------------