├── README.md ├── conf └── unique_num.txt ├── log ├── interface_auto_test.2021-08-28.log └── interface_auto_test.log ├── test_case ├── __init__.py ├── test_edit_module.py └── test_login_module.py ├── test_data └── test_case_data.xlsx ├── test_report ├── app.js ├── data │ ├── attachments │ │ ├── 190ba6dba1231ffa.txt │ │ ├── 1a226aaf9e2633e3.txt │ │ ├── 36d9e2c92188f1e9.txt │ │ ├── 3c673d881dc90af0.txt │ │ ├── 4f2134c8077dabae.txt │ │ ├── 51773fc339bb5a2a.txt │ │ ├── 5956dfac7c2affd7.txt │ │ ├── 64bd365b2e8f3782.txt │ │ ├── 6f16054c149ca0c6.txt │ │ ├── 78a5a9af66623c8.txt │ │ ├── 9e9d05a5f24f79b6.txt │ │ ├── b16ec22e593aaf0e.txt │ │ ├── b5a35f93905e72b0.txt │ │ ├── c8099de3a3431c20.txt │ │ ├── c9a059184ea54b42.txt │ │ ├── cb2bc316e7ced127.txt │ │ ├── f2f22c3f1f11b219.txt │ │ └── f7e0ac24db6df31.txt │ ├── behaviors.csv │ ├── behaviors.json │ ├── categories.csv │ ├── categories.json │ ├── packages.json │ ├── suites.csv │ ├── suites.json │ ├── test-cases │ │ ├── 150f129aaf81c31f.json │ │ ├── 2287eec54c7f212.json │ │ ├── 41e8e6e95b7c75b5.json │ │ ├── 43dc24eab8dcd7ee.json │ │ ├── 4ca6ce593a277005.json │ │ ├── 5847db81c22255cc.json │ │ ├── 59a0b2d61cf702a6.json │ │ ├── 5e792b44457ea9aa.json │ │ ├── 77bac1a9be6aa799.json │ │ ├── 8db162b0c1a180aa.json │ │ ├── 8f972462257f4377.json │ │ ├── 928fd66149be506e.json │ │ ├── 93000324a8016c7a.json │ │ ├── 9c7fb473d7fc68f0.json │ │ ├── a9e063ba23abac18.json │ │ ├── bfa1537d2e1423a0.json │ │ ├── c2f39569f374b874.json │ │ └── d08fac4ece00ec22.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 ├── test_result ├── 0f682578-f740-4a3b-8099-34a043764e54-attachment.txt ├── 12f4fb24-a6db-4a86-85e1-4abbab26ac59-container.json ├── 18ffd22c-7027-4d6b-b968-fc2eb6ea73fe-result.json ├── 1af97849-47b3-43d3-8658-e0e399e88a23-result.json ├── 234db551-0932-4a9c-9737-3b21c6deaa9d-container.json ├── 2e20e98a-12c9-4e9b-b007-f7d318f88b9b-result.json ├── 32739062-f736-40a4-9b9b-c6cf9d72c2c6-attachment.txt ├── 33d478e7-5aaa-44f8-957f-82cda50aea61-result.json ├── 37a51e63-6a8e-4c63-9878-b30fec947a80-container.json ├── 3976adb9-505e-46c1-9a17-b47a440a8a22-container.json ├── 3be4cec9-15a5-4c36-8c59-4edd9b052e23-container.json ├── 40b7906a-05e2-46e9-81bc-92a686ade2e4-container.json ├── 4a1983e7-ae32-4e18-be9b-91228266e00d-container.json ├── 4edc4e07-d6b2-4e47-b4f4-d121edc8c159-result.json ├── 4fda2be0-77ae-4703-9a4b-dbe6191c7fc7-container.json ├── 51f064bd-353f-49f8-82c2-94b97c4b1fbf-attachment.txt ├── 524c61e9-0a42-4299-b2a3-3a48df8f01df-container.json ├── 58091a4c-be35-4024-a892-40942a6dea6b-container.json ├── 5c473561-2d3a-45a5-862e-ba9840bb0d2f-attachment.txt ├── 5e066ce1-14d2-4338-8dbc-565889502298-attachment.txt ├── 5fe4b510-4b93-4317-96a5-b46121ba6245-result.json ├── 69bd538e-a44f-46a0-8ceb-3d99ae3f4267-result.json ├── 6cd025bd-323f-443b-b8ff-7160565623ae-result.json ├── 715ba18e-39e6-4200-9412-25a935241914-container.json ├── 779b2e16-28b5-4ee4-a5ec-9ffd1cb9fdb0-attachment.txt ├── 7dc69f04-0038-4564-909d-cba1d69dfe64-result.json ├── 8ffaeddc-e78e-4a60-b543-8fe35ec9dac7-result.json ├── 94984d21-224e-43cf-9bb8-41ff30447914-attachment.txt ├── 978d6878-f432-4bca-be8f-294eae0af00b-result.json ├── 9a60667f-33f3-4fff-a023-0567b2ca4aa3-result.json ├── 9a8f1331-6175-4f3b-9811-e8594b233fd6-attachment.txt ├── 9b968bd8-6146-41ad-8259-248d87536899-attachment.txt ├── 9c228662-32f1-4b68-9dc7-0bab62f80428-attachment.txt ├── 9e30fa4d-3ca8-427e-b073-36692594b847-container.json ├── 9f46f864-c347-4654-8dd0-40cb238d8437-attachment.txt ├── a2a9f264-282a-4ee6-a127-3fdebd51f8d0-result.json ├── a8ec81ed-e814-40af-9e19-d30af4515340-attachment.txt ├── b3199980-1cd3-4175-af33-a8fa5e020aa7-attachment.txt ├── b77e1f77-57b6-4a22-a3c6-0af74b777c4c-result.json ├── c2736481-ce73-47f6-aa78-052dd17c6526-attachment.txt ├── ce12d212-8dc3-42a7-9d11-d9c989477190-container.json ├── d52db718-67af-4bce-a8ea-19bcf7673999-attachment.txt ├── d5937f42-3ff8-40d0-b2c3-011f28adfc09-result.json ├── d6ed73fc-d53e-4c50-9f7f-82fbe72a6800-attachment.txt ├── db5d2c79-1193-4cfe-be2b-f0a2645c2578-attachment.txt ├── de5763a9-6dd1-4a17-aa62-0171b0ce1d97-container.json ├── e4b40619-7281-4ba9-8d49-55419690e526-container.json ├── e77e2185-78c7-4fd2-8238-3f43c11948bd-result.json ├── e7db5765-059d-414c-947c-11a4a8845fdd-container.json ├── e876952e-1082-4c46-af1e-17ec42587d64-result.json ├── e8a8c5d1-131b-4724-9a7a-4fcc08c6ee95-container.json ├── f07a7ae1-d797-4139-9a19-17e2940e6cc8-attachment.txt ├── f1f0997f-f2ca-427f-8b72-d0b4a86d5b7c-result.json └── f32a694f-543d-490f-897f-7bfd8524deb2-container.json └── util ├── __init__.py ├── assert_util.py ├── excel_util.py ├── global_var.py ├── json_util.py ├── keyword_function.py ├── log_util.py └── request_util.py /README.md: -------------------------------------------------------------------------------- 1 | # InterfaceAutoTestWithPytest 2 | 接口自动化测试框架:Pytest+Allure+Excel数据驱动 3 | 4 | 博客详解:https://www.cnblogs.com/juno3550/p/15165332.html 5 | -------------------------------------------------------------------------------- /conf/unique_num.txt: -------------------------------------------------------------------------------- 1 | 30309 -------------------------------------------------------------------------------- /test_case/__init__.py: -------------------------------------------------------------------------------- 1 | from util.log_util import log_config_ini 2 | 3 | log_config_ini() -------------------------------------------------------------------------------- /test_case/test_edit_module.py: -------------------------------------------------------------------------------- 1 | import pytest 2 | import allure 3 | import logging 4 | from util.assert_util import assert_keyword 5 | from util.request_util import api_request 6 | from util.global_var import * 7 | from util.excel_util import excel_util 8 | 9 | 10 | create_test_data = excel_util.get_sheet_data("创建博文") 11 | user_blog_search_test_data = excel_util.get_sheet_data("查看用户博文") 12 | blog_content_test_data = excel_util.get_sheet_data("查看博文内容") 13 | blog_update_test_data = excel_util.get_sheet_data("更新博文内容") 14 | blog_batch_search_test_data = excel_util.get_sheet_data("批量查询博文") 15 | delete_test_data = excel_util.get_sheet_data("删除博文") 16 | 17 | 18 | @allure.feature("编辑模块") 19 | @pytest.mark.dependency(name="TestEditModule", depends=["TestLoginModule"], scope='package') 20 | class TestEditModule: 21 | 22 | # def setup_class(self): 23 | # 初始化调用注册和登录接口,获取userid和token供后续接口关联 24 | # 使用该初始化则可不依赖test_login_module.py的TestLoginModule 25 | # get_userid_and_token() 26 | 27 | @allure.story("博文创建功能") 28 | @allure.title('创建博文') # 指定测试用例标题,默认是函数名 29 | @allure.description('通过接口创建博文') # 添加测试用例描述 30 | @allure.severity(allure.severity_level.CRITICAL) # 阻塞级别 31 | @pytest.mark.run(order=3) 32 | @pytest.mark.parametrize('case_data', create_test_data) 33 | def test_create(self, case_data): 34 | with allure.step("读取请求数据,调用接口"): 35 | logging.info("接口用例数据:%s" % case_data) 36 | response = api_request(case_data[API_IP], case_data[API_URI], case_data[REQUEST_METHOD], 37 | case_data[API_REQUEST_DATA], case_data[RESPONSE_EXTRACT_VAR], 38 | case_data[REQUEST_HEADER], case_data[REQUEST_COOKIE]) 39 | with allure.step("获取响应数据,进行断言"): 40 | assert_keyword(response, case_data[RESPONSE_ASSERT_KEYWORD]) 41 | 42 | @allure.story("用户博文查询功能") 43 | @allure.title('查看用户博文') # 指定测试用例标题,默认是函数名 44 | @allure.description('通过接口查看用户所有博文') # 添加测试用例描述 45 | @allure.severity(allure.severity_level.CRITICAL) # 严重级别 46 | @pytest.mark.run(order=4) 47 | @pytest.mark.parametrize('case_data', user_blog_search_test_data) 48 | def test_user_blog_search(self, case_data): 49 | with allure.step("读取请求数据,调用接口"): 50 | logging.info("接口用例数据:%s" % case_data) 51 | response = api_request(case_data[API_IP], case_data[API_URI], case_data[REQUEST_METHOD], 52 | case_data[API_REQUEST_DATA], case_data[RESPONSE_EXTRACT_VAR], 53 | case_data[REQUEST_HEADER], case_data[REQUEST_COOKIE]) 54 | with allure.step("获取响应数据,进行断言"): 55 | assert_keyword(response, case_data[RESPONSE_ASSERT_KEYWORD]) 56 | 57 | @allure.story("博文内容查询功能") 58 | @allure.title('查看博文内容') # 指定测试用例标题,默认是函数名 59 | @allure.description('通过接口查看博文内容') # 添加测试用例描述 60 | @allure.severity(allure.severity_level.CRITICAL) # 严重级别 61 | @pytest.mark.run(order=5) 62 | @pytest.mark.parametrize('case_data', blog_content_test_data) 63 | def test_blog_content_search(self, case_data): 64 | with allure.step("读取请求数据,调用接口"): 65 | logging.info("接口用例数据:%s" % case_data) 66 | response = api_request(case_data[API_IP], case_data[API_URI], case_data[REQUEST_METHOD], 67 | case_data[API_REQUEST_DATA], case_data[RESPONSE_EXTRACT_VAR], 68 | case_data[REQUEST_HEADER], case_data[REQUEST_COOKIE]) 69 | with allure.step("获取响应数据,进行断言"): 70 | assert_keyword(response, case_data[RESPONSE_ASSERT_KEYWORD]) 71 | 72 | @allure.story("博文内容更新功能") 73 | @allure.title('更新博文内容') # 指定测试用例标题,默认是函数名 74 | @allure.description('通过接口更新博文内容') # 添加测试用例描述 75 | @allure.severity(allure.severity_level.CRITICAL) # 严重级别 76 | @pytest.mark.run(order=6) 77 | @pytest.mark.parametrize('case_data', blog_update_test_data) 78 | def test_blog_content_update(self, case_data): 79 | with allure.step("读取请求数据,调用接口"): 80 | logging.info("接口用例数据:%s" % case_data) 81 | response = api_request(case_data[API_IP], case_data[API_URI], case_data[REQUEST_METHOD], 82 | case_data[API_REQUEST_DATA], case_data[RESPONSE_EXTRACT_VAR], 83 | case_data[REQUEST_HEADER], case_data[REQUEST_COOKIE]) 84 | with allure.step("获取响应数据,进行断言"): 85 | assert_keyword(response, case_data[RESPONSE_ASSERT_KEYWORD]) 86 | 87 | @allure.story("批量查询博文功能") 88 | @allure.title('批量查询博文') # 指定测试用例标题,默认是函数名 89 | @allure.description('通过接口批量查询博文') # 添加测试用例描述 90 | @allure.severity(allure.severity_level.CRITICAL) # 严重级别 91 | @pytest.mark.run(order=7) 92 | @pytest.mark.parametrize('case_data', blog_batch_search_test_data) 93 | def test_blog_batch_search(self, case_data): 94 | with allure.step("读取请求数据,调用接口"): 95 | logging.info("接口用例数据:%s" % case_data) 96 | response = api_request(case_data[API_IP], case_data[API_URI], case_data[REQUEST_METHOD], 97 | case_data[API_REQUEST_DATA], case_data[RESPONSE_EXTRACT_VAR], 98 | case_data[REQUEST_HEADER], case_data[REQUEST_COOKIE]) 99 | with allure.step("获取响应数据,进行断言"): 100 | assert_keyword(response, case_data[RESPONSE_ASSERT_KEYWORD]) 101 | 102 | @allure.story("博文删除功能") 103 | @allure.title('删除博文') # 指定测试用例标题,默认是函数名 104 | @allure.description('通过接口删除博文') # 添加测试用例描述 105 | @allure.severity(allure.severity_level.CRITICAL) # 严重级别 106 | @pytest.mark.run(order=8) 107 | @pytest.mark.parametrize('case_data', delete_test_data) 108 | def test_delete(self, case_data): 109 | with allure.step("读取请求数据,调用接口"): 110 | logging.info("接口用例数据:%s" % case_data) 111 | response = api_request(case_data[API_IP], case_data[API_URI], case_data[REQUEST_METHOD], 112 | case_data[API_REQUEST_DATA], case_data[RESPONSE_EXTRACT_VAR], 113 | case_data[REQUEST_HEADER], case_data[REQUEST_COOKIE]) 114 | with allure.step("获取响应数据,进行断言"): 115 | assert_keyword(response, case_data[RESPONSE_ASSERT_KEYWORD]) 116 | 117 | 118 | if __name__ == "__main__": 119 | test_dir = os.path.dirname(__file__) 120 | pytest.main(['-s', '-q', test_dir, '--alluredir', '../test_result/', "--clean-alluredir"]) 121 | os.system('allure generate ../test_result/ -o ../test_report/ --clean') 122 | os.system('allure open -h 127.0.0.1 -p 8881 ../test_report/') -------------------------------------------------------------------------------- /test_case/test_login_module.py: -------------------------------------------------------------------------------- 1 | import pytest 2 | import allure 3 | import logging 4 | from util.assert_util import assert_keyword 5 | from util.request_util import api_request 6 | from util.global_var import * 7 | from util.excel_util import excel_util 8 | 9 | 10 | register_test_data = excel_util.get_sheet_data("注册") 11 | login_test_data = excel_util.get_sheet_data("登录") 12 | 13 | 14 | @allure.feature("登录模块") 15 | @pytest.mark.dependency(name="TestLoginModule") 16 | class TestLoginModule: 17 | 18 | @allure.story("注册功能") 19 | @allure.title('用户注册') # 指定测试用例标题,默认是函数名 20 | @allure.description('通过接口进行用户注册') # 添加测试用例描述 21 | @allure.severity(allure.severity_level.BLOCKER) # 阻塞级别 22 | @pytest.mark.run(order=1) 23 | @pytest.mark.parametrize('case_data', register_test_data) 24 | def test_register(self, case_data): 25 | with allure.step("读取请求数据,调用接口"): 26 | logging.info("接口用例数据:%s" % case_data) 27 | response = api_request(case_data[API_IP], case_data[API_URI], case_data[REQUEST_METHOD], 28 | case_data[API_REQUEST_DATA], case_data[RESPONSE_EXTRACT_VAR], 29 | case_data[REQUEST_HEADER], case_data[REQUEST_COOKIE]) 30 | with allure.step("获取响应数据,进行断言"): 31 | assert_keyword(response, case_data[RESPONSE_ASSERT_KEYWORD]) 32 | 33 | @allure.story("登录功能") 34 | @allure.title('用户登录') # 指定测试用例标题,默认是函数名 35 | @allure.description('通过接口进行用户登录') # 添加测试用例描述 36 | @allure.severity(allure.severity_level.BLOCKER) # 阻塞级别 37 | @pytest.mark.run(order=2) 38 | @pytest.mark.parametrize('case_data', login_test_data) 39 | def test_login(self, case_data): 40 | with allure.step("读取请求数据,调用接口"): 41 | logging.info("接口用例数据:%s" % case_data) 42 | response = api_request(case_data[API_IP], case_data[API_URI], case_data[REQUEST_METHOD], 43 | case_data[API_REQUEST_DATA], case_data[RESPONSE_EXTRACT_VAR], 44 | case_data[REQUEST_HEADER], case_data[REQUEST_COOKIE]) 45 | with allure.step("获取响应数据,进行断言"): 46 | assert_keyword(response, case_data[RESPONSE_ASSERT_KEYWORD]) 47 | 48 | 49 | if __name__ == "__main__": 50 | test_dir = os.path.dirname(__file__) 51 | pytest.main(['-s', '-q', test_dir, '--alluredir', '../test_result/', "--clean-alluredir"]) 52 | os.system('allure generate ../test_result/ -o ../test_report/ --clean') 53 | os.system('allure open -h 127.0.0.1 -p 8881 ../test_report/') -------------------------------------------------------------------------------- /test_data/test_case_data.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juno3550/InterfaceAutoTestWithPytest/f050e71a9f7cf5e3ee3697d3d1b47b83e6bd442a/test_data/test_case_data.xlsx -------------------------------------------------------------------------------- /test_report/data/attachments/190ba6dba1231ffa.txt: -------------------------------------------------------------------------------- 1 | INFO root:log_util.py:16 接口用例数据:[3.0, '密码错误,登录成功', 'http://39.100.104.214:8080', '/login/', 'post', '{"username":"juno${unique_num2}","password":"juno999999"}', '"code": "03"', '', '', ''] 2 | INFO root:log_util.py:16 请求原始数据:{"username":"juno${unique_num2}","password":"juno999999"} 3 | INFO root:log_util.py:16 请求数据预处理结果:{"username":"juno30302","password":"juno999999"} 4 | INFO root:log_util.py:16 接口调用成功! 5 | INFO root:log_util.py:16 响应数据:{"code": "03", "params": {"username": "juno30302", "password": "juno999999"}} 6 | INFO root:log_util.py:16 无关联参数提取.. 7 | INFO root:log_util.py:16 【"code": "03"】关键字断言成功【{"code": "03", "params": {"username": "juno30302", "password": "juno999999"}}】 -------------------------------------------------------------------------------- /test_report/data/attachments/1a226aaf9e2633e3.txt: -------------------------------------------------------------------------------- 1 | INFO root:log_util.py:16 接口用例数据:[2.0, 'articleId有误,博文批量查询失败', 'http://39.100.104.214:8080', '/getBlogsContent/articleIds=null', 'get', '', '"code": "999"', '', '', ''] 2 | INFO root:log_util.py:16 请求原始数据:/getBlogsContent/articleIds=null 3 | INFO root:log_util.py:16 请求数据预处理结果:/getBlogsContent/articleIds=null 4 | INFO root:log_util.py:16 接口调用成功! 5 | INFO root:log_util.py:16 响应数据:{"code": "999"} 6 | INFO root:log_util.py:16 无关联参数提取.. 7 | INFO root:log_util.py:16 【"code": "999"】关键字断言成功【{"code": "999"}】 -------------------------------------------------------------------------------- /test_report/data/attachments/36d9e2c92188f1e9.txt: -------------------------------------------------------------------------------- 1 | INFO root:log_util.py:16 接口用例数据:[2.0, '创建博文失败', 'http://39.100.104.214:8080', '/create/', 'post', '{"userid":${userid}, "token":"123", "title":"title test", "content":"content test"}', '"code": "03"', '', '', ''] 2 | INFO root:log_util.py:16 请求原始数据:{"userid":${userid}, "token":"123", "title":"title test", "content":"content test"} 3 | INFO root:log_util.py:16 请求数据预处理结果:{"userid":337, "token":"123", "title":"title test", "content":"content test"} 4 | INFO root:log_util.py:16 接口调用成功! 5 | INFO root:log_util.py:16 响应数据:{"code": "03", "userid": 337} 6 | INFO root:log_util.py:16 无关联参数提取.. 7 | INFO root:log_util.py:16 【"code": "03"】关键字断言成功【{"code": "03", "userid": 337}】 -------------------------------------------------------------------------------- /test_report/data/attachments/3c673d881dc90af0.txt: -------------------------------------------------------------------------------- 1 | INFO root:log_util.py:16 接口用例数据:[1.0, '博文内容更新成功', 'http://39.100.104.214:8080', '/update/', 'put', '{"userid":${userid}, "token": "${token}", "articleId":${articleId}, "title":"python", "content":"test test"}', '"update_time":', '', '', ''] 2 | INFO root:log_util.py:16 请求原始数据:{"userid":${userid}, "token": "${token}", "articleId":${articleId}, "title":"python", "content":"test test"} 3 | INFO root:log_util.py:16 请求数据预处理结果:{"userid":337, "token": "e951750fd86bfe9d643d46b42fa2f1c7", "articleId":142, "title":"python", "content":"test test"} 4 | INFO root:log_util.py:16 接口调用成功! 5 | INFO root:log_util.py:16 响应数据:{"articleId": 142, "update_time": "2021-08-26 00:07:58", "code": "00", "userid": 337} 6 | INFO root:log_util.py:16 无关联参数提取.. 7 | INFO root:log_util.py:16 【"update_time":】关键字断言成功【{"articleId": 142, "update_time": "2021-08-26 00:07:58", "code": "00", "userid": 337}】 -------------------------------------------------------------------------------- /test_report/data/attachments/4f2134c8077dabae.txt: -------------------------------------------------------------------------------- 1 | INFO root:log_util.py:16 接口用例数据:[1.0, '用户存在博文,查询成功', 'http://39.100.104.214:8080', '/getBlogsOfUser/', 'post', '{"userid":${userid}, "token":"${token}"}', '"title"', 'articleId', '', ''] 2 | INFO root:log_util.py:16 请求原始数据:{"userid":${userid}, "token":"${token}"} 3 | INFO root:log_util.py:16 请求数据预处理结果:{"userid":337, "token":"e951750fd86bfe9d643d46b42fa2f1c7"} 4 | INFO root:log_util.py:16 接口调用成功! 5 | INFO root:log_util.py:16 响应数据:{"data": [{"update_time": null, "title": "title test", "content": "content test", "articleId": 142, "owner": 337, "posted_on": "2021-08-26 00:07:57"}], "code": "00", "userid": 337} 6 | INFO root:log_util.py:16 关联参数提取成功:【articleId: 142】 7 | INFO root:log_util.py:16 【"title"】关键字断言成功【{"data": [{"update_time": null, "title": "title test", "content": "content test", "articleId": 142, "owner": 337, "posted_on": "2021-08-26 00:07:57"}], "code": "00", "userid": 337}】 -------------------------------------------------------------------------------- /test_report/data/attachments/51773fc339bb5a2a.txt: -------------------------------------------------------------------------------- 1 | INFO root:log_util.py:16 接口用例数据:[1.0, '博文内容查询成功', 'http://39.100.104.214:8080', '/getBlogContent/${articleId}', 'get', '', '"content": "content test"', '', '', ''] 2 | INFO root:log_util.py:16 请求原始数据:/getBlogContent/${articleId} 3 | INFO root:log_util.py:16 请求数据预处理结果:/getBlogContent/142 4 | INFO root:log_util.py:16 接口调用成功! 5 | INFO root:log_util.py:16 响应数据:{"code": "00", "data": [{"update_time": null, "title": "title test", "content": "content test", "articleId": 142, "owner": 337, "posted_on": "2021-08-26 00:07:57"}]} 6 | INFO root:log_util.py:16 无关联参数提取.. 7 | INFO root:log_util.py:16 【"content": "content test"】关键字断言成功【{"code": "00", "data": [{"update_time": null, "title": "title test", "content": "content test", "articleId": 142, "owner": 337, "posted_on": "2021-08-26 00:07:57"}]}】 -------------------------------------------------------------------------------- /test_report/data/attachments/5956dfac7c2affd7.txt: -------------------------------------------------------------------------------- 1 | INFO root:log_util.py:16 接口用例数据:[2.0, 'token有误,更新失败', 'http://39.100.104.214:8080', '/delete/', 'post', '{"userid":${userid}, "token": "123", "articleId":[]}', '"code": "03"', '', '', ''] 2 | INFO root:log_util.py:16 请求原始数据:{"userid":${userid}, "token": "123", "articleId":[]} 3 | INFO root:log_util.py:16 请求数据预处理结果:{"userid":337, "token": "123", "articleId":[]} 4 | INFO root:log_util.py:16 接口调用成功! 5 | INFO root:log_util.py:16 响应数据:{"code": "03", "userid": 337} 6 | INFO root:log_util.py:16 无关联参数提取.. 7 | INFO root:log_util.py:16 【"code": "03"】关键字断言成功【{"code": "03", "userid": 337}】 -------------------------------------------------------------------------------- /test_report/data/attachments/64bd365b2e8f3782.txt: -------------------------------------------------------------------------------- 1 | INFO root:log_util.py:16 接口用例数据:[2.0, '用户名重复,注册失败', 'http://39.100.104.214:8080', '/register/', 'post', '{"username":"juno${unique_num1}","password":"juno999999","email":"juno123@qq.com"}', '"code": "01"', '', '', ''] 2 | INFO root:log_util.py:16 请求原始数据:{"username":"juno${unique_num1}","password":"juno999999","email":"juno123@qq.com"} 3 | INFO root:log_util.py:16 请求数据预处理结果:{"username":"juno30301","password":"juno999999","email":"juno123@qq.com"} 4 | INFO root:log_util.py:16 接口调用成功! 5 | INFO root:log_util.py:16 响应数据:{"username": "juno30301", "code": "01"} 6 | INFO root:log_util.py:16 无关联参数提取.. 7 | INFO root:log_util.py:16 【"code": "01"】关键字断言成功【{"username": "juno30301", "code": "01"}】 -------------------------------------------------------------------------------- /test_report/data/attachments/6f16054c149ca0c6.txt: -------------------------------------------------------------------------------- 1 | INFO root:log_util.py:16 接口用例数据:[1.0, '登录成功', 'http://39.100.104.214:8080', '/login/', 'post', '{"username":"juno${unique_num1}","password":"${md5(\'juno999999\')}"}', '"token"', 'token', '', ''] 2 | INFO root:log_util.py:16 请求原始数据:{"username":"juno${unique_num1}","password":"${md5('juno999999')}"} 3 | INFO root:log_util.py:16 请求数据预处理结果:{"username":"juno30301","password":"4c1c1924ad2ba4d1136acee44a1b39a2"} 4 | INFO root:log_util.py:16 接口调用成功! 5 | INFO root:log_util.py:16 响应数据:{"token": "68b467791cedc1dd4d9b83712a4e3d58", "code": "00", "userid": 336, "login_time": "2021-08-26 00:07:55"} 6 | INFO root:log_util.py:16 关联参数提取成功:【token: 68b467791cedc1dd4d9b83712a4e3d58】 7 | INFO root:log_util.py:16 【"token"】关键字断言成功【{"token": "68b467791cedc1dd4d9b83712a4e3d58", "code": "00", "userid": 336, "login_time": "2021-08-26 00:07:55"}】 -------------------------------------------------------------------------------- /test_report/data/attachments/78a5a9af66623c8.txt: -------------------------------------------------------------------------------- 1 | INFO root:log_util.py:16 接口用例数据:[2.0, 'articleId有误,更新失败', 'http://39.100.104.214:8080', '/update/', 'put', '{"userid":${userid}, "token": "${token}", "articleId":1234, "title":"python", "content":"test test"}', '"code": "03"', '', '', ''] 2 | INFO root:log_util.py:16 请求原始数据:{"userid":${userid}, "token": "${token}", "articleId":1234, "title":"python", "content":"test test"} 3 | INFO root:log_util.py:16 请求数据预处理结果:{"userid":337, "token": "e951750fd86bfe9d643d46b42fa2f1c7", "articleId":1234, "title":"python", "content":"test test"} 4 | INFO root:log_util.py:16 接口调用成功! 5 | INFO root:log_util.py:16 响应数据:{"articleId": 1234, "code": "03", "userid": 337} 6 | INFO root:log_util.py:16 无关联参数提取.. 7 | INFO root:log_util.py:16 【"code": "03"】关键字断言成功【{"articleId": 1234, "code": "03", "userid": 337}】 -------------------------------------------------------------------------------- /test_report/data/attachments/9e9d05a5f24f79b6.txt: -------------------------------------------------------------------------------- 1 | INFO root:log_util.py:16 接口用例数据:[2.0, '注册成功', 'http://39.100.104.214:8080', '/register/', 'post', '{"username":"juno${get_unique_num2}","password":"juno999999","email":"juno123@qq.com"}', '"code": "00"', 'userid', '', ''] 2 | INFO root:log_util.py:16 请求原始数据:{"username":"juno${get_unique_num2}","password":"juno999999","email":"juno123@qq.com"} 3 | INFO root:log_util.py:16 请求数据预处理结果:{"username":"juno30302","password":"juno999999","email":"juno123@qq.com"} 4 | INFO root:log_util.py:16 接口调用成功! 5 | INFO root:log_util.py:16 响应数据:{"code": "00", "userid": 337} 6 | INFO root:log_util.py:16 关联参数提取成功:【userid: 337】 7 | INFO root:log_util.py:16 【"code": "00"】关键字断言成功【{"code": "00", "userid": 337}】 -------------------------------------------------------------------------------- /test_report/data/attachments/b16ec22e593aaf0e.txt: -------------------------------------------------------------------------------- 1 | INFO root:log_util.py:16 接口用例数据:[2.0, 'articleId有误,查询失败', 'http://39.100.104.214:8080', '/getBlogContent/1234', 'get', '', '"code": "03"', '', '', ''] 2 | INFO root:log_util.py:16 请求原始数据:/getBlogContent/1234 3 | INFO root:log_util.py:16 请求数据预处理结果:/getBlogContent/1234 4 | INFO root:log_util.py:16 接口调用成功! 5 | INFO root:log_util.py:16 响应数据:{"code": "03", "articleId": "1234"} 6 | INFO root:log_util.py:16 无关联参数提取.. 7 | INFO root:log_util.py:16 【"code": "03"】关键字断言成功【{"code": "03", "articleId": "1234"}】 -------------------------------------------------------------------------------- /test_report/data/attachments/b5a35f93905e72b0.txt: -------------------------------------------------------------------------------- 1 | INFO root:log_util.py:16 接口用例数据:[1.0, '注册成功', 'http://39.100.104.214:8080', '/register/', 'post', '{"username":"juno${get_unique_num1}","password":"juno999999","email":"juno123@qq.com"}', '"code": "00"', 'userid', '', ''] 2 | INFO root:log_util.py:16 请求原始数据:{"username":"juno${get_unique_num1}","password":"juno999999","email":"juno123@qq.com"} 3 | INFO root:log_util.py:16 请求数据预处理结果:{"username":"juno30301","password":"juno999999","email":"juno123@qq.com"} 4 | INFO root:log_util.py:16 接口调用成功! 5 | INFO root:log_util.py:16 响应数据:{"code": "00", "userid": 336} 6 | INFO root:log_util.py:16 关联参数提取成功:【userid: 336】 7 | INFO root:log_util.py:16 【"code": "00"】关键字断言成功【{"code": "00", "userid": 336}】 -------------------------------------------------------------------------------- /test_report/data/attachments/c8099de3a3431c20.txt: -------------------------------------------------------------------------------- 1 | INFO root:log_util.py:16 接口用例数据:[2.0, '登录成功', 'http://39.100.104.214:8080', '/login/', 'post', '{"username":"juno${unique_num2}","password":"${md5(\'juno999999\')}"}', '"token"', 'token', '', ''] 2 | INFO root:log_util.py:16 请求原始数据:{"username":"juno${unique_num2}","password":"${md5('juno999999')}"} 3 | INFO root:log_util.py:16 请求数据预处理结果:{"username":"juno30302","password":"4c1c1924ad2ba4d1136acee44a1b39a2"} 4 | INFO root:log_util.py:16 接口调用成功! 5 | INFO root:log_util.py:16 响应数据:{"token": "e951750fd86bfe9d643d46b42fa2f1c7", "code": "00", "userid": 337, "login_time": "2021-08-26 00:07:56"} 6 | INFO root:log_util.py:16 关联参数提取成功:【token: e951750fd86bfe9d643d46b42fa2f1c7】 7 | INFO root:log_util.py:16 【"token"】关键字断言成功【{"token": "e951750fd86bfe9d643d46b42fa2f1c7", "code": "00", "userid": 337, "login_time": "2021-08-26 00:07:56"}】 -------------------------------------------------------------------------------- /test_report/data/attachments/c9a059184ea54b42.txt: -------------------------------------------------------------------------------- 1 | INFO root:log_util.py:16 接口用例数据:[1.0, '博文删除成功', 'http://39.100.104.214:8080', '/delete/', 'post', '{"userid":${userid}, "token": "${token}", "articleId":[${articleId}]}', '"code": "00"', '', '', ''] 2 | INFO root:log_util.py:16 请求原始数据:{"userid":${userid}, "token": "${token}", "articleId":[${articleId}]} 3 | INFO root:log_util.py:16 请求数据预处理结果:{"userid":337, "token": "e951750fd86bfe9d643d46b42fa2f1c7", "articleId":[142]} 4 | INFO root:log_util.py:16 接口调用成功! 5 | INFO root:log_util.py:16 响应数据:{"articleId": [142], "code": "00", "userid": 337} 6 | INFO root:log_util.py:16 无关联参数提取.. 7 | INFO root:log_util.py:16 【"code": "00"】关键字断言成功【{"articleId": [142], "code": "00", "userid": 337}】 -------------------------------------------------------------------------------- /test_report/data/attachments/cb2bc316e7ced127.txt: -------------------------------------------------------------------------------- 1 | INFO root:log_util.py:16 接口用例数据:[1.0, '创建博文成功', 'http://39.100.104.214:8080', '/create/', 'post', '{"userid":${userid}, "token":"${token}", "title":"title test", "content":"content test"}', '"code": "00"', '', '', ''] 2 | INFO root:log_util.py:16 请求原始数据:{"userid":${userid}, "token":"${token}", "title":"title test", "content":"content test"} 3 | INFO root:log_util.py:16 请求数据预处理结果:{"userid":337, "token":"e951750fd86bfe9d643d46b42fa2f1c7", "title":"title test", "content":"content test"} 4 | INFO root:log_util.py:16 接口调用成功! 5 | INFO root:log_util.py:16 响应数据:{"data": [{"content": "content test", "title": "title test"}], "code": "00", "userid": 337} 6 | INFO root:log_util.py:16 无关联参数提取.. 7 | INFO root:log_util.py:16 【"code": "00"】关键字断言成功【{"data": [{"content": "content test", "title": "title test"}], "code": "00", "userid": 337}】 -------------------------------------------------------------------------------- /test_report/data/attachments/f2f22c3f1f11b219.txt: -------------------------------------------------------------------------------- 1 | INFO root:log_util.py:16 接口用例数据:[2.0, '用户token有误,查询失败', 'http://39.100.104.214:8080', '/getBlogsOfUser/', 'post', '{"userid":${userid}, "token":"123"}', '"code": "03"', '', '', ''] 2 | INFO root:log_util.py:16 请求原始数据:{"userid":${userid}, "token":"123"} 3 | INFO root:log_util.py:16 请求数据预处理结果:{"userid":337, "token":"123"} 4 | INFO root:log_util.py:16 接口调用成功! 5 | INFO root:log_util.py:16 响应数据:{"code": "03", "userid": 337} 6 | INFO root:log_util.py:16 无关联参数提取.. 7 | INFO root:log_util.py:16 【"code": "03"】关键字断言成功【{"code": "03", "userid": 337}】 -------------------------------------------------------------------------------- /test_report/data/attachments/f7e0ac24db6df31.txt: -------------------------------------------------------------------------------- 1 | INFO root:log_util.py:16 接口用例数据:[1.0, '博文批量查询成功', 'http://39.100.104.214:8080', '/getBlogsContent/articleIds=${articleId}', 'get', '', '"code": "00"', '', '', ''] 2 | INFO root:log_util.py:16 请求原始数据:/getBlogsContent/articleIds=${articleId} 3 | INFO root:log_util.py:16 请求数据预处理结果:/getBlogsContent/articleIds=142 4 | INFO root:log_util.py:16 接口调用成功! 5 | INFO root:log_util.py:16 响应数据:{"code": "00", "data": [{"update_time": "2021-08-26 00:07:58", "title": "python", "content": "test test", "articleId": 142, "owner": 337, "posted_on": "2021-08-26 00:07:57"}]} 6 | INFO root:log_util.py:16 无关联参数提取.. 7 | INFO root:log_util.py:16 【"code": "00"】关键字断言成功【{"code": "00", "data": [{"update_time": "2021-08-26 00:07:58", "title": "python", "content": "test test", "articleId": 142, "owner": 337, "posted_on": "2021-08-26 00:07:57"}]}】 -------------------------------------------------------------------------------- /test_report/data/behaviors.csv: -------------------------------------------------------------------------------- 1 | "Epic","Feature","Story","FAILED","BROKEN","PASSED","SKIPPED","UNKNOWN" 2 | "","编辑模块","博文删除功能","0","0","2","0","0" 3 | "","编辑模块","博文创建功能","0","0","2","0","0" 4 | "","登录模块","注册功能","0","0","3","0","0" 5 | "","编辑模块","博文内容更新功能","0","0","2","0","0" 6 | "","编辑模块","批量查询博文功能","0","0","2","0","0" 7 | "","登录模块","登录功能","0","0","3","0","0" 8 | "","编辑模块","博文内容查询功能","0","0","2","0","0" 9 | "","编辑模块","用户博文查询功能","0","0","2","0","0" 10 | -------------------------------------------------------------------------------- /test_report/data/categories.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juno3550/InterfaceAutoTestWithPytest/f050e71a9f7cf5e3ee3697d3d1b47b83e6bd442a/test_report/data/categories.csv -------------------------------------------------------------------------------- /test_report/data/categories.json: -------------------------------------------------------------------------------- 1 | { 2 | "uid" : "4b4757e66a1912dae1a509f688f20b0f", 3 | "name" : "categories", 4 | "children" : [ ] 5 | } -------------------------------------------------------------------------------- /test_report/data/packages.json: -------------------------------------------------------------------------------- 1 | { 2 | "uid" : "83edc06c07f9ae9e47eb6dd1b683e4e2", 3 | "name" : "packages", 4 | "children" : [ { 5 | "name" : "test_case", 6 | "children" : [ { 7 | "name" : "test_login_module", 8 | "children" : [ { 9 | "name" : "用户注册", 10 | "uid" : "bfa1537d2e1423a0", 11 | "parentUid" : "091d0ef08c8711394b9f668495b005a3", 12 | "status" : "passed", 13 | "time" : { 14 | "start" : 1629907674132, 15 | "stop" : 1629907674338, 16 | "duration" : 206 17 | }, 18 | "flaky" : false, 19 | "newFailed" : false, 20 | "parameters" : [ "[1.0, '注册成功', 'http://39.100.104.214:8080', '/register/', 'post', '{\"username\":\"juno${get_unique_num1}\",\"password\":\"juno999999\",\"email\":\"juno123@qq.com\"}', '\"code\": \"00\"', 'userid', '', '']" ] 21 | }, { 22 | "name" : "用户注册", 23 | "uid" : "41e8e6e95b7c75b5", 24 | "parentUid" : "091d0ef08c8711394b9f668495b005a3", 25 | "status" : "passed", 26 | "time" : { 27 | "start" : 1629907674351, 28 | "stop" : 1629907674530, 29 | "duration" : 179 30 | }, 31 | "flaky" : false, 32 | "newFailed" : false, 33 | "parameters" : [ "[2.0, '用户名重复,注册失败', 'http://39.100.104.214:8080', '/register/', 'post', '{\"username\":\"juno${unique_num1}\",\"password\":\"juno999999\",\"email\":\"juno123@qq.com\"}', '\"code\": \"01\"', '', '', '']" ] 34 | }, { 35 | "name" : "用户注册", 36 | "uid" : "59a0b2d61cf702a6", 37 | "parentUid" : "091d0ef08c8711394b9f668495b005a3", 38 | "status" : "passed", 39 | "time" : { 40 | "start" : 1629907674544, 41 | "stop" : 1629907675012, 42 | "duration" : 468 43 | }, 44 | "flaky" : false, 45 | "newFailed" : false, 46 | "parameters" : [ "[2.0, '注册成功', 'http://39.100.104.214:8080', '/register/', 'post', '{\"username\":\"juno${get_unique_num2}\",\"password\":\"juno999999\",\"email\":\"juno123@qq.com\"}', '\"code\": \"00\"', 'userid', '', '']" ] 47 | }, { 48 | "name" : "用户登录", 49 | "uid" : "150f129aaf81c31f", 50 | "parentUid" : "091d0ef08c8711394b9f668495b005a3", 51 | "status" : "passed", 52 | "time" : { 53 | "start" : 1629907675025, 54 | "stop" : 1629907675628, 55 | "duration" : 603 56 | }, 57 | "flaky" : false, 58 | "newFailed" : false, 59 | "parameters" : [ "[1.0, '登录成功', 'http://39.100.104.214:8080', '/login/', 'post', '{\"username\":\"juno${unique_num1}\",\"password\":\"${md5(\\'juno999999\\')}\"}', '\"token\"', 'token', '', '']" ] 60 | }, { 61 | "name" : "用户登录", 62 | "uid" : "77bac1a9be6aa799", 63 | "parentUid" : "091d0ef08c8711394b9f668495b005a3", 64 | "status" : "passed", 65 | "time" : { 66 | "start" : 1629907675639, 67 | "stop" : 1629907676260, 68 | "duration" : 621 69 | }, 70 | "flaky" : false, 71 | "newFailed" : false, 72 | "parameters" : [ "[2.0, '登录成功', 'http://39.100.104.214:8080', '/login/', 'post', '{\"username\":\"juno${unique_num2}\",\"password\":\"${md5(\\'juno999999\\')}\"}', '\"token\"', 'token', '', '']" ] 73 | }, { 74 | "name" : "用户登录", 75 | "uid" : "5847db81c22255cc", 76 | "parentUid" : "091d0ef08c8711394b9f668495b005a3", 77 | "status" : "passed", 78 | "time" : { 79 | "start" : 1629907676274, 80 | "stop" : 1629907677322, 81 | "duration" : 1048 82 | }, 83 | "flaky" : false, 84 | "newFailed" : false, 85 | "parameters" : [ "[3.0, '密码错误,登录成功', 'http://39.100.104.214:8080', '/login/', 'post', '{\"username\":\"juno${unique_num2}\",\"password\":\"juno999999\"}', '\"code\": \"03\"', '', '', '']" ] 86 | } ], 87 | "uid" : "091d0ef08c8711394b9f668495b005a3" 88 | }, { 89 | "name" : "test_edit_module", 90 | "children" : [ { 91 | "name" : "创建博文", 92 | "uid" : "43dc24eab8dcd7ee", 93 | "parentUid" : "1117d61e2bd931c47a920db3e828767a", 94 | "status" : "passed", 95 | "time" : { 96 | "start" : 1629907677334, 97 | "stop" : 1629907677497, 98 | "duration" : 163 99 | }, 100 | "flaky" : false, 101 | "newFailed" : false, 102 | "parameters" : [ "[1.0, '创建博文成功', 'http://39.100.104.214:8080', '/create/', 'post', '{\"userid\":${userid}, \"token\":\"${token}\", \"title\":\"title test\", \"content\":\"content test\"}', '\"code\": \"00\"', '', '', '']" ] 103 | }, { 104 | "name" : "创建博文", 105 | "uid" : "4ca6ce593a277005", 106 | "parentUid" : "1117d61e2bd931c47a920db3e828767a", 107 | "status" : "passed", 108 | "time" : { 109 | "start" : 1629907677512, 110 | "stop" : 1629907677712, 111 | "duration" : 200 112 | }, 113 | "flaky" : false, 114 | "newFailed" : false, 115 | "parameters" : [ "[2.0, '创建博文失败', 'http://39.100.104.214:8080', '/create/', 'post', '{\"userid\":${userid}, \"token\":\"123\", \"title\":\"title test\", \"content\":\"content test\"}', '\"code\": \"03\"', '', '', '']" ] 116 | }, { 117 | "name" : "查看用户博文", 118 | "uid" : "d08fac4ece00ec22", 119 | "parentUid" : "1117d61e2bd931c47a920db3e828767a", 120 | "status" : "passed", 121 | "time" : { 122 | "start" : 1629907677725, 123 | "stop" : 1629907677919, 124 | "duration" : 194 125 | }, 126 | "flaky" : false, 127 | "newFailed" : false, 128 | "parameters" : [ "[1.0, '用户存在博文,查询成功', 'http://39.100.104.214:8080', '/getBlogsOfUser/', 'post', '{\"userid\":${userid}, \"token\":\"${token}\"}', '\"title\"', 'articleId', '', '']" ] 129 | }, { 130 | "name" : "查看用户博文", 131 | "uid" : "8db162b0c1a180aa", 132 | "parentUid" : "1117d61e2bd931c47a920db3e828767a", 133 | "status" : "passed", 134 | "time" : { 135 | "start" : 1629907677933, 136 | "stop" : 1629907678147, 137 | "duration" : 214 138 | }, 139 | "flaky" : false, 140 | "newFailed" : false, 141 | "parameters" : [ "[2.0, '用户token有误,查询失败', 'http://39.100.104.214:8080', '/getBlogsOfUser/', 'post', '{\"userid\":${userid}, \"token\":\"123\"}', '\"code\": \"03\"', '', '', '']" ] 142 | }, { 143 | "name" : "查看博文内容", 144 | "uid" : "93000324a8016c7a", 145 | "parentUid" : "1117d61e2bd931c47a920db3e828767a", 146 | "status" : "passed", 147 | "time" : { 148 | "start" : 1629907678158, 149 | "stop" : 1629907678284, 150 | "duration" : 126 151 | }, 152 | "flaky" : false, 153 | "newFailed" : false, 154 | "parameters" : [ "[1.0, '博文内容查询成功', 'http://39.100.104.214:8080', '/getBlogContent/${articleId}', 'get', '', '\"content\": \"content test\"', '', '', '']" ] 155 | }, { 156 | "name" : "查看博文内容", 157 | "uid" : "5e792b44457ea9aa", 158 | "parentUid" : "1117d61e2bd931c47a920db3e828767a", 159 | "status" : "passed", 160 | "time" : { 161 | "start" : 1629907678295, 162 | "stop" : 1629907678432, 163 | "duration" : 137 164 | }, 165 | "flaky" : false, 166 | "newFailed" : false, 167 | "parameters" : [ "[2.0, 'articleId有误,查询失败', 'http://39.100.104.214:8080', '/getBlogContent/1234', 'get', '', '\"code\": \"03\"', '', '', '']" ] 168 | }, { 169 | "name" : "更新博文内容", 170 | "uid" : "9c7fb473d7fc68f0", 171 | "parentUid" : "1117d61e2bd931c47a920db3e828767a", 172 | "status" : "passed", 173 | "time" : { 174 | "start" : 1629907678443, 175 | "stop" : 1629907678601, 176 | "duration" : 158 177 | }, 178 | "flaky" : false, 179 | "newFailed" : false, 180 | "parameters" : [ "[1.0, '博文内容更新成功', 'http://39.100.104.214:8080', '/update/', 'put', '{\"userid\":${userid}, \"token\": \"${token}\", \"articleId\":${articleId}, \"title\":\"python\", \"content\":\"test test\"}', '\"update_time\":', '', '', '']" ] 181 | }, { 182 | "name" : "更新博文内容", 183 | "uid" : "2287eec54c7f212", 184 | "parentUid" : "1117d61e2bd931c47a920db3e828767a", 185 | "status" : "passed", 186 | "time" : { 187 | "start" : 1629907678612, 188 | "stop" : 1629907678777, 189 | "duration" : 165 190 | }, 191 | "flaky" : false, 192 | "newFailed" : false, 193 | "parameters" : [ "[2.0, 'articleId有误,更新失败', 'http://39.100.104.214:8080', '/update/', 'put', '{\"userid\":${userid}, \"token\": \"${token}\", \"articleId\":1234, \"title\":\"python\", \"content\":\"test test\"}', '\"code\": \"03\"', '', '', '']" ] 194 | }, { 195 | "name" : "批量查询博文", 196 | "uid" : "928fd66149be506e", 197 | "parentUid" : "1117d61e2bd931c47a920db3e828767a", 198 | "status" : "passed", 199 | "time" : { 200 | "start" : 1629907678788, 201 | "stop" : 1629907678917, 202 | "duration" : 129 203 | }, 204 | "flaky" : false, 205 | "newFailed" : false, 206 | "parameters" : [ "[1.0, '博文批量查询成功', 'http://39.100.104.214:8080', '/getBlogsContent/articleIds=${articleId}', 'get', '', '\"code\": \"00\"', '', '', '']" ] 207 | }, { 208 | "name" : "批量查询博文", 209 | "uid" : "c2f39569f374b874", 210 | "parentUid" : "1117d61e2bd931c47a920db3e828767a", 211 | "status" : "passed", 212 | "time" : { 213 | "start" : 1629907678928, 214 | "stop" : 1629907679075, 215 | "duration" : 147 216 | }, 217 | "flaky" : false, 218 | "newFailed" : false, 219 | "parameters" : [ "[2.0, 'articleId有误,博文批量查询失败', 'http://39.100.104.214:8080', '/getBlogsContent/articleIds=null', 'get', '', '\"code\": \"999\"', '', '', '']" ] 220 | }, { 221 | "name" : "删除博文", 222 | "uid" : "a9e063ba23abac18", 223 | "parentUid" : "1117d61e2bd931c47a920db3e828767a", 224 | "status" : "passed", 225 | "time" : { 226 | "start" : 1629907679087, 227 | "stop" : 1629907679298, 228 | "duration" : 211 229 | }, 230 | "flaky" : false, 231 | "newFailed" : false, 232 | "parameters" : [ "[1.0, '博文删除成功', 'http://39.100.104.214:8080', '/delete/', 'post', '{\"userid\":${userid}, \"token\": \"${token}\", \"articleId\":[${articleId}]}', '\"code\": \"00\"', '', '', '']" ] 233 | }, { 234 | "name" : "删除博文", 235 | "uid" : "8f972462257f4377", 236 | "parentUid" : "1117d61e2bd931c47a920db3e828767a", 237 | "status" : "passed", 238 | "time" : { 239 | "start" : 1629907679310, 240 | "stop" : 1629907679439, 241 | "duration" : 129 242 | }, 243 | "flaky" : false, 244 | "newFailed" : false, 245 | "parameters" : [ "[2.0, 'token有误,更新失败', 'http://39.100.104.214:8080', '/delete/', 'post', '{\"userid\":${userid}, \"token\": \"123\", \"articleId\":[]}', '\"code\": \"03\"', '', '', '']" ] 246 | } ], 247 | "uid" : "1117d61e2bd931c47a920db3e828767a" 248 | } ], 249 | "uid" : "3b2e467b921b0ea8d4803b9c79d92d0c" 250 | } ] 251 | } -------------------------------------------------------------------------------- /test_report/data/suites.csv: -------------------------------------------------------------------------------- 1 | "Status","Start Time","Stop Time","Duration in ms","Parent Suite","Suite","Sub Suite","Test Class","Test Method","Name","Description" 2 | "passed","Thu Aug 26 00:07:59 CST 2021","Thu Aug 26 00:07:59 CST 2021","211","test_case","test_edit_module","TestEditModule","","","删除博文","通过接口删除博文" 3 | "passed","Thu Aug 26 00:07:57 CST 2021","Thu Aug 26 00:07:57 CST 2021","200","test_case","test_edit_module","TestEditModule","","","创建博文","通过接口创建博文" 4 | "passed","Thu Aug 26 00:07:54 CST 2021","Thu Aug 26 00:07:54 CST 2021","179","test_case","test_login_module","TestLoginModule","","","用户注册","通过接口进行用户注册" 5 | "passed","Thu Aug 26 00:07:58 CST 2021","Thu Aug 26 00:07:58 CST 2021","158","test_case","test_edit_module","TestEditModule","","","更新博文内容","通过接口更新博文内容" 6 | "passed","Thu Aug 26 00:07:58 CST 2021","Thu Aug 26 00:07:58 CST 2021","129","test_case","test_edit_module","TestEditModule","","","批量查询博文","通过接口批量查询博文" 7 | "passed","Thu Aug 26 00:07:59 CST 2021","Thu Aug 26 00:07:59 CST 2021","129","test_case","test_edit_module","TestEditModule","","","删除博文","通过接口删除博文" 8 | "passed","Thu Aug 26 00:07:55 CST 2021","Thu Aug 26 00:07:55 CST 2021","603","test_case","test_login_module","TestLoginModule","","","用户登录","通过接口进行用户登录" 9 | "passed","Thu Aug 26 00:07:57 CST 2021","Thu Aug 26 00:07:57 CST 2021","163","test_case","test_edit_module","TestEditModule","","","创建博文","通过接口创建博文" 10 | "passed","Thu Aug 26 00:07:58 CST 2021","Thu Aug 26 00:07:58 CST 2021","126","test_case","test_edit_module","TestEditModule","","","查看博文内容","通过接口查看博文内容" 11 | "passed","Thu Aug 26 00:07:57 CST 2021","Thu Aug 26 00:07:57 CST 2021","194","test_case","test_edit_module","TestEditModule","","","查看用户博文","通过接口查看用户所有博文" 12 | "passed","Thu Aug 26 00:07:55 CST 2021","Thu Aug 26 00:07:56 CST 2021","621","test_case","test_login_module","TestLoginModule","","","用户登录","通过接口进行用户登录" 13 | "passed","Thu Aug 26 00:07:58 CST 2021","Thu Aug 26 00:07:58 CST 2021","165","test_case","test_edit_module","TestEditModule","","","更新博文内容","通过接口更新博文内容" 14 | "passed","Thu Aug 26 00:07:58 CST 2021","Thu Aug 26 00:07:59 CST 2021","147","test_case","test_edit_module","TestEditModule","","","批量查询博文","通过接口批量查询博文" 15 | "passed","Thu Aug 26 00:07:57 CST 2021","Thu Aug 26 00:07:58 CST 2021","214","test_case","test_edit_module","TestEditModule","","","查看用户博文","通过接口查看用户所有博文" 16 | "passed","Thu Aug 26 00:07:54 CST 2021","Thu Aug 26 00:07:55 CST 2021","468","test_case","test_login_module","TestLoginModule","","","用户注册","通过接口进行用户注册" 17 | "passed","Thu Aug 26 00:07:58 CST 2021","Thu Aug 26 00:07:58 CST 2021","137","test_case","test_edit_module","TestEditModule","","","查看博文内容","通过接口查看博文内容" 18 | "passed","Thu Aug 26 00:07:54 CST 2021","Thu Aug 26 00:07:54 CST 2021","206","test_case","test_login_module","TestLoginModule","","","用户注册","通过接口进行用户注册" 19 | "passed","Thu Aug 26 00:07:56 CST 2021","Thu Aug 26 00:07:57 CST 2021","1048","test_case","test_login_module","TestLoginModule","","","用户登录","通过接口进行用户登录" 20 | -------------------------------------------------------------------------------- /test_report/data/test-cases/150f129aaf81c31f.json: -------------------------------------------------------------------------------- 1 | { 2 | "uid" : "150f129aaf81c31f", 3 | "name" : "用户登录", 4 | "fullName" : "test_case.test_login_module.TestLoginModule#test_login", 5 | "historyId" : "d8983635e87a151b9b3b7b66fd0ac0dc", 6 | "time" : { 7 | "start" : 1629907675025, 8 | "stop" : 1629907675628, 9 | "duration" : 603 10 | }, 11 | "description" : "通过接口进行用户登录", 12 | "descriptionHtml" : "

通过接口进行用户登录

\n", 13 | "status" : "passed", 14 | "flaky" : false, 15 | "newFailed" : false, 16 | "beforeStages" : [ ], 17 | "testStage" : { 18 | "description" : "通过接口进行用户登录", 19 | "status" : "passed", 20 | "steps" : [ { 21 | "name" : "读取请求数据,调用接口", 22 | "time" : { 23 | "start" : 1629907675025, 24 | "stop" : 1629907675626, 25 | "duration" : 601 26 | }, 27 | "status" : "passed", 28 | "steps" : [ ], 29 | "attachments" : [ ], 30 | "parameters" : [ ], 31 | "attachmentsCount" : 0, 32 | "shouldDisplayMessage" : false, 33 | "stepsCount" : 0, 34 | "hasContent" : false 35 | }, { 36 | "name" : "获取响应数据,进行断言", 37 | "time" : { 38 | "start" : 1629907675627, 39 | "stop" : 1629907675627, 40 | "duration" : 0 41 | }, 42 | "status" : "passed", 43 | "steps" : [ ], 44 | "attachments" : [ ], 45 | "parameters" : [ ], 46 | "attachmentsCount" : 0, 47 | "shouldDisplayMessage" : false, 48 | "stepsCount" : 0, 49 | "hasContent" : false 50 | } ], 51 | "attachments" : [ { 52 | "uid" : "6f16054c149ca0c6", 53 | "name" : "log", 54 | "source" : "6f16054c149ca0c6.txt", 55 | "type" : "text/plain", 56 | "size" : 959 57 | } ], 58 | "parameters" : [ ], 59 | "attachmentsCount" : 1, 60 | "shouldDisplayMessage" : false, 61 | "stepsCount" : 2, 62 | "hasContent" : true 63 | }, 64 | "afterStages" : [ ], 65 | "labels" : [ { 66 | "name" : "story", 67 | "value" : "登录功能" 68 | }, { 69 | "name" : "severity", 70 | "value" : "blocker" 71 | }, { 72 | "name" : "feature", 73 | "value" : "登录模块" 74 | }, { 75 | "name" : "tag", 76 | "value" : "run(order=2)" 77 | }, { 78 | "name" : "parentSuite", 79 | "value" : "test_case" 80 | }, { 81 | "name" : "suite", 82 | "value" : "test_login_module" 83 | }, { 84 | "name" : "subSuite", 85 | "value" : "TestLoginModule" 86 | }, { 87 | "name" : "host", 88 | "value" : "DESKTOP-13387BR" 89 | }, { 90 | "name" : "thread", 91 | "value" : "2748-MainThread" 92 | }, { 93 | "name" : "framework", 94 | "value" : "pytest" 95 | }, { 96 | "name" : "language", 97 | "value" : "cpython3" 98 | }, { 99 | "name" : "package", 100 | "value" : "test_case.test_login_module" 101 | }, { 102 | "name" : "resultFormat", 103 | "value" : "allure2" 104 | } ], 105 | "parameters" : [ { 106 | "name" : "case_data", 107 | "value" : "[1.0, '登录成功', 'http://39.100.104.214:8080', '/login/', 'post', '{\"username\":\"juno${unique_num1}\",\"password\":\"${md5(\\'juno999999\\')}\"}', '\"token\"', 'token', '', '']" 108 | } ], 109 | "links" : [ ], 110 | "hidden" : false, 111 | "retry" : false, 112 | "extra" : { 113 | "severity" : "blocker", 114 | "retries" : [ ], 115 | "categories" : [ ], 116 | "tags" : [ "run(order=2)" ] 117 | }, 118 | "source" : "150f129aaf81c31f.json", 119 | "parameterValues" : [ "[1.0, '登录成功', 'http://39.100.104.214:8080', '/login/', 'post', '{\"username\":\"juno${unique_num1}\",\"password\":\"${md5(\\'juno999999\\')}\"}', '\"token\"', 'token', '', '']" ] 120 | } -------------------------------------------------------------------------------- /test_report/data/test-cases/2287eec54c7f212.json: -------------------------------------------------------------------------------- 1 | { 2 | "uid" : "2287eec54c7f212", 3 | "name" : "更新博文内容", 4 | "fullName" : "test_case.test_edit_module.TestEditModule#test_blog_content_update", 5 | "historyId" : "72442eb161046e365132a46ddc653f6c", 6 | "time" : { 7 | "start" : 1629907678612, 8 | "stop" : 1629907678777, 9 | "duration" : 165 10 | }, 11 | "description" : "通过接口更新博文内容", 12 | "descriptionHtml" : "

通过接口更新博文内容

\n", 13 | "status" : "passed", 14 | "flaky" : false, 15 | "newFailed" : false, 16 | "beforeStages" : [ ], 17 | "testStage" : { 18 | "description" : "通过接口更新博文内容", 19 | "status" : "passed", 20 | "steps" : [ { 21 | "name" : "读取请求数据,调用接口", 22 | "time" : { 23 | "start" : 1629907678612, 24 | "stop" : 1629907678776, 25 | "duration" : 164 26 | }, 27 | "status" : "passed", 28 | "steps" : [ ], 29 | "attachments" : [ ], 30 | "parameters" : [ ], 31 | "attachmentsCount" : 0, 32 | "shouldDisplayMessage" : false, 33 | "stepsCount" : 0, 34 | "hasContent" : false 35 | }, { 36 | "name" : "获取响应数据,进行断言", 37 | "time" : { 38 | "start" : 1629907678776, 39 | "stop" : 1629907678777, 40 | "duration" : 1 41 | }, 42 | "status" : "passed", 43 | "steps" : [ ], 44 | "attachments" : [ ], 45 | "parameters" : [ ], 46 | "attachmentsCount" : 0, 47 | "shouldDisplayMessage" : false, 48 | "stepsCount" : 0, 49 | "hasContent" : false 50 | } ], 51 | "attachments" : [ { 52 | "uid" : "78a5a9af66623c8", 53 | "name" : "log", 54 | "source" : "78a5a9af66623c8.txt", 55 | "type" : "text/plain", 56 | "size" : 919 57 | } ], 58 | "parameters" : [ ], 59 | "attachmentsCount" : 1, 60 | "shouldDisplayMessage" : false, 61 | "stepsCount" : 2, 62 | "hasContent" : true 63 | }, 64 | "afterStages" : [ ], 65 | "labels" : [ { 66 | "name" : "story", 67 | "value" : "博文内容更新功能" 68 | }, { 69 | "name" : "feature", 70 | "value" : "编辑模块" 71 | }, { 72 | "name" : "severity", 73 | "value" : "critical" 74 | }, { 75 | "name" : "tag", 76 | "value" : "run(order=6)" 77 | }, { 78 | "name" : "parentSuite", 79 | "value" : "test_case" 80 | }, { 81 | "name" : "suite", 82 | "value" : "test_edit_module" 83 | }, { 84 | "name" : "subSuite", 85 | "value" : "TestEditModule" 86 | }, { 87 | "name" : "host", 88 | "value" : "DESKTOP-13387BR" 89 | }, { 90 | "name" : "thread", 91 | "value" : "2748-MainThread" 92 | }, { 93 | "name" : "framework", 94 | "value" : "pytest" 95 | }, { 96 | "name" : "language", 97 | "value" : "cpython3" 98 | }, { 99 | "name" : "package", 100 | "value" : "test_case.test_edit_module" 101 | }, { 102 | "name" : "resultFormat", 103 | "value" : "allure2" 104 | } ], 105 | "parameters" : [ { 106 | "name" : "case_data", 107 | "value" : "[2.0, 'articleId有误,更新失败', 'http://39.100.104.214:8080', '/update/', 'put', '{\"userid\":${userid}, \"token\": \"${token}\", \"articleId\":1234, \"title\":\"python\", \"content\":\"test test\"}', '\"code\": \"03\"', '', '', '']" 108 | } ], 109 | "links" : [ ], 110 | "hidden" : false, 111 | "retry" : false, 112 | "extra" : { 113 | "severity" : "critical", 114 | "retries" : [ ], 115 | "categories" : [ ], 116 | "tags" : [ "run(order=6)" ] 117 | }, 118 | "source" : "2287eec54c7f212.json", 119 | "parameterValues" : [ "[2.0, 'articleId有误,更新失败', 'http://39.100.104.214:8080', '/update/', 'put', '{\"userid\":${userid}, \"token\": \"${token}\", \"articleId\":1234, \"title\":\"python\", \"content\":\"test test\"}', '\"code\": \"03\"', '', '', '']" ] 120 | } -------------------------------------------------------------------------------- /test_report/data/test-cases/41e8e6e95b7c75b5.json: -------------------------------------------------------------------------------- 1 | { 2 | "uid" : "41e8e6e95b7c75b5", 3 | "name" : "用户注册", 4 | "fullName" : "test_case.test_login_module.TestLoginModule#test_register", 5 | "historyId" : "13a0acdd59b00e1a0f6d06b7d22e1536", 6 | "time" : { 7 | "start" : 1629907674351, 8 | "stop" : 1629907674530, 9 | "duration" : 179 10 | }, 11 | "description" : "通过接口进行用户注册", 12 | "descriptionHtml" : "

通过接口进行用户注册

\n", 13 | "status" : "passed", 14 | "flaky" : false, 15 | "newFailed" : false, 16 | "beforeStages" : [ ], 17 | "testStage" : { 18 | "description" : "通过接口进行用户注册", 19 | "status" : "passed", 20 | "steps" : [ { 21 | "name" : "读取请求数据,调用接口", 22 | "time" : { 23 | "start" : 1629907674352, 24 | "stop" : 1629907674529, 25 | "duration" : 177 26 | }, 27 | "status" : "passed", 28 | "steps" : [ ], 29 | "attachments" : [ ], 30 | "parameters" : [ ], 31 | "attachmentsCount" : 0, 32 | "shouldDisplayMessage" : false, 33 | "stepsCount" : 0, 34 | "hasContent" : false 35 | }, { 36 | "name" : "获取响应数据,进行断言", 37 | "time" : { 38 | "start" : 1629907674529, 39 | "stop" : 1629907674530, 40 | "duration" : 1 41 | }, 42 | "status" : "passed", 43 | "steps" : [ ], 44 | "attachments" : [ ], 45 | "parameters" : [ ], 46 | "attachmentsCount" : 0, 47 | "shouldDisplayMessage" : false, 48 | "stepsCount" : 0, 49 | "hasContent" : false 50 | } ], 51 | "attachments" : [ { 52 | "uid" : "64bd365b2e8f3782", 53 | "name" : "log", 54 | "source" : "64bd365b2e8f3782.txt", 55 | "type" : "text/plain", 56 | "size" : 823 57 | } ], 58 | "parameters" : [ ], 59 | "attachmentsCount" : 1, 60 | "shouldDisplayMessage" : false, 61 | "stepsCount" : 2, 62 | "hasContent" : true 63 | }, 64 | "afterStages" : [ ], 65 | "labels" : [ { 66 | "name" : "story", 67 | "value" : "注册功能" 68 | }, { 69 | "name" : "severity", 70 | "value" : "blocker" 71 | }, { 72 | "name" : "feature", 73 | "value" : "登录模块" 74 | }, { 75 | "name" : "tag", 76 | "value" : "run(order=1)" 77 | }, { 78 | "name" : "parentSuite", 79 | "value" : "test_case" 80 | }, { 81 | "name" : "suite", 82 | "value" : "test_login_module" 83 | }, { 84 | "name" : "subSuite", 85 | "value" : "TestLoginModule" 86 | }, { 87 | "name" : "host", 88 | "value" : "DESKTOP-13387BR" 89 | }, { 90 | "name" : "thread", 91 | "value" : "2748-MainThread" 92 | }, { 93 | "name" : "framework", 94 | "value" : "pytest" 95 | }, { 96 | "name" : "language", 97 | "value" : "cpython3" 98 | }, { 99 | "name" : "package", 100 | "value" : "test_case.test_login_module" 101 | }, { 102 | "name" : "resultFormat", 103 | "value" : "allure2" 104 | } ], 105 | "parameters" : [ { 106 | "name" : "case_data", 107 | "value" : "[2.0, '用户名重复,注册失败', 'http://39.100.104.214:8080', '/register/', 'post', '{\"username\":\"juno${unique_num1}\",\"password\":\"juno999999\",\"email\":\"juno123@qq.com\"}', '\"code\": \"01\"', '', '', '']" 108 | } ], 109 | "links" : [ ], 110 | "hidden" : false, 111 | "retry" : false, 112 | "extra" : { 113 | "severity" : "blocker", 114 | "retries" : [ ], 115 | "categories" : [ ], 116 | "tags" : [ "run(order=1)" ] 117 | }, 118 | "source" : "41e8e6e95b7c75b5.json", 119 | "parameterValues" : [ "[2.0, '用户名重复,注册失败', 'http://39.100.104.214:8080', '/register/', 'post', '{\"username\":\"juno${unique_num1}\",\"password\":\"juno999999\",\"email\":\"juno123@qq.com\"}', '\"code\": \"01\"', '', '', '']" ] 120 | } -------------------------------------------------------------------------------- /test_report/data/test-cases/43dc24eab8dcd7ee.json: -------------------------------------------------------------------------------- 1 | { 2 | "uid" : "43dc24eab8dcd7ee", 3 | "name" : "创建博文", 4 | "fullName" : "test_case.test_edit_module.TestEditModule#test_create", 5 | "historyId" : "6b1f6a954615e6829a4d01c4e25bb7cd", 6 | "time" : { 7 | "start" : 1629907677334, 8 | "stop" : 1629907677497, 9 | "duration" : 163 10 | }, 11 | "description" : "通过接口创建博文", 12 | "descriptionHtml" : "

通过接口创建博文

\n", 13 | "status" : "passed", 14 | "flaky" : false, 15 | "newFailed" : false, 16 | "beforeStages" : [ ], 17 | "testStage" : { 18 | "description" : "通过接口创建博文", 19 | "status" : "passed", 20 | "steps" : [ { 21 | "name" : "读取请求数据,调用接口", 22 | "time" : { 23 | "start" : 1629907677334, 24 | "stop" : 1629907677496, 25 | "duration" : 162 26 | }, 27 | "status" : "passed", 28 | "steps" : [ ], 29 | "attachments" : [ ], 30 | "parameters" : [ ], 31 | "attachmentsCount" : 0, 32 | "shouldDisplayMessage" : false, 33 | "stepsCount" : 0, 34 | "hasContent" : false 35 | }, { 36 | "name" : "获取响应数据,进行断言", 37 | "time" : { 38 | "start" : 1629907677496, 39 | "stop" : 1629907677497, 40 | "duration" : 1 41 | }, 42 | "status" : "passed", 43 | "steps" : [ ], 44 | "attachments" : [ ], 45 | "parameters" : [ ], 46 | "attachmentsCount" : 0, 47 | "shouldDisplayMessage" : false, 48 | "stepsCount" : 0, 49 | "hasContent" : false 50 | } ], 51 | "attachments" : [ { 52 | "uid" : "cb2bc316e7ced127", 53 | "name" : "log", 54 | "source" : "cb2bc316e7ced127.txt", 55 | "type" : "text/plain", 56 | "size" : 958 57 | } ], 58 | "parameters" : [ ], 59 | "attachmentsCount" : 1, 60 | "shouldDisplayMessage" : false, 61 | "stepsCount" : 2, 62 | "hasContent" : true 63 | }, 64 | "afterStages" : [ ], 65 | "labels" : [ { 66 | "name" : "story", 67 | "value" : "博文创建功能" 68 | }, { 69 | "name" : "feature", 70 | "value" : "编辑模块" 71 | }, { 72 | "name" : "severity", 73 | "value" : "critical" 74 | }, { 75 | "name" : "tag", 76 | "value" : "run(order=3)" 77 | }, { 78 | "name" : "parentSuite", 79 | "value" : "test_case" 80 | }, { 81 | "name" : "suite", 82 | "value" : "test_edit_module" 83 | }, { 84 | "name" : "subSuite", 85 | "value" : "TestEditModule" 86 | }, { 87 | "name" : "host", 88 | "value" : "DESKTOP-13387BR" 89 | }, { 90 | "name" : "thread", 91 | "value" : "2748-MainThread" 92 | }, { 93 | "name" : "framework", 94 | "value" : "pytest" 95 | }, { 96 | "name" : "language", 97 | "value" : "cpython3" 98 | }, { 99 | "name" : "package", 100 | "value" : "test_case.test_edit_module" 101 | }, { 102 | "name" : "resultFormat", 103 | "value" : "allure2" 104 | } ], 105 | "parameters" : [ { 106 | "name" : "case_data", 107 | "value" : "[1.0, '创建博文成功', 'http://39.100.104.214:8080', '/create/', 'post', '{\"userid\":${userid}, \"token\":\"${token}\", \"title\":\"title test\", \"content\":\"content test\"}', '\"code\": \"00\"', '', '', '']" 108 | } ], 109 | "links" : [ ], 110 | "hidden" : false, 111 | "retry" : false, 112 | "extra" : { 113 | "severity" : "critical", 114 | "retries" : [ ], 115 | "categories" : [ ], 116 | "tags" : [ "run(order=3)" ] 117 | }, 118 | "source" : "43dc24eab8dcd7ee.json", 119 | "parameterValues" : [ "[1.0, '创建博文成功', 'http://39.100.104.214:8080', '/create/', 'post', '{\"userid\":${userid}, \"token\":\"${token}\", \"title\":\"title test\", \"content\":\"content test\"}', '\"code\": \"00\"', '', '', '']" ] 120 | } -------------------------------------------------------------------------------- /test_report/data/test-cases/4ca6ce593a277005.json: -------------------------------------------------------------------------------- 1 | { 2 | "uid" : "4ca6ce593a277005", 3 | "name" : "创建博文", 4 | "fullName" : "test_case.test_edit_module.TestEditModule#test_create", 5 | "historyId" : "dc072d17411f37f6a047bda09ea2711d", 6 | "time" : { 7 | "start" : 1629907677512, 8 | "stop" : 1629907677712, 9 | "duration" : 200 10 | }, 11 | "description" : "通过接口创建博文", 12 | "descriptionHtml" : "

通过接口创建博文

\n", 13 | "status" : "passed", 14 | "flaky" : false, 15 | "newFailed" : false, 16 | "beforeStages" : [ ], 17 | "testStage" : { 18 | "description" : "通过接口创建博文", 19 | "status" : "passed", 20 | "steps" : [ { 21 | "name" : "读取请求数据,调用接口", 22 | "time" : { 23 | "start" : 1629907677512, 24 | "stop" : 1629907677711, 25 | "duration" : 199 26 | }, 27 | "status" : "passed", 28 | "steps" : [ ], 29 | "attachments" : [ ], 30 | "parameters" : [ ], 31 | "attachmentsCount" : 0, 32 | "shouldDisplayMessage" : false, 33 | "stepsCount" : 0, 34 | "hasContent" : false 35 | }, { 36 | "name" : "获取响应数据,进行断言", 37 | "time" : { 38 | "start" : 1629907677712, 39 | "stop" : 1629907677712, 40 | "duration" : 0 41 | }, 42 | "status" : "passed", 43 | "steps" : [ ], 44 | "attachments" : [ ], 45 | "parameters" : [ ], 46 | "attachmentsCount" : 0, 47 | "shouldDisplayMessage" : false, 48 | "stepsCount" : 0, 49 | "hasContent" : false 50 | } ], 51 | "attachments" : [ { 52 | "uid" : "36d9e2c92188f1e9", 53 | "name" : "log", 54 | "source" : "36d9e2c92188f1e9.txt", 55 | "type" : "text/plain", 56 | "size" : 795 57 | } ], 58 | "parameters" : [ ], 59 | "attachmentsCount" : 1, 60 | "shouldDisplayMessage" : false, 61 | "stepsCount" : 2, 62 | "hasContent" : true 63 | }, 64 | "afterStages" : [ ], 65 | "labels" : [ { 66 | "name" : "story", 67 | "value" : "博文创建功能" 68 | }, { 69 | "name" : "feature", 70 | "value" : "编辑模块" 71 | }, { 72 | "name" : "severity", 73 | "value" : "critical" 74 | }, { 75 | "name" : "tag", 76 | "value" : "run(order=3)" 77 | }, { 78 | "name" : "parentSuite", 79 | "value" : "test_case" 80 | }, { 81 | "name" : "suite", 82 | "value" : "test_edit_module" 83 | }, { 84 | "name" : "subSuite", 85 | "value" : "TestEditModule" 86 | }, { 87 | "name" : "host", 88 | "value" : "DESKTOP-13387BR" 89 | }, { 90 | "name" : "thread", 91 | "value" : "2748-MainThread" 92 | }, { 93 | "name" : "framework", 94 | "value" : "pytest" 95 | }, { 96 | "name" : "language", 97 | "value" : "cpython3" 98 | }, { 99 | "name" : "package", 100 | "value" : "test_case.test_edit_module" 101 | }, { 102 | "name" : "resultFormat", 103 | "value" : "allure2" 104 | } ], 105 | "parameters" : [ { 106 | "name" : "case_data", 107 | "value" : "[2.0, '创建博文失败', 'http://39.100.104.214:8080', '/create/', 'post', '{\"userid\":${userid}, \"token\":\"123\", \"title\":\"title test\", \"content\":\"content test\"}', '\"code\": \"03\"', '', '', '']" 108 | } ], 109 | "links" : [ ], 110 | "hidden" : false, 111 | "retry" : false, 112 | "extra" : { 113 | "severity" : "critical", 114 | "retries" : [ ], 115 | "categories" : [ ], 116 | "tags" : [ "run(order=3)" ] 117 | }, 118 | "source" : "4ca6ce593a277005.json", 119 | "parameterValues" : [ "[2.0, '创建博文失败', 'http://39.100.104.214:8080', '/create/', 'post', '{\"userid\":${userid}, \"token\":\"123\", \"title\":\"title test\", \"content\":\"content test\"}', '\"code\": \"03\"', '', '', '']" ] 120 | } -------------------------------------------------------------------------------- /test_report/data/test-cases/5847db81c22255cc.json: -------------------------------------------------------------------------------- 1 | { 2 | "uid" : "5847db81c22255cc", 3 | "name" : "用户登录", 4 | "fullName" : "test_case.test_login_module.TestLoginModule#test_login", 5 | "historyId" : "5f9293329904e63832e3b1d10c6d286e", 6 | "time" : { 7 | "start" : 1629907676274, 8 | "stop" : 1629907677322, 9 | "duration" : 1048 10 | }, 11 | "description" : "通过接口进行用户登录", 12 | "descriptionHtml" : "

通过接口进行用户登录

\n", 13 | "status" : "passed", 14 | "flaky" : false, 15 | "newFailed" : false, 16 | "beforeStages" : [ ], 17 | "testStage" : { 18 | "description" : "通过接口进行用户登录", 19 | "status" : "passed", 20 | "steps" : [ { 21 | "name" : "读取请求数据,调用接口", 22 | "time" : { 23 | "start" : 1629907676274, 24 | "stop" : 1629907677321, 25 | "duration" : 1047 26 | }, 27 | "status" : "passed", 28 | "steps" : [ ], 29 | "attachments" : [ ], 30 | "parameters" : [ ], 31 | "attachmentsCount" : 0, 32 | "shouldDisplayMessage" : false, 33 | "stepsCount" : 0, 34 | "hasContent" : false 35 | }, { 36 | "name" : "获取响应数据,进行断言", 37 | "time" : { 38 | "start" : 1629907677321, 39 | "stop" : 1629907677321, 40 | "duration" : 0 41 | }, 42 | "status" : "passed", 43 | "steps" : [ ], 44 | "attachments" : [ ], 45 | "parameters" : [ ], 46 | "attachmentsCount" : 0, 47 | "shouldDisplayMessage" : false, 48 | "stepsCount" : 0, 49 | "hasContent" : false 50 | } ], 51 | "attachments" : [ { 52 | "uid" : "190ba6dba1231ffa", 53 | "name" : "log", 54 | "source" : "190ba6dba1231ffa.txt", 55 | "type" : "text/plain", 56 | "size" : 818 57 | } ], 58 | "parameters" : [ ], 59 | "attachmentsCount" : 1, 60 | "shouldDisplayMessage" : false, 61 | "stepsCount" : 2, 62 | "hasContent" : true 63 | }, 64 | "afterStages" : [ ], 65 | "labels" : [ { 66 | "name" : "story", 67 | "value" : "登录功能" 68 | }, { 69 | "name" : "severity", 70 | "value" : "blocker" 71 | }, { 72 | "name" : "feature", 73 | "value" : "登录模块" 74 | }, { 75 | "name" : "tag", 76 | "value" : "run(order=2)" 77 | }, { 78 | "name" : "parentSuite", 79 | "value" : "test_case" 80 | }, { 81 | "name" : "suite", 82 | "value" : "test_login_module" 83 | }, { 84 | "name" : "subSuite", 85 | "value" : "TestLoginModule" 86 | }, { 87 | "name" : "host", 88 | "value" : "DESKTOP-13387BR" 89 | }, { 90 | "name" : "thread", 91 | "value" : "2748-MainThread" 92 | }, { 93 | "name" : "framework", 94 | "value" : "pytest" 95 | }, { 96 | "name" : "language", 97 | "value" : "cpython3" 98 | }, { 99 | "name" : "package", 100 | "value" : "test_case.test_login_module" 101 | }, { 102 | "name" : "resultFormat", 103 | "value" : "allure2" 104 | } ], 105 | "parameters" : [ { 106 | "name" : "case_data", 107 | "value" : "[3.0, '密码错误,登录成功', 'http://39.100.104.214:8080', '/login/', 'post', '{\"username\":\"juno${unique_num2}\",\"password\":\"juno999999\"}', '\"code\": \"03\"', '', '', '']" 108 | } ], 109 | "links" : [ ], 110 | "hidden" : false, 111 | "retry" : false, 112 | "extra" : { 113 | "severity" : "blocker", 114 | "retries" : [ ], 115 | "categories" : [ ], 116 | "tags" : [ "run(order=2)" ] 117 | }, 118 | "source" : "5847db81c22255cc.json", 119 | "parameterValues" : [ "[3.0, '密码错误,登录成功', 'http://39.100.104.214:8080', '/login/', 'post', '{\"username\":\"juno${unique_num2}\",\"password\":\"juno999999\"}', '\"code\": \"03\"', '', '', '']" ] 120 | } -------------------------------------------------------------------------------- /test_report/data/test-cases/59a0b2d61cf702a6.json: -------------------------------------------------------------------------------- 1 | { 2 | "uid" : "59a0b2d61cf702a6", 3 | "name" : "用户注册", 4 | "fullName" : "test_case.test_login_module.TestLoginModule#test_register", 5 | "historyId" : "f6d1eb043a6b15674e731e1ef7bf23e6", 6 | "time" : { 7 | "start" : 1629907674544, 8 | "stop" : 1629907675012, 9 | "duration" : 468 10 | }, 11 | "description" : "通过接口进行用户注册", 12 | "descriptionHtml" : "

通过接口进行用户注册

\n", 13 | "status" : "passed", 14 | "flaky" : false, 15 | "newFailed" : false, 16 | "beforeStages" : [ ], 17 | "testStage" : { 18 | "description" : "通过接口进行用户注册", 19 | "status" : "passed", 20 | "steps" : [ { 21 | "name" : "读取请求数据,调用接口", 22 | "time" : { 23 | "start" : 1629907674544, 24 | "stop" : 1629907675011, 25 | "duration" : 467 26 | }, 27 | "status" : "passed", 28 | "steps" : [ ], 29 | "attachments" : [ ], 30 | "parameters" : [ ], 31 | "attachmentsCount" : 0, 32 | "shouldDisplayMessage" : false, 33 | "stepsCount" : 0, 34 | "hasContent" : false 35 | }, { 36 | "name" : "获取响应数据,进行断言", 37 | "time" : { 38 | "start" : 1629907675011, 39 | "stop" : 1629907675011, 40 | "duration" : 0 41 | }, 42 | "status" : "passed", 43 | "steps" : [ ], 44 | "attachments" : [ ], 45 | "parameters" : [ ], 46 | "attachmentsCount" : 0, 47 | "shouldDisplayMessage" : false, 48 | "stepsCount" : 0, 49 | "hasContent" : false 50 | } ], 51 | "attachments" : [ { 52 | "uid" : "9e9d05a5f24f79b6", 53 | "name" : "log", 54 | "source" : "9e9d05a5f24f79b6.txt", 55 | "type" : "text/plain", 56 | "size" : 820 57 | } ], 58 | "parameters" : [ ], 59 | "attachmentsCount" : 1, 60 | "shouldDisplayMessage" : false, 61 | "stepsCount" : 2, 62 | "hasContent" : true 63 | }, 64 | "afterStages" : [ ], 65 | "labels" : [ { 66 | "name" : "story", 67 | "value" : "注册功能" 68 | }, { 69 | "name" : "severity", 70 | "value" : "blocker" 71 | }, { 72 | "name" : "feature", 73 | "value" : "登录模块" 74 | }, { 75 | "name" : "tag", 76 | "value" : "run(order=1)" 77 | }, { 78 | "name" : "parentSuite", 79 | "value" : "test_case" 80 | }, { 81 | "name" : "suite", 82 | "value" : "test_login_module" 83 | }, { 84 | "name" : "subSuite", 85 | "value" : "TestLoginModule" 86 | }, { 87 | "name" : "host", 88 | "value" : "DESKTOP-13387BR" 89 | }, { 90 | "name" : "thread", 91 | "value" : "2748-MainThread" 92 | }, { 93 | "name" : "framework", 94 | "value" : "pytest" 95 | }, { 96 | "name" : "language", 97 | "value" : "cpython3" 98 | }, { 99 | "name" : "package", 100 | "value" : "test_case.test_login_module" 101 | }, { 102 | "name" : "resultFormat", 103 | "value" : "allure2" 104 | } ], 105 | "parameters" : [ { 106 | "name" : "case_data", 107 | "value" : "[2.0, '注册成功', 'http://39.100.104.214:8080', '/register/', 'post', '{\"username\":\"juno${get_unique_num2}\",\"password\":\"juno999999\",\"email\":\"juno123@qq.com\"}', '\"code\": \"00\"', 'userid', '', '']" 108 | } ], 109 | "links" : [ ], 110 | "hidden" : false, 111 | "retry" : false, 112 | "extra" : { 113 | "severity" : "blocker", 114 | "retries" : [ ], 115 | "categories" : [ ], 116 | "tags" : [ "run(order=1)" ] 117 | }, 118 | "source" : "59a0b2d61cf702a6.json", 119 | "parameterValues" : [ "[2.0, '注册成功', 'http://39.100.104.214:8080', '/register/', 'post', '{\"username\":\"juno${get_unique_num2}\",\"password\":\"juno999999\",\"email\":\"juno123@qq.com\"}', '\"code\": \"00\"', 'userid', '', '']" ] 120 | } -------------------------------------------------------------------------------- /test_report/data/test-cases/5e792b44457ea9aa.json: -------------------------------------------------------------------------------- 1 | { 2 | "uid" : "5e792b44457ea9aa", 3 | "name" : "查看博文内容", 4 | "fullName" : "test_case.test_edit_module.TestEditModule#test_blog_content_search", 5 | "historyId" : "416b196eb12787a78916dd535df9932e", 6 | "time" : { 7 | "start" : 1629907678295, 8 | "stop" : 1629907678432, 9 | "duration" : 137 10 | }, 11 | "description" : "通过接口查看博文内容", 12 | "descriptionHtml" : "

通过接口查看博文内容

\n", 13 | "status" : "passed", 14 | "flaky" : false, 15 | "newFailed" : false, 16 | "beforeStages" : [ ], 17 | "testStage" : { 18 | "description" : "通过接口查看博文内容", 19 | "status" : "passed", 20 | "steps" : [ { 21 | "name" : "读取请求数据,调用接口", 22 | "time" : { 23 | "start" : 1629907678295, 24 | "stop" : 1629907678430, 25 | "duration" : 135 26 | }, 27 | "status" : "passed", 28 | "steps" : [ ], 29 | "attachments" : [ ], 30 | "parameters" : [ ], 31 | "attachmentsCount" : 0, 32 | "shouldDisplayMessage" : false, 33 | "stepsCount" : 0, 34 | "hasContent" : false 35 | }, { 36 | "name" : "获取响应数据,进行断言", 37 | "time" : { 38 | "start" : 1629907678431, 39 | "stop" : 1629907678431, 40 | "duration" : 0 41 | }, 42 | "status" : "passed", 43 | "steps" : [ ], 44 | "attachments" : [ ], 45 | "parameters" : [ ], 46 | "attachmentsCount" : 0, 47 | "shouldDisplayMessage" : false, 48 | "stepsCount" : 0, 49 | "hasContent" : false 50 | } ], 51 | "attachments" : [ { 52 | "uid" : "b16ec22e593aaf0e", 53 | "name" : "log", 54 | "source" : "b16ec22e593aaf0e.txt", 55 | "type" : "text/plain", 56 | "size" : 627 57 | } ], 58 | "parameters" : [ ], 59 | "attachmentsCount" : 1, 60 | "shouldDisplayMessage" : false, 61 | "stepsCount" : 2, 62 | "hasContent" : true 63 | }, 64 | "afterStages" : [ ], 65 | "labels" : [ { 66 | "name" : "story", 67 | "value" : "博文内容查询功能" 68 | }, { 69 | "name" : "feature", 70 | "value" : "编辑模块" 71 | }, { 72 | "name" : "severity", 73 | "value" : "critical" 74 | }, { 75 | "name" : "tag", 76 | "value" : "run(order=5)" 77 | }, { 78 | "name" : "parentSuite", 79 | "value" : "test_case" 80 | }, { 81 | "name" : "suite", 82 | "value" : "test_edit_module" 83 | }, { 84 | "name" : "subSuite", 85 | "value" : "TestEditModule" 86 | }, { 87 | "name" : "host", 88 | "value" : "DESKTOP-13387BR" 89 | }, { 90 | "name" : "thread", 91 | "value" : "2748-MainThread" 92 | }, { 93 | "name" : "framework", 94 | "value" : "pytest" 95 | }, { 96 | "name" : "language", 97 | "value" : "cpython3" 98 | }, { 99 | "name" : "package", 100 | "value" : "test_case.test_edit_module" 101 | }, { 102 | "name" : "resultFormat", 103 | "value" : "allure2" 104 | } ], 105 | "parameters" : [ { 106 | "name" : "case_data", 107 | "value" : "[2.0, 'articleId有误,查询失败', 'http://39.100.104.214:8080', '/getBlogContent/1234', 'get', '', '\"code\": \"03\"', '', '', '']" 108 | } ], 109 | "links" : [ ], 110 | "hidden" : false, 111 | "retry" : false, 112 | "extra" : { 113 | "severity" : "critical", 114 | "retries" : [ ], 115 | "categories" : [ ], 116 | "tags" : [ "run(order=5)" ] 117 | }, 118 | "source" : "5e792b44457ea9aa.json", 119 | "parameterValues" : [ "[2.0, 'articleId有误,查询失败', 'http://39.100.104.214:8080', '/getBlogContent/1234', 'get', '', '\"code\": \"03\"', '', '', '']" ] 120 | } -------------------------------------------------------------------------------- /test_report/data/test-cases/77bac1a9be6aa799.json: -------------------------------------------------------------------------------- 1 | { 2 | "uid" : "77bac1a9be6aa799", 3 | "name" : "用户登录", 4 | "fullName" : "test_case.test_login_module.TestLoginModule#test_login", 5 | "historyId" : "78f3f821c4dea63cf111ffe451d46df3", 6 | "time" : { 7 | "start" : 1629907675639, 8 | "stop" : 1629907676260, 9 | "duration" : 621 10 | }, 11 | "description" : "通过接口进行用户登录", 12 | "descriptionHtml" : "

通过接口进行用户登录

\n", 13 | "status" : "passed", 14 | "flaky" : false, 15 | "newFailed" : false, 16 | "beforeStages" : [ ], 17 | "testStage" : { 18 | "description" : "通过接口进行用户登录", 19 | "status" : "passed", 20 | "steps" : [ { 21 | "name" : "读取请求数据,调用接口", 22 | "time" : { 23 | "start" : 1629907675639, 24 | "stop" : 1629907676258, 25 | "duration" : 619 26 | }, 27 | "status" : "passed", 28 | "steps" : [ ], 29 | "attachments" : [ ], 30 | "parameters" : [ ], 31 | "attachmentsCount" : 0, 32 | "shouldDisplayMessage" : false, 33 | "stepsCount" : 0, 34 | "hasContent" : false 35 | }, { 36 | "name" : "获取响应数据,进行断言", 37 | "time" : { 38 | "start" : 1629907676259, 39 | "stop" : 1629907676259, 40 | "duration" : 0 41 | }, 42 | "status" : "passed", 43 | "steps" : [ ], 44 | "attachments" : [ ], 45 | "parameters" : [ ], 46 | "attachmentsCount" : 0, 47 | "shouldDisplayMessage" : false, 48 | "stepsCount" : 0, 49 | "hasContent" : false 50 | } ], 51 | "attachments" : [ { 52 | "uid" : "c8099de3a3431c20", 53 | "name" : "log", 54 | "source" : "c8099de3a3431c20.txt", 55 | "type" : "text/plain", 56 | "size" : 959 57 | } ], 58 | "parameters" : [ ], 59 | "attachmentsCount" : 1, 60 | "shouldDisplayMessage" : false, 61 | "stepsCount" : 2, 62 | "hasContent" : true 63 | }, 64 | "afterStages" : [ ], 65 | "labels" : [ { 66 | "name" : "story", 67 | "value" : "登录功能" 68 | }, { 69 | "name" : "severity", 70 | "value" : "blocker" 71 | }, { 72 | "name" : "feature", 73 | "value" : "登录模块" 74 | }, { 75 | "name" : "tag", 76 | "value" : "run(order=2)" 77 | }, { 78 | "name" : "parentSuite", 79 | "value" : "test_case" 80 | }, { 81 | "name" : "suite", 82 | "value" : "test_login_module" 83 | }, { 84 | "name" : "subSuite", 85 | "value" : "TestLoginModule" 86 | }, { 87 | "name" : "host", 88 | "value" : "DESKTOP-13387BR" 89 | }, { 90 | "name" : "thread", 91 | "value" : "2748-MainThread" 92 | }, { 93 | "name" : "framework", 94 | "value" : "pytest" 95 | }, { 96 | "name" : "language", 97 | "value" : "cpython3" 98 | }, { 99 | "name" : "package", 100 | "value" : "test_case.test_login_module" 101 | }, { 102 | "name" : "resultFormat", 103 | "value" : "allure2" 104 | } ], 105 | "parameters" : [ { 106 | "name" : "case_data", 107 | "value" : "[2.0, '登录成功', 'http://39.100.104.214:8080', '/login/', 'post', '{\"username\":\"juno${unique_num2}\",\"password\":\"${md5(\\'juno999999\\')}\"}', '\"token\"', 'token', '', '']" 108 | } ], 109 | "links" : [ ], 110 | "hidden" : false, 111 | "retry" : false, 112 | "extra" : { 113 | "severity" : "blocker", 114 | "retries" : [ ], 115 | "categories" : [ ], 116 | "tags" : [ "run(order=2)" ] 117 | }, 118 | "source" : "77bac1a9be6aa799.json", 119 | "parameterValues" : [ "[2.0, '登录成功', 'http://39.100.104.214:8080', '/login/', 'post', '{\"username\":\"juno${unique_num2}\",\"password\":\"${md5(\\'juno999999\\')}\"}', '\"token\"', 'token', '', '']" ] 120 | } -------------------------------------------------------------------------------- /test_report/data/test-cases/8db162b0c1a180aa.json: -------------------------------------------------------------------------------- 1 | { 2 | "uid" : "8db162b0c1a180aa", 3 | "name" : "查看用户博文", 4 | "fullName" : "test_case.test_edit_module.TestEditModule#test_user_blog_search", 5 | "historyId" : "ce639bf4b18ab421b63f9d2e8ddc47ab", 6 | "time" : { 7 | "start" : 1629907677933, 8 | "stop" : 1629907678147, 9 | "duration" : 214 10 | }, 11 | "description" : "通过接口查看用户所有博文", 12 | "descriptionHtml" : "

通过接口查看用户所有博文

\n", 13 | "status" : "passed", 14 | "flaky" : false, 15 | "newFailed" : false, 16 | "beforeStages" : [ ], 17 | "testStage" : { 18 | "description" : "通过接口查看用户所有博文", 19 | "status" : "passed", 20 | "steps" : [ { 21 | "name" : "读取请求数据,调用接口", 22 | "time" : { 23 | "start" : 1629907677934, 24 | "stop" : 1629907678146, 25 | "duration" : 212 26 | }, 27 | "status" : "passed", 28 | "steps" : [ ], 29 | "attachments" : [ ], 30 | "parameters" : [ ], 31 | "attachmentsCount" : 0, 32 | "shouldDisplayMessage" : false, 33 | "stepsCount" : 0, 34 | "hasContent" : false 35 | }, { 36 | "name" : "获取响应数据,进行断言", 37 | "time" : { 38 | "start" : 1629907678146, 39 | "stop" : 1629907678147, 40 | "duration" : 1 41 | }, 42 | "status" : "passed", 43 | "steps" : [ ], 44 | "attachments" : [ ], 45 | "parameters" : [ ], 46 | "attachmentsCount" : 0, 47 | "shouldDisplayMessage" : false, 48 | "stepsCount" : 0, 49 | "hasContent" : false 50 | } ], 51 | "attachments" : [ { 52 | "uid" : "f2f22c3f1f11b219", 53 | "name" : "log", 54 | "source" : "f2f22c3f1f11b219.txt", 55 | "type" : "text/plain", 56 | "size" : 673 57 | } ], 58 | "parameters" : [ ], 59 | "attachmentsCount" : 1, 60 | "shouldDisplayMessage" : false, 61 | "stepsCount" : 2, 62 | "hasContent" : true 63 | }, 64 | "afterStages" : [ ], 65 | "labels" : [ { 66 | "name" : "feature", 67 | "value" : "编辑模块" 68 | }, { 69 | "name" : "story", 70 | "value" : "用户博文查询功能" 71 | }, { 72 | "name" : "severity", 73 | "value" : "critical" 74 | }, { 75 | "name" : "tag", 76 | "value" : "run(order=4)" 77 | }, { 78 | "name" : "parentSuite", 79 | "value" : "test_case" 80 | }, { 81 | "name" : "suite", 82 | "value" : "test_edit_module" 83 | }, { 84 | "name" : "subSuite", 85 | "value" : "TestEditModule" 86 | }, { 87 | "name" : "host", 88 | "value" : "DESKTOP-13387BR" 89 | }, { 90 | "name" : "thread", 91 | "value" : "2748-MainThread" 92 | }, { 93 | "name" : "framework", 94 | "value" : "pytest" 95 | }, { 96 | "name" : "language", 97 | "value" : "cpython3" 98 | }, { 99 | "name" : "package", 100 | "value" : "test_case.test_edit_module" 101 | }, { 102 | "name" : "resultFormat", 103 | "value" : "allure2" 104 | } ], 105 | "parameters" : [ { 106 | "name" : "case_data", 107 | "value" : "[2.0, '用户token有误,查询失败', 'http://39.100.104.214:8080', '/getBlogsOfUser/', 'post', '{\"userid\":${userid}, \"token\":\"123\"}', '\"code\": \"03\"', '', '', '']" 108 | } ], 109 | "links" : [ ], 110 | "hidden" : false, 111 | "retry" : false, 112 | "extra" : { 113 | "severity" : "critical", 114 | "retries" : [ ], 115 | "categories" : [ ], 116 | "tags" : [ "run(order=4)" ] 117 | }, 118 | "source" : "8db162b0c1a180aa.json", 119 | "parameterValues" : [ "[2.0, '用户token有误,查询失败', 'http://39.100.104.214:8080', '/getBlogsOfUser/', 'post', '{\"userid\":${userid}, \"token\":\"123\"}', '\"code\": \"03\"', '', '', '']" ] 120 | } -------------------------------------------------------------------------------- /test_report/data/test-cases/8f972462257f4377.json: -------------------------------------------------------------------------------- 1 | { 2 | "uid" : "8f972462257f4377", 3 | "name" : "删除博文", 4 | "fullName" : "test_case.test_edit_module.TestEditModule#test_delete", 5 | "historyId" : "d05ee58a25da395bb3ae0b1270c84483", 6 | "time" : { 7 | "start" : 1629907679310, 8 | "stop" : 1629907679439, 9 | "duration" : 129 10 | }, 11 | "description" : "通过接口删除博文", 12 | "descriptionHtml" : "

通过接口删除博文

\n", 13 | "status" : "passed", 14 | "flaky" : false, 15 | "newFailed" : false, 16 | "beforeStages" : [ ], 17 | "testStage" : { 18 | "description" : "通过接口删除博文", 19 | "status" : "passed", 20 | "steps" : [ { 21 | "name" : "读取请求数据,调用接口", 22 | "time" : { 23 | "start" : 1629907679311, 24 | "stop" : 1629907679438, 25 | "duration" : 127 26 | }, 27 | "status" : "passed", 28 | "steps" : [ ], 29 | "attachments" : [ ], 30 | "parameters" : [ ], 31 | "attachmentsCount" : 0, 32 | "shouldDisplayMessage" : false, 33 | "stepsCount" : 0, 34 | "hasContent" : false 35 | }, { 36 | "name" : "获取响应数据,进行断言", 37 | "time" : { 38 | "start" : 1629907679438, 39 | "stop" : 1629907679439, 40 | "duration" : 1 41 | }, 42 | "status" : "passed", 43 | "steps" : [ ], 44 | "attachments" : [ ], 45 | "parameters" : [ ], 46 | "attachmentsCount" : 0, 47 | "shouldDisplayMessage" : false, 48 | "stepsCount" : 0, 49 | "hasContent" : false 50 | } ], 51 | "attachments" : [ { 52 | "uid" : "5956dfac7c2affd7", 53 | "name" : "log", 54 | "source" : "5956dfac7c2affd7.txt", 55 | "type" : "text/plain", 56 | "size" : 710 57 | } ], 58 | "parameters" : [ ], 59 | "attachmentsCount" : 1, 60 | "shouldDisplayMessage" : false, 61 | "stepsCount" : 2, 62 | "hasContent" : true 63 | }, 64 | "afterStages" : [ ], 65 | "labels" : [ { 66 | "name" : "story", 67 | "value" : "博文删除功能" 68 | }, { 69 | "name" : "feature", 70 | "value" : "编辑模块" 71 | }, { 72 | "name" : "severity", 73 | "value" : "critical" 74 | }, { 75 | "name" : "tag", 76 | "value" : "run(order=8)" 77 | }, { 78 | "name" : "parentSuite", 79 | "value" : "test_case" 80 | }, { 81 | "name" : "suite", 82 | "value" : "test_edit_module" 83 | }, { 84 | "name" : "subSuite", 85 | "value" : "TestEditModule" 86 | }, { 87 | "name" : "host", 88 | "value" : "DESKTOP-13387BR" 89 | }, { 90 | "name" : "thread", 91 | "value" : "2748-MainThread" 92 | }, { 93 | "name" : "framework", 94 | "value" : "pytest" 95 | }, { 96 | "name" : "language", 97 | "value" : "cpython3" 98 | }, { 99 | "name" : "package", 100 | "value" : "test_case.test_edit_module" 101 | }, { 102 | "name" : "resultFormat", 103 | "value" : "allure2" 104 | } ], 105 | "parameters" : [ { 106 | "name" : "case_data", 107 | "value" : "[2.0, 'token有误,更新失败', 'http://39.100.104.214:8080', '/delete/', 'post', '{\"userid\":${userid}, \"token\": \"123\", \"articleId\":[]}', '\"code\": \"03\"', '', '', '']" 108 | } ], 109 | "links" : [ ], 110 | "hidden" : false, 111 | "retry" : false, 112 | "extra" : { 113 | "severity" : "critical", 114 | "retries" : [ ], 115 | "categories" : [ ], 116 | "tags" : [ "run(order=8)" ] 117 | }, 118 | "source" : "8f972462257f4377.json", 119 | "parameterValues" : [ "[2.0, 'token有误,更新失败', 'http://39.100.104.214:8080', '/delete/', 'post', '{\"userid\":${userid}, \"token\": \"123\", \"articleId\":[]}', '\"code\": \"03\"', '', '', '']" ] 120 | } -------------------------------------------------------------------------------- /test_report/data/test-cases/928fd66149be506e.json: -------------------------------------------------------------------------------- 1 | { 2 | "uid" : "928fd66149be506e", 3 | "name" : "批量查询博文", 4 | "fullName" : "test_case.test_edit_module.TestEditModule#test_blog_batch_search", 5 | "historyId" : "9d19b71007895959926a1af082521df3", 6 | "time" : { 7 | "start" : 1629907678788, 8 | "stop" : 1629907678917, 9 | "duration" : 129 10 | }, 11 | "description" : "通过接口批量查询博文", 12 | "descriptionHtml" : "

通过接口批量查询博文

\n", 13 | "status" : "passed", 14 | "flaky" : false, 15 | "newFailed" : false, 16 | "beforeStages" : [ ], 17 | "testStage" : { 18 | "description" : "通过接口批量查询博文", 19 | "status" : "passed", 20 | "steps" : [ { 21 | "name" : "读取请求数据,调用接口", 22 | "time" : { 23 | "start" : 1629907678788, 24 | "stop" : 1629907678916, 25 | "duration" : 128 26 | }, 27 | "status" : "passed", 28 | "steps" : [ ], 29 | "attachments" : [ ], 30 | "parameters" : [ ], 31 | "attachmentsCount" : 0, 32 | "shouldDisplayMessage" : false, 33 | "stepsCount" : 0, 34 | "hasContent" : false 35 | }, { 36 | "name" : "获取响应数据,进行断言", 37 | "time" : { 38 | "start" : 1629907678916, 39 | "stop" : 1629907678917, 40 | "duration" : 1 41 | }, 42 | "status" : "passed", 43 | "steps" : [ ], 44 | "attachments" : [ ], 45 | "parameters" : [ ], 46 | "attachmentsCount" : 0, 47 | "shouldDisplayMessage" : false, 48 | "stepsCount" : 0, 49 | "hasContent" : false 50 | } ], 51 | "attachments" : [ { 52 | "uid" : "f7e0ac24db6df31", 53 | "name" : "log", 54 | "source" : "f7e0ac24db6df31.txt", 55 | "type" : "text/plain", 56 | "size" : 952 57 | } ], 58 | "parameters" : [ ], 59 | "attachmentsCount" : 1, 60 | "shouldDisplayMessage" : false, 61 | "stepsCount" : 2, 62 | "hasContent" : true 63 | }, 64 | "afterStages" : [ ], 65 | "labels" : [ { 66 | "name" : "feature", 67 | "value" : "编辑模块" 68 | }, { 69 | "name" : "story", 70 | "value" : "批量查询博文功能" 71 | }, { 72 | "name" : "severity", 73 | "value" : "critical" 74 | }, { 75 | "name" : "tag", 76 | "value" : "run(order=7)" 77 | }, { 78 | "name" : "parentSuite", 79 | "value" : "test_case" 80 | }, { 81 | "name" : "suite", 82 | "value" : "test_edit_module" 83 | }, { 84 | "name" : "subSuite", 85 | "value" : "TestEditModule" 86 | }, { 87 | "name" : "host", 88 | "value" : "DESKTOP-13387BR" 89 | }, { 90 | "name" : "thread", 91 | "value" : "2748-MainThread" 92 | }, { 93 | "name" : "framework", 94 | "value" : "pytest" 95 | }, { 96 | "name" : "language", 97 | "value" : "cpython3" 98 | }, { 99 | "name" : "package", 100 | "value" : "test_case.test_edit_module" 101 | }, { 102 | "name" : "resultFormat", 103 | "value" : "allure2" 104 | } ], 105 | "parameters" : [ { 106 | "name" : "case_data", 107 | "value" : "[1.0, '博文批量查询成功', 'http://39.100.104.214:8080', '/getBlogsContent/articleIds=${articleId}', 'get', '', '\"code\": \"00\"', '', '', '']" 108 | } ], 109 | "links" : [ ], 110 | "hidden" : false, 111 | "retry" : false, 112 | "extra" : { 113 | "severity" : "critical", 114 | "retries" : [ ], 115 | "categories" : [ ], 116 | "tags" : [ "run(order=7)" ] 117 | }, 118 | "source" : "928fd66149be506e.json", 119 | "parameterValues" : [ "[1.0, '博文批量查询成功', 'http://39.100.104.214:8080', '/getBlogsContent/articleIds=${articleId}', 'get', '', '\"code\": \"00\"', '', '', '']" ] 120 | } -------------------------------------------------------------------------------- /test_report/data/test-cases/93000324a8016c7a.json: -------------------------------------------------------------------------------- 1 | { 2 | "uid" : "93000324a8016c7a", 3 | "name" : "查看博文内容", 4 | "fullName" : "test_case.test_edit_module.TestEditModule#test_blog_content_search", 5 | "historyId" : "13b38d6b55f2887a829110dffd1bda14", 6 | "time" : { 7 | "start" : 1629907678158, 8 | "stop" : 1629907678284, 9 | "duration" : 126 10 | }, 11 | "description" : "通过接口查看博文内容", 12 | "descriptionHtml" : "

通过接口查看博文内容

\n", 13 | "status" : "passed", 14 | "flaky" : false, 15 | "newFailed" : false, 16 | "beforeStages" : [ ], 17 | "testStage" : { 18 | "description" : "通过接口查看博文内容", 19 | "status" : "passed", 20 | "steps" : [ { 21 | "name" : "读取请求数据,调用接口", 22 | "time" : { 23 | "start" : 1629907678159, 24 | "stop" : 1629907678282, 25 | "duration" : 123 26 | }, 27 | "status" : "passed", 28 | "steps" : [ ], 29 | "attachments" : [ ], 30 | "parameters" : [ ], 31 | "attachmentsCount" : 0, 32 | "shouldDisplayMessage" : false, 33 | "stepsCount" : 0, 34 | "hasContent" : false 35 | }, { 36 | "name" : "获取响应数据,进行断言", 37 | "time" : { 38 | "start" : 1629907678283, 39 | "stop" : 1629907678283, 40 | "duration" : 0 41 | }, 42 | "status" : "passed", 43 | "steps" : [ ], 44 | "attachments" : [ ], 45 | "parameters" : [ ], 46 | "attachmentsCount" : 0, 47 | "shouldDisplayMessage" : false, 48 | "stepsCount" : 0, 49 | "hasContent" : false 50 | } ], 51 | "attachments" : [ { 52 | "uid" : "51773fc339bb5a2a", 53 | "name" : "log", 54 | "source" : "51773fc339bb5a2a.txt", 55 | "type" : "text/plain", 56 | "size" : 922 57 | } ], 58 | "parameters" : [ ], 59 | "attachmentsCount" : 1, 60 | "shouldDisplayMessage" : false, 61 | "stepsCount" : 2, 62 | "hasContent" : true 63 | }, 64 | "afterStages" : [ ], 65 | "labels" : [ { 66 | "name" : "story", 67 | "value" : "博文内容查询功能" 68 | }, { 69 | "name" : "feature", 70 | "value" : "编辑模块" 71 | }, { 72 | "name" : "severity", 73 | "value" : "critical" 74 | }, { 75 | "name" : "tag", 76 | "value" : "run(order=5)" 77 | }, { 78 | "name" : "parentSuite", 79 | "value" : "test_case" 80 | }, { 81 | "name" : "suite", 82 | "value" : "test_edit_module" 83 | }, { 84 | "name" : "subSuite", 85 | "value" : "TestEditModule" 86 | }, { 87 | "name" : "host", 88 | "value" : "DESKTOP-13387BR" 89 | }, { 90 | "name" : "thread", 91 | "value" : "2748-MainThread" 92 | }, { 93 | "name" : "framework", 94 | "value" : "pytest" 95 | }, { 96 | "name" : "language", 97 | "value" : "cpython3" 98 | }, { 99 | "name" : "package", 100 | "value" : "test_case.test_edit_module" 101 | }, { 102 | "name" : "resultFormat", 103 | "value" : "allure2" 104 | } ], 105 | "parameters" : [ { 106 | "name" : "case_data", 107 | "value" : "[1.0, '博文内容查询成功', 'http://39.100.104.214:8080', '/getBlogContent/${articleId}', 'get', '', '\"content\": \"content test\"', '', '', '']" 108 | } ], 109 | "links" : [ ], 110 | "hidden" : false, 111 | "retry" : false, 112 | "extra" : { 113 | "severity" : "critical", 114 | "retries" : [ ], 115 | "categories" : [ ], 116 | "tags" : [ "run(order=5)" ] 117 | }, 118 | "source" : "93000324a8016c7a.json", 119 | "parameterValues" : [ "[1.0, '博文内容查询成功', 'http://39.100.104.214:8080', '/getBlogContent/${articleId}', 'get', '', '\"content\": \"content test\"', '', '', '']" ] 120 | } -------------------------------------------------------------------------------- /test_report/data/test-cases/9c7fb473d7fc68f0.json: -------------------------------------------------------------------------------- 1 | { 2 | "uid" : "9c7fb473d7fc68f0", 3 | "name" : "更新博文内容", 4 | "fullName" : "test_case.test_edit_module.TestEditModule#test_blog_content_update", 5 | "historyId" : "46a0e2eef5067b91b46ef2f9551d0783", 6 | "time" : { 7 | "start" : 1629907678443, 8 | "stop" : 1629907678601, 9 | "duration" : 158 10 | }, 11 | "description" : "通过接口更新博文内容", 12 | "descriptionHtml" : "

通过接口更新博文内容

\n", 13 | "status" : "passed", 14 | "flaky" : false, 15 | "newFailed" : false, 16 | "beforeStages" : [ ], 17 | "testStage" : { 18 | "description" : "通过接口更新博文内容", 19 | "status" : "passed", 20 | "steps" : [ { 21 | "name" : "读取请求数据,调用接口", 22 | "time" : { 23 | "start" : 1629907678443, 24 | "stop" : 1629907678600, 25 | "duration" : 157 26 | }, 27 | "status" : "passed", 28 | "steps" : [ ], 29 | "attachments" : [ ], 30 | "parameters" : [ ], 31 | "attachmentsCount" : 0, 32 | "shouldDisplayMessage" : false, 33 | "stepsCount" : 0, 34 | "hasContent" : false 35 | }, { 36 | "name" : "获取响应数据,进行断言", 37 | "time" : { 38 | "start" : 1629907678600, 39 | "stop" : 1629907678601, 40 | "duration" : 1 41 | }, 42 | "status" : "passed", 43 | "steps" : [ ], 44 | "attachments" : [ ], 45 | "parameters" : [ ], 46 | "attachmentsCount" : 0, 47 | "shouldDisplayMessage" : false, 48 | "stepsCount" : 0, 49 | "hasContent" : false 50 | } ], 51 | "attachments" : [ { 52 | "uid" : "3c673d881dc90af0", 53 | "name" : "log", 54 | "source" : "3c673d881dc90af0.txt", 55 | "type" : "text/plain", 56 | "size" : 1006 57 | } ], 58 | "parameters" : [ ], 59 | "attachmentsCount" : 1, 60 | "shouldDisplayMessage" : false, 61 | "stepsCount" : 2, 62 | "hasContent" : true 63 | }, 64 | "afterStages" : [ ], 65 | "labels" : [ { 66 | "name" : "story", 67 | "value" : "博文内容更新功能" 68 | }, { 69 | "name" : "feature", 70 | "value" : "编辑模块" 71 | }, { 72 | "name" : "severity", 73 | "value" : "critical" 74 | }, { 75 | "name" : "tag", 76 | "value" : "run(order=6)" 77 | }, { 78 | "name" : "parentSuite", 79 | "value" : "test_case" 80 | }, { 81 | "name" : "suite", 82 | "value" : "test_edit_module" 83 | }, { 84 | "name" : "subSuite", 85 | "value" : "TestEditModule" 86 | }, { 87 | "name" : "host", 88 | "value" : "DESKTOP-13387BR" 89 | }, { 90 | "name" : "thread", 91 | "value" : "2748-MainThread" 92 | }, { 93 | "name" : "framework", 94 | "value" : "pytest" 95 | }, { 96 | "name" : "language", 97 | "value" : "cpython3" 98 | }, { 99 | "name" : "package", 100 | "value" : "test_case.test_edit_module" 101 | }, { 102 | "name" : "resultFormat", 103 | "value" : "allure2" 104 | } ], 105 | "parameters" : [ { 106 | "name" : "case_data", 107 | "value" : "[1.0, '博文内容更新成功', 'http://39.100.104.214:8080', '/update/', 'put', '{\"userid\":${userid}, \"token\": \"${token}\", \"articleId\":${articleId}, \"title\":\"python\", \"content\":\"test test\"}', '\"update_time\":', '', '', '']" 108 | } ], 109 | "links" : [ ], 110 | "hidden" : false, 111 | "retry" : false, 112 | "extra" : { 113 | "severity" : "critical", 114 | "retries" : [ ], 115 | "categories" : [ ], 116 | "tags" : [ "run(order=6)" ] 117 | }, 118 | "source" : "9c7fb473d7fc68f0.json", 119 | "parameterValues" : [ "[1.0, '博文内容更新成功', 'http://39.100.104.214:8080', '/update/', 'put', '{\"userid\":${userid}, \"token\": \"${token}\", \"articleId\":${articleId}, \"title\":\"python\", \"content\":\"test test\"}', '\"update_time\":', '', '', '']" ] 120 | } -------------------------------------------------------------------------------- /test_report/data/test-cases/a9e063ba23abac18.json: -------------------------------------------------------------------------------- 1 | { 2 | "uid" : "a9e063ba23abac18", 3 | "name" : "删除博文", 4 | "fullName" : "test_case.test_edit_module.TestEditModule#test_delete", 5 | "historyId" : "4baf0c524b3f3405bef804d98d2e4f9d", 6 | "time" : { 7 | "start" : 1629907679087, 8 | "stop" : 1629907679298, 9 | "duration" : 211 10 | }, 11 | "description" : "通过接口删除博文", 12 | "descriptionHtml" : "

通过接口删除博文

\n", 13 | "status" : "passed", 14 | "flaky" : false, 15 | "newFailed" : false, 16 | "beforeStages" : [ ], 17 | "testStage" : { 18 | "description" : "通过接口删除博文", 19 | "status" : "passed", 20 | "steps" : [ { 21 | "name" : "读取请求数据,调用接口", 22 | "time" : { 23 | "start" : 1629907679087, 24 | "stop" : 1629907679297, 25 | "duration" : 210 26 | }, 27 | "status" : "passed", 28 | "steps" : [ ], 29 | "attachments" : [ ], 30 | "parameters" : [ ], 31 | "attachmentsCount" : 0, 32 | "shouldDisplayMessage" : false, 33 | "stepsCount" : 0, 34 | "hasContent" : false 35 | }, { 36 | "name" : "获取响应数据,进行断言", 37 | "time" : { 38 | "start" : 1629907679297, 39 | "stop" : 1629907679298, 40 | "duration" : 1 41 | }, 42 | "status" : "passed", 43 | "steps" : [ ], 44 | "attachments" : [ ], 45 | "parameters" : [ ], 46 | "attachmentsCount" : 0, 47 | "shouldDisplayMessage" : false, 48 | "stepsCount" : 0, 49 | "hasContent" : false 50 | } ], 51 | "attachments" : [ { 52 | "uid" : "c9a059184ea54b42", 53 | "name" : "log", 54 | "source" : "c9a059184ea54b42.txt", 55 | "type" : "text/plain", 56 | "size" : 808 57 | } ], 58 | "parameters" : [ ], 59 | "attachmentsCount" : 1, 60 | "shouldDisplayMessage" : false, 61 | "stepsCount" : 2, 62 | "hasContent" : true 63 | }, 64 | "afterStages" : [ ], 65 | "labels" : [ { 66 | "name" : "story", 67 | "value" : "博文删除功能" 68 | }, { 69 | "name" : "feature", 70 | "value" : "编辑模块" 71 | }, { 72 | "name" : "severity", 73 | "value" : "critical" 74 | }, { 75 | "name" : "tag", 76 | "value" : "run(order=8)" 77 | }, { 78 | "name" : "parentSuite", 79 | "value" : "test_case" 80 | }, { 81 | "name" : "suite", 82 | "value" : "test_edit_module" 83 | }, { 84 | "name" : "subSuite", 85 | "value" : "TestEditModule" 86 | }, { 87 | "name" : "host", 88 | "value" : "DESKTOP-13387BR" 89 | }, { 90 | "name" : "thread", 91 | "value" : "2748-MainThread" 92 | }, { 93 | "name" : "framework", 94 | "value" : "pytest" 95 | }, { 96 | "name" : "language", 97 | "value" : "cpython3" 98 | }, { 99 | "name" : "package", 100 | "value" : "test_case.test_edit_module" 101 | }, { 102 | "name" : "resultFormat", 103 | "value" : "allure2" 104 | } ], 105 | "parameters" : [ { 106 | "name" : "case_data", 107 | "value" : "[1.0, '博文删除成功', 'http://39.100.104.214:8080', '/delete/', 'post', '{\"userid\":${userid}, \"token\": \"${token}\", \"articleId\":[${articleId}]}', '\"code\": \"00\"', '', '', '']" 108 | } ], 109 | "links" : [ ], 110 | "hidden" : false, 111 | "retry" : false, 112 | "extra" : { 113 | "severity" : "critical", 114 | "retries" : [ ], 115 | "categories" : [ ], 116 | "tags" : [ "run(order=8)" ] 117 | }, 118 | "source" : "a9e063ba23abac18.json", 119 | "parameterValues" : [ "[1.0, '博文删除成功', 'http://39.100.104.214:8080', '/delete/', 'post', '{\"userid\":${userid}, \"token\": \"${token}\", \"articleId\":[${articleId}]}', '\"code\": \"00\"', '', '', '']" ] 120 | } -------------------------------------------------------------------------------- /test_report/data/test-cases/bfa1537d2e1423a0.json: -------------------------------------------------------------------------------- 1 | { 2 | "uid" : "bfa1537d2e1423a0", 3 | "name" : "用户注册", 4 | "fullName" : "test_case.test_login_module.TestLoginModule#test_register", 5 | "historyId" : "a7b56100d0b7490e087f52fa1108244d", 6 | "time" : { 7 | "start" : 1629907674132, 8 | "stop" : 1629907674338, 9 | "duration" : 206 10 | }, 11 | "description" : "通过接口进行用户注册", 12 | "descriptionHtml" : "

通过接口进行用户注册

\n", 13 | "status" : "passed", 14 | "flaky" : false, 15 | "newFailed" : false, 16 | "beforeStages" : [ ], 17 | "testStage" : { 18 | "description" : "通过接口进行用户注册", 19 | "status" : "passed", 20 | "steps" : [ { 21 | "name" : "读取请求数据,调用接口", 22 | "time" : { 23 | "start" : 1629907674132, 24 | "stop" : 1629907674337, 25 | "duration" : 205 26 | }, 27 | "status" : "passed", 28 | "steps" : [ ], 29 | "attachments" : [ ], 30 | "parameters" : [ ], 31 | "attachmentsCount" : 0, 32 | "shouldDisplayMessage" : false, 33 | "stepsCount" : 0, 34 | "hasContent" : false 35 | }, { 36 | "name" : "获取响应数据,进行断言", 37 | "time" : { 38 | "start" : 1629907674337, 39 | "stop" : 1629907674338, 40 | "duration" : 1 41 | }, 42 | "status" : "passed", 43 | "steps" : [ ], 44 | "attachments" : [ ], 45 | "parameters" : [ ], 46 | "attachmentsCount" : 0, 47 | "shouldDisplayMessage" : false, 48 | "stepsCount" : 0, 49 | "hasContent" : false 50 | } ], 51 | "attachments" : [ { 52 | "uid" : "b5a35f93905e72b0", 53 | "name" : "log", 54 | "source" : "b5a35f93905e72b0.txt", 55 | "type" : "text/plain", 56 | "size" : 820 57 | } ], 58 | "parameters" : [ ], 59 | "attachmentsCount" : 1, 60 | "shouldDisplayMessage" : false, 61 | "stepsCount" : 2, 62 | "hasContent" : true 63 | }, 64 | "afterStages" : [ ], 65 | "labels" : [ { 66 | "name" : "story", 67 | "value" : "注册功能" 68 | }, { 69 | "name" : "severity", 70 | "value" : "blocker" 71 | }, { 72 | "name" : "feature", 73 | "value" : "登录模块" 74 | }, { 75 | "name" : "tag", 76 | "value" : "run(order=1)" 77 | }, { 78 | "name" : "parentSuite", 79 | "value" : "test_case" 80 | }, { 81 | "name" : "suite", 82 | "value" : "test_login_module" 83 | }, { 84 | "name" : "subSuite", 85 | "value" : "TestLoginModule" 86 | }, { 87 | "name" : "host", 88 | "value" : "DESKTOP-13387BR" 89 | }, { 90 | "name" : "thread", 91 | "value" : "2748-MainThread" 92 | }, { 93 | "name" : "framework", 94 | "value" : "pytest" 95 | }, { 96 | "name" : "language", 97 | "value" : "cpython3" 98 | }, { 99 | "name" : "package", 100 | "value" : "test_case.test_login_module" 101 | }, { 102 | "name" : "resultFormat", 103 | "value" : "allure2" 104 | } ], 105 | "parameters" : [ { 106 | "name" : "case_data", 107 | "value" : "[1.0, '注册成功', 'http://39.100.104.214:8080', '/register/', 'post', '{\"username\":\"juno${get_unique_num1}\",\"password\":\"juno999999\",\"email\":\"juno123@qq.com\"}', '\"code\": \"00\"', 'userid', '', '']" 108 | } ], 109 | "links" : [ ], 110 | "hidden" : false, 111 | "retry" : false, 112 | "extra" : { 113 | "severity" : "blocker", 114 | "retries" : [ ], 115 | "categories" : [ ], 116 | "tags" : [ "run(order=1)" ] 117 | }, 118 | "source" : "bfa1537d2e1423a0.json", 119 | "parameterValues" : [ "[1.0, '注册成功', 'http://39.100.104.214:8080', '/register/', 'post', '{\"username\":\"juno${get_unique_num1}\",\"password\":\"juno999999\",\"email\":\"juno123@qq.com\"}', '\"code\": \"00\"', 'userid', '', '']" ] 120 | } -------------------------------------------------------------------------------- /test_report/data/test-cases/c2f39569f374b874.json: -------------------------------------------------------------------------------- 1 | { 2 | "uid" : "c2f39569f374b874", 3 | "name" : "批量查询博文", 4 | "fullName" : "test_case.test_edit_module.TestEditModule#test_blog_batch_search", 5 | "historyId" : "da9df48f48cd30eea94b53d841a283ca", 6 | "time" : { 7 | "start" : 1629907678928, 8 | "stop" : 1629907679075, 9 | "duration" : 147 10 | }, 11 | "description" : "通过接口批量查询博文", 12 | "descriptionHtml" : "

通过接口批量查询博文

\n", 13 | "status" : "passed", 14 | "flaky" : false, 15 | "newFailed" : false, 16 | "beforeStages" : [ ], 17 | "testStage" : { 18 | "description" : "通过接口批量查询博文", 19 | "status" : "passed", 20 | "steps" : [ { 21 | "name" : "读取请求数据,调用接口", 22 | "time" : { 23 | "start" : 1629907678928, 24 | "stop" : 1629907679074, 25 | "duration" : 146 26 | }, 27 | "status" : "passed", 28 | "steps" : [ ], 29 | "attachments" : [ ], 30 | "parameters" : [ ], 31 | "attachmentsCount" : 0, 32 | "shouldDisplayMessage" : false, 33 | "stepsCount" : 0, 34 | "hasContent" : false 35 | }, { 36 | "name" : "获取响应数据,进行断言", 37 | "time" : { 38 | "start" : 1629907679074, 39 | "stop" : 1629907679074, 40 | "duration" : 0 41 | }, 42 | "status" : "passed", 43 | "steps" : [ ], 44 | "attachments" : [ ], 45 | "parameters" : [ ], 46 | "attachmentsCount" : 0, 47 | "shouldDisplayMessage" : false, 48 | "stepsCount" : 0, 49 | "hasContent" : false 50 | } ], 51 | "attachments" : [ { 52 | "uid" : "1a226aaf9e2633e3", 53 | "name" : "log", 54 | "source" : "1a226aaf9e2633e3.txt", 55 | "type" : "text/plain", 56 | "size" : 637 57 | } ], 58 | "parameters" : [ ], 59 | "attachmentsCount" : 1, 60 | "shouldDisplayMessage" : false, 61 | "stepsCount" : 2, 62 | "hasContent" : true 63 | }, 64 | "afterStages" : [ ], 65 | "labels" : [ { 66 | "name" : "feature", 67 | "value" : "编辑模块" 68 | }, { 69 | "name" : "story", 70 | "value" : "批量查询博文功能" 71 | }, { 72 | "name" : "severity", 73 | "value" : "critical" 74 | }, { 75 | "name" : "tag", 76 | "value" : "run(order=7)" 77 | }, { 78 | "name" : "parentSuite", 79 | "value" : "test_case" 80 | }, { 81 | "name" : "suite", 82 | "value" : "test_edit_module" 83 | }, { 84 | "name" : "subSuite", 85 | "value" : "TestEditModule" 86 | }, { 87 | "name" : "host", 88 | "value" : "DESKTOP-13387BR" 89 | }, { 90 | "name" : "thread", 91 | "value" : "2748-MainThread" 92 | }, { 93 | "name" : "framework", 94 | "value" : "pytest" 95 | }, { 96 | "name" : "language", 97 | "value" : "cpython3" 98 | }, { 99 | "name" : "package", 100 | "value" : "test_case.test_edit_module" 101 | }, { 102 | "name" : "resultFormat", 103 | "value" : "allure2" 104 | } ], 105 | "parameters" : [ { 106 | "name" : "case_data", 107 | "value" : "[2.0, 'articleId有误,博文批量查询失败', 'http://39.100.104.214:8080', '/getBlogsContent/articleIds=null', 'get', '', '\"code\": \"999\"', '', '', '']" 108 | } ], 109 | "links" : [ ], 110 | "hidden" : false, 111 | "retry" : false, 112 | "extra" : { 113 | "severity" : "critical", 114 | "retries" : [ ], 115 | "categories" : [ ], 116 | "tags" : [ "run(order=7)" ] 117 | }, 118 | "source" : "c2f39569f374b874.json", 119 | "parameterValues" : [ "[2.0, 'articleId有误,博文批量查询失败', 'http://39.100.104.214:8080', '/getBlogsContent/articleIds=null', 'get', '', '\"code\": \"999\"', '', '', '']" ] 120 | } -------------------------------------------------------------------------------- /test_report/data/test-cases/d08fac4ece00ec22.json: -------------------------------------------------------------------------------- 1 | { 2 | "uid" : "d08fac4ece00ec22", 3 | "name" : "查看用户博文", 4 | "fullName" : "test_case.test_edit_module.TestEditModule#test_user_blog_search", 5 | "historyId" : "7f57de9a858aed2e031bad4829d17741", 6 | "time" : { 7 | "start" : 1629907677725, 8 | "stop" : 1629907677919, 9 | "duration" : 194 10 | }, 11 | "description" : "通过接口查看用户所有博文", 12 | "descriptionHtml" : "

通过接口查看用户所有博文

\n", 13 | "status" : "passed", 14 | "flaky" : false, 15 | "newFailed" : false, 16 | "beforeStages" : [ ], 17 | "testStage" : { 18 | "description" : "通过接口查看用户所有博文", 19 | "status" : "passed", 20 | "steps" : [ { 21 | "name" : "读取请求数据,调用接口", 22 | "time" : { 23 | "start" : 1629907677725, 24 | "stop" : 1629907677918, 25 | "duration" : 193 26 | }, 27 | "status" : "passed", 28 | "steps" : [ ], 29 | "attachments" : [ ], 30 | "parameters" : [ ], 31 | "attachmentsCount" : 0, 32 | "shouldDisplayMessage" : false, 33 | "stepsCount" : 0, 34 | "hasContent" : false 35 | }, { 36 | "name" : "获取响应数据,进行断言", 37 | "time" : { 38 | "start" : 1629907677918, 39 | "stop" : 1629907677919, 40 | "duration" : 1 41 | }, 42 | "status" : "passed", 43 | "steps" : [ ], 44 | "attachments" : [ ], 45 | "parameters" : [ ], 46 | "attachmentsCount" : 0, 47 | "shouldDisplayMessage" : false, 48 | "stepsCount" : 0, 49 | "hasContent" : false 50 | } ], 51 | "attachments" : [ { 52 | "uid" : "4f2134c8077dabae", 53 | "name" : "log", 54 | "source" : "4f2134c8077dabae.txt", 55 | "type" : "text/plain", 56 | "size" : 1038 57 | } ], 58 | "parameters" : [ ], 59 | "attachmentsCount" : 1, 60 | "shouldDisplayMessage" : false, 61 | "stepsCount" : 2, 62 | "hasContent" : true 63 | }, 64 | "afterStages" : [ ], 65 | "labels" : [ { 66 | "name" : "feature", 67 | "value" : "编辑模块" 68 | }, { 69 | "name" : "story", 70 | "value" : "用户博文查询功能" 71 | }, { 72 | "name" : "severity", 73 | "value" : "critical" 74 | }, { 75 | "name" : "tag", 76 | "value" : "run(order=4)" 77 | }, { 78 | "name" : "parentSuite", 79 | "value" : "test_case" 80 | }, { 81 | "name" : "suite", 82 | "value" : "test_edit_module" 83 | }, { 84 | "name" : "subSuite", 85 | "value" : "TestEditModule" 86 | }, { 87 | "name" : "host", 88 | "value" : "DESKTOP-13387BR" 89 | }, { 90 | "name" : "thread", 91 | "value" : "2748-MainThread" 92 | }, { 93 | "name" : "framework", 94 | "value" : "pytest" 95 | }, { 96 | "name" : "language", 97 | "value" : "cpython3" 98 | }, { 99 | "name" : "package", 100 | "value" : "test_case.test_edit_module" 101 | }, { 102 | "name" : "resultFormat", 103 | "value" : "allure2" 104 | } ], 105 | "parameters" : [ { 106 | "name" : "case_data", 107 | "value" : "[1.0, '用户存在博文,查询成功', 'http://39.100.104.214:8080', '/getBlogsOfUser/', 'post', '{\"userid\":${userid}, \"token\":\"${token}\"}', '\"title\"', 'articleId', '', '']" 108 | } ], 109 | "links" : [ ], 110 | "hidden" : false, 111 | "retry" : false, 112 | "extra" : { 113 | "severity" : "critical", 114 | "retries" : [ ], 115 | "categories" : [ ], 116 | "tags" : [ "run(order=4)" ] 117 | }, 118 | "source" : "d08fac4ece00ec22.json", 119 | "parameterValues" : [ "[1.0, '用户存在博文,查询成功', 'http://39.100.104.214:8080', '/getBlogsOfUser/', 'post', '{\"userid\":${userid}, \"token\":\"${token}\"}', '\"title\"', 'articleId', '', '']" ] 120 | } -------------------------------------------------------------------------------- /test_report/data/timeline.json: -------------------------------------------------------------------------------- 1 | { 2 | "uid" : "ab17fc5a4eb3bca4b216b548c7f9fcbc", 3 | "name" : "timeline", 4 | "children" : [ { 5 | "name" : "DESKTOP-13387BR", 6 | "children" : [ { 7 | "name" : "2748-MainThread", 8 | "children" : [ { 9 | "name" : "创建博文", 10 | "uid" : "4ca6ce593a277005", 11 | "parentUid" : "3882a6cdeb4b31aaf48580164d8cf3a4", 12 | "status" : "passed", 13 | "time" : { 14 | "start" : 1629907677512, 15 | "stop" : 1629907677712, 16 | "duration" : 200 17 | }, 18 | "flaky" : false, 19 | "newFailed" : false, 20 | "parameters" : [ "[2.0, '创建博文失败', 'http://39.100.104.214:8080', '/create/', 'post', '{\"userid\":${userid}, \"token\":\"123\", \"title\":\"title test\", \"content\":\"content test\"}', '\"code\": \"03\"', '', '', '']" ] 21 | }, { 22 | "name" : "查看博文内容", 23 | "uid" : "93000324a8016c7a", 24 | "parentUid" : "3882a6cdeb4b31aaf48580164d8cf3a4", 25 | "status" : "passed", 26 | "time" : { 27 | "start" : 1629907678158, 28 | "stop" : 1629907678284, 29 | "duration" : 126 30 | }, 31 | "flaky" : false, 32 | "newFailed" : false, 33 | "parameters" : [ "[1.0, '博文内容查询成功', 'http://39.100.104.214:8080', '/getBlogContent/${articleId}', 'get', '', '\"content\": \"content test\"', '', '', '']" ] 34 | }, { 35 | "name" : "批量查询博文", 36 | "uid" : "c2f39569f374b874", 37 | "parentUid" : "3882a6cdeb4b31aaf48580164d8cf3a4", 38 | "status" : "passed", 39 | "time" : { 40 | "start" : 1629907678928, 41 | "stop" : 1629907679075, 42 | "duration" : 147 43 | }, 44 | "flaky" : false, 45 | "newFailed" : false, 46 | "parameters" : [ "[2.0, 'articleId有误,博文批量查询失败', 'http://39.100.104.214:8080', '/getBlogsContent/articleIds=null', 'get', '', '\"code\": \"999\"', '', '', '']" ] 47 | }, { 48 | "name" : "查看用户博文", 49 | "uid" : "8db162b0c1a180aa", 50 | "parentUid" : "3882a6cdeb4b31aaf48580164d8cf3a4", 51 | "status" : "passed", 52 | "time" : { 53 | "start" : 1629907677933, 54 | "stop" : 1629907678147, 55 | "duration" : 214 56 | }, 57 | "flaky" : false, 58 | "newFailed" : false, 59 | "parameters" : [ "[2.0, '用户token有误,查询失败', 'http://39.100.104.214:8080', '/getBlogsOfUser/', 'post', '{\"userid\":${userid}, \"token\":\"123\"}', '\"code\": \"03\"', '', '', '']" ] 60 | }, { 61 | "name" : "用户登录", 62 | "uid" : "150f129aaf81c31f", 63 | "parentUid" : "3882a6cdeb4b31aaf48580164d8cf3a4", 64 | "status" : "passed", 65 | "time" : { 66 | "start" : 1629907675025, 67 | "stop" : 1629907675628, 68 | "duration" : 603 69 | }, 70 | "flaky" : false, 71 | "newFailed" : false, 72 | "parameters" : [ "[1.0, '登录成功', 'http://39.100.104.214:8080', '/login/', 'post', '{\"username\":\"juno${unique_num1}\",\"password\":\"${md5(\\'juno999999\\')}\"}', '\"token\"', 'token', '', '']" ] 73 | }, { 74 | "name" : "用户注册", 75 | "uid" : "bfa1537d2e1423a0", 76 | "parentUid" : "3882a6cdeb4b31aaf48580164d8cf3a4", 77 | "status" : "passed", 78 | "time" : { 79 | "start" : 1629907674132, 80 | "stop" : 1629907674338, 81 | "duration" : 206 82 | }, 83 | "flaky" : false, 84 | "newFailed" : false, 85 | "parameters" : [ "[1.0, '注册成功', 'http://39.100.104.214:8080', '/register/', 'post', '{\"username\":\"juno${get_unique_num1}\",\"password\":\"juno999999\",\"email\":\"juno123@qq.com\"}', '\"code\": \"00\"', 'userid', '', '']" ] 86 | }, { 87 | "name" : "更新博文内容", 88 | "uid" : "2287eec54c7f212", 89 | "parentUid" : "3882a6cdeb4b31aaf48580164d8cf3a4", 90 | "status" : "passed", 91 | "time" : { 92 | "start" : 1629907678612, 93 | "stop" : 1629907678777, 94 | "duration" : 165 95 | }, 96 | "flaky" : false, 97 | "newFailed" : false, 98 | "parameters" : [ "[2.0, 'articleId有误,更新失败', 'http://39.100.104.214:8080', '/update/', 'put', '{\"userid\":${userid}, \"token\": \"${token}\", \"articleId\":1234, \"title\":\"python\", \"content\":\"test test\"}', '\"code\": \"03\"', '', '', '']" ] 99 | }, { 100 | "name" : "创建博文", 101 | "uid" : "43dc24eab8dcd7ee", 102 | "parentUid" : "3882a6cdeb4b31aaf48580164d8cf3a4", 103 | "status" : "passed", 104 | "time" : { 105 | "start" : 1629907677334, 106 | "stop" : 1629907677497, 107 | "duration" : 163 108 | }, 109 | "flaky" : false, 110 | "newFailed" : false, 111 | "parameters" : [ "[1.0, '创建博文成功', 'http://39.100.104.214:8080', '/create/', 'post', '{\"userid\":${userid}, \"token\":\"${token}\", \"title\":\"title test\", \"content\":\"content test\"}', '\"code\": \"00\"', '', '', '']" ] 112 | }, { 113 | "name" : "批量查询博文", 114 | "uid" : "928fd66149be506e", 115 | "parentUid" : "3882a6cdeb4b31aaf48580164d8cf3a4", 116 | "status" : "passed", 117 | "time" : { 118 | "start" : 1629907678788, 119 | "stop" : 1629907678917, 120 | "duration" : 129 121 | }, 122 | "flaky" : false, 123 | "newFailed" : false, 124 | "parameters" : [ "[1.0, '博文批量查询成功', 'http://39.100.104.214:8080', '/getBlogsContent/articleIds=${articleId}', 'get', '', '\"code\": \"00\"', '', '', '']" ] 125 | }, { 126 | "name" : "查看用户博文", 127 | "uid" : "d08fac4ece00ec22", 128 | "parentUid" : "3882a6cdeb4b31aaf48580164d8cf3a4", 129 | "status" : "passed", 130 | "time" : { 131 | "start" : 1629907677725, 132 | "stop" : 1629907677919, 133 | "duration" : 194 134 | }, 135 | "flaky" : false, 136 | "newFailed" : false, 137 | "parameters" : [ "[1.0, '用户存在博文,查询成功', 'http://39.100.104.214:8080', '/getBlogsOfUser/', 'post', '{\"userid\":${userid}, \"token\":\"${token}\"}', '\"title\"', 'articleId', '', '']" ] 138 | }, { 139 | "name" : "用户注册", 140 | "uid" : "41e8e6e95b7c75b5", 141 | "parentUid" : "3882a6cdeb4b31aaf48580164d8cf3a4", 142 | "status" : "passed", 143 | "time" : { 144 | "start" : 1629907674351, 145 | "stop" : 1629907674530, 146 | "duration" : 179 147 | }, 148 | "flaky" : false, 149 | "newFailed" : false, 150 | "parameters" : [ "[2.0, '用户名重复,注册失败', 'http://39.100.104.214:8080', '/register/', 'post', '{\"username\":\"juno${unique_num1}\",\"password\":\"juno999999\",\"email\":\"juno123@qq.com\"}', '\"code\": \"01\"', '', '', '']" ] 151 | }, { 152 | "name" : "用户登录", 153 | "uid" : "5847db81c22255cc", 154 | "parentUid" : "3882a6cdeb4b31aaf48580164d8cf3a4", 155 | "status" : "passed", 156 | "time" : { 157 | "start" : 1629907676274, 158 | "stop" : 1629907677322, 159 | "duration" : 1048 160 | }, 161 | "flaky" : false, 162 | "newFailed" : false, 163 | "parameters" : [ "[3.0, '密码错误,登录成功', 'http://39.100.104.214:8080', '/login/', 'post', '{\"username\":\"juno${unique_num2}\",\"password\":\"juno999999\"}', '\"code\": \"03\"', '', '', '']" ] 164 | }, { 165 | "name" : "用户注册", 166 | "uid" : "59a0b2d61cf702a6", 167 | "parentUid" : "3882a6cdeb4b31aaf48580164d8cf3a4", 168 | "status" : "passed", 169 | "time" : { 170 | "start" : 1629907674544, 171 | "stop" : 1629907675012, 172 | "duration" : 468 173 | }, 174 | "flaky" : false, 175 | "newFailed" : false, 176 | "parameters" : [ "[2.0, '注册成功', 'http://39.100.104.214:8080', '/register/', 'post', '{\"username\":\"juno${get_unique_num2}\",\"password\":\"juno999999\",\"email\":\"juno123@qq.com\"}', '\"code\": \"00\"', 'userid', '', '']" ] 177 | }, { 178 | "name" : "用户登录", 179 | "uid" : "77bac1a9be6aa799", 180 | "parentUid" : "3882a6cdeb4b31aaf48580164d8cf3a4", 181 | "status" : "passed", 182 | "time" : { 183 | "start" : 1629907675639, 184 | "stop" : 1629907676260, 185 | "duration" : 621 186 | }, 187 | "flaky" : false, 188 | "newFailed" : false, 189 | "parameters" : [ "[2.0, '登录成功', 'http://39.100.104.214:8080', '/login/', 'post', '{\"username\":\"juno${unique_num2}\",\"password\":\"${md5(\\'juno999999\\')}\"}', '\"token\"', 'token', '', '']" ] 190 | }, { 191 | "name" : "查看博文内容", 192 | "uid" : "5e792b44457ea9aa", 193 | "parentUid" : "3882a6cdeb4b31aaf48580164d8cf3a4", 194 | "status" : "passed", 195 | "time" : { 196 | "start" : 1629907678295, 197 | "stop" : 1629907678432, 198 | "duration" : 137 199 | }, 200 | "flaky" : false, 201 | "newFailed" : false, 202 | "parameters" : [ "[2.0, 'articleId有误,查询失败', 'http://39.100.104.214:8080', '/getBlogContent/1234', 'get', '', '\"code\": \"03\"', '', '', '']" ] 203 | }, { 204 | "name" : "删除博文", 205 | "uid" : "8f972462257f4377", 206 | "parentUid" : "3882a6cdeb4b31aaf48580164d8cf3a4", 207 | "status" : "passed", 208 | "time" : { 209 | "start" : 1629907679310, 210 | "stop" : 1629907679439, 211 | "duration" : 129 212 | }, 213 | "flaky" : false, 214 | "newFailed" : false, 215 | "parameters" : [ "[2.0, 'token有误,更新失败', 'http://39.100.104.214:8080', '/delete/', 'post', '{\"userid\":${userid}, \"token\": \"123\", \"articleId\":[]}', '\"code\": \"03\"', '', '', '']" ] 216 | }, { 217 | "name" : "更新博文内容", 218 | "uid" : "9c7fb473d7fc68f0", 219 | "parentUid" : "3882a6cdeb4b31aaf48580164d8cf3a4", 220 | "status" : "passed", 221 | "time" : { 222 | "start" : 1629907678443, 223 | "stop" : 1629907678601, 224 | "duration" : 158 225 | }, 226 | "flaky" : false, 227 | "newFailed" : false, 228 | "parameters" : [ "[1.0, '博文内容更新成功', 'http://39.100.104.214:8080', '/update/', 'put', '{\"userid\":${userid}, \"token\": \"${token}\", \"articleId\":${articleId}, \"title\":\"python\", \"content\":\"test test\"}', '\"update_time\":', '', '', '']" ] 229 | }, { 230 | "name" : "删除博文", 231 | "uid" : "a9e063ba23abac18", 232 | "parentUid" : "3882a6cdeb4b31aaf48580164d8cf3a4", 233 | "status" : "passed", 234 | "time" : { 235 | "start" : 1629907679087, 236 | "stop" : 1629907679298, 237 | "duration" : 211 238 | }, 239 | "flaky" : false, 240 | "newFailed" : false, 241 | "parameters" : [ "[1.0, '博文删除成功', 'http://39.100.104.214:8080', '/delete/', 'post', '{\"userid\":${userid}, \"token\": \"${token}\", \"articleId\":[${articleId}]}', '\"code\": \"00\"', '', '', '']" ] 242 | } ], 243 | "uid" : "3882a6cdeb4b31aaf48580164d8cf3a4" 244 | } ], 245 | "uid" : "7181e53ebb64412cb716b07b00320ea4" 246 | } ] 247 | } -------------------------------------------------------------------------------- /test_report/export/influxDbData.txt: -------------------------------------------------------------------------------- 1 | launch_status failed=0 1629907688000000000 2 | launch_status broken=0 1629907688000000000 3 | launch_status passed=18 1629907688000000000 4 | launch_status skipped=0 1629907688000000000 5 | launch_status unknown=0 1629907688000000000 6 | launch_time duration=5307 1629907688000000000 7 | launch_time min_duration=126 1629907688000000000 8 | launch_time max_duration=1048 1629907688000000000 9 | launch_time sum_duration=5098 1629907688000000000 10 | launch_retries retries=0 1629907688000000000 11 | launch_retries run=18 1629907688000000000 12 | -------------------------------------------------------------------------------- /test_report/export/mail.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Allure Report summary mail 6 | 7 | 8 | Mail body 9 | 10 | 11 | -------------------------------------------------------------------------------- /test_report/export/prometheusData.txt: -------------------------------------------------------------------------------- 1 | launch_status_failed 0 2 | launch_status_broken 0 3 | launch_status_passed 18 4 | launch_status_skipped 0 5 | launch_status_unknown 0 6 | launch_time_duration 5307 7 | launch_time_min_duration 126 8 | launch_time_max_duration 1048 9 | launch_time_sum_duration 5098 10 | launch_retries_retries 0 11 | launch_retries_run 18 12 | -------------------------------------------------------------------------------- /test_report/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juno3550/InterfaceAutoTestWithPytest/f050e71a9f7cf5e3ee3697d3d1b47b83e6bd442a/test_report/favicon.ico -------------------------------------------------------------------------------- /test_report/history/categories-trend.json: -------------------------------------------------------------------------------- 1 | [ { 2 | "data" : { } 3 | } ] -------------------------------------------------------------------------------- /test_report/history/duration-trend.json: -------------------------------------------------------------------------------- 1 | [ { 2 | "data" : { 3 | "duration" : 5307 4 | } 5 | } ] -------------------------------------------------------------------------------- /test_report/history/history-trend.json: -------------------------------------------------------------------------------- 1 | [ { 2 | "data" : { 3 | "failed" : 0, 4 | "broken" : 0, 5 | "skipped" : 0, 6 | "passed" : 18, 7 | "unknown" : 0, 8 | "total" : 18 9 | } 10 | } ] -------------------------------------------------------------------------------- /test_report/history/history.json: -------------------------------------------------------------------------------- 1 | { 2 | "da9df48f48cd30eea94b53d841a283ca" : { 3 | "statistic" : { 4 | "failed" : 0, 5 | "broken" : 0, 6 | "skipped" : 0, 7 | "passed" : 1, 8 | "unknown" : 0, 9 | "total" : 1 10 | }, 11 | "items" : [ { 12 | "uid" : "c2f39569f374b874", 13 | "status" : "passed", 14 | "time" : { 15 | "start" : 1629907678928, 16 | "stop" : 1629907679075, 17 | "duration" : 147 18 | } 19 | } ] 20 | }, 21 | "13b38d6b55f2887a829110dffd1bda14" : { 22 | "statistic" : { 23 | "failed" : 0, 24 | "broken" : 0, 25 | "skipped" : 0, 26 | "passed" : 1, 27 | "unknown" : 0, 28 | "total" : 1 29 | }, 30 | "items" : [ { 31 | "uid" : "93000324a8016c7a", 32 | "status" : "passed", 33 | "time" : { 34 | "start" : 1629907678158, 35 | "stop" : 1629907678284, 36 | "duration" : 126 37 | } 38 | } ] 39 | }, 40 | "78f3f821c4dea63cf111ffe451d46df3" : { 41 | "statistic" : { 42 | "failed" : 0, 43 | "broken" : 0, 44 | "skipped" : 0, 45 | "passed" : 1, 46 | "unknown" : 0, 47 | "total" : 1 48 | }, 49 | "items" : [ { 50 | "uid" : "77bac1a9be6aa799", 51 | "status" : "passed", 52 | "time" : { 53 | "start" : 1629907675639, 54 | "stop" : 1629907676260, 55 | "duration" : 621 56 | } 57 | } ] 58 | }, 59 | "7f57de9a858aed2e031bad4829d17741" : { 60 | "statistic" : { 61 | "failed" : 0, 62 | "broken" : 0, 63 | "skipped" : 0, 64 | "passed" : 1, 65 | "unknown" : 0, 66 | "total" : 1 67 | }, 68 | "items" : [ { 69 | "uid" : "d08fac4ece00ec22", 70 | "status" : "passed", 71 | "time" : { 72 | "start" : 1629907677725, 73 | "stop" : 1629907677919, 74 | "duration" : 194 75 | } 76 | } ] 77 | }, 78 | "6b1f6a954615e6829a4d01c4e25bb7cd" : { 79 | "statistic" : { 80 | "failed" : 0, 81 | "broken" : 0, 82 | "skipped" : 0, 83 | "passed" : 1, 84 | "unknown" : 0, 85 | "total" : 1 86 | }, 87 | "items" : [ { 88 | "uid" : "43dc24eab8dcd7ee", 89 | "status" : "passed", 90 | "time" : { 91 | "start" : 1629907677334, 92 | "stop" : 1629907677497, 93 | "duration" : 163 94 | } 95 | } ] 96 | }, 97 | "4baf0c524b3f3405bef804d98d2e4f9d" : { 98 | "statistic" : { 99 | "failed" : 0, 100 | "broken" : 0, 101 | "skipped" : 0, 102 | "passed" : 1, 103 | "unknown" : 0, 104 | "total" : 1 105 | }, 106 | "items" : [ { 107 | "uid" : "a9e063ba23abac18", 108 | "status" : "passed", 109 | "time" : { 110 | "start" : 1629907679087, 111 | "stop" : 1629907679298, 112 | "duration" : 211 113 | } 114 | } ] 115 | }, 116 | "f6d1eb043a6b15674e731e1ef7bf23e6" : { 117 | "statistic" : { 118 | "failed" : 0, 119 | "broken" : 0, 120 | "skipped" : 0, 121 | "passed" : 1, 122 | "unknown" : 0, 123 | "total" : 1 124 | }, 125 | "items" : [ { 126 | "uid" : "59a0b2d61cf702a6", 127 | "status" : "passed", 128 | "time" : { 129 | "start" : 1629907674544, 130 | "stop" : 1629907675012, 131 | "duration" : 468 132 | } 133 | } ] 134 | }, 135 | "5f9293329904e63832e3b1d10c6d286e" : { 136 | "statistic" : { 137 | "failed" : 0, 138 | "broken" : 0, 139 | "skipped" : 0, 140 | "passed" : 1, 141 | "unknown" : 0, 142 | "total" : 1 143 | }, 144 | "items" : [ { 145 | "uid" : "5847db81c22255cc", 146 | "status" : "passed", 147 | "time" : { 148 | "start" : 1629907676274, 149 | "stop" : 1629907677322, 150 | "duration" : 1048 151 | } 152 | } ] 153 | }, 154 | "416b196eb12787a78916dd535df9932e" : { 155 | "statistic" : { 156 | "failed" : 0, 157 | "broken" : 0, 158 | "skipped" : 0, 159 | "passed" : 1, 160 | "unknown" : 0, 161 | "total" : 1 162 | }, 163 | "items" : [ { 164 | "uid" : "5e792b44457ea9aa", 165 | "status" : "passed", 166 | "time" : { 167 | "start" : 1629907678295, 168 | "stop" : 1629907678432, 169 | "duration" : 137 170 | } 171 | } ] 172 | }, 173 | "dc072d17411f37f6a047bda09ea2711d" : { 174 | "statistic" : { 175 | "failed" : 0, 176 | "broken" : 0, 177 | "skipped" : 0, 178 | "passed" : 1, 179 | "unknown" : 0, 180 | "total" : 1 181 | }, 182 | "items" : [ { 183 | "uid" : "4ca6ce593a277005", 184 | "status" : "passed", 185 | "time" : { 186 | "start" : 1629907677512, 187 | "stop" : 1629907677712, 188 | "duration" : 200 189 | } 190 | } ] 191 | }, 192 | "9d19b71007895959926a1af082521df3" : { 193 | "statistic" : { 194 | "failed" : 0, 195 | "broken" : 0, 196 | "skipped" : 0, 197 | "passed" : 1, 198 | "unknown" : 0, 199 | "total" : 1 200 | }, 201 | "items" : [ { 202 | "uid" : "928fd66149be506e", 203 | "status" : "passed", 204 | "time" : { 205 | "start" : 1629907678788, 206 | "stop" : 1629907678917, 207 | "duration" : 129 208 | } 209 | } ] 210 | }, 211 | "d8983635e87a151b9b3b7b66fd0ac0dc" : { 212 | "statistic" : { 213 | "failed" : 0, 214 | "broken" : 0, 215 | "skipped" : 0, 216 | "passed" : 1, 217 | "unknown" : 0, 218 | "total" : 1 219 | }, 220 | "items" : [ { 221 | "uid" : "150f129aaf81c31f", 222 | "status" : "passed", 223 | "time" : { 224 | "start" : 1629907675025, 225 | "stop" : 1629907675628, 226 | "duration" : 603 227 | } 228 | } ] 229 | }, 230 | "46a0e2eef5067b91b46ef2f9551d0783" : { 231 | "statistic" : { 232 | "failed" : 0, 233 | "broken" : 0, 234 | "skipped" : 0, 235 | "passed" : 1, 236 | "unknown" : 0, 237 | "total" : 1 238 | }, 239 | "items" : [ { 240 | "uid" : "9c7fb473d7fc68f0", 241 | "status" : "passed", 242 | "time" : { 243 | "start" : 1629907678443, 244 | "stop" : 1629907678601, 245 | "duration" : 158 246 | } 247 | } ] 248 | }, 249 | "d05ee58a25da395bb3ae0b1270c84483" : { 250 | "statistic" : { 251 | "failed" : 0, 252 | "broken" : 0, 253 | "skipped" : 0, 254 | "passed" : 1, 255 | "unknown" : 0, 256 | "total" : 1 257 | }, 258 | "items" : [ { 259 | "uid" : "8f972462257f4377", 260 | "status" : "passed", 261 | "time" : { 262 | "start" : 1629907679310, 263 | "stop" : 1629907679439, 264 | "duration" : 129 265 | } 266 | } ] 267 | }, 268 | "13a0acdd59b00e1a0f6d06b7d22e1536" : { 269 | "statistic" : { 270 | "failed" : 0, 271 | "broken" : 0, 272 | "skipped" : 0, 273 | "passed" : 1, 274 | "unknown" : 0, 275 | "total" : 1 276 | }, 277 | "items" : [ { 278 | "uid" : "41e8e6e95b7c75b5", 279 | "status" : "passed", 280 | "time" : { 281 | "start" : 1629907674351, 282 | "stop" : 1629907674530, 283 | "duration" : 179 284 | } 285 | } ] 286 | }, 287 | "a7b56100d0b7490e087f52fa1108244d" : { 288 | "statistic" : { 289 | "failed" : 0, 290 | "broken" : 0, 291 | "skipped" : 0, 292 | "passed" : 1, 293 | "unknown" : 0, 294 | "total" : 1 295 | }, 296 | "items" : [ { 297 | "uid" : "bfa1537d2e1423a0", 298 | "status" : "passed", 299 | "time" : { 300 | "start" : 1629907674132, 301 | "stop" : 1629907674338, 302 | "duration" : 206 303 | } 304 | } ] 305 | }, 306 | "ce639bf4b18ab421b63f9d2e8ddc47ab" : { 307 | "statistic" : { 308 | "failed" : 0, 309 | "broken" : 0, 310 | "skipped" : 0, 311 | "passed" : 1, 312 | "unknown" : 0, 313 | "total" : 1 314 | }, 315 | "items" : [ { 316 | "uid" : "8db162b0c1a180aa", 317 | "status" : "passed", 318 | "time" : { 319 | "start" : 1629907677933, 320 | "stop" : 1629907678147, 321 | "duration" : 214 322 | } 323 | } ] 324 | }, 325 | "72442eb161046e365132a46ddc653f6c" : { 326 | "statistic" : { 327 | "failed" : 0, 328 | "broken" : 0, 329 | "skipped" : 0, 330 | "passed" : 1, 331 | "unknown" : 0, 332 | "total" : 1 333 | }, 334 | "items" : [ { 335 | "uid" : "2287eec54c7f212", 336 | "status" : "passed", 337 | "time" : { 338 | "start" : 1629907678612, 339 | "stop" : 1629907678777, 340 | "duration" : 165 341 | } 342 | } ] 343 | } 344 | } -------------------------------------------------------------------------------- /test_report/history/retry-trend.json: -------------------------------------------------------------------------------- 1 | [ { 2 | "data" : { 3 | "run" : 18, 4 | "retry" : 0 5 | } 6 | } ] -------------------------------------------------------------------------------- /test_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 | -------------------------------------------------------------------------------- /test_report/plugins/behaviors/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | allure.api.addTranslation('en', { 4 | tab: { 5 | behaviors: { 6 | name: 'Behaviors' 7 | } 8 | }, 9 | widget: { 10 | behaviors: { 11 | name: 'Features by stories', 12 | showAll: 'show all' 13 | } 14 | } 15 | }); 16 | 17 | allure.api.addTranslation('ru', { 18 | tab: { 19 | behaviors: { 20 | name: 'Функциональность' 21 | } 22 | }, 23 | widget: { 24 | behaviors: { 25 | name: 'Функциональность', 26 | showAll: 'показать все' 27 | } 28 | } 29 | }); 30 | 31 | allure.api.addTranslation('zh', { 32 | tab: { 33 | behaviors: { 34 | name: '功能' 35 | } 36 | }, 37 | widget: { 38 | behaviors: { 39 | name: '特性场景', 40 | showAll: '显示所有' 41 | } 42 | } 43 | }); 44 | 45 | allure.api.addTranslation('de', { 46 | tab: { 47 | behaviors: { 48 | name: 'Verhalten' 49 | } 50 | }, 51 | widget: { 52 | behaviors: { 53 | name: 'Features nach Stories', 54 | showAll: 'Zeige alle' 55 | } 56 | } 57 | }); 58 | 59 | allure.api.addTranslation('nl', { 60 | tab: { 61 | behaviors: { 62 | name: 'Functionaliteit' 63 | } 64 | }, 65 | widget: { 66 | behaviors: { 67 | name: 'Features en story’s', 68 | showAll: 'Toon alle' 69 | } 70 | } 71 | }); 72 | 73 | allure.api.addTranslation('he', { 74 | tab: { 75 | behaviors: { 76 | name: 'התנהגויות' 77 | } 78 | }, 79 | widget: { 80 | behaviors: { 81 | name: 'תכונות לפי סיפורי משתמש', 82 | showAll: 'הצג הכול' 83 | } 84 | } 85 | }); 86 | 87 | allure.api.addTranslation('br', { 88 | tab: { 89 | behaviors: { 90 | name: 'Comportamentos' 91 | } 92 | }, 93 | widget: { 94 | behaviors: { 95 | name: 'Funcionalidades por história', 96 | showAll: 'Mostrar tudo' 97 | } 98 | } 99 | }); 100 | 101 | allure.api.addTranslation('ja', { 102 | tab: { 103 | behaviors: { 104 | name: '振る舞い' 105 | } 106 | }, 107 | widget: { 108 | behaviors: { 109 | name: 'ストーリー別の機能', 110 | showAll: '全て表示' 111 | } 112 | } 113 | }); 114 | 115 | allure.api.addTranslation('es', { 116 | tab: { 117 | behaviors: { 118 | name: 'Funcionalidades' 119 | } 120 | }, 121 | widget: { 122 | behaviors: { 123 | name: 'Funcionalidades por Historias de Usuario', 124 | showAll: 'mostrar todo' 125 | } 126 | } 127 | }); 128 | 129 | allure.api.addTranslation('kr', { 130 | tab: { 131 | behaviors: { 132 | name: '동작' 133 | } 134 | }, 135 | widget: { 136 | behaviors: { 137 | name: '스토리별 기능', 138 | showAll: '전체 보기' 139 | } 140 | } 141 | }); 142 | 143 | allure.api.addTranslation('fr', { 144 | tab: { 145 | behaviors: { 146 | name: 'Comportements' 147 | } 148 | }, 149 | widget: { 150 | behaviors: { 151 | name: 'Thèmes par histoires', 152 | showAll: 'Montrer tout' 153 | } 154 | } 155 | }); 156 | 157 | allure.api.addTab('behaviors', { 158 | title: 'tab.behaviors.name', icon: 'fa fa-list', 159 | route: 'behaviors(/)(:testGroup)(/)(:testResult)(/)(:testResultTab)(/)', 160 | onEnter: (function (testGroup, testResult, testResultTab) { 161 | return new allure.components.TreeLayout({ 162 | testGroup: testGroup, 163 | testResult: testResult, 164 | testResultTab: testResultTab, 165 | tabName: 'tab.behaviors.name', 166 | baseUrl: 'behaviors', 167 | url: 'data/behaviors.json', 168 | csvUrl: 'data/behaviors.csv' 169 | }); 170 | }) 171 | }); 172 | 173 | allure.api.addWidget('widgets', 'behaviors', allure.components.WidgetStatusView.extend({ 174 | rowTag: 'a', 175 | title: 'widget.behaviors.name', 176 | baseUrl: 'behaviors', 177 | showLinks: true 178 | })); 179 | -------------------------------------------------------------------------------- /test_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('nl', { 36 | tab: { 37 | packages: { 38 | name: 'Packages' 39 | } 40 | } 41 | }); 42 | 43 | allure.api.addTranslation('he', { 44 | tab: { 45 | packages: { 46 | name: 'חבילות' 47 | } 48 | } 49 | }); 50 | 51 | allure.api.addTranslation('br', { 52 | tab: { 53 | packages: { 54 | name: 'Pacotes' 55 | } 56 | } 57 | }); 58 | 59 | allure.api.addTranslation('ja', { 60 | tab: { 61 | packages: { 62 | name: 'パッケージ' 63 | } 64 | } 65 | }); 66 | 67 | allure.api.addTranslation('es', { 68 | tab: { 69 | packages: { 70 | name: 'Paquetes' 71 | } 72 | } 73 | }); 74 | 75 | allure.api.addTranslation('kr', { 76 | tab: { 77 | packages: { 78 | name: '패키지' 79 | } 80 | } 81 | }); 82 | 83 | allure.api.addTranslation('fr', { 84 | tab: { 85 | packages: { 86 | name: 'Paquets' 87 | } 88 | } 89 | }); 90 | 91 | allure.api.addTab('packages', { 92 | title: 'tab.packages.name', icon: 'fa fa-align-left', 93 | route: 'packages(/)(:testGroup)(/)(:testResult)(/)(:testResultTab)(/)', 94 | onEnter: (function (testGroup, testResult, testResultTab) { 95 | return new allure.components.TreeLayout({ 96 | testGroup: testGroup, 97 | testResult: testResult, 98 | testResultTab: testResultTab, 99 | tabName: 'tab.packages.name', 100 | baseUrl: 'packages', 101 | url: 'data/packages.json' 102 | }); 103 | }) 104 | }); 105 | -------------------------------------------------------------------------------- /test_report/plugins/screen-diff/index.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | var settings = allure.getPluginSettings('screen-diff', { diffType: 'diff' }); 3 | 4 | function renderImage(src) { 5 | return ( 6 | '
' + 7 | '' + 10 | '
' 11 | ); 12 | } 13 | 14 | function findImage(data, name) { 15 | if (data.testStage && data.testStage.attachments) { 16 | var matchedImage = data.testStage.attachments.filter(function (attachment) { 17 | return attachment.name === name; 18 | })[0]; 19 | if (matchedImage) { 20 | return 'data/attachments/' + matchedImage.source; 21 | } 22 | } 23 | return null; 24 | } 25 | 26 | function renderDiffContent(type, diffImage, actualImage, expectedImage) { 27 | if (type === 'diff') { 28 | if (diffImage) { 29 | return renderImage(diffImage); 30 | } 31 | } 32 | if (type === 'overlay' && expectedImage) { 33 | return ( 34 | '
' + 35 | '' + 38 | '
' + 39 | '' + 42 | '
' + 43 | '
' 44 | ); 45 | } 46 | if (actualImage) { 47 | return renderImage(actualImage); 48 | } 49 | return 'No diff data provided'; 50 | } 51 | 52 | var TestResultView = Backbone.Marionette.View.extend({ 53 | regions: { 54 | subView: '.screen-diff-view', 55 | }, 56 | template: function () { 57 | return '
'; 58 | }, 59 | onRender: function () { 60 | var data = this.model.toJSON(); 61 | var testType = data.labels.filter(function (label) { 62 | return label.name === 'testType'; 63 | })[0]; 64 | var diffImage = findImage(data, 'diff'); 65 | var actualImage = findImage(data, 'actual'); 66 | var expectedImage = findImage(data, 'expected'); 67 | if (!testType || testType.value !== 'screenshotDiff') { 68 | return; 69 | } 70 | this.showChildView( 71 | 'subView', 72 | new ScreenDiffView({ 73 | diffImage: diffImage, 74 | actualImage: actualImage, 75 | expectedImage: expectedImage, 76 | }), 77 | ); 78 | }, 79 | }); 80 | var ErrorView = Backbone.Marionette.View.extend({ 81 | templateContext: function () { 82 | return this.options; 83 | }, 84 | template: function (data) { 85 | return '
' + data.error + '
'; 86 | }, 87 | }); 88 | var AttachmentView = Backbone.Marionette.View.extend({ 89 | regions: { 90 | subView: '.screen-diff-view', 91 | }, 92 | template: function () { 93 | return '
'; 94 | }, 95 | onRender: function () { 96 | jQuery 97 | .getJSON(this.options.sourceUrl) 98 | .then(this.renderScreenDiffView.bind(this), this.renderErrorView.bind(this)); 99 | }, 100 | renderErrorView: function (error) { 101 | console.log(error); 102 | this.showChildView( 103 | 'subView', 104 | new ErrorView({ 105 | error: error.statusText, 106 | }), 107 | ); 108 | }, 109 | renderScreenDiffView: function (data) { 110 | this.showChildView( 111 | 'subView', 112 | new ScreenDiffView({ 113 | diffImage: data.diff, 114 | actualImage: data.actual, 115 | expectedImage: data.expected, 116 | }), 117 | ); 118 | }, 119 | }); 120 | 121 | var ScreenDiffView = Backbone.Marionette.View.extend({ 122 | className: 'pane__section', 123 | events: function () { 124 | return { 125 | ['click [name="screen-diff-type-' + this.cid + '"]']: 'onDiffTypeChange', 126 | 'mousemove .screen-diff__overlay': 'onOverlayMove', 127 | }; 128 | }, 129 | initialize: function (options) { 130 | this.diffImage = options.diffImage; 131 | this.actualImage = options.actualImage; 132 | this.expectedImage = options.expectedImage; 133 | this.radioName = 'screen-diff-type-' + this.cid; 134 | }, 135 | templateContext: function () { 136 | return { 137 | diffType: settings.get('diffType'), 138 | diffImage: this.diffImage, 139 | actualImage: this.actualImage, 140 | expectedImage: this.expectedImage, 141 | radioName: this.radioName, 142 | }; 143 | }, 144 | template: function (data) { 145 | if (!data.diffImage && !data.actualImage && !data.expectedImage) { 146 | return ''; 147 | } 148 | 149 | return ( 150 | '

Screen Diff

' + 151 | '
' + 152 | '
' + 153 | '' + 156 | '' + 159 | '
' + 160 | renderDiffContent( 161 | data.diffType, 162 | data.diffImage, 163 | data.actualImage, 164 | data.expectedImage, 165 | ) + 166 | '
' 167 | ); 168 | }, 169 | adjustImageSize: function (event) { 170 | var overImage = this.$(event.target); 171 | overImage.width(overImage.width()); 172 | }, 173 | onRender: function () { 174 | const diffType = settings.get('diffType'); 175 | this.$('[name="' + this.radioName + '"][value="' + diffType + '"]').prop( 176 | 'checked', 177 | true, 178 | ); 179 | if (diffType === 'overlay') { 180 | this.$('.screen-diff__image-over img').on('load', this.adjustImageSize.bind(this)); 181 | } 182 | }, 183 | onOverlayMove: function (event) { 184 | var pageX = event.pageX; 185 | var containerScroll = this.$('.screen-diff__container').scrollLeft(); 186 | var elementX = event.currentTarget.getBoundingClientRect().left; 187 | var delta = pageX - elementX + containerScroll; 188 | this.$('.screen-diff__image-over').width(delta); 189 | }, 190 | onDiffTypeChange: function (event) { 191 | settings.save('diffType', event.target.value); 192 | this.render(); 193 | }, 194 | }); 195 | allure.api.addTestResultBlock(TestResultView, { position: 'before' }); 196 | allure.api.addAttachmentViewer('application/vnd.allure.image.diff', { 197 | View: AttachmentView, 198 | icon: 'fa fa-exchange', 199 | }); 200 | })(); 201 | -------------------------------------------------------------------------------- /test_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 | 28 | .screen-diff-error { 29 | color: #fd5a3e; 30 | } 31 | -------------------------------------------------------------------------------- /test_report/widgets/behaviors.json: -------------------------------------------------------------------------------- 1 | { 2 | "total" : 2, 3 | "items" : [ { 4 | "uid" : "bb2c25a407e11fdca66f64ffdffe2ab0", 5 | "name" : "编辑模块", 6 | "statistic" : { 7 | "failed" : 0, 8 | "broken" : 0, 9 | "skipped" : 0, 10 | "passed" : 6, 11 | "unknown" : 0, 12 | "total" : 6 13 | } 14 | }, { 15 | "uid" : "6958045a481574bf02bb11ef07a7047b", 16 | "name" : "登录模块", 17 | "statistic" : { 18 | "failed" : 0, 19 | "broken" : 0, 20 | "skipped" : 0, 21 | "passed" : 2, 22 | "unknown" : 0, 23 | "total" : 2 24 | } 25 | } ] 26 | } -------------------------------------------------------------------------------- /test_report/widgets/categories-trend.json: -------------------------------------------------------------------------------- 1 | [ { 2 | "data" : { } 3 | } ] -------------------------------------------------------------------------------- /test_report/widgets/categories.json: -------------------------------------------------------------------------------- 1 | { 2 | "total" : 0, 3 | "items" : [ ] 4 | } -------------------------------------------------------------------------------- /test_report/widgets/duration-trend.json: -------------------------------------------------------------------------------- 1 | [ { 2 | "data" : { 3 | "duration" : 5307 4 | } 5 | } ] -------------------------------------------------------------------------------- /test_report/widgets/duration.json: -------------------------------------------------------------------------------- 1 | [ { 2 | "uid" : "a9e063ba23abac18", 3 | "name" : "删除博文", 4 | "time" : { 5 | "start" : 1629907679087, 6 | "stop" : 1629907679298, 7 | "duration" : 211 8 | }, 9 | "status" : "passed", 10 | "severity" : "critical" 11 | }, { 12 | "uid" : "4ca6ce593a277005", 13 | "name" : "创建博文", 14 | "time" : { 15 | "start" : 1629907677512, 16 | "stop" : 1629907677712, 17 | "duration" : 200 18 | }, 19 | "status" : "passed", 20 | "severity" : "critical" 21 | }, { 22 | "uid" : "41e8e6e95b7c75b5", 23 | "name" : "用户注册", 24 | "time" : { 25 | "start" : 1629907674351, 26 | "stop" : 1629907674530, 27 | "duration" : 179 28 | }, 29 | "status" : "passed", 30 | "severity" : "blocker" 31 | }, { 32 | "uid" : "9c7fb473d7fc68f0", 33 | "name" : "更新博文内容", 34 | "time" : { 35 | "start" : 1629907678443, 36 | "stop" : 1629907678601, 37 | "duration" : 158 38 | }, 39 | "status" : "passed", 40 | "severity" : "critical" 41 | }, { 42 | "uid" : "928fd66149be506e", 43 | "name" : "批量查询博文", 44 | "time" : { 45 | "start" : 1629907678788, 46 | "stop" : 1629907678917, 47 | "duration" : 129 48 | }, 49 | "status" : "passed", 50 | "severity" : "critical" 51 | }, { 52 | "uid" : "8f972462257f4377", 53 | "name" : "删除博文", 54 | "time" : { 55 | "start" : 1629907679310, 56 | "stop" : 1629907679439, 57 | "duration" : 129 58 | }, 59 | "status" : "passed", 60 | "severity" : "critical" 61 | }, { 62 | "uid" : "150f129aaf81c31f", 63 | "name" : "用户登录", 64 | "time" : { 65 | "start" : 1629907675025, 66 | "stop" : 1629907675628, 67 | "duration" : 603 68 | }, 69 | "status" : "passed", 70 | "severity" : "blocker" 71 | }, { 72 | "uid" : "43dc24eab8dcd7ee", 73 | "name" : "创建博文", 74 | "time" : { 75 | "start" : 1629907677334, 76 | "stop" : 1629907677497, 77 | "duration" : 163 78 | }, 79 | "status" : "passed", 80 | "severity" : "critical" 81 | }, { 82 | "uid" : "93000324a8016c7a", 83 | "name" : "查看博文内容", 84 | "time" : { 85 | "start" : 1629907678158, 86 | "stop" : 1629907678284, 87 | "duration" : 126 88 | }, 89 | "status" : "passed", 90 | "severity" : "critical" 91 | }, { 92 | "uid" : "d08fac4ece00ec22", 93 | "name" : "查看用户博文", 94 | "time" : { 95 | "start" : 1629907677725, 96 | "stop" : 1629907677919, 97 | "duration" : 194 98 | }, 99 | "status" : "passed", 100 | "severity" : "critical" 101 | }, { 102 | "uid" : "77bac1a9be6aa799", 103 | "name" : "用户登录", 104 | "time" : { 105 | "start" : 1629907675639, 106 | "stop" : 1629907676260, 107 | "duration" : 621 108 | }, 109 | "status" : "passed", 110 | "severity" : "blocker" 111 | }, { 112 | "uid" : "2287eec54c7f212", 113 | "name" : "更新博文内容", 114 | "time" : { 115 | "start" : 1629907678612, 116 | "stop" : 1629907678777, 117 | "duration" : 165 118 | }, 119 | "status" : "passed", 120 | "severity" : "critical" 121 | }, { 122 | "uid" : "c2f39569f374b874", 123 | "name" : "批量查询博文", 124 | "time" : { 125 | "start" : 1629907678928, 126 | "stop" : 1629907679075, 127 | "duration" : 147 128 | }, 129 | "status" : "passed", 130 | "severity" : "critical" 131 | }, { 132 | "uid" : "8db162b0c1a180aa", 133 | "name" : "查看用户博文", 134 | "time" : { 135 | "start" : 1629907677933, 136 | "stop" : 1629907678147, 137 | "duration" : 214 138 | }, 139 | "status" : "passed", 140 | "severity" : "critical" 141 | }, { 142 | "uid" : "59a0b2d61cf702a6", 143 | "name" : "用户注册", 144 | "time" : { 145 | "start" : 1629907674544, 146 | "stop" : 1629907675012, 147 | "duration" : 468 148 | }, 149 | "status" : "passed", 150 | "severity" : "blocker" 151 | }, { 152 | "uid" : "5e792b44457ea9aa", 153 | "name" : "查看博文内容", 154 | "time" : { 155 | "start" : 1629907678295, 156 | "stop" : 1629907678432, 157 | "duration" : 137 158 | }, 159 | "status" : "passed", 160 | "severity" : "critical" 161 | }, { 162 | "uid" : "bfa1537d2e1423a0", 163 | "name" : "用户注册", 164 | "time" : { 165 | "start" : 1629907674132, 166 | "stop" : 1629907674338, 167 | "duration" : 206 168 | }, 169 | "status" : "passed", 170 | "severity" : "blocker" 171 | }, { 172 | "uid" : "5847db81c22255cc", 173 | "name" : "用户登录", 174 | "time" : { 175 | "start" : 1629907676274, 176 | "stop" : 1629907677322, 177 | "duration" : 1048 178 | }, 179 | "status" : "passed", 180 | "severity" : "blocker" 181 | } ] -------------------------------------------------------------------------------- /test_report/widgets/environment.json: -------------------------------------------------------------------------------- 1 | [ ] -------------------------------------------------------------------------------- /test_report/widgets/executors.json: -------------------------------------------------------------------------------- 1 | [ ] -------------------------------------------------------------------------------- /test_report/widgets/history-trend.json: -------------------------------------------------------------------------------- 1 | [ { 2 | "data" : { 3 | "failed" : 0, 4 | "broken" : 0, 5 | "skipped" : 0, 6 | "passed" : 18, 7 | "unknown" : 0, 8 | "total" : 18 9 | } 10 | } ] -------------------------------------------------------------------------------- /test_report/widgets/launch.json: -------------------------------------------------------------------------------- 1 | [ ] -------------------------------------------------------------------------------- /test_report/widgets/retry-trend.json: -------------------------------------------------------------------------------- 1 | [ { 2 | "data" : { 3 | "run" : 18, 4 | "retry" : 0 5 | } 6 | } ] -------------------------------------------------------------------------------- /test_report/widgets/severity.json: -------------------------------------------------------------------------------- 1 | [ { 2 | "uid" : "93000324a8016c7a", 3 | "name" : "查看博文内容", 4 | "time" : { 5 | "start" : 1629907678158, 6 | "stop" : 1629907678284, 7 | "duration" : 126 8 | }, 9 | "status" : "passed", 10 | "severity" : "critical" 11 | }, { 12 | "uid" : "c2f39569f374b874", 13 | "name" : "批量查询博文", 14 | "time" : { 15 | "start" : 1629907678928, 16 | "stop" : 1629907679075, 17 | "duration" : 147 18 | }, 19 | "status" : "passed", 20 | "severity" : "critical" 21 | }, { 22 | "uid" : "59a0b2d61cf702a6", 23 | "name" : "用户注册", 24 | "time" : { 25 | "start" : 1629907674544, 26 | "stop" : 1629907675012, 27 | "duration" : 468 28 | }, 29 | "status" : "passed", 30 | "severity" : "blocker" 31 | }, { 32 | "uid" : "77bac1a9be6aa799", 33 | "name" : "用户登录", 34 | "time" : { 35 | "start" : 1629907675639, 36 | "stop" : 1629907676260, 37 | "duration" : 621 38 | }, 39 | "status" : "passed", 40 | "severity" : "blocker" 41 | }, { 42 | "uid" : "150f129aaf81c31f", 43 | "name" : "用户登录", 44 | "time" : { 45 | "start" : 1629907675025, 46 | "stop" : 1629907675628, 47 | "duration" : 603 48 | }, 49 | "status" : "passed", 50 | "severity" : "blocker" 51 | }, { 52 | "uid" : "5e792b44457ea9aa", 53 | "name" : "查看博文内容", 54 | "time" : { 55 | "start" : 1629907678295, 56 | "stop" : 1629907678432, 57 | "duration" : 137 58 | }, 59 | "status" : "passed", 60 | "severity" : "critical" 61 | }, { 62 | "uid" : "9c7fb473d7fc68f0", 63 | "name" : "更新博文内容", 64 | "time" : { 65 | "start" : 1629907678443, 66 | "stop" : 1629907678601, 67 | "duration" : 158 68 | }, 69 | "status" : "passed", 70 | "severity" : "critical" 71 | }, { 72 | "uid" : "2287eec54c7f212", 73 | "name" : "更新博文内容", 74 | "time" : { 75 | "start" : 1629907678612, 76 | "stop" : 1629907678777, 77 | "duration" : 165 78 | }, 79 | "status" : "passed", 80 | "severity" : "critical" 81 | }, { 82 | "uid" : "8db162b0c1a180aa", 83 | "name" : "查看用户博文", 84 | "time" : { 85 | "start" : 1629907677933, 86 | "stop" : 1629907678147, 87 | "duration" : 214 88 | }, 89 | "status" : "passed", 90 | "severity" : "critical" 91 | }, { 92 | "uid" : "43dc24eab8dcd7ee", 93 | "name" : "创建博文", 94 | "time" : { 95 | "start" : 1629907677334, 96 | "stop" : 1629907677497, 97 | "duration" : 163 98 | }, 99 | "status" : "passed", 100 | "severity" : "critical" 101 | }, { 102 | "uid" : "d08fac4ece00ec22", 103 | "name" : "查看用户博文", 104 | "time" : { 105 | "start" : 1629907677725, 106 | "stop" : 1629907677919, 107 | "duration" : 194 108 | }, 109 | "status" : "passed", 110 | "severity" : "critical" 111 | }, { 112 | "uid" : "928fd66149be506e", 113 | "name" : "批量查询博文", 114 | "time" : { 115 | "start" : 1629907678788, 116 | "stop" : 1629907678917, 117 | "duration" : 129 118 | }, 119 | "status" : "passed", 120 | "severity" : "critical" 121 | }, { 122 | "uid" : "5847db81c22255cc", 123 | "name" : "用户登录", 124 | "time" : { 125 | "start" : 1629907676274, 126 | "stop" : 1629907677322, 127 | "duration" : 1048 128 | }, 129 | "status" : "passed", 130 | "severity" : "blocker" 131 | }, { 132 | "uid" : "bfa1537d2e1423a0", 133 | "name" : "用户注册", 134 | "time" : { 135 | "start" : 1629907674132, 136 | "stop" : 1629907674338, 137 | "duration" : 206 138 | }, 139 | "status" : "passed", 140 | "severity" : "blocker" 141 | }, { 142 | "uid" : "4ca6ce593a277005", 143 | "name" : "创建博文", 144 | "time" : { 145 | "start" : 1629907677512, 146 | "stop" : 1629907677712, 147 | "duration" : 200 148 | }, 149 | "status" : "passed", 150 | "severity" : "critical" 151 | }, { 152 | "uid" : "41e8e6e95b7c75b5", 153 | "name" : "用户注册", 154 | "time" : { 155 | "start" : 1629907674351, 156 | "stop" : 1629907674530, 157 | "duration" : 179 158 | }, 159 | "status" : "passed", 160 | "severity" : "blocker" 161 | }, { 162 | "uid" : "8f972462257f4377", 163 | "name" : "删除博文", 164 | "time" : { 165 | "start" : 1629907679310, 166 | "stop" : 1629907679439, 167 | "duration" : 129 168 | }, 169 | "status" : "passed", 170 | "severity" : "critical" 171 | }, { 172 | "uid" : "a9e063ba23abac18", 173 | "name" : "删除博文", 174 | "time" : { 175 | "start" : 1629907679087, 176 | "stop" : 1629907679298, 177 | "duration" : 211 178 | }, 179 | "status" : "passed", 180 | "severity" : "critical" 181 | } ] -------------------------------------------------------------------------------- /test_report/widgets/status-chart.json: -------------------------------------------------------------------------------- 1 | [ { 2 | "uid" : "a9e063ba23abac18", 3 | "name" : "删除博文", 4 | "time" : { 5 | "start" : 1629907679087, 6 | "stop" : 1629907679298, 7 | "duration" : 211 8 | }, 9 | "status" : "passed", 10 | "severity" : "critical" 11 | }, { 12 | "uid" : "4ca6ce593a277005", 13 | "name" : "创建博文", 14 | "time" : { 15 | "start" : 1629907677512, 16 | "stop" : 1629907677712, 17 | "duration" : 200 18 | }, 19 | "status" : "passed", 20 | "severity" : "critical" 21 | }, { 22 | "uid" : "41e8e6e95b7c75b5", 23 | "name" : "用户注册", 24 | "time" : { 25 | "start" : 1629907674351, 26 | "stop" : 1629907674530, 27 | "duration" : 179 28 | }, 29 | "status" : "passed", 30 | "severity" : "blocker" 31 | }, { 32 | "uid" : "9c7fb473d7fc68f0", 33 | "name" : "更新博文内容", 34 | "time" : { 35 | "start" : 1629907678443, 36 | "stop" : 1629907678601, 37 | "duration" : 158 38 | }, 39 | "status" : "passed", 40 | "severity" : "critical" 41 | }, { 42 | "uid" : "928fd66149be506e", 43 | "name" : "批量查询博文", 44 | "time" : { 45 | "start" : 1629907678788, 46 | "stop" : 1629907678917, 47 | "duration" : 129 48 | }, 49 | "status" : "passed", 50 | "severity" : "critical" 51 | }, { 52 | "uid" : "8f972462257f4377", 53 | "name" : "删除博文", 54 | "time" : { 55 | "start" : 1629907679310, 56 | "stop" : 1629907679439, 57 | "duration" : 129 58 | }, 59 | "status" : "passed", 60 | "severity" : "critical" 61 | }, { 62 | "uid" : "150f129aaf81c31f", 63 | "name" : "用户登录", 64 | "time" : { 65 | "start" : 1629907675025, 66 | "stop" : 1629907675628, 67 | "duration" : 603 68 | }, 69 | "status" : "passed", 70 | "severity" : "blocker" 71 | }, { 72 | "uid" : "43dc24eab8dcd7ee", 73 | "name" : "创建博文", 74 | "time" : { 75 | "start" : 1629907677334, 76 | "stop" : 1629907677497, 77 | "duration" : 163 78 | }, 79 | "status" : "passed", 80 | "severity" : "critical" 81 | }, { 82 | "uid" : "93000324a8016c7a", 83 | "name" : "查看博文内容", 84 | "time" : { 85 | "start" : 1629907678158, 86 | "stop" : 1629907678284, 87 | "duration" : 126 88 | }, 89 | "status" : "passed", 90 | "severity" : "critical" 91 | }, { 92 | "uid" : "d08fac4ece00ec22", 93 | "name" : "查看用户博文", 94 | "time" : { 95 | "start" : 1629907677725, 96 | "stop" : 1629907677919, 97 | "duration" : 194 98 | }, 99 | "status" : "passed", 100 | "severity" : "critical" 101 | }, { 102 | "uid" : "77bac1a9be6aa799", 103 | "name" : "用户登录", 104 | "time" : { 105 | "start" : 1629907675639, 106 | "stop" : 1629907676260, 107 | "duration" : 621 108 | }, 109 | "status" : "passed", 110 | "severity" : "blocker" 111 | }, { 112 | "uid" : "2287eec54c7f212", 113 | "name" : "更新博文内容", 114 | "time" : { 115 | "start" : 1629907678612, 116 | "stop" : 1629907678777, 117 | "duration" : 165 118 | }, 119 | "status" : "passed", 120 | "severity" : "critical" 121 | }, { 122 | "uid" : "c2f39569f374b874", 123 | "name" : "批量查询博文", 124 | "time" : { 125 | "start" : 1629907678928, 126 | "stop" : 1629907679075, 127 | "duration" : 147 128 | }, 129 | "status" : "passed", 130 | "severity" : "critical" 131 | }, { 132 | "uid" : "8db162b0c1a180aa", 133 | "name" : "查看用户博文", 134 | "time" : { 135 | "start" : 1629907677933, 136 | "stop" : 1629907678147, 137 | "duration" : 214 138 | }, 139 | "status" : "passed", 140 | "severity" : "critical" 141 | }, { 142 | "uid" : "59a0b2d61cf702a6", 143 | "name" : "用户注册", 144 | "time" : { 145 | "start" : 1629907674544, 146 | "stop" : 1629907675012, 147 | "duration" : 468 148 | }, 149 | "status" : "passed", 150 | "severity" : "blocker" 151 | }, { 152 | "uid" : "5e792b44457ea9aa", 153 | "name" : "查看博文内容", 154 | "time" : { 155 | "start" : 1629907678295, 156 | "stop" : 1629907678432, 157 | "duration" : 137 158 | }, 159 | "status" : "passed", 160 | "severity" : "critical" 161 | }, { 162 | "uid" : "bfa1537d2e1423a0", 163 | "name" : "用户注册", 164 | "time" : { 165 | "start" : 1629907674132, 166 | "stop" : 1629907674338, 167 | "duration" : 206 168 | }, 169 | "status" : "passed", 170 | "severity" : "blocker" 171 | }, { 172 | "uid" : "5847db81c22255cc", 173 | "name" : "用户登录", 174 | "time" : { 175 | "start" : 1629907676274, 176 | "stop" : 1629907677322, 177 | "duration" : 1048 178 | }, 179 | "status" : "passed", 180 | "severity" : "blocker" 181 | } ] -------------------------------------------------------------------------------- /test_report/widgets/suites.json: -------------------------------------------------------------------------------- 1 | { 2 | "total" : 1, 3 | "items" : [ { 4 | "uid" : "86abcc46617c603d802c3e378b13740e", 5 | "name" : "test_case", 6 | "statistic" : { 7 | "failed" : 0, 8 | "broken" : 0, 9 | "skipped" : 0, 10 | "passed" : 18, 11 | "unknown" : 0, 12 | "total" : 18 13 | } 14 | } ] 15 | } -------------------------------------------------------------------------------- /test_report/widgets/summary.json: -------------------------------------------------------------------------------- 1 | { 2 | "reportName" : "Allure Report", 3 | "testRuns" : [ ], 4 | "statistic" : { 5 | "failed" : 0, 6 | "broken" : 0, 7 | "skipped" : 0, 8 | "passed" : 18, 9 | "unknown" : 0, 10 | "total" : 18 11 | }, 12 | "time" : { 13 | "start" : 1629907674132, 14 | "stop" : 1629907679439, 15 | "duration" : 5307, 16 | "minDuration" : 126, 17 | "maxDuration" : 1048, 18 | "sumDuration" : 5098 19 | } 20 | } -------------------------------------------------------------------------------- /test_result/0f682578-f740-4a3b-8099-34a043764e54-attachment.txt: -------------------------------------------------------------------------------- 1 | INFO root:log_util.py:16 接口用例数据:[2.0, '创建博文失败', 'http://39.100.104.214:8080', '/create/', 'post', '{"userid":${userid}, "token":"123", "title":"title test", "content":"content test"}', '"code": "03"', '', '', ''] 2 | INFO root:log_util.py:16 请求原始数据:{"userid":${userid}, "token":"123", "title":"title test", "content":"content test"} 3 | INFO root:log_util.py:16 请求数据预处理结果:{"userid":343, "token":"123", "title":"title test", "content":"content test"} 4 | INFO root:log_util.py:16 接口调用成功! 5 | INFO root:log_util.py:16 响应数据:{"code": "03", "userid": 343} 6 | INFO root:log_util.py:16 无关联参数提取.. 7 | INFO root:log_util.py:16 【"code": "03"】关键字断言成功【{"code": "03", "userid": 343}】 -------------------------------------------------------------------------------- /test_result/12f4fb24-a6db-4a86-85e1-4abbab26ac59-container.json: -------------------------------------------------------------------------------- 1 | {"uuid": "58fda05b-d20f-4d94-85a8-29f5d6f9f0e3", "befores": [{"name": "case_data", "status": "passed", "start": 1629908585526, "stop": 1629908585526}], "start": 1629908585526, "stop": 1629908585764} -------------------------------------------------------------------------------- /test_result/18ffd22c-7027-4d6b-b968-fc2eb6ea73fe-result.json: -------------------------------------------------------------------------------- 1 | {"name": "用户注册", "status": "passed", "description": "通过接口进行用户注册", "steps": [{"name": "读取请求数据,调用接口", "status": "passed", "start": 1629908582180, "stop": 1629908582613}, {"name": "获取响应数据,进行断言", "status": "passed", "start": 1629908582614, "stop": 1629908582615}], "attachments": [{"name": "log", "source": "c2736481-ce73-47f6-aa78-052dd17c6526-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "case_data", "value": "[1.0, '注册成功', 'http://39.100.104.214:8080', '/register/', 'post', '{\"username\":\"juno${get_unique_num1}\",\"password\":\"juno999999\",\"email\":\"juno123@qq.com\"}', '\"code\": \"00\"', 'userid', '', '']"}], "start": 1629908582179, "stop": 1629908582616, "uuid": "f56f8705-f586-4901-905a-68b60f7e3ac2", "historyId": "a7b56100d0b7490e087f52fa1108244d", "testCaseId": "9185d2e2663b3a955ae391f6b8748eb5", "fullName": "test_case.test_login_module.TestLoginModule#test_register", "labels": [{"name": "feature", "value": "登录模块"}, {"name": "story", "value": "注册功能"}, {"name": "severity", "value": "blocker"}, {"name": "tag", "value": "dependency(name='TestLoginModule')"}, {"name": "tag", "value": "run(order=1)"}, {"name": "parentSuite", "value": "test_case"}, {"name": "suite", "value": "test_login_module"}, {"name": "subSuite", "value": "TestLoginModule"}, {"name": "host", "value": "DESKTOP-13387BR"}, {"name": "thread", "value": "7388-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_case.test_login_module"}]} -------------------------------------------------------------------------------- /test_result/1af97849-47b3-43d3-8658-e0e399e88a23-result.json: -------------------------------------------------------------------------------- 1 | {"name": "查看用户博文", "status": "passed", "description": "通过接口查看用户所有博文", "steps": [{"name": "读取请求数据,调用接口", "status": "passed", "start": 1629908584240, "stop": 1629908584370}, {"name": "获取响应数据,进行断言", "status": "passed", "start": 1629908584370, "stop": 1629908584371}], "attachments": [{"name": "log", "source": "32739062-f736-40a4-9b9b-c6cf9d72c2c6-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "case_data", "value": "[2.0, '用户token有误,查询失败', 'http://39.100.104.214:8080', '/getBlogsOfUser/', 'post', '{\"userid\":${userid}, \"token\":\"123\"}', '\"code\": \"03\"', '', '', '']"}], "start": 1629908584240, "stop": 1629908584371, "uuid": "71aac04b-0fc0-48b6-9528-271b3d600eaa", "historyId": "ce639bf4b18ab421b63f9d2e8ddc47ab", "testCaseId": "b84aed3947d2ca66b2dc10fe3ad9e25f", "fullName": "test_case.test_edit_module.TestEditModule#test_user_blog_search", "labels": [{"name": "severity", "value": "critical"}, {"name": "feature", "value": "编辑模块"}, {"name": "story", "value": "用户博文查询功能"}, {"name": "tag", "value": "dependency(name='TestEditModule', depends=['TestLoginModule'], scope='package')"}, {"name": "tag", "value": "run(order=4)"}, {"name": "parentSuite", "value": "test_case"}, {"name": "suite", "value": "test_edit_module"}, {"name": "subSuite", "value": "TestEditModule"}, {"name": "host", "value": "DESKTOP-13387BR"}, {"name": "thread", "value": "7388-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_case.test_edit_module"}]} -------------------------------------------------------------------------------- /test_result/234db551-0932-4a9c-9737-3b21c6deaa9d-container.json: -------------------------------------------------------------------------------- 1 | {"uuid": "e1a3a926-3dd0-47f8-9e18-d822acc00e51", "befores": [{"name": "case_data", "status": "passed", "start": 1629908584381, "stop": 1629908584381}], "start": 1629908584381, "stop": 1629908584514} -------------------------------------------------------------------------------- /test_result/2e20e98a-12c9-4e9b-b007-f7d318f88b9b-result.json: -------------------------------------------------------------------------------- 1 | {"name": "用户注册", "status": "passed", "description": "通过接口进行用户注册", "steps": [{"name": "读取请求数据,调用接口", "status": "passed", "start": 1629908583096, "stop": 1629908583261}, {"name": "获取响应数据,进行断言", "status": "passed", "start": 1629908583261, "stop": 1629908583262}], "attachments": [{"name": "log", "source": "5c473561-2d3a-45a5-862e-ba9840bb0d2f-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "case_data", "value": "[2.0, '注册成功', 'http://39.100.104.214:8080', '/register/', 'post', '{\"username\":\"juno${get_unique_num2}\",\"password\":\"juno999999\",\"email\":\"juno123@qq.com\"}', '\"code\": \"00\"', 'userid', '', '']"}], "start": 1629908583096, "stop": 1629908583262, "uuid": "55069aa7-dc81-4362-bc3d-a353c999c294", "historyId": "f6d1eb043a6b15674e731e1ef7bf23e6", "testCaseId": "9185d2e2663b3a955ae391f6b8748eb5", "fullName": "test_case.test_login_module.TestLoginModule#test_register", "labels": [{"name": "feature", "value": "登录模块"}, {"name": "story", "value": "注册功能"}, {"name": "severity", "value": "blocker"}, {"name": "tag", "value": "dependency(name='TestLoginModule')"}, {"name": "tag", "value": "run(order=1)"}, {"name": "parentSuite", "value": "test_case"}, {"name": "suite", "value": "test_login_module"}, {"name": "subSuite", "value": "TestLoginModule"}, {"name": "host", "value": "DESKTOP-13387BR"}, {"name": "thread", "value": "7388-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_case.test_login_module"}]} -------------------------------------------------------------------------------- /test_result/32739062-f736-40a4-9b9b-c6cf9d72c2c6-attachment.txt: -------------------------------------------------------------------------------- 1 | INFO root:log_util.py:16 接口用例数据:[2.0, '用户token有误,查询失败', 'http://39.100.104.214:8080', '/getBlogsOfUser/', 'post', '{"userid":${userid}, "token":"123"}', '"code": "03"', '', '', ''] 2 | INFO root:log_util.py:16 请求原始数据:{"userid":${userid}, "token":"123"} 3 | INFO root:log_util.py:16 请求数据预处理结果:{"userid":343, "token":"123"} 4 | INFO root:log_util.py:16 接口调用成功! 5 | INFO root:log_util.py:16 响应数据:{"code": "03", "userid": 343} 6 | INFO root:log_util.py:16 无关联参数提取.. 7 | INFO root:log_util.py:16 【"code": "03"】关键字断言成功【{"code": "03", "userid": 343}】 -------------------------------------------------------------------------------- /test_result/33d478e7-5aaa-44f8-957f-82cda50aea61-result.json: -------------------------------------------------------------------------------- 1 | {"name": "用户登录", "status": "passed", "description": "通过接口进行用户登录", "steps": [{"name": "读取请求数据,调用接口", "status": "passed", "start": 1629908583438, "stop": 1629908583587}, {"name": "获取响应数据,进行断言", "status": "passed", "start": 1629908583587, "stop": 1629908583588}], "attachments": [{"name": "log", "source": "a8ec81ed-e814-40af-9e19-d30af4515340-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "case_data", "value": "[2.0, '登录成功', 'http://39.100.104.214:8080', '/login/', 'post', '{\"username\":\"juno${unique_num2}\",\"password\":\"${md5(\\'juno999999\\')}\"}', '\"token\"', 'token', '', '']"}], "start": 1629908583438, "stop": 1629908583588, "uuid": "4905fe65-4a2f-4465-b87c-51105b202620", "historyId": "78f3f821c4dea63cf111ffe451d46df3", "testCaseId": "ac7c256b846c3db8122097909f6dbfef", "fullName": "test_case.test_login_module.TestLoginModule#test_login", "labels": [{"name": "story", "value": "登录功能"}, {"name": "feature", "value": "登录模块"}, {"name": "severity", "value": "blocker"}, {"name": "tag", "value": "dependency(name='TestLoginModule')"}, {"name": "tag", "value": "run(order=2)"}, {"name": "parentSuite", "value": "test_case"}, {"name": "suite", "value": "test_login_module"}, {"name": "subSuite", "value": "TestLoginModule"}, {"name": "host", "value": "DESKTOP-13387BR"}, {"name": "thread", "value": "7388-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_case.test_login_module"}]} -------------------------------------------------------------------------------- /test_result/37a51e63-6a8e-4c63-9878-b30fec947a80-container.json: -------------------------------------------------------------------------------- 1 | {"uuid": "3f7b03db-1638-4b05-bc8c-cde6cd6f78f8", "befores": [{"name": "case_data", "status": "passed", "start": 1629908584854, "stop": 1629908584855}], "start": 1629908584854, "stop": 1629908585035} -------------------------------------------------------------------------------- /test_result/3976adb9-505e-46c1-9a17-b47a440a8a22-container.json: -------------------------------------------------------------------------------- 1 | {"uuid": "dbaab7dc-011f-45c7-9792-d8877e2e4e58", "befores": [{"name": "case_data", "status": "passed", "start": 1629908585235, "stop": 1629908585235}], "start": 1629908585235, "stop": 1629908585368} -------------------------------------------------------------------------------- /test_result/3be4cec9-15a5-4c36-8c59-4edd9b052e23-container.json: -------------------------------------------------------------------------------- 1 | {"uuid": "6017c936-3f8c-4b35-a9b3-42a3cf92eebe", "befores": [{"name": "case_data", "status": "passed", "start": 1629908584239, "stop": 1629908584239}], "start": 1629908584239, "stop": 1629908584372} -------------------------------------------------------------------------------- /test_result/40b7906a-05e2-46e9-81bc-92a686ade2e4-container.json: -------------------------------------------------------------------------------- 1 | {"uuid": "ce7ef7bd-6b2c-490c-bba6-2ce70b8e7c08", "befores": [{"name": "case_data", "status": "passed", "start": 1629908582628, "stop": 1629908582628}], "start": 1629908582628, "stop": 1629908583084} -------------------------------------------------------------------------------- /test_result/4a1983e7-ae32-4e18-be9b-91228266e00d-container.json: -------------------------------------------------------------------------------- 1 | {"uuid": "c6599a5e-7776-4cef-8442-0b15be7a1555", "befores": [{"name": "case_data", "status": "passed", "start": 1629908583094, "stop": 1629908583095}], "start": 1629908583094, "stop": 1629908583263} -------------------------------------------------------------------------------- /test_result/4edc4e07-d6b2-4e47-b4f4-d121edc8c159-result.json: -------------------------------------------------------------------------------- 1 | {"name": "用户登录", "status": "passed", "description": "通过接口进行用户登录", "steps": [{"name": "读取请求数据,调用接口", "status": "passed", "start": 1629908583275, "stop": 1629908583425}, {"name": "获取响应数据,进行断言", "status": "passed", "start": 1629908583425, "stop": 1629908583426}], "attachments": [{"name": "log", "source": "b3199980-1cd3-4175-af33-a8fa5e020aa7-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "case_data", "value": "[1.0, '登录成功', 'http://39.100.104.214:8080', '/login/', 'post', '{\"username\":\"juno${unique_num1}\",\"password\":\"${md5(\\'juno999999\\')}\"}', '\"token\"', 'token', '', '']"}], "start": 1629908583275, "stop": 1629908583426, "uuid": "4c5d8015-2746-4539-8fc6-ba7f07b27a7a", "historyId": "d8983635e87a151b9b3b7b66fd0ac0dc", "testCaseId": "ac7c256b846c3db8122097909f6dbfef", "fullName": "test_case.test_login_module.TestLoginModule#test_login", "labels": [{"name": "story", "value": "登录功能"}, {"name": "feature", "value": "登录模块"}, {"name": "severity", "value": "blocker"}, {"name": "tag", "value": "dependency(name='TestLoginModule')"}, {"name": "tag", "value": "run(order=2)"}, {"name": "parentSuite", "value": "test_case"}, {"name": "suite", "value": "test_login_module"}, {"name": "subSuite", "value": "TestLoginModule"}, {"name": "host", "value": "DESKTOP-13387BR"}, {"name": "thread", "value": "7388-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_case.test_login_module"}]} -------------------------------------------------------------------------------- /test_result/4fda2be0-77ae-4703-9a4b-dbe6191c7fc7-container.json: -------------------------------------------------------------------------------- 1 | {"uuid": "861f9838-e711-45d4-abbd-1eb2c191377e", "befores": [{"name": "case_data", "status": "passed", "start": 1629908583436, "stop": 1629908583436}], "start": 1629908583436, "stop": 1629908583589} -------------------------------------------------------------------------------- /test_result/51f064bd-353f-49f8-82c2-94b97c4b1fbf-attachment.txt: -------------------------------------------------------------------------------- 1 | INFO root:log_util.py:16 接口用例数据:[2.0, 'articleId有误,博文批量查询失败', 'http://39.100.104.214:8080', '/getBlogsContent/articleIds=null', 'get', '', '"code": "999"', '', '', ''] 2 | INFO root:log_util.py:16 请求原始数据:/getBlogsContent/articleIds=null 3 | INFO root:log_util.py:16 请求数据预处理结果:/getBlogsContent/articleIds=null 4 | INFO root:log_util.py:16 接口调用成功! 5 | INFO root:log_util.py:16 响应数据:{"code": "999"} 6 | INFO root:log_util.py:16 无关联参数提取.. 7 | INFO root:log_util.py:16 【"code": "999"】关键字断言成功【{"code": "999"}】 -------------------------------------------------------------------------------- /test_result/524c61e9-0a42-4299-b2a3-3a48df8f01df-container.json: -------------------------------------------------------------------------------- 1 | {"uuid": "c3e2c204-4cf3-4a38-8105-fcbca1679df6", "befores": [{"name": "case_data", "status": "passed", "start": 1629908583907, "stop": 1629908583907}], "start": 1629908583907, "stop": 1629908584067} -------------------------------------------------------------------------------- /test_result/58091a4c-be35-4024-a892-40942a6dea6b-container.json: -------------------------------------------------------------------------------- 1 | {"uuid": "e7d8c59d-80e3-4d68-9282-b7a684a22379", "befores": [{"name": "case_data", "status": "passed", "start": 1629908585377, "stop": 1629908585377}], "start": 1629908585377, "stop": 1629908585516} -------------------------------------------------------------------------------- /test_result/5c473561-2d3a-45a5-862e-ba9840bb0d2f-attachment.txt: -------------------------------------------------------------------------------- 1 | INFO root:log_util.py:16 接口用例数据:[2.0, '注册成功', 'http://39.100.104.214:8080', '/register/', 'post', '{"username":"juno${get_unique_num2}","password":"juno999999","email":"juno123@qq.com"}', '"code": "00"', 'userid', '', ''] 2 | INFO root:log_util.py:16 请求原始数据:{"username":"juno${get_unique_num2}","password":"juno999999","email":"juno123@qq.com"} 3 | INFO root:log_util.py:16 请求数据预处理结果:{"username":"juno30308","password":"juno999999","email":"juno123@qq.com"} 4 | INFO root:log_util.py:16 接口调用成功! 5 | INFO root:log_util.py:16 响应数据:{"code": "00", "userid": 343} 6 | INFO root:log_util.py:16 关联参数提取成功:【userid: 343】 7 | INFO root:log_util.py:16 【"code": "00"】关键字断言成功【{"code": "00", "userid": 343}】 -------------------------------------------------------------------------------- /test_result/5e066ce1-14d2-4338-8dbc-565889502298-attachment.txt: -------------------------------------------------------------------------------- 1 | INFO root:log_util.py:16 接口用例数据:[2.0, 'articleId有误,更新失败', 'http://39.100.104.214:8080', '/update/', 'put', '{"userid":${userid}, "token": "${token}", "articleId":1234, "title":"python", "content":"test test"}', '"code": "03"', '', '', ''] 2 | INFO root:log_util.py:16 请求原始数据:{"userid":${userid}, "token": "${token}", "articleId":1234, "title":"python", "content":"test test"} 3 | INFO root:log_util.py:16 请求数据预处理结果:{"userid":343, "token": "5d31e610094e895e9411d9dddec35055", "articleId":1234, "title":"python", "content":"test test"} 4 | INFO root:log_util.py:16 接口调用成功! 5 | INFO root:log_util.py:16 响应数据:{"articleId": 1234, "code": "03", "userid": 343} 6 | INFO root:log_util.py:16 无关联参数提取.. 7 | INFO root:log_util.py:16 【"code": "03"】关键字断言成功【{"articleId": 1234, "code": "03", "userid": 343}】 -------------------------------------------------------------------------------- /test_result/5fe4b510-4b93-4317-96a5-b46121ba6245-result.json: -------------------------------------------------------------------------------- 1 | {"name": "更新博文内容", "status": "passed", "description": "通过接口更新博文内容", "steps": [{"name": "读取请求数据,调用接口", "status": "passed", "start": 1629908584856, "stop": 1629908585032}, {"name": "获取响应数据,进行断言", "status": "passed", "start": 1629908585033, "stop": 1629908585033}], "attachments": [{"name": "log", "source": "5e066ce1-14d2-4338-8dbc-565889502298-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "case_data", "value": "[2.0, 'articleId有误,更新失败', 'http://39.100.104.214:8080', '/update/', 'put', '{\"userid\":${userid}, \"token\": \"${token}\", \"articleId\":1234, \"title\":\"python\", \"content\":\"test test\"}', '\"code\": \"03\"', '', '', '']"}], "start": 1629908584856, "stop": 1629908585034, "uuid": "93425d79-0989-4c26-abf4-e070f31df928", "historyId": "72442eb161046e365132a46ddc653f6c", "testCaseId": "59b4dfda70a4559f50f3f52664262b57", "fullName": "test_case.test_edit_module.TestEditModule#test_blog_content_update", "labels": [{"name": "story", "value": "博文内容更新功能"}, {"name": "severity", "value": "critical"}, {"name": "feature", "value": "编辑模块"}, {"name": "tag", "value": "dependency(name='TestEditModule', depends=['TestLoginModule'], scope='package')"}, {"name": "tag", "value": "run(order=6)"}, {"name": "parentSuite", "value": "test_case"}, {"name": "suite", "value": "test_edit_module"}, {"name": "subSuite", "value": "TestEditModule"}, {"name": "host", "value": "DESKTOP-13387BR"}, {"name": "thread", "value": "7388-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_case.test_edit_module"}]} -------------------------------------------------------------------------------- /test_result/69bd538e-a44f-46a0-8ceb-3d99ae3f4267-result.json: -------------------------------------------------------------------------------- 1 | {"name": "查看博文内容", "status": "passed", "description": "通过接口查看博文内容", "steps": [{"name": "读取请求数据,调用接口", "status": "passed", "start": 1629908584382, "stop": 1629908584511}, {"name": "获取响应数据,进行断言", "status": "passed", "start": 1629908584512, "stop": 1629908584512}], "attachments": [{"name": "log", "source": "9a8f1331-6175-4f3b-9811-e8594b233fd6-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "case_data", "value": "[1.0, '博文内容查询成功', 'http://39.100.104.214:8080', '/getBlogContent/${articleId}', 'get', '', '\"content\": \"content test\"', '', '', '']"}], "start": 1629908584382, "stop": 1629908584513, "uuid": "cd5e5904-e3e9-4154-91ae-02a22ba87ee6", "historyId": "13b38d6b55f2887a829110dffd1bda14", "testCaseId": "3c1ad54966919616cefd221d9beb572c", "fullName": "test_case.test_edit_module.TestEditModule#test_blog_content_search", "labels": [{"name": "severity", "value": "critical"}, {"name": "feature", "value": "编辑模块"}, {"name": "story", "value": "博文内容查询功能"}, {"name": "tag", "value": "dependency(name='TestEditModule', depends=['TestLoginModule'], scope='package')"}, {"name": "tag", "value": "run(order=5)"}, {"name": "parentSuite", "value": "test_case"}, {"name": "suite", "value": "test_edit_module"}, {"name": "subSuite", "value": "TestEditModule"}, {"name": "host", "value": "DESKTOP-13387BR"}, {"name": "thread", "value": "7388-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_case.test_edit_module"}]} -------------------------------------------------------------------------------- /test_result/6cd025bd-323f-443b-b8ff-7160565623ae-result.json: -------------------------------------------------------------------------------- 1 | {"name": "创建博文", "status": "passed", "description": "通过接口创建博文", "steps": [{"name": "读取请求数据,调用接口", "status": "passed", "start": 1629908583909, "stop": 1629908584065}, {"name": "获取响应数据,进行断言", "status": "passed", "start": 1629908584065, "stop": 1629908584065}], "attachments": [{"name": "log", "source": "0f682578-f740-4a3b-8099-34a043764e54-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "case_data", "value": "[2.0, '创建博文失败', 'http://39.100.104.214:8080', '/create/', 'post', '{\"userid\":${userid}, \"token\":\"123\", \"title\":\"title test\", \"content\":\"content test\"}', '\"code\": \"03\"', '', '', '']"}], "start": 1629908583908, "stop": 1629908584066, "uuid": "2971c8fb-5e4a-44b1-9e34-85d9c4a8e7ac", "historyId": "dc072d17411f37f6a047bda09ea2711d", "testCaseId": "480dec29853ff5cdc60466f64a4e7c35", "fullName": "test_case.test_edit_module.TestEditModule#test_create", "labels": [{"name": "severity", "value": "critical"}, {"name": "feature", "value": "编辑模块"}, {"name": "story", "value": "博文创建功能"}, {"name": "tag", "value": "dependency(name='TestEditModule', depends=['TestLoginModule'], scope='package')"}, {"name": "tag", "value": "run(order=3)"}, {"name": "parentSuite", "value": "test_case"}, {"name": "suite", "value": "test_edit_module"}, {"name": "subSuite", "value": "TestEditModule"}, {"name": "host", "value": "DESKTOP-13387BR"}, {"name": "thread", "value": "7388-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_case.test_edit_module"}]} -------------------------------------------------------------------------------- /test_result/715ba18e-39e6-4200-9412-25a935241914-container.json: -------------------------------------------------------------------------------- 1 | {"uuid": "b465e751-d072-41cc-a828-ca91322d77f1", "befores": [{"name": "case_data", "status": "passed", "start": 1629908583599, "stop": 1629908583599}], "start": 1629908583599, "stop": 1629908583726} -------------------------------------------------------------------------------- /test_result/779b2e16-28b5-4ee4-a5ec-9ffd1cb9fdb0-attachment.txt: -------------------------------------------------------------------------------- 1 | INFO root:log_util.py:16 接口用例数据:[1.0, '博文内容更新成功', 'http://39.100.104.214:8080', '/update/', 'put', '{"userid":${userid}, "token": "${token}", "articleId":${articleId}, "title":"python", "content":"test test"}', '"update_time":', '', '', ''] 2 | INFO root:log_util.py:16 请求原始数据:{"userid":${userid}, "token": "${token}", "articleId":${articleId}, "title":"python", "content":"test test"} 3 | INFO root:log_util.py:16 请求数据预处理结果:{"userid":343, "token": "5d31e610094e895e9411d9dddec35055", "articleId":143, "title":"python", "content":"test test"} 4 | INFO root:log_util.py:16 接口调用成功! 5 | INFO root:log_util.py:16 响应数据:{"articleId": 143, "update_time": "2021-08-26 00:23:05", "code": "00", "userid": 343} 6 | INFO root:log_util.py:16 无关联参数提取.. 7 | INFO root:log_util.py:16 【"update_time":】关键字断言成功【{"articleId": 143, "update_time": "2021-08-26 00:23:05", "code": "00", "userid": 343}】 -------------------------------------------------------------------------------- /test_result/7dc69f04-0038-4564-909d-cba1d69dfe64-result.json: -------------------------------------------------------------------------------- 1 | {"name": "创建博文", "status": "passed", "description": "通过接口创建博文", "steps": [{"name": "读取请求数据,调用接口", "status": "passed", "start": 1629908583737, "stop": 1629908583894}, {"name": "获取响应数据,进行断言", "status": "passed", "start": 1629908583895, "stop": 1629908583895}], "attachments": [{"name": "log", "source": "f07a7ae1-d797-4139-9a19-17e2940e6cc8-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "case_data", "value": "[1.0, '创建博文成功', 'http://39.100.104.214:8080', '/create/', 'post', '{\"userid\":${userid}, \"token\":\"${token}\", \"title\":\"title test\", \"content\":\"content test\"}', '\"code\": \"00\"', '', '', '']"}], "start": 1629908583737, "stop": 1629908583896, "uuid": "61b4a48e-b360-41ad-97c2-aa267aa958b7", "historyId": "6b1f6a954615e6829a4d01c4e25bb7cd", "testCaseId": "480dec29853ff5cdc60466f64a4e7c35", "fullName": "test_case.test_edit_module.TestEditModule#test_create", "labels": [{"name": "severity", "value": "critical"}, {"name": "feature", "value": "编辑模块"}, {"name": "story", "value": "博文创建功能"}, {"name": "tag", "value": "dependency(name='TestEditModule', depends=['TestLoginModule'], scope='package')"}, {"name": "tag", "value": "run(order=3)"}, {"name": "parentSuite", "value": "test_case"}, {"name": "suite", "value": "test_edit_module"}, {"name": "subSuite", "value": "TestEditModule"}, {"name": "host", "value": "DESKTOP-13387BR"}, {"name": "thread", "value": "7388-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_case.test_edit_module"}]} -------------------------------------------------------------------------------- /test_result/8ffaeddc-e78e-4a60-b543-8fe35ec9dac7-result.json: -------------------------------------------------------------------------------- 1 | {"name": "查看博文内容", "status": "passed", "description": "通过接口查看博文内容", "steps": [{"name": "读取请求数据,调用接口", "status": "passed", "start": 1629908584525, "stop": 1629908584677}, {"name": "获取响应数据,进行断言", "status": "passed", "start": 1629908584677, "stop": 1629908584678}], "attachments": [{"name": "log", "source": "94984d21-224e-43cf-9bb8-41ff30447914-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "case_data", "value": "[2.0, 'articleId有误,查询失败', 'http://39.100.104.214:8080', '/getBlogContent/1234', 'get', '', '\"code\": \"03\"', '', '', '']"}], "start": 1629908584525, "stop": 1629908584678, "uuid": "9447cb83-1c13-44b8-9459-9bb071fad7fb", "historyId": "416b196eb12787a78916dd535df9932e", "testCaseId": "3c1ad54966919616cefd221d9beb572c", "fullName": "test_case.test_edit_module.TestEditModule#test_blog_content_search", "labels": [{"name": "severity", "value": "critical"}, {"name": "feature", "value": "编辑模块"}, {"name": "story", "value": "博文内容查询功能"}, {"name": "tag", "value": "dependency(name='TestEditModule', depends=['TestLoginModule'], scope='package')"}, {"name": "tag", "value": "run(order=5)"}, {"name": "parentSuite", "value": "test_case"}, {"name": "suite", "value": "test_edit_module"}, {"name": "subSuite", "value": "TestEditModule"}, {"name": "host", "value": "DESKTOP-13387BR"}, {"name": "thread", "value": "7388-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_case.test_edit_module"}]} -------------------------------------------------------------------------------- /test_result/94984d21-224e-43cf-9bb8-41ff30447914-attachment.txt: -------------------------------------------------------------------------------- 1 | INFO root:log_util.py:16 接口用例数据:[2.0, 'articleId有误,查询失败', 'http://39.100.104.214:8080', '/getBlogContent/1234', 'get', '', '"code": "03"', '', '', ''] 2 | INFO root:log_util.py:16 请求原始数据:/getBlogContent/1234 3 | INFO root:log_util.py:16 请求数据预处理结果:/getBlogContent/1234 4 | INFO root:log_util.py:16 接口调用成功! 5 | INFO root:log_util.py:16 响应数据:{"code": "03", "articleId": "1234"} 6 | INFO root:log_util.py:16 无关联参数提取.. 7 | INFO root:log_util.py:16 【"code": "03"】关键字断言成功【{"code": "03", "articleId": "1234"}】 -------------------------------------------------------------------------------- /test_result/978d6878-f432-4bca-be8f-294eae0af00b-result.json: -------------------------------------------------------------------------------- 1 | {"name": "更新博文内容", "status": "passed", "description": "通过接口更新博文内容", "steps": [{"name": "读取请求数据,调用接口", "status": "passed", "start": 1629908584690, "stop": 1629908584842}, {"name": "获取响应数据,进行断言", "status": "passed", "start": 1629908584842, "stop": 1629908584843}], "attachments": [{"name": "log", "source": "779b2e16-28b5-4ee4-a5ec-9ffd1cb9fdb0-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "case_data", "value": "[1.0, '博文内容更新成功', 'http://39.100.104.214:8080', '/update/', 'put', '{\"userid\":${userid}, \"token\": \"${token}\", \"articleId\":${articleId}, \"title\":\"python\", \"content\":\"test test\"}', '\"update_time\":', '', '', '']"}], "start": 1629908584689, "stop": 1629908584843, "uuid": "9b1c65eb-e8b9-4c10-85d6-c1af688a2e90", "historyId": "46a0e2eef5067b91b46ef2f9551d0783", "testCaseId": "59b4dfda70a4559f50f3f52664262b57", "fullName": "test_case.test_edit_module.TestEditModule#test_blog_content_update", "labels": [{"name": "story", "value": "博文内容更新功能"}, {"name": "severity", "value": "critical"}, {"name": "feature", "value": "编辑模块"}, {"name": "tag", "value": "dependency(name='TestEditModule', depends=['TestLoginModule'], scope='package')"}, {"name": "tag", "value": "run(order=6)"}, {"name": "parentSuite", "value": "test_case"}, {"name": "suite", "value": "test_edit_module"}, {"name": "subSuite", "value": "TestEditModule"}, {"name": "host", "value": "DESKTOP-13387BR"}, {"name": "thread", "value": "7388-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_case.test_edit_module"}]} -------------------------------------------------------------------------------- /test_result/9a60667f-33f3-4fff-a023-0567b2ca4aa3-result.json: -------------------------------------------------------------------------------- 1 | {"name": "批量查询博文", "status": "passed", "description": "通过接口批量查询博文", "steps": [{"name": "读取请求数据,调用接口", "status": "passed", "start": 1629908585045, "stop": 1629908585224}, {"name": "获取响应数据,进行断言", "status": "passed", "start": 1629908585224, "stop": 1629908585225}], "attachments": [{"name": "log", "source": "d52db718-67af-4bce-a8ea-19bcf7673999-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "case_data", "value": "[1.0, '博文批量查询成功', 'http://39.100.104.214:8080', '/getBlogsContent/articleIds=${articleId}', 'get', '', '\"code\": \"00\"', '', '', '']"}], "start": 1629908585045, "stop": 1629908585225, "uuid": "5caf7120-f7dc-491f-ab4a-8769e50b672a", "historyId": "9d19b71007895959926a1af082521df3", "testCaseId": "fb6fbc0404b3eaf8a605f7e683f84c38", "fullName": "test_case.test_edit_module.TestEditModule#test_blog_batch_search", "labels": [{"name": "feature", "value": "编辑模块"}, {"name": "severity", "value": "critical"}, {"name": "story", "value": "批量查询博文功能"}, {"name": "tag", "value": "dependency(name='TestEditModule', depends=['TestLoginModule'], scope='package')"}, {"name": "tag", "value": "run(order=7)"}, {"name": "parentSuite", "value": "test_case"}, {"name": "suite", "value": "test_edit_module"}, {"name": "subSuite", "value": "TestEditModule"}, {"name": "host", "value": "DESKTOP-13387BR"}, {"name": "thread", "value": "7388-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_case.test_edit_module"}]} -------------------------------------------------------------------------------- /test_result/9a8f1331-6175-4f3b-9811-e8594b233fd6-attachment.txt: -------------------------------------------------------------------------------- 1 | INFO root:log_util.py:16 接口用例数据:[1.0, '博文内容查询成功', 'http://39.100.104.214:8080', '/getBlogContent/${articleId}', 'get', '', '"content": "content test"', '', '', ''] 2 | INFO root:log_util.py:16 请求原始数据:/getBlogContent/${articleId} 3 | INFO root:log_util.py:16 请求数据预处理结果:/getBlogContent/143 4 | INFO root:log_util.py:16 接口调用成功! 5 | INFO root:log_util.py:16 响应数据:{"code": "00", "data": [{"update_time": null, "title": "title test", "content": "content test", "articleId": 143, "owner": 343, "posted_on": "2021-08-26 00:23:04"}]} 6 | INFO root:log_util.py:16 无关联参数提取.. 7 | INFO root:log_util.py:16 【"content": "content test"】关键字断言成功【{"code": "00", "data": [{"update_time": null, "title": "title test", "content": "content test", "articleId": 143, "owner": 343, "posted_on": "2021-08-26 00:23:04"}]}】 -------------------------------------------------------------------------------- /test_result/9b968bd8-6146-41ad-8259-248d87536899-attachment.txt: -------------------------------------------------------------------------------- 1 | INFO root:log_util.py:16 接口用例数据:[2.0, '用户名重复,注册失败', 'http://39.100.104.214:8080', '/register/', 'post', '{"username":"juno${unique_num1}","password":"juno999999","email":"juno123@qq.com"}', '"code": "01"', '', '', ''] 2 | INFO root:log_util.py:16 请求原始数据:{"username":"juno${unique_num1}","password":"juno999999","email":"juno123@qq.com"} 3 | INFO root:log_util.py:16 请求数据预处理结果:{"username":"juno30307","password":"juno999999","email":"juno123@qq.com"} 4 | INFO root:log_util.py:16 接口调用成功! 5 | INFO root:log_util.py:16 响应数据:{"username": "juno30307", "code": "01"} 6 | INFO root:log_util.py:16 无关联参数提取.. 7 | INFO root:log_util.py:16 【"code": "01"】关键字断言成功【{"username": "juno30307", "code": "01"}】 -------------------------------------------------------------------------------- /test_result/9c228662-32f1-4b68-9dc7-0bab62f80428-attachment.txt: -------------------------------------------------------------------------------- 1 | INFO root:log_util.py:16 接口用例数据:[2.0, 'token有误,更新失败', 'http://39.100.104.214:8080', '/delete/', 'post', '{"userid":${userid}, "token": "123", "articleId":[]}', '"code": "03"', '', '', ''] 2 | INFO root:log_util.py:16 请求原始数据:{"userid":${userid}, "token": "123", "articleId":[]} 3 | INFO root:log_util.py:16 请求数据预处理结果:{"userid":343, "token": "123", "articleId":[]} 4 | INFO root:log_util.py:16 接口调用成功! 5 | INFO root:log_util.py:16 响应数据:{"code": "03", "userid": 343} 6 | INFO root:log_util.py:16 无关联参数提取.. 7 | INFO root:log_util.py:16 【"code": "03"】关键字断言成功【{"code": "03", "userid": 343}】 -------------------------------------------------------------------------------- /test_result/9e30fa4d-3ca8-427e-b073-36692594b847-container.json: -------------------------------------------------------------------------------- 1 | {"uuid": "06b76223-931e-459b-80f6-20fa15682e1f", "befores": [{"name": "case_data", "status": "passed", "start": 1629908584688, "stop": 1629908584688}], "start": 1629908584688, "stop": 1629908584844} -------------------------------------------------------------------------------- /test_result/9f46f864-c347-4654-8dd0-40cb238d8437-attachment.txt: -------------------------------------------------------------------------------- 1 | INFO root:log_util.py:16 接口用例数据:[1.0, '博文删除成功', 'http://39.100.104.214:8080', '/delete/', 'post', '{"userid":${userid}, "token": "${token}", "articleId":[${articleId}]}', '"code": "00"', '', '', ''] 2 | INFO root:log_util.py:16 请求原始数据:{"userid":${userid}, "token": "${token}", "articleId":[${articleId}]} 3 | INFO root:log_util.py:16 请求数据预处理结果:{"userid":343, "token": "5d31e610094e895e9411d9dddec35055", "articleId":[143]} 4 | INFO root:log_util.py:16 接口调用成功! 5 | INFO root:log_util.py:16 响应数据:{"articleId": [143], "code": "00", "userid": 343} 6 | INFO root:log_util.py:16 无关联参数提取.. 7 | INFO root:log_util.py:16 【"code": "00"】关键字断言成功【{"articleId": [143], "code": "00", "userid": 343}】 -------------------------------------------------------------------------------- /test_result/a2a9f264-282a-4ee6-a127-3fdebd51f8d0-result.json: -------------------------------------------------------------------------------- 1 | {"name": "查看用户博文", "status": "passed", "description": "通过接口查看用户所有博文", "steps": [{"name": "读取请求数据,调用接口", "status": "passed", "start": 1629908584079, "stop": 1629908584226}, {"name": "获取响应数据,进行断言", "status": "passed", "start": 1629908584226, "stop": 1629908584227}], "attachments": [{"name": "log", "source": "db5d2c79-1193-4cfe-be2b-f0a2645c2578-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "case_data", "value": "[1.0, '用户存在博文,查询成功', 'http://39.100.104.214:8080', '/getBlogsOfUser/', 'post', '{\"userid\":${userid}, \"token\":\"${token}\"}', '\"title\"', 'articleId', '', '']"}], "start": 1629908584078, "stop": 1629908584227, "uuid": "bf4bddaf-00f5-4088-93ae-89dec026762e", "historyId": "7f57de9a858aed2e031bad4829d17741", "testCaseId": "b84aed3947d2ca66b2dc10fe3ad9e25f", "fullName": "test_case.test_edit_module.TestEditModule#test_user_blog_search", "labels": [{"name": "severity", "value": "critical"}, {"name": "feature", "value": "编辑模块"}, {"name": "story", "value": "用户博文查询功能"}, {"name": "tag", "value": "dependency(name='TestEditModule', depends=['TestLoginModule'], scope='package')"}, {"name": "tag", "value": "run(order=4)"}, {"name": "parentSuite", "value": "test_case"}, {"name": "suite", "value": "test_edit_module"}, {"name": "subSuite", "value": "TestEditModule"}, {"name": "host", "value": "DESKTOP-13387BR"}, {"name": "thread", "value": "7388-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_case.test_edit_module"}]} -------------------------------------------------------------------------------- /test_result/a8ec81ed-e814-40af-9e19-d30af4515340-attachment.txt: -------------------------------------------------------------------------------- 1 | INFO root:log_util.py:16 接口用例数据:[2.0, '登录成功', 'http://39.100.104.214:8080', '/login/', 'post', '{"username":"juno${unique_num2}","password":"${md5(\'juno999999\')}"}', '"token"', 'token', '', ''] 2 | INFO root:log_util.py:16 请求原始数据:{"username":"juno${unique_num2}","password":"${md5('juno999999')}"} 3 | INFO root:log_util.py:16 请求数据预处理结果:{"username":"juno30308","password":"4c1c1924ad2ba4d1136acee44a1b39a2"} 4 | INFO root:log_util.py:16 接口调用成功! 5 | INFO root:log_util.py:16 响应数据:{"token": "5d31e610094e895e9411d9dddec35055", "code": "00", "userid": 343, "login_time": "2021-08-26 00:23:03"} 6 | INFO root:log_util.py:16 关联参数提取成功:【token: 5d31e610094e895e9411d9dddec35055】 7 | INFO root:log_util.py:16 【"token"】关键字断言成功【{"token": "5d31e610094e895e9411d9dddec35055", "code": "00", "userid": 343, "login_time": "2021-08-26 00:23:03"}】 -------------------------------------------------------------------------------- /test_result/b3199980-1cd3-4175-af33-a8fa5e020aa7-attachment.txt: -------------------------------------------------------------------------------- 1 | INFO root:log_util.py:16 接口用例数据:[1.0, '登录成功', 'http://39.100.104.214:8080', '/login/', 'post', '{"username":"juno${unique_num1}","password":"${md5(\'juno999999\')}"}', '"token"', 'token', '', ''] 2 | INFO root:log_util.py:16 请求原始数据:{"username":"juno${unique_num1}","password":"${md5('juno999999')}"} 3 | INFO root:log_util.py:16 请求数据预处理结果:{"username":"juno30307","password":"4c1c1924ad2ba4d1136acee44a1b39a2"} 4 | INFO root:log_util.py:16 接口调用成功! 5 | INFO root:log_util.py:16 响应数据:{"token": "40d119989ff39d2f077ac4f14241e053", "code": "00", "userid": 342, "login_time": "2021-08-26 00:23:03"} 6 | INFO root:log_util.py:16 关联参数提取成功:【token: 40d119989ff39d2f077ac4f14241e053】 7 | INFO root:log_util.py:16 【"token"】关键字断言成功【{"token": "40d119989ff39d2f077ac4f14241e053", "code": "00", "userid": 342, "login_time": "2021-08-26 00:23:03"}】 -------------------------------------------------------------------------------- /test_result/b77e1f77-57b6-4a22-a3c6-0af74b777c4c-result.json: -------------------------------------------------------------------------------- 1 | {"name": "用户注册", "status": "passed", "description": "通过接口进行用户注册", "steps": [{"name": "读取请求数据,调用接口", "status": "passed", "start": 1629908582630, "stop": 1629908583082}, {"name": "获取响应数据,进行断言", "status": "passed", "start": 1629908583082, "stop": 1629908583083}], "attachments": [{"name": "log", "source": "9b968bd8-6146-41ad-8259-248d87536899-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "case_data", "value": "[2.0, '用户名重复,注册失败', 'http://39.100.104.214:8080', '/register/', 'post', '{\"username\":\"juno${unique_num1}\",\"password\":\"juno999999\",\"email\":\"juno123@qq.com\"}', '\"code\": \"01\"', '', '', '']"}], "start": 1629908582629, "stop": 1629908583083, "uuid": "820ddfb6-3cf7-4e54-b0aa-bcc8c9f4f156", "historyId": "13a0acdd59b00e1a0f6d06b7d22e1536", "testCaseId": "9185d2e2663b3a955ae391f6b8748eb5", "fullName": "test_case.test_login_module.TestLoginModule#test_register", "labels": [{"name": "feature", "value": "登录模块"}, {"name": "story", "value": "注册功能"}, {"name": "severity", "value": "blocker"}, {"name": "tag", "value": "dependency(name='TestLoginModule')"}, {"name": "tag", "value": "run(order=1)"}, {"name": "parentSuite", "value": "test_case"}, {"name": "suite", "value": "test_login_module"}, {"name": "subSuite", "value": "TestLoginModule"}, {"name": "host", "value": "DESKTOP-13387BR"}, {"name": "thread", "value": "7388-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_case.test_login_module"}]} -------------------------------------------------------------------------------- /test_result/c2736481-ce73-47f6-aa78-052dd17c6526-attachment.txt: -------------------------------------------------------------------------------- 1 | INFO root:log_util.py:16 接口用例数据:[1.0, '注册成功', 'http://39.100.104.214:8080', '/register/', 'post', '{"username":"juno${get_unique_num1}","password":"juno999999","email":"juno123@qq.com"}', '"code": "00"', 'userid', '', ''] 2 | INFO root:log_util.py:16 请求原始数据:{"username":"juno${get_unique_num1}","password":"juno999999","email":"juno123@qq.com"} 3 | INFO root:log_util.py:16 请求数据预处理结果:{"username":"juno30307","password":"juno999999","email":"juno123@qq.com"} 4 | INFO root:log_util.py:16 接口调用成功! 5 | INFO root:log_util.py:16 响应数据:{"code": "00", "userid": 342} 6 | INFO root:log_util.py:16 关联参数提取成功:【userid: 342】 7 | INFO root:log_util.py:16 【"code": "00"】关键字断言成功【{"code": "00", "userid": 342}】 -------------------------------------------------------------------------------- /test_result/ce12d212-8dc3-42a7-9d11-d9c989477190-container.json: -------------------------------------------------------------------------------- 1 | {"uuid": "9e6626c3-3a10-47e7-a7c5-049b203a8820", "befores": [{"name": "case_data", "status": "passed", "start": 1629908582175, "stop": 1629908582175}], "start": 1629908582175, "stop": 1629908582617} -------------------------------------------------------------------------------- /test_result/d52db718-67af-4bce-a8ea-19bcf7673999-attachment.txt: -------------------------------------------------------------------------------- 1 | INFO root:log_util.py:16 接口用例数据:[1.0, '博文批量查询成功', 'http://39.100.104.214:8080', '/getBlogsContent/articleIds=${articleId}', 'get', '', '"code": "00"', '', '', ''] 2 | INFO root:log_util.py:16 请求原始数据:/getBlogsContent/articleIds=${articleId} 3 | INFO root:log_util.py:16 请求数据预处理结果:/getBlogsContent/articleIds=143 4 | INFO root:log_util.py:16 接口调用成功! 5 | INFO root:log_util.py:16 响应数据:{"code": "00", "data": [{"update_time": "2021-08-26 00:23:05", "title": "python", "content": "test test", "articleId": 143, "owner": 343, "posted_on": "2021-08-26 00:23:04"}]} 6 | INFO root:log_util.py:16 无关联参数提取.. 7 | INFO root:log_util.py:16 【"code": "00"】关键字断言成功【{"code": "00", "data": [{"update_time": "2021-08-26 00:23:05", "title": "python", "content": "test test", "articleId": 143, "owner": 343, "posted_on": "2021-08-26 00:23:04"}]}】 -------------------------------------------------------------------------------- /test_result/d5937f42-3ff8-40d0-b2c3-011f28adfc09-result.json: -------------------------------------------------------------------------------- 1 | {"name": "删除博文", "status": "passed", "description": "通过接口删除博文", "steps": [{"name": "读取请求数据,调用接口", "status": "passed", "start": 1629908585528, "stop": 1629908585761}, {"name": "获取响应数据,进行断言", "status": "passed", "start": 1629908585762, "stop": 1629908585762}], "attachments": [{"name": "log", "source": "9c228662-32f1-4b68-9dc7-0bab62f80428-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "case_data", "value": "[2.0, 'token有误,更新失败', 'http://39.100.104.214:8080', '/delete/', 'post', '{\"userid\":${userid}, \"token\": \"123\", \"articleId\":[]}', '\"code\": \"03\"', '', '', '']"}], "start": 1629908585528, "stop": 1629908585763, "uuid": "c51492ac-af37-4676-a5b1-e6722e454b8c", "historyId": "d05ee58a25da395bb3ae0b1270c84483", "testCaseId": "64170a0a54ac869987a24fd4ddddeb22", "fullName": "test_case.test_edit_module.TestEditModule#test_delete", "labels": [{"name": "story", "value": "博文删除功能"}, {"name": "severity", "value": "critical"}, {"name": "feature", "value": "编辑模块"}, {"name": "tag", "value": "dependency(name='TestEditModule', depends=['TestLoginModule'], scope='package')"}, {"name": "tag", "value": "run(order=8)"}, {"name": "parentSuite", "value": "test_case"}, {"name": "suite", "value": "test_edit_module"}, {"name": "subSuite", "value": "TestEditModule"}, {"name": "host", "value": "DESKTOP-13387BR"}, {"name": "thread", "value": "7388-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_case.test_edit_module"}]} -------------------------------------------------------------------------------- /test_result/d6ed73fc-d53e-4c50-9f7f-82fbe72a6800-attachment.txt: -------------------------------------------------------------------------------- 1 | INFO root:log_util.py:16 接口用例数据:[3.0, '密码错误,登录成功', 'http://39.100.104.214:8080', '/login/', 'post', '{"username":"juno${unique_num2}","password":"juno999999"}', '"code": "03"', '', '', ''] 2 | INFO root:log_util.py:16 请求原始数据:{"username":"juno${unique_num2}","password":"juno999999"} 3 | INFO root:log_util.py:16 请求数据预处理结果:{"username":"juno30308","password":"juno999999"} 4 | INFO root:log_util.py:16 接口调用成功! 5 | INFO root:log_util.py:16 响应数据:{"code": "03", "params": {"username": "juno30308", "password": "juno999999"}} 6 | INFO root:log_util.py:16 无关联参数提取.. 7 | INFO root:log_util.py:16 【"code": "03"】关键字断言成功【{"code": "03", "params": {"username": "juno30308", "password": "juno999999"}}】 -------------------------------------------------------------------------------- /test_result/db5d2c79-1193-4cfe-be2b-f0a2645c2578-attachment.txt: -------------------------------------------------------------------------------- 1 | INFO root:log_util.py:16 接口用例数据:[1.0, '用户存在博文,查询成功', 'http://39.100.104.214:8080', '/getBlogsOfUser/', 'post', '{"userid":${userid}, "token":"${token}"}', '"title"', 'articleId', '', ''] 2 | INFO root:log_util.py:16 请求原始数据:{"userid":${userid}, "token":"${token}"} 3 | INFO root:log_util.py:16 请求数据预处理结果:{"userid":343, "token":"5d31e610094e895e9411d9dddec35055"} 4 | INFO root:log_util.py:16 接口调用成功! 5 | INFO root:log_util.py:16 响应数据:{"data": [{"update_time": null, "title": "title test", "content": "content test", "articleId": 143, "owner": 343, "posted_on": "2021-08-26 00:23:04"}], "code": "00", "userid": 343} 6 | INFO root:log_util.py:16 关联参数提取成功:【articleId: 143】 7 | INFO root:log_util.py:16 【"title"】关键字断言成功【{"data": [{"update_time": null, "title": "title test", "content": "content test", "articleId": 143, "owner": 343, "posted_on": "2021-08-26 00:23:04"}], "code": "00", "userid": 343}】 -------------------------------------------------------------------------------- /test_result/de5763a9-6dd1-4a17-aa62-0171b0ce1d97-container.json: -------------------------------------------------------------------------------- 1 | {"uuid": "d814817e-db62-4676-b932-ad534639b8a3", "befores": [{"name": "case_data", "status": "passed", "start": 1629908583736, "stop": 1629908583736}], "start": 1629908583736, "stop": 1629908583897} -------------------------------------------------------------------------------- /test_result/e4b40619-7281-4ba9-8d49-55419690e526-container.json: -------------------------------------------------------------------------------- 1 | {"uuid": "1dc1f244-97ac-43f8-bc38-feb9a43a23f2", "befores": [{"name": "case_data", "status": "passed", "start": 1629908585044, "stop": 1629908585044}], "start": 1629908585044, "stop": 1629908585227} -------------------------------------------------------------------------------- /test_result/e77e2185-78c7-4fd2-8238-3f43c11948bd-result.json: -------------------------------------------------------------------------------- 1 | {"name": "批量查询博文", "status": "passed", "description": "通过接口批量查询博文", "steps": [{"name": "读取请求数据,调用接口", "status": "passed", "start": 1629908585237, "stop": 1629908585366}, {"name": "获取响应数据,进行断言", "status": "passed", "start": 1629908585366, "stop": 1629908585367}], "attachments": [{"name": "log", "source": "51f064bd-353f-49f8-82c2-94b97c4b1fbf-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "case_data", "value": "[2.0, 'articleId有误,博文批量查询失败', 'http://39.100.104.214:8080', '/getBlogsContent/articleIds=null', 'get', '', '\"code\": \"999\"', '', '', '']"}], "start": 1629908585237, "stop": 1629908585367, "uuid": "d038a52c-02a2-4af9-8a02-499a933b11ed", "historyId": "da9df48f48cd30eea94b53d841a283ca", "testCaseId": "fb6fbc0404b3eaf8a605f7e683f84c38", "fullName": "test_case.test_edit_module.TestEditModule#test_blog_batch_search", "labels": [{"name": "feature", "value": "编辑模块"}, {"name": "severity", "value": "critical"}, {"name": "story", "value": "批量查询博文功能"}, {"name": "tag", "value": "dependency(name='TestEditModule', depends=['TestLoginModule'], scope='package')"}, {"name": "tag", "value": "run(order=7)"}, {"name": "parentSuite", "value": "test_case"}, {"name": "suite", "value": "test_edit_module"}, {"name": "subSuite", "value": "TestEditModule"}, {"name": "host", "value": "DESKTOP-13387BR"}, {"name": "thread", "value": "7388-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_case.test_edit_module"}]} -------------------------------------------------------------------------------- /test_result/e7db5765-059d-414c-947c-11a4a8845fdd-container.json: -------------------------------------------------------------------------------- 1 | {"uuid": "d51b226b-76cf-44fb-9893-86c1a58bc26f", "befores": [{"name": "case_data", "status": "passed", "start": 1629908584523, "stop": 1629908584524}], "start": 1629908584523, "stop": 1629908584679} -------------------------------------------------------------------------------- /test_result/e876952e-1082-4c46-af1e-17ec42587d64-result.json: -------------------------------------------------------------------------------- 1 | {"name": "删除博文", "status": "passed", "description": "通过接口删除博文", "steps": [{"name": "读取请求数据,调用接口", "status": "passed", "start": 1629908585379, "stop": 1629908585514}, {"name": "获取响应数据,进行断言", "status": "passed", "start": 1629908585514, "stop": 1629908585515}], "attachments": [{"name": "log", "source": "9f46f864-c347-4654-8dd0-40cb238d8437-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "case_data", "value": "[1.0, '博文删除成功', 'http://39.100.104.214:8080', '/delete/', 'post', '{\"userid\":${userid}, \"token\": \"${token}\", \"articleId\":[${articleId}]}', '\"code\": \"00\"', '', '', '']"}], "start": 1629908585378, "stop": 1629908585515, "uuid": "946f5d67-8788-450d-8bae-ce2b27e951b2", "historyId": "4baf0c524b3f3405bef804d98d2e4f9d", "testCaseId": "64170a0a54ac869987a24fd4ddddeb22", "fullName": "test_case.test_edit_module.TestEditModule#test_delete", "labels": [{"name": "story", "value": "博文删除功能"}, {"name": "severity", "value": "critical"}, {"name": "feature", "value": "编辑模块"}, {"name": "tag", "value": "dependency(name='TestEditModule', depends=['TestLoginModule'], scope='package')"}, {"name": "tag", "value": "run(order=8)"}, {"name": "parentSuite", "value": "test_case"}, {"name": "suite", "value": "test_edit_module"}, {"name": "subSuite", "value": "TestEditModule"}, {"name": "host", "value": "DESKTOP-13387BR"}, {"name": "thread", "value": "7388-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_case.test_edit_module"}]} -------------------------------------------------------------------------------- /test_result/e8a8c5d1-131b-4724-9a7a-4fcc08c6ee95-container.json: -------------------------------------------------------------------------------- 1 | {"uuid": "27e2485e-55da-480d-8c69-202ccab5f1e6", "befores": [{"name": "case_data", "status": "passed", "start": 1629908584077, "stop": 1629908584077}], "start": 1629908584077, "stop": 1629908584229} -------------------------------------------------------------------------------- /test_result/f07a7ae1-d797-4139-9a19-17e2940e6cc8-attachment.txt: -------------------------------------------------------------------------------- 1 | INFO root:log_util.py:16 接口用例数据:[1.0, '创建博文成功', 'http://39.100.104.214:8080', '/create/', 'post', '{"userid":${userid}, "token":"${token}", "title":"title test", "content":"content test"}', '"code": "00"', '', '', ''] 2 | INFO root:log_util.py:16 请求原始数据:{"userid":${userid}, "token":"${token}", "title":"title test", "content":"content test"} 3 | INFO root:log_util.py:16 请求数据预处理结果:{"userid":343, "token":"5d31e610094e895e9411d9dddec35055", "title":"title test", "content":"content test"} 4 | INFO root:log_util.py:16 接口调用成功! 5 | INFO root:log_util.py:16 响应数据:{"data": [{"content": "content test", "title": "title test"}], "code": "00", "userid": 343} 6 | INFO root:log_util.py:16 无关联参数提取.. 7 | INFO root:log_util.py:16 【"code": "00"】关键字断言成功【{"data": [{"content": "content test", "title": "title test"}], "code": "00", "userid": 343}】 -------------------------------------------------------------------------------- /test_result/f1f0997f-f2ca-427f-8b72-d0b4a86d5b7c-result.json: -------------------------------------------------------------------------------- 1 | {"name": "用户登录", "status": "passed", "description": "通过接口进行用户登录", "steps": [{"name": "读取请求数据,调用接口", "status": "passed", "start": 1629908583600, "stop": 1629908583723}, {"name": "获取响应数据,进行断言", "status": "passed", "start": 1629908583723, "stop": 1629908583724}], "attachments": [{"name": "log", "source": "d6ed73fc-d53e-4c50-9f7f-82fbe72a6800-attachment.txt", "type": "text/plain"}], "parameters": [{"name": "case_data", "value": "[3.0, '密码错误,登录成功', 'http://39.100.104.214:8080', '/login/', 'post', '{\"username\":\"juno${unique_num2}\",\"password\":\"juno999999\"}', '\"code\": \"03\"', '', '', '']"}], "start": 1629908583600, "stop": 1629908583724, "uuid": "2217f704-2942-41ec-8bcb-6f32441a4713", "historyId": "5f9293329904e63832e3b1d10c6d286e", "testCaseId": "ac7c256b846c3db8122097909f6dbfef", "fullName": "test_case.test_login_module.TestLoginModule#test_login", "labels": [{"name": "story", "value": "登录功能"}, {"name": "feature", "value": "登录模块"}, {"name": "severity", "value": "blocker"}, {"name": "tag", "value": "dependency(name='TestLoginModule')"}, {"name": "tag", "value": "run(order=2)"}, {"name": "parentSuite", "value": "test_case"}, {"name": "suite", "value": "test_login_module"}, {"name": "subSuite", "value": "TestLoginModule"}, {"name": "host", "value": "DESKTOP-13387BR"}, {"name": "thread", "value": "7388-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_case.test_login_module"}]} -------------------------------------------------------------------------------- /test_result/f32a694f-543d-490f-897f-7bfd8524deb2-container.json: -------------------------------------------------------------------------------- 1 | {"uuid": "6c4d0019-ff11-4c71-aab0-9b95bf031121", "befores": [{"name": "case_data", "status": "passed", "start": 1629908583273, "stop": 1629908583273}], "start": 1629908583273, "stop": 1629908583427} -------------------------------------------------------------------------------- /util/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juno3550/InterfaceAutoTestWithPytest/f050e71a9f7cf5e3ee3697d3d1b47b83e6bd442a/util/__init__.py -------------------------------------------------------------------------------- /util/assert_util.py: -------------------------------------------------------------------------------- 1 | import traceback 2 | import logging 3 | 4 | 5 | # 封装断言功能 6 | def assert_keyword(response, keyword): 7 | keyword_list = keyword.split("|") 8 | for keyword in keyword_list: 9 | try: 10 | assert keyword.strip() in response.text 11 | logging.info("【%s】关键字断言成功【%s】" % (keyword, response.text)) 12 | except: 13 | logging.error("【%s】关键字断言失败【%s】" % (keyword, response.text)) 14 | logging.error(traceback.format_exc()) 15 | raise 16 | -------------------------------------------------------------------------------- /util/excel_util.py: -------------------------------------------------------------------------------- 1 | import xlrd 2 | import traceback 3 | import logging 4 | from util.global_var import * 5 | 6 | 7 | class ExcelUtil: 8 | 9 | # Excel文件初始化 10 | def __init__(self, file_name): 11 | try: 12 | self.wb = xlrd.open_workbook(file_name) 13 | except: 14 | logging.error("Excel初始化失败:【%s】" % file_name) 15 | logging.error(traceback.format_exc()) 16 | raise 17 | 18 | # 根据sheet名获取所有行的用例数据 19 | def get_sheet_data(self, sheet_name): 20 | try: 21 | self.sheet = self.wb.sheet_by_name(sheet_name) 22 | except: 23 | logging.error("Sheet测试数据读取失败:【%s】" % sheet_name) 24 | logging.error(traceback.format_exc()) 25 | raise 26 | else: 27 | result = [] 28 | for row_index in range(1, self.sheet.nrows): # 去除标题行 29 | result.append(self.sheet.row_values(row_index)) 30 | if len(result) < 1: 31 | logging.info("【%s】测试数据为空,无需执行" % sheet_name) 32 | return result 33 | 34 | 35 | excel_util = ExcelUtil(TEST_CASE_DATA_DIR) 36 | 37 | 38 | if __name__ == "__main__": 39 | print(excel_util.get_sheet_data("用例名称")) -------------------------------------------------------------------------------- /util/global_var.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | 4 | # 工程根目录 5 | PROJECT_ROOT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) 6 | 7 | # 维护唯一数参数的文件路径 8 | UNIQUE_NUM_FILE_PATH = os.path.join(PROJECT_ROOT_DIR, "conf", "unique_num.txt") 9 | 10 | # 测试用例文件存放目录 11 | TEST_CASE_DATA_DIR = os.path.join(PROJECT_ROOT_DIR, "test_data", "test_case_data.xlsx") 12 | 13 | # 维护一个参数化全局变量:供接口关联使用 14 | PARAM_GLOBAL_DICT = {} 15 | 16 | # 日志配置文件路径 17 | LOG_CONF_FILE_PATH = os.path.join(PROJECT_ROOT_DIR, "conf", "logger.conf") 18 | 19 | # 测试用例数据列号 20 | API_IP = 2 21 | API_URI = 3 22 | REQUEST_METHOD = 4 23 | API_REQUEST_DATA = 5 24 | RESPONSE_ASSERT_KEYWORD = 6 25 | RESPONSE_EXTRACT_VAR = 7 26 | REQUEST_HEADER = 8 27 | REQUEST_COOKIE = 9 28 | 29 | 30 | if __name__ == "__main__": 31 | print(PROJECT_ROOT_DIR) 32 | print(LOG_CONF_FILE_PATH) -------------------------------------------------------------------------------- /util/json_util.py: -------------------------------------------------------------------------------- 1 | import json 2 | import traceback 3 | import logging 4 | 5 | 6 | # JSON 处理功能 7 | class JsonHandler: 8 | 9 | # 将json串转成字典对象 10 | @staticmethod 11 | def json_to_dict(json_str): 12 | try: 13 | return json.loads(json_str, encoding="utf-8") 14 | except: 15 | logging.error("Json串转换字典对象 失败:【%s】" % json_str) 16 | logging.error(traceback.format_exc()) 17 | raise 18 | 19 | # 将字典对象转成json串 20 | @staticmethod 21 | def dict_to_json(dict_obj): 22 | try: 23 | return json.dumps(dict_obj, ensure_ascii=False) 24 | except: 25 | logging.error("字典对象转换Json串 失败:【%s】" % dict_obj) 26 | logging.error(traceback.format_exc()) 27 | raise 28 | 29 | # 在字典中根据key找到value值(默认找第一个值) 30 | @staticmethod 31 | def find_value(response, key): 32 | if isinstance(response, str): 33 | response = JsonHandler.json_to_dict(response) 34 | if not isinstance(response, dict): 35 | logging.error("【%s】非字典类型,在响应数据中查找值失败!" % response) 36 | raise 37 | for k, v in response.items(): 38 | if k == key: 39 | return v 40 | elif isinstance(v, dict): 41 | return JsonHandler.find_value(v, key) 42 | elif isinstance(v, list): 43 | for value in v: 44 | if isinstance(value, dict): 45 | return JsonHandler.find_value(value, key) 46 | else: 47 | logging.error("键【%s】在响应数据中不存在【%s】!" % (key, response)) 48 | raise 49 | 50 | 51 | if __name__ == "__main__": 52 | rsp_str = '{"data": [{"update_time": null, "title": "title test", "content": "content test", "articleId": 128, "owner": 310, "posted_on": "2021-08-25 21:09:01"}], "code": "00", "userid": 310}' 53 | print(JsonHandler.find_value(rsp_str, "articleId")) 54 | -------------------------------------------------------------------------------- /util/keyword_function.py: -------------------------------------------------------------------------------- 1 | import hashlib 2 | import traceback 3 | import logging 4 | from util.global_var import * 5 | 6 | 7 | # 获取递增的唯一数参数 8 | def get_unique_num(): 9 | try: 10 | with open(UNIQUE_NUM_FILE_PATH, "r+") as f: 11 | # 先从文件中获取当前的唯一数 12 | num = f.read() 13 | # 将唯一数+1再写回文件 14 | f.seek(0, 0) 15 | f.write(str(int(num)+1)) 16 | return num 17 | except: 18 | logging.error("唯一数文件【%s】读写异常!" % UNIQUE_NUM_FILE_PATH) 19 | logging.error(traceback.format_exc()) 20 | raise 21 | 22 | 23 | # MD5加密 24 | def md5(string): 25 | # 创建一个md5 hash对象 26 | m = hashlib.md5() 27 | # 对字符串进行md5加密的更新处理,需要指定编码 28 | m.update(string.encode("utf-8")) 29 | # 返回十六进制加密结果 30 | return m.hexdigest() 31 | 32 | -------------------------------------------------------------------------------- /util/log_util.py: -------------------------------------------------------------------------------- 1 | import logging 2 | import logging.handlers 3 | import time 4 | from util.global_var import * 5 | 6 | 7 | # 日志配置初始化 8 | def log_config_ini(): 9 | # 初始化日志对象 10 | logger = logging.getLogger() 11 | 12 | # 设置日志级别 13 | logger.setLevel(logging.INFO) 14 | 15 | # 创建控制台日志处理器 16 | sh = logging.StreamHandler() 17 | 18 | # 创建文件日志处理器 19 | # 创建每日的日志文件 20 | filename_day = PROJECT_ROOT_DIR + "/log/" + "interface_auto_test.%s.log" % time.strftime("%Y-%m-%d") 21 | fh_day = logging.handlers.TimedRotatingFileHandler(filename_day, when='MIDNIGHT', interval=1, backupCount=3, encoding='utf-8') 22 | # when: 时间单位, 可选参数 23 | # interval: 时间间隔 24 | # backupCount: 日志文件备份数量。 如果backupCount大于0, 那么当生成新的日志文件时,将只保留backupCount个文件, 删除最老的文件。 25 | 26 | # 创建汇总日志文件 27 | filename_all = PROJECT_ROOT_DIR + "/log/" + "interface_auto_test.log" 28 | fh_all = logging.handlers.TimedRotatingFileHandler(filename_all, when='MIDNIGHT', interval=1, backupCount=3, encoding='utf-8') 29 | 30 | # 设置日志格式,创建格式化器 31 | fmt = '%(asctime)s %(levelname)s [%(filename)s(%(funcName)s:%(lineno)d)] - %(message)s' 32 | formatter = logging.Formatter(fmt) 33 | 34 | # 将格式化器设置到日志器中 35 | sh.setFormatter(formatter) 36 | fh_day.setFormatter(formatter) 37 | fh_all.setFormatter(formatter) 38 | 39 | # 6、将日志处理器添加到日志对象 40 | logger.addHandler(sh) 41 | logger.addHandler(fh_day) 42 | logger.addHandler(fh_all) 43 | 44 | 45 | if __name__ == "__main__": 46 | logging.info("This is hippop man") 47 | 48 | -------------------------------------------------------------------------------- /util/request_util.py: -------------------------------------------------------------------------------- 1 | import requests 2 | import traceback 3 | import logging 4 | import re 5 | from util.json_util import JsonHandler 6 | from util.keyword_function import * 7 | 8 | 9 | # 请求数据预处理 10 | def api_preprocess(request_data): 11 | logging.info("请求原始数据:%s" % request_data) 12 | try: 13 | # 匹配需要调用唯一数函数的参数 14 | if re.search(r"\$\{get_unique_num\w*\}", request_data): 15 | unique_num = get_unique_num() 16 | # 从用例中获取唯一数的变量名,供后续接口关联使用 17 | global_num_name = re.search(r"\$\{get_(unique_\w*)\}", request_data).group(1) 18 | # 将调用获取的唯一数的变量名和值存入全局变量中,供后续接口关联使用 19 | PARAM_GLOBAL_DICT[global_num_name] = unique_num 20 | request_data = re.sub(r"\$\{get_unique_num\w*\}", unique_num, request_data) 21 | # 匹配需要进行关联的参数 22 | if re.search(r"\$\{\w+\}", request_data): 23 | for var_data in re.findall(r"\$\{\w+\}", request_data): 24 | var = re.search(r"\$\{(\w+)\}", var_data).group(1) 25 | if isinstance(PARAM_GLOBAL_DICT[var], str): 26 | request_data = re.sub(r"\$\{%s\}" % var, PARAM_GLOBAL_DICT[var], request_data) 27 | else: 28 | request_data = re.sub(r'(\$\{%s\})' % var, str(PARAM_GLOBAL_DICT[var]), request_data) 29 | # 匹配需要进行函数化的参数 30 | if re.search(r"\$\{\w+?\(.+?\)\}", request_data): 31 | for var_data in re.findall(r"\$\{\w+?\(.+?\)\}", request_data): 32 | func_var = re.search(r"\$\{(\w+?\(.+?\))\}", var_data).group(1) 33 | func_result = eval(func_var) 34 | request_data = re.sub(r"\$\{(\w+?\(.+?\))\}", func_result, request_data) 35 | logging.info("请求数据预处理结果:%s" % request_data) 36 | return request_data 37 | except: 38 | logging.error("请求数据预处理异常:【%s】" % request_data) 39 | logging.error(traceback.format_exc()) 40 | raise 41 | 42 | 43 | # 响应数据关联参数提取 44 | def api_postprocess(response_data, extract_var): 45 | try: 46 | if extract_var.strip() == "" or extract_var.lower() == "无": 47 | logging.info("无关联参数提取..") 48 | return 49 | extract_var_list = re.split(r",|\|", extract_var) # 以“|”或“,”分隔 50 | if not isinstance(extract_var_list, list): 51 | logging.error("关联参数格式有误!【%s】" % extract_var_list) 52 | logging.error(traceback.format_exc()) 53 | raise 54 | # 各关联参数以逗号分割 55 | for key in extract_var_list: 56 | key_result = JsonHandler.find_value(response_data, key) 57 | PARAM_GLOBAL_DICT[key] = key_result 58 | logging.info("关联参数提取成功:【%s】" % (key+": "+str(key_result))) 59 | except: 60 | logging.error("响应数据关联参数提取异常:【关联参数:%s】【响应数据:%s】" % (extract_var, response_data)) 61 | logging.error(traceback.format_exc()) 62 | raise 63 | 64 | 65 | # 接口调用函数 66 | def api_request(url, uri, method, data, response_var, headers=None, cookies=None): 67 | try: 68 | if method.lower() == "post": 69 | # post 对请求体数据进行预处理 70 | request_data = api_preprocess(data) 71 | response = requests.post((url+uri), data=request_data, headers=headers, cookies=cookies) 72 | elif method.lower() == "get": 73 | # get 对请求URL数据进行预处理 74 | uri = api_preprocess(uri) 75 | response = requests.get((url+uri), headers=headers, cookies=cookies) 76 | elif method.lower() == "put": 77 | request_data = api_preprocess(data) 78 | response = requests.put((url + uri), data=request_data, headers=headers, cookies=cookies) 79 | else: 80 | logging.error("接口【%s】请求方法【%s】有误!" % ((url+uri), method)) 81 | raise 82 | logging.info("接口调用成功!") 83 | logging.info("响应数据:%s" % response.text) 84 | api_postprocess(response.text, response_var) 85 | return response 86 | except: 87 | logging.error("接口请求失败:【%s】【%s】" % ((url+uri), method)) 88 | logging.error(traceback.format_exc()) 89 | raise 90 | 91 | 92 | # 调用注册和登录接口,获取userid和token并放入全局变量中 93 | def get_userid_and_token(): 94 | register_request_data = '{"username":"juno${get_unique_num100}","password":"juno999999","email":"juno123@qq.com"}' 95 | api_request("http://39.100.104.214:8080", "/register/", "post", register_request_data, "userid") 96 | login_request_data = '{"username":"juno${unique_num100}", "password": "${md5('+"'"+'juno999999'+"'"+')}"}' 97 | api_request("http://39.100.104.214:8080", "/login/", "post", login_request_data, "token") 98 | 99 | 100 | if __name__ == "__main__": 101 | get_userid_and_token() --------------------------------------------------------------------------------