# bpm_report.html

Report generated on 15-Jul-2024 at 17:11:10 by pytest-html v3.1.0

## Summary

26 tests ran in 2.52 seconds.

(Un)check the boxes to filter the results.

20 passed, 0 skipped, 6 failed, 0 errors, 0 expected failures, 0 unexpected passes, 18 rerun

## Results

Result | Test | Duration | Links
--- | --- | --- | ---
No results found. Try to check the filters
Failed | test_case/test_basic/test_case.py::TestBPM::test_bpm[认证接口-登录系统-中-反向用例-用户名正确-密码为空-POST-http://36.139.193.99:8088/auth-application/json-case_data5-expect_data5-None-None-None] | 0.04 |
self = <APIAutoTest_v3_1.test_case.test_basic.test_case.TestBPM object at 0x0000028C3CAA3AC0> req_fix = <APIAutoTest_v3_1.request_method.request_method.RequestMethod object at 0x0000028C3CAAA250> db_fix = <APIAutoTest_v3_1.common.db.DB object at 0x0000028C3CA9C190>, module_name = '认证接口', api_name = '登录系统', level = '中' case_title = '反向用例-用户名正确-密码为空', case_method = 'POST', case_url = 'http://36.139.193.99:8088/auth', case_mime = 'application/json' case_data = {'password': '', 'username': 'admin'}, expect_data = {'message': '账户错误或该租户未启用', 'state': False}, sql_type = None, sql_data = None update_key = None @log_decorator @allure.epic("BPM-Basic") # @allure.feature("模块名称") # @allure.story("接口名称") # @allure.title("接口标题") # @allure.severity("用例级别") @pytest.mark.parametrize("module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key", ReadExcel(USERNAME).get_data()) def test_bpm(self, req_fix, db_fix, module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key): # 影响allure报告的输出 allure.dynamic.feature(module_name) allure.dynamic.story(api_name) allure.dynamic.title(case_title) allure.dynamic.severity(level) print(case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key) # 判断sql语句类型是否为delete，如果是，使用DB类对象调用delete方法执行删除的sql语句 if sql_type == "delete": # 使用DB类对象调用delete方法执行删除的sql语句, DB类对象就是自定义固件db_fix db_fix.delete(sql_data) # 判断sql语句的类型是否为select，如果是，使用DB类对象调用select方法执行查询语句，并接收查询的结果 elif sql_type == "select": # 使用DB类对象调用select方法执行查询语句，并接收查询的结果 select_result = db_fix.select(sql_data) # 将查询结果更新到用例数据中 case_data[update_key] = select_result # 判断sql语句的类型是否为select|delete 或者 delete|select ，如果是，使用DB类对象执行sql语句 elif sql_type == "select|delete" or sql_type == "delete|select": # 使用DB类对象调用delete方法执行删除的sql语句。 db_fix.delete(sql_data["delete"]) # 使用DB类对象调用select方法执行查询的sql语句, 并接收查询的结果 select_result = db_fix.select(sql_data["select"]) # 将查询结果更新到用例数据中 case_data[update_key] = select_result result = req_fix.request_all(req_method=case_method, req_url=case_url, req_mime=case_mime, case_data=case_data) print(result.text) try: for key in expect_data: > assert expect_data[key] == result.json().get(key) E AssertionError: assert '账户错误或该租户未启用' == '账号或密码错误' E E - 账号或密码错误 E + 账户错误或该租户未启用 test_case\test_basic\test_case.py:61: AssertionError During handling of the above exception, another exception occurred: self = <APIAutoTest_v3_1.test_case.test_basic.test_case.TestBPM object at 0x0000028C3CAA3AC0> req_fix = <APIAutoTest_v3_1.request_method.request_method.RequestMethod object at 0x0000028C3CAAA250> db_fix = <APIAutoTest_v3_1.common.db.DB object at 0x0000028C3CA9C190>, module_name = '认证接口', api_name = '登录系统', level = '中' case_title = '反向用例-用户名正确-密码为空', case_method = 'POST', case_url = 'http://36.139.193.99:8088/auth', case_mime = 'application/json' case_data = {'password': '', 'username': 'admin'}, expect_data = {'message': '账户错误或该租户未启用', 'state': False}, sql_type = None, sql_data = None update_key = None @log_decorator @allure.epic("BPM-Basic") # @allure.feature("模块名称") # @allure.story("接口名称") # @allure.title("接口标题") # @allure.severity("用例级别") @pytest.mark.parametrize("module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key", ReadExcel(USERNAME).get_data()) def test_bpm(self, req_fix, db_fix, module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key): # 影响allure报告的输出 allure.dynamic.feature(module_name) allure.dynamic.story(api_name) allure.dynamic.title(case_title) allure.dynamic.severity(level) print(case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key) # 判断sql语句类型是否为delete，如果是，使用DB类对象调用delete方法执行删除的sql语句 if sql_type == "delete": # 使用DB类对象调用delete方法执行删除的sql语句, DB类对象就是自定义固件db_fix db_fix.delete(sql_data) # 判断sql语句的类型是否为select，如果是，使用DB类对象调用select方法执行查询语句，并接收查询的结果 elif sql_type == "select": # 使用DB类对象调用select方法执行查询语句，并接收查询的结果 select_result = db_fix.select(sql_data) # 将查询结果更新到用例数据中 case_data[update_key] = select_result # 判断sql语句的类型是否为select|delete 或者 delete|select ，如果是，使用DB类对象执行sql语句 elif sql_type == "select|delete" or sql_type == "delete|select": # 使用DB类对象调用delete方法执行删除的sql语句。 db_fix.delete(sql_data["delete"]) # 使用DB类对象调用select方法执行查询的sql语句, 并接收查询的结果 select_result = db_fix.select(sql_data["select"]) # 将查询结果更新到用例数据中 case_data[update_key] = select_result result = req_fix.request_all(req_method=case_method, req_url=case_url, req_mime=case_mime, case_data=case_data) print(result.text) try: for key in expect_data: assert expect_data[key] == result.json().get(key) except AssertionError: > raise AssertionError("断言失败，描述失败的原因") E AssertionError: 断言失败，描述失败的原因 test_case\test_basic\test_case.py:63: AssertionError ------------------------------Captured stdout call------------------------------ POST http://36.139.193.99:8088/auth application/json {'username': 'admin', 'password': ''} {'state': False, 'message': '账户错误或该租户未启用'} None None None {"state":false,"message":"账号或密码错误","code":200,"logId":"1812776659666444288"} -------------------------------Captured log call-------------------------------- INFO root:__init__.py:79 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18 DEBUG urllib3.connectionpool:connectionpool.py:291 Resetting dropped connection: 36.139.193.99 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "POST /auth HTTP/11" 500 None ERROR root:__init__.py:82 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18报错，错误为：断言失败，描述失败的原因 ------------------------------Captured stdout call------------------------------ POST http://36.139.193.99:8088/auth application/json {'username': 'admin', 'password': ''} {'state': False, 'message': '账户错误或该租户未启用'} None None None {"state":false,"message":"账号或密码错误","code":200,"logId":"1812776660488527872"} -------------------------------Captured log call-------------------------------- INFO root:__init__.py:79 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18 DEBUG urllib3.connectionpool:connectionpool.py:291 Resetting dropped connection: 36.139.193.99 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "POST /auth HTTP/11" 500 None ERROR root:__init__.py:82 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18报错，错误为：断言失败，描述失败的原因 ------------------------------Captured stdout call------------------------------ POST http://36.139.193.99:8088/auth application/json {'username': 'admin', 'password': ''} {'state': False, 'message': '账户错误或该租户未启用'} None None None {"state":false,"message":"账号或密码错误","code":200,"logId":"1812776660677271552"} -------------------------------Captured log call-------------------------------- INFO root:__init__.py:79 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18 DEBUG urllib3.connectionpool:connectionpool.py:291 Resetting dropped connection: 36.139.193.99 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "POST /auth HTTP/11" 500 None ERROR root:__init__.py:82 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18报错，错误为：断言失败，描述失败的原因 ------------------------------Captured stdout call------------------------------ POST http://36.139.193.99:8088/auth application/json {'username': 'admin', 'password': ''} {'state': False, 'message': '账户错误或该租户未启用'} None None None {"state":false,"message":"账号或密码错误","code":200,"logId":"1812776660857626624"} -------------------------------Captured log call-------------------------------- INFO root:__init__.py:79 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18 DEBUG urllib3.connectionpool:connectionpool.py:291 Resetting dropped connection: 36.139.193.99 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "POST /auth HTTP/11" 500 None ERROR root:__init__.py:82 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18报错，错误为：断言失败，描述失败的原因
Failed | test_case/test_basic/test_case.py::TestBPM::test_bpm[认证接口-登录系统-中-反向用例-用户名正确-密码过长-POST-http://36.139.193.99:8088/auth-application/json-case_data6-expect_data6-None-None-None] | 0.03 |
self = <APIAutoTest_v3_1.test_case.test_basic.test_case.TestBPM object at 0x0000028C3CAA3CD0> req_fix = <APIAutoTest_v3_1.request_method.request_method.RequestMethod object at 0x0000028C3CAAA250> db_fix = <APIAutoTest_v3_1.common.db.DB object at 0x0000028C3CA9C190>, module_name = '认证接口', api_name = '登录系统', level = '中' case_title = '反向用例-用户名正确-密码过长', case_method = 'POST', case_url = 'http://36.139.193.99:8088/auth', case_mime = 'application/json' case_data = {'password': '1', 'username': 'admin'}, expect_data = {'message': '账户错误或该租户未启用', 'state': False}, sql_type = None, sql_data = None update_key = None @log_decorator @allure.epic("BPM-Basic") # @allure.feature("模块名称") # @allure.story("接口名称") # @allure.title("接口标题") # @allure.severity("用例级别") @pytest.mark.parametrize("module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key", ReadExcel(USERNAME).get_data()) def test_bpm(self, req_fix, db_fix, module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key): # 影响allure报告的输出 allure.dynamic.feature(module_name) allure.dynamic.story(api_name) allure.dynamic.title(case_title) allure.dynamic.severity(level) print(case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key) # 判断sql语句类型是否为delete，如果是，使用DB类对象调用delete方法执行删除的sql语句 if sql_type == "delete": # 使用DB类对象调用delete方法执行删除的sql语句, DB类对象就是自定义固件db_fix db_fix.delete(sql_data) # 判断sql语句的类型是否为select，如果是，使用DB类对象调用select方法执行查询语句，并接收查询的结果 elif sql_type == "select": # 使用DB类对象调用select方法执行查询语句，并接收查询的结果 select_result = db_fix.select(sql_data) # 将查询结果更新到用例数据中 case_data[update_key] = select_result # 判断sql语句的类型是否为select|delete 或者 delete|select ，如果是，使用DB类对象执行sql语句 elif sql_type == "select|delete" or sql_type == "delete|select": # 使用DB类对象调用delete方法执行删除的sql语句。 db_fix.delete(sql_data["delete"]) # 使用DB类对象调用select方法执行查询的sql语句, 并接收查询的结果 select_result = db_fix.select(sql_data["select"]) # 将查询结果更新到用例数据中 case_data[update_key] = select_result result = req_fix.request_all(req_method=case_method, req_url=case_url, req_mime=case_mime, case_data=case_data) print(result.text) try: for key in expect_data: > assert expect_data[key] == result.json().get(key) E AssertionError: assert '账户错误或该租户未启用' == '账号或密码错误' E E - 账号或密码错误 E + 账户错误或该租户未启用 test_case\test_basic\test_case.py:61: AssertionError During handling of the above exception, another exception occurred: self = <APIAutoTest_v3_1.test_case.test_basic.test_case.TestBPM object at 0x0000028C3CAA3CD0> req_fix = <APIAutoTest_v3_1.request_method.request_method.RequestMethod object at 0x0000028C3CAAA250> db_fix = <APIAutoTest_v3_1.common.db.DB object at 0x0000028C3CA9C190>, module_name = '认证接口', api_name = '登录系统', level = '中' case_title = '反向用例-用户名正确-密码过长', case_method = 'POST', case_url = 'http://36.139.193.99:8088/auth', case_mime = 'application/json' case_data = {'password': '1', 'username': 'admin'}, expect_data = {'message': '账户错误或该租户未启用', 'state': False}, sql_type = None, sql_data = None update_key = None @log_decorator @allure.epic("BPM-Basic") # @allure.feature("模块名称") # @allure.story("接口名称") # @allure.title("接口标题") # @allure.severity("用例级别") @pytest.mark.parametrize("module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key", ReadExcel(USERNAME).get_data()) def test_bpm(self, req_fix, db_fix, module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key): # 影响allure报告的输出 allure.dynamic.feature(module_name) allure.dynamic.story(api_name) allure.dynamic.title(case_title) allure.dynamic.severity(level) print(case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key) # 判断sql语句类型是否为delete，如果是，使用DB类对象调用delete方法执行删除的sql语句 if sql_type == "delete": # 使用DB类对象调用delete方法执行删除的sql语句, DB类对象就是自定义固件db_fix db_fix.delete(sql_data) # 判断sql语句的类型是否为select，如果是，使用DB类对象调用select方法执行查询语句，并接收查询的结果 elif sql_type == "select": # 使用DB类对象调用select方法执行查询语句，并接收查询的结果 select_result = db_fix.select(sql_data) # 将查询结果更新到用例数据中 case_data[update_key] = select_result # 判断sql语句的类型是否为select|delete 或者 delete|select ，如果是，使用DB类对象执行sql语句 elif sql_type == "select|delete" or sql_type == "delete|select": # 使用DB类对象调用delete方法执行删除的sql语句。 db_fix.delete(sql_data["delete"]) # 使用DB类对象调用select方法执行查询的sql语句, 并接收查询的结果 select_result = db_fix.select(sql_data["select"]) # 将查询结果更新到用例数据中 case_data[update_key] = select_result result = req_fix.request_all(req_method=case_method, req_url=case_url, req_mime=case_mime, case_data=case_data) print(result.text) try: for key in expect_data: assert expect_data[key] == result.json().get(key) except AssertionError: > raise AssertionError("断言失败，描述失败的原因") E AssertionError: 断言失败，描述失败的原因 test_case\test_basic\test_case.py:63: AssertionError ------------------------------Captured stdout call------------------------------ POST http://36.139.193.99:8088/auth application/json {'username': 'admin', 'password': '1'} {'state': False, 'message': '账户错误或该租户未启用'} None None None {"state":false,"message":"账号或密码错误","code":200,"logId":"1812776661021204480"} -------------------------------Captured log call-------------------------------- INFO root:__init__.py:79 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18 DEBUG urllib3.connectionpool:connectionpool.py:291 Resetting dropped connection: 36.139.193.99 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "POST /auth HTTP/11" 500 None ERROR root:__init__.py:82 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18报错，错误为：断言失败，描述失败的原因 ------------------------------Captured stdout call------------------------------ POST http://36.139.193.99:8088/auth application/json {'username': 'admin', 'password': '1'} {'state': False, 'message': '账户错误或该租户未启用'} None None None {"state":false,"message":"账号或密码错误","code":200,"logId":"1812776661251891200"} -------------------------------Captured log call-------------------------------- INFO root:__init__.py:79 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18 DEBUG urllib3.connectionpool:connectionpool.py:291 Resetting dropped connection: 36.139.193.99 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "POST /auth HTTP/11" 500 None ERROR root:__init__.py:82 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18报错，错误为：断言失败，描述失败的原因 ------------------------------Captured stdout call------------------------------ POST http://36.139.193.99:8088/auth application/json {'username': 'admin', 'password': '1'} {'state': False, 'message': '账户错误或该租户未启用'} None None None {"state":false,"message":"账号或密码错误","code":200,"logId":"1812776661415469056"} -------------------------------Captured log call-------------------------------- INFO root:__init__.py:79 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18 DEBUG urllib3.connectionpool:connectionpool.py:291 Resetting dropped connection: 36.139.193.99 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "POST /auth HTTP/11" 500 None ERROR root:__init__.py:82 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18报错，错误为：断言失败，描述失败的原因 ------------------------------Captured stdout call------------------------------ POST http://36.139.193.99:8088/auth application/json {'username': 'admin', 'password': '1'} {'state': False, 'message': '账户错误或该租户未启用'} None None None {"state":false,"message":"账号或密码错误","code":200,"logId":"1812776661587435520"} -------------------------------Captured log call-------------------------------- INFO root:__init__.py:79 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18 DEBUG urllib3.connectionpool:connectionpool.py:291 Resetting dropped connection: 36.139.193.99 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "POST /auth HTTP/11" 500 None ERROR root:__init__.py:82 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18报错，错误为：断言失败，描述失败的原因
Failed | test_case/test_basic/test_case.py::TestBPM::test_bpm[认证接口-登录系统-中-反向用例-用户名正确-密码过短-POST-http://36.139.193.99:8088/auth-application/json-case_data7-expect_data7-None-None-None] | 0.03 |
self = <APIAutoTest_v3_1.test_case.test_basic.test_case.TestBPM object at 0x0000028C3CAA3D90> req_fix = <APIAutoTest_v3_1.request_method.request_method.RequestMethod object at 0x0000028C3CAAA250> db_fix = <APIAutoTest_v3_1.common.db.DB object at 0x0000028C3CA9C190>, module_name = '认证接口', api_name = '登录系统', level = '中' case_title = '反向用例-用户名正确-密码过短', case_method = 'POST', case_url = 'http://36.139.193.99:8088/auth', case_mime = 'application/json' case_data = {'password': 'F4/DVgPS/NEruLxVVRqHktsb1R2fVpw81t5VuGfFjwp0G7U4k6spHPr/ejPlw8XxIVilJ+SyIH0G5FbQStFEd/94mmI7+2Dw2c7MXXIE...5FbQStFEd/94mmI7+2Dw2c7MXXIERYKjd3XNe4gZR4ANJclCJHNGfE+mtnX5voprYwEo9m6ponCdmmXTMx9cWVEJ4K/nbR8=', 'username': 'admin'} expect_data = {'message': '账户错误或该租户未启用', 'state': False}, sql_type = None, sql_data = None, update_key = None @log_decorator @allure.epic("BPM-Basic") # @allure.feature("模块名称") # @allure.story("接口名称") # @allure.title("接口标题") # @allure.severity("用例级别") @pytest.mark.parametrize("module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key", ReadExcel(USERNAME).get_data()) def test_bpm(self, req_fix, db_fix, module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key): # 影响allure报告的输出 allure.dynamic.feature(module_name) allure.dynamic.story(api_name) allure.dynamic.title(case_title) allure.dynamic.severity(level) print(case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key) # 判断sql语句类型是否为delete，如果是，使用DB类对象调用delete方法执行删除的sql语句 if sql_type == "delete": # 使用DB类对象调用delete方法执行删除的sql语句, DB类对象就是自定义固件db_fix db_fix.delete(sql_data) # 判断sql语句的类型是否为select，如果是，使用DB类对象调用select方法执行查询语句，并接收查询的结果 elif sql_type == "select": # 使用DB类对象调用select方法执行查询语句，并接收查询的结果 select_result = db_fix.select(sql_data) # 将查询结果更新到用例数据中 case_data[update_key] = select_result # 判断sql语句的类型是否为select|delete 或者 delete|select ，如果是，使用DB类对象执行sql语句 elif sql_type == "select|delete" or sql_type == "delete|select": # 使用DB类对象调用delete方法执行删除的sql语句。 db_fix.delete(sql_data["delete"]) # 使用DB类对象调用select方法执行查询的sql语句, 并接收查询的结果 select_result = db_fix.select(sql_data["select"]) # 将查询结果更新到用例数据中 case_data[update_key] = select_result result = req_fix.request_all(req_method=case_method, req_url=case_url, req_mime=case_mime, case_data=case_data) print(result.text) try: for key in expect_data: > assert expect_data[key] == result.json().get(key) E AssertionError: assert False == None E + where None = <built-in method get of dict object at 0x0000028C3CAFF6C0>('state') E + where <built-in method get of dict object at 0x0000028C3CAFF6C0> = {'account': 'admin', 'expiration': 86400, 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjExMjEwMTAsImlhdCI6MTcyMTAzNDYxMH0.YAAt-e625AY68ttRh5eWDLGn8mBFvvSlIYlhRVZrZTwSmC5azd3S2XqWeY-apfUNgpQc4-iJngvqnx196fMngQ', ...}.get E + where {'account': 'admin', 'expiration': 86400, 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjExMjEwMTAsImlhdCI6MTcyMTAzNDYxMH0.YAAt-e625AY68ttRh5eWDLGn8mBFvvSlIYlhRVZrZTwSmC5azd3S2XqWeY-apfUNgpQc4-iJngvqnx196fMngQ', ...} = <bound method Response.json of <Response [200]>>() E + where <bound method Response.json of <Response [200]>> = <Response [200]>.json test_case\test_basic\test_case.py:61: AssertionError During handling of the above exception, another exception occurred: self = <APIAutoTest_v3_1.test_case.test_basic.test_case.TestBPM object at 0x0000028C3CAA3D90> req_fix = <APIAutoTest_v3_1.request_method.request_method.RequestMethod object at 0x0000028C3CAAA250> db_fix = <APIAutoTest_v3_1.common.db.DB object at 0x0000028C3CA9C190>, module_name = '认证接口', api_name = '登录系统', level = '中' case_title = '反向用例-用户名正确-密码过短', case_method = 'POST', case_url = 'http://36.139.193.99:8088/auth', case_mime = 'application/json' case_data = {'password': 'F4/DVgPS/NEruLxVVRqHktsb1R2fVpw81t5VuGfFjwp0G7U4k6spHPr/ejPlw8XxIVilJ+SyIH0G5FbQStFEd/94mmI7+2Dw2c7MXXIE...5FbQStFEd/94mmI7+2Dw2c7MXXIERYKjd3XNe4gZR4ANJclCJHNGfE+mtnX5voprYwEo9m6ponCdmmXTMx9cWVEJ4K/nbR8=', 'username': 'admin'} expect_data = {'message': '账户错误或该租户未启用', 'state': False}, sql_type = None, sql_data = None, update_key = None @log_decorator @allure.epic("BPM-Basic") # @allure.feature("模块名称") # @allure.story("接口名称") # @allure.title("接口标题") # @allure.severity("用例级别") @pytest.mark.parametrize("module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key", ReadExcel(USERNAME).get_data()) def test_bpm(self, req_fix, db_fix, module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key): # 影响allure报告的输出 allure.dynamic.feature(module_name) allure.dynamic.story(api_name) allure.dynamic.title(case_title) allure.dynamic.severity(level) print(case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key) # 判断sql语句类型是否为delete，如果是，使用DB类对象调用delete方法执行删除的sql语句 if sql_type == "delete": # 使用DB类对象调用delete方法执行删除的sql语句, DB类对象就是自定义固件db_fix db_fix.delete(sql_data) # 判断sql语句的类型是否为select，如果是，使用DB类对象调用select方法执行查询语句，并接收查询的结果 elif sql_type == "select": # 使用DB类对象调用select方法执行查询语句，并接收查询的结果 select_result = db_fix.select(sql_data) # 将查询结果更新到用例数据中 case_data[update_key] = select_result # 判断sql语句的类型是否为select|delete 或者 delete|select ，如果是，使用DB类对象执行sql语句 elif sql_type == "select|delete" or sql_type == "delete|select": # 使用DB类对象调用delete方法执行删除的sql语句。 db_fix.delete(sql_data["delete"]) # 使用DB类对象调用select方法执行查询的sql语句, 并接收查询的结果 select_result = db_fix.select(sql_data["select"]) # 将查询结果更新到用例数据中 case_data[update_key] = select_result result = req_fix.request_all(req_method=case_method, req_url=case_url, req_mime=case_mime, case_data=case_data) print(result.text) try: for key in expect_data: assert expect_data[key] == result.json().get(key) except AssertionError: > raise AssertionError("断言失败，描述失败的原因") E AssertionError: 断言失败，描述失败的原因 test_case\test_basic\test_case.py:63: AssertionError ------------------------------Captured stdout call------------------------------ POST http://36.139.193.99:8088/auth application/json {'username': 'admin', 'password': 'F4/DVgPS/NEruLxVVRqHktsb1R2fVpw81t5VuGfFjwp0G7U4k6spHPr/ejPlw8XxIVilJ+SyIH0G5FbQStFEd/94mmI7+2Dw2c7MXXIERYKjd3XNe4gZR4ANJclCJHNGfE+mtnX5voprYwEo9m6ponCdmmXTMx9cWVEJ4K/nbR8=F4/DVgPS/NEruLxVVRqHktsb1R2fVpw81t5VuGfFjwp0G7U4k6spHPr/ejPlw8XxIVilJ+SyIH0G5FbQStFEd/94mmI7+2Dw2c7MXXIERYKjd3XNe4gZR4ANJclCJHNGfE+mtnX5voprYwEo9m6ponCdmmXTMx9cWVEJ4K/nbR8='} {'state': False, 'message': '账户错误或该租户未启用'} None None None {"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjExMjEwMTAsImlhdCI6MTcyMTAzNDYxMH0.YAAt-e625AY68ttRh5eWDLGn8mBFvvSlIYlhRVZrZTwSmC5azd3S2XqWeY-apfUNgpQc4-iJngvqnx196fMngQ","username":"超级管理员","account":"admin","userId":"1","expiration":86400,"loginStatus":true,"userAttrs":{"tenantId":"-1"}} -------------------------------Captured log call-------------------------------- INFO root:__init__.py:79 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18 DEBUG urllib3.connectionpool:connectionpool.py:291 Resetting dropped connection: 36.139.193.99 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "POST /auth HTTP/11" 200 None ERROR root:__init__.py:82 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18报错，错误为：断言失败，描述失败的原因 ------------------------------Captured stdout call------------------------------ POST http://36.139.193.99:8088/auth application/json {'username': 'admin', 'password': 'F4/DVgPS/NEruLxVVRqHktsb1R2fVpw81t5VuGfFjwp0G7U4k6spHPr/ejPlw8XxIVilJ+SyIH0G5FbQStFEd/94mmI7+2Dw2c7MXXIERYKjd3XNe4gZR4ANJclCJHNGfE+mtnX5voprYwEo9m6ponCdmmXTMx9cWVEJ4K/nbR8=F4/DVgPS/NEruLxVVRqHktsb1R2fVpw81t5VuGfFjwp0G7U4k6spHPr/ejPlw8XxIVilJ+SyIH0G5FbQStFEd/94mmI7+2Dw2c7MXXIERYKjd3XNe4gZR4ANJclCJHNGfE+mtnX5voprYwEo9m6ponCdmmXTMx9cWVEJ4K/nbR8='} {'state': False, 'message': '账户错误或该租户未启用'} None None None {"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjExMjEwMTAsImlhdCI6MTcyMTAzNDYxMH0.YAAt-e625AY68ttRh5eWDLGn8mBFvvSlIYlhRVZrZTwSmC5azd3S2XqWeY-apfUNgpQc4-iJngvqnx196fMngQ","username":"超级管理员","account":"admin","userId":"1","expiration":86400,"loginStatus":true,"userAttrs":{"tenantId":"-1"}} -------------------------------Captured log call-------------------------------- INFO root:__init__.py:79 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "POST /auth HTTP/11" 200 None ERROR root:__init__.py:82 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18报错，错误为：断言失败，描述失败的原因 ------------------------------Captured stdout call------------------------------ POST http://36.139.193.99:8088/auth application/json {'username': 'admin', 'password': 'F4/DVgPS/NEruLxVVRqHktsb1R2fVpw81t5VuGfFjwp0G7U4k6spHPr/ejPlw8XxIVilJ+SyIH0G5FbQStFEd/94mmI7+2Dw2c7MXXIERYKjd3XNe4gZR4ANJclCJHNGfE+mtnX5voprYwEo9m6ponCdmmXTMx9cWVEJ4K/nbR8=F4/DVgPS/NEruLxVVRqHktsb1R2fVpw81t5VuGfFjwp0G7U4k6spHPr/ejPlw8XxIVilJ+SyIH0G5FbQStFEd/94mmI7+2Dw2c7MXXIERYKjd3XNe4gZR4ANJclCJHNGfE+mtnX5voprYwEo9m6ponCdmmXTMx9cWVEJ4K/nbR8='} {'state': False, 'message': '账户错误或该租户未启用'} None None None {"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjExMjEwMTAsImlhdCI6MTcyMTAzNDYxMH0.YAAt-e625AY68ttRh5eWDLGn8mBFvvSlIYlhRVZrZTwSmC5azd3S2XqWeY-apfUNgpQc4-iJngvqnx196fMngQ","username":"超级管理员","account":"admin","userId":"1","expiration":86400,"loginStatus":true,"userAttrs":{"tenantId":"-1"}} -------------------------------Captured log call-------------------------------- INFO root:__init__.py:79 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "POST /auth HTTP/11" 200 None ERROR root:__init__.py:82 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18报错，错误为：断言失败，描述失败的原因 ------------------------------Captured stdout call------------------------------ POST http://36.139.193.99:8088/auth application/json {'username': 'admin', 'password': 'F4/DVgPS/NEruLxVVRqHktsb1R2fVpw81t5VuGfFjwp0G7U4k6spHPr/ejPlw8XxIVilJ+SyIH0G5FbQStFEd/94mmI7+2Dw2c7MXXIERYKjd3XNe4gZR4ANJclCJHNGfE+mtnX5voprYwEo9m6ponCdmmXTMx9cWVEJ4K/nbR8=F4/DVgPS/NEruLxVVRqHktsb1R2fVpw81t5VuGfFjwp0G7U4k6spHPr/ejPlw8XxIVilJ+SyIH0G5FbQStFEd/94mmI7+2Dw2c7MXXIERYKjd3XNe4gZR4ANJclCJHNGfE+mtnX5voprYwEo9m6ponCdmmXTMx9cWVEJ4K/nbR8='} {'state': False, 'message': '账户错误或该租户未启用'} None None None {"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjExMjEwMTAsImlhdCI6MTcyMTAzNDYxMH0.YAAt-e625AY68ttRh5eWDLGn8mBFvvSlIYlhRVZrZTwSmC5azd3S2XqWeY-apfUNgpQc4-iJngvqnx196fMngQ","username":"超级管理员","account":"admin","userId":"1","expiration":86400,"loginStatus":true,"userAttrs":{"tenantId":"-1"}} -------------------------------Captured log call-------------------------------- INFO root:__init__.py:79 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "POST /auth HTTP/11" 200 None ERROR root:__init__.py:82 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18报错，错误为：断言失败，描述失败的原因
Failed | test_case/test_basic/test_case.py::TestBPM::test_bpm[认证接口-刷新token-高-正向用例-GET-http://36.139.193.99:8088/refresh-None-None-expect_data8-None-None-None] | 0.03 |
self = <APIAutoTest_v3_1.test_case.test_basic.test_case.TestBPM object at 0x0000028C3CAA3E50> req_fix = <APIAutoTest_v3_1.request_method.request_method.RequestMethod object at 0x0000028C3CAAA250> db_fix = <APIAutoTest_v3_1.common.db.DB object at 0x0000028C3CA9C190>, module_name = '认证接口', api_name = '刷新token', level = '高' case_title = '正向用例', case_method = 'GET', case_url = 'http://36.139.193.99:8088/refresh', case_mime = None, case_data = None expect_data = {'message': '刷新成功'}, sql_type = None, sql_data = None, update_key = None @log_decorator @allure.epic("BPM-Basic") # @allure.feature("模块名称") # @allure.story("接口名称") # @allure.title("接口标题") # @allure.severity("用例级别") @pytest.mark.parametrize("module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key", ReadExcel(USERNAME).get_data()) def test_bpm(self, req_fix, db_fix, module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key): # 影响allure报告的输出 allure.dynamic.feature(module_name) allure.dynamic.story(api_name) allure.dynamic.title(case_title) allure.dynamic.severity(level) print(case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key) # 判断sql语句类型是否为delete，如果是，使用DB类对象调用delete方法执行删除的sql语句 if sql_type == "delete": # 使用DB类对象调用delete方法执行删除的sql语句, DB类对象就是自定义固件db_fix db_fix.delete(sql_data) # 判断sql语句的类型是否为select，如果是，使用DB类对象调用select方法执行查询语句，并接收查询的结果 elif sql_type == "select": # 使用DB类对象调用select方法执行查询语句，并接收查询的结果 select_result = db_fix.select(sql_data) # 将查询结果更新到用例数据中 case_data[update_key] = select_result # 判断sql语句的类型是否为select|delete 或者 delete|select ，如果是，使用DB类对象执行sql语句 elif sql_type == "select|delete" or sql_type == "delete|select": # 使用DB类对象调用delete方法执行删除的sql语句。 db_fix.delete(sql_data["delete"]) # 使用DB类对象调用select方法执行查询的sql语句, 并接收查询的结果 select_result = db_fix.select(sql_data["select"]) # 将查询结果更新到用例数据中 case_data[update_key] = select_result result = req_fix.request_all(req_method=case_method, req_url=case_url, req_mime=case_mime, case_data=case_data) print(result.text) try: for key in expect_data: > assert expect_data[key] == result.json().get(key) E AssertionError: assert '刷新成功' == None E + where None = <built-in method get of dict object at 0x0000028C3CC14840>('message') E + where <built-in method get of dict object at 0x0000028C3CC14840> = {'account': 'admin', 'expiration': 86400, 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjExMjEwMTAsImlhdCI6MTcyMTAzNDYxMH0.YAAt-e625AY68ttRh5eWDLGn8mBFvvSlIYlhRVZrZTwSmC5azd3S2XqWeY-apfUNgpQc4-iJngvqnx196fMngQ', ...}.get E + where {'account': 'admin', 'expiration': 86400, 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjExMjEwMTAsImlhdCI6MTcyMTAzNDYxMH0.YAAt-e625AY68ttRh5eWDLGn8mBFvvSlIYlhRVZrZTwSmC5azd3S2XqWeY-apfUNgpQc4-iJngvqnx196fMngQ', ...} = <bound method Response.json of <Response [200]>>() E + where <bound method Response.json of <Response [200]>> = <Response [200]>.json test_case\test_basic\test_case.py:61: AssertionError During handling of the above exception, another exception occurred: self = <APIAutoTest_v3_1.test_case.test_basic.test_case.TestBPM object at 0x0000028C3CAA3E50> req_fix = <APIAutoTest_v3_1.request_method.request_method.RequestMethod object at 0x0000028C3CAAA250> db_fix = <APIAutoTest_v3_1.common.db.DB object at 0x0000028C3CA9C190>, module_name = '认证接口', api_name = '刷新token', level = '高' case_title = '正向用例', case_method = 'GET', case_url = 'http://36.139.193.99:8088/refresh', case_mime = None, case_data = None expect_data = {'message': '刷新成功'}, sql_type = None, sql_data = None, update_key = None @log_decorator @allure.epic("BPM-Basic") # @allure.feature("模块名称") # @allure.story("接口名称") # @allure.title("接口标题") # @allure.severity("用例级别") @pytest.mark.parametrize("module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key", ReadExcel(USERNAME).get_data()) def test_bpm(self, req_fix, db_fix, module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key): # 影响allure报告的输出 allure.dynamic.feature(module_name) allure.dynamic.story(api_name) allure.dynamic.title(case_title) allure.dynamic.severity(level) print(case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key) # 判断sql语句类型是否为delete，如果是，使用DB类对象调用delete方法执行删除的sql语句 if sql_type == "delete": # 使用DB类对象调用delete方法执行删除的sql语句, DB类对象就是自定义固件db_fix db_fix.delete(sql_data) # 判断sql语句的类型是否为select，如果是，使用DB类对象调用select方法执行查询语句，并接收查询的结果 elif sql_type == "select": # 使用DB类对象调用select方法执行查询语句，并接收查询的结果 select_result = db_fix.select(sql_data) # 将查询结果更新到用例数据中 case_data[update_key] = select_result # 判断sql语句的类型是否为select|delete 或者 delete|select ，如果是，使用DB类对象执行sql语句 elif sql_type == "select|delete" or sql_type == "delete|select": # 使用DB类对象调用delete方法执行删除的sql语句。 db_fix.delete(sql_data["delete"]) # 使用DB类对象调用select方法执行查询的sql语句, 并接收查询的结果 select_result = db_fix.select(sql_data["select"]) # 将查询结果更新到用例数据中 case_data[update_key] = select_result result = req_fix.request_all(req_method=case_method, req_url=case_url, req_mime=case_mime, case_data=case_data) print(result.text) try: for key in expect_data: assert expect_data[key] == result.json().get(key) except AssertionError: > raise AssertionError("断言失败，描述失败的原因") E AssertionError: 断言失败，描述失败的原因 test_case\test_basic\test_case.py:63: AssertionError ------------------------------Captured stdout call------------------------------ GET http://36.139.193.99:8088/refresh None None {'message': '刷新成功'} None None None {"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjExMjEwMTAsImlhdCI6MTcyMTAzNDYxMH0.YAAt-e625AY68ttRh5eWDLGn8mBFvvSlIYlhRVZrZTwSmC5azd3S2XqWeY-apfUNgpQc4-iJngvqnx196fMngQ","username":"admin","account":"admin","userId":"","expiration":86400,"loginStatus":true} -------------------------------Captured log call-------------------------------- INFO root:__init__.py:79 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "GET /refresh HTTP/11" 200 None ERROR root:__init__.py:82 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18报错，错误为：断言失败，描述失败的原因 ------------------------------Captured stdout call------------------------------ GET http://36.139.193.99:8088/refresh None None {'message': '刷新成功'} None None None {"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjExMjEwMTAsImlhdCI6MTcyMTAzNDYxMH0.YAAt-e625AY68ttRh5eWDLGn8mBFvvSlIYlhRVZrZTwSmC5azd3S2XqWeY-apfUNgpQc4-iJngvqnx196fMngQ","username":"admin","account":"admin","userId":"","expiration":86400,"loginStatus":true} -------------------------------Captured log call-------------------------------- INFO root:__init__.py:79 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "GET /refresh HTTP/11" 200 None ERROR root:__init__.py:82 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18报错，错误为：断言失败，描述失败的原因 ------------------------------Captured stdout call------------------------------ GET http://36.139.193.99:8088/refresh None None {'message': '刷新成功'} None None None {"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjExMjEwMTAsImlhdCI6MTcyMTAzNDYxMH0.YAAt-e625AY68ttRh5eWDLGn8mBFvvSlIYlhRVZrZTwSmC5azd3S2XqWeY-apfUNgpQc4-iJngvqnx196fMngQ","username":"admin","account":"admin","userId":"","expiration":86400,"loginStatus":true} -------------------------------Captured log call-------------------------------- INFO root:__init__.py:79 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "GET /refresh HTTP/11" 200 None ERROR root:__init__.py:82 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18报错，错误为：断言失败，描述失败的原因 ------------------------------Captured stdout call------------------------------ GET http://36.139.193.99:8088/refresh None None {'message': '刷新成功'} None None None {"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjExMjEwMTAsImlhdCI6MTcyMTAzNDYxMH0.YAAt-e625AY68ttRh5eWDLGn8mBFvvSlIYlhRVZrZTwSmC5azd3S2XqWeY-apfUNgpQc4-iJngvqnx196fMngQ","username":"admin","account":"admin","userId":"","expiration":86400,"loginStatus":true} -------------------------------Captured log call-------------------------------- INFO root:__init__.py:79 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "GET /refresh HTTP/11" 200 None ERROR root:__init__.py:82 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18报错，错误为：断言失败，描述失败的原因
Failed | test_case/test_basic/test_case.py::TestBPM::test_bpm[维度管理-根据维度编码删除维度-中-正向用例-DELETE-http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds-query-case_data14-expect_data14-select-SELECT ID_ FROM uc_demension WHERE `CODE_`="test_dem_xyz_123";-ids] | 0.03 |
self = <APIAutoTest_v3_1.test_case.test_basic.test_case.TestBPM object at 0x0000028C3CADA310> req_fix = <APIAutoTest_v3_1.request_method.request_method.RequestMethod object at 0x0000028C3CAAA250> db_fix = <APIAutoTest_v3_1.common.db.DB object at 0x0000028C3CA9C190>, module_name = '维度管理', api_name = '根据维度编码删除维度', level = '中' case_title = '正向用例', case_method = 'DELETE', case_url = 'http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds', case_mime = 'query' case_data = {'ids': '1812776663009304576'}, expect_data = {'message': '删除维度成功'}, sql_type = 'select' sql_data = 'SELECT ID_ FROM uc_demension WHERE `CODE_`="test_dem_xyz_123";', update_key = 'ids' @log_decorator @allure.epic("BPM-Basic") # @allure.feature("模块名称") # @allure.story("接口名称") # @allure.title("接口标题") # @allure.severity("用例级别") @pytest.mark.parametrize("module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key", ReadExcel(USERNAME).get_data()) def test_bpm(self, req_fix, db_fix, module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key): # 影响allure报告的输出 allure.dynamic.feature(module_name) allure.dynamic.story(api_name) allure.dynamic.title(case_title) allure.dynamic.severity(level) print(case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key) # 判断sql语句类型是否为delete，如果是，使用DB类对象调用delete方法执行删除的sql语句 if sql_type == "delete": # 使用DB类对象调用delete方法执行删除的sql语句, DB类对象就是自定义固件db_fix db_fix.delete(sql_data) # 判断sql语句的类型是否为select，如果是，使用DB类对象调用select方法执行查询语句，并接收查询的结果 elif sql_type == "select": # 使用DB类对象调用select方法执行查询语句，并接收查询的结果 select_result = db_fix.select(sql_data) # 将查询结果更新到用例数据中 case_data[update_key] = select_result # 判断sql语句的类型是否为select|delete 或者 delete|select ，如果是，使用DB类对象执行sql语句 elif sql_type == "select|delete" or sql_type == "delete|select": # 使用DB类对象调用delete方法执行删除的sql语句。 db_fix.delete(sql_data["delete"]) # 使用DB类对象调用select方法执行查询的sql语句, 并接收查询的结果 select_result = db_fix.select(sql_data["select"]) # 将查询结果更新到用例数据中 case_data[update_key] = select_result result = req_fix.request_all(req_method=case_method, req_url=case_url, req_mime=case_mime, case_data=case_data) print(result.text) try: for key in expect_data: > assert expect_data[key] == result.json().get(key) E AssertionError: assert '删除维度成功' == '' E E + 删除维度成功 test_case\test_basic\test_case.py:61: AssertionError During handling of the above exception, another exception occurred: self = <APIAutoTest_v3_1.test_case.test_basic.test_case.TestBPM object at 0x0000028C3CADA310> req_fix = <APIAutoTest_v3_1.request_method.request_method.RequestMethod object at 0x0000028C3CAAA250> db_fix = <APIAutoTest_v3_1.common.db.DB object at 0x0000028C3CA9C190>, module_name = '维度管理', api_name = '根据维度编码删除维度', level = '中' case_title = '正向用例', case_method = 'DELETE', case_url = 'http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds', case_mime = 'query' case_data = {'ids': '1812776663009304576'}, expect_data = {'message': '删除维度成功'}, sql_type = 'select' sql_data = 'SELECT ID_ FROM uc_demension WHERE `CODE_`="test_dem_xyz_123";', update_key = 'ids' @log_decorator @allure.epic("BPM-Basic") # @allure.feature("模块名称") # @allure.story("接口名称") # @allure.title("接口标题") # @allure.severity("用例级别") @pytest.mark.parametrize("module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key", ReadExcel(USERNAME).get_data()) def test_bpm(self, req_fix, db_fix, module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key): # 影响allure报告的输出 allure.dynamic.feature(module_name) allure.dynamic.story(api_name) allure.dynamic.title(case_title) allure.dynamic.severity(level) print(case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key) # 判断sql语句类型是否为delete，如果是，使用DB类对象调用delete方法执行删除的sql语句 if sql_type == "delete": # 使用DB类对象调用delete方法执行删除的sql语句, DB类对象就是自定义固件db_fix db_fix.delete(sql_data) # 判断sql语句的类型是否为select，如果是，使用DB类对象调用select方法执行查询语句，并接收查询的结果 elif sql_type == "select": # 使用DB类对象调用select方法执行查询语句，并接收查询的结果 select_result = db_fix.select(sql_data) # 将查询结果更新到用例数据中 case_data[update_key] = select_result # 判断sql语句的类型是否为select|delete 或者 delete|select ，如果是，使用DB类对象执行sql语句 elif sql_type == "select|delete" or sql_type == "delete|select": # 使用DB类对象调用delete方法执行删除的sql语句。 db_fix.delete(sql_data["delete"]) # 使用DB类对象调用select方法执行查询的sql语句, 并接收查询的结果 select_result = db_fix.select(sql_data["select"]) # 将查询结果更新到用例数据中 case_data[update_key] = select_result result = req_fix.request_all(req_method=case_method, req_url=case_url, req_mime=case_mime, case_data=case_data) print(result.text) try: for key in expect_data: assert expect_data[key] == result.json().get(key) except AssertionError: > raise AssertionError("断言失败，描述失败的原因") E AssertionError: 断言失败，描述失败的原因 test_case\test_basic\test_case.py:63: AssertionError ------------------------------Captured stdout call------------------------------ DELETE http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds query {'ids': '需要更新'} {'message': '删除维度成功'} select SELECT ID_ FROM uc_demension WHERE `CODE_`="test_dem_xyz_123"; ids {"state":true,"message":"删除维度成功！","value":"","code":200} -------------------------------Captured log call-------------------------------- INFO root:__init__.py:79 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1812776663009304576 HTTP/11" 200 None ERROR root:__init__.py:82 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18报错，错误为：断言失败，描述失败的原因 ------------------------------Captured stdout call------------------------------ DELETE http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds query {'ids': '1812776663009304576'} {'message': '删除维度成功'} select SELECT ID_ FROM uc_demension WHERE `CODE_`="test_dem_xyz_123"; ids {"state":false,"message":"","code":200,"logId":"1812776664234041344"} -------------------------------Captured log call-------------------------------- INFO root:__init__.py:79 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1812776663009304576 HTTP/11" 500 None ERROR root:__init__.py:82 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18报错，错误为：断言失败，描述失败的原因 ------------------------------Captured stdout call------------------------------ DELETE http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds query {'ids': '1812776663009304576'} {'message': '删除维度成功'} select SELECT ID_ FROM uc_demension WHERE `CODE_`="test_dem_xyz_123"; ids {"state":false,"message":"","code":200,"logId":"1812776664393424896"} -------------------------------Captured log call-------------------------------- INFO root:__init__.py:79 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18 DEBUG urllib3.connectionpool:connectionpool.py:291 Resetting dropped connection: 36.139.193.99 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1812776663009304576 HTTP/11" 500 None ERROR root:__init__.py:82 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18报错，错误为：断言失败，描述失败的原因 ------------------------------Captured stdout call------------------------------ DELETE http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds query {'ids': '1812776663009304576'} {'message': '删除维度成功'} select SELECT ID_ FROM uc_demension WHERE `CODE_`="test_dem_xyz_123"; ids {"state":false,"message":"","code":200,"logId":"1812776664569585664"} -------------------------------Captured log call-------------------------------- INFO root:__init__.py:79 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18 DEBUG urllib3.connectionpool:connectionpool.py:291 Resetting dropped connection: 36.139.193.99 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1812776663009304576 HTTP/11" 500 None ERROR root:__init__.py:82 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18报错，错误为：断言失败，描述失败的原因
Failed | test_case/test_lao_zhang/test_case.py::TestBPM::test_bpm[维度管理-根据维度编码删除维度-中-正向用例-DELETE-http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds-query-case_data5-expect_data5-select-SELECT ID_ FROM uc_demension WHERE `CODE_`="test_dem_xyz_123";-ids] | 0.03 |
self = <APIAutoTest_v3_1.test_case.test_lao_zhang.test_case.TestBPM object at 0x0000028C3CAEC0D0> req_fix = <APIAutoTest_v3_1.request_method.request_method.RequestMethod object at 0x0000028C3CC40250> db_fix = <APIAutoTest_v3_1.common.db.DB object at 0x0000028C3CBBAD60>, module_name = '维度管理', api_name = '根据维度编码删除维度', level = '中' case_title = '正向用例', case_method = 'DELETE', case_url = 'http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds', case_mime = 'query' case_data = {'ids': '1812776665760768000'}, expect_data = {'message': '删除维度成功'}, sql_type = 'select' sql_data = 'SELECT ID_ FROM uc_demension WHERE `CODE_`="test_dem_xyz_123";', update_key = 'ids' @log_decorator @allure.epic("BPM-张三") # @allure.feature("模块名称") # @allure.story("接口名称") # @allure.title("接口标题") # @allure.severity("用例级别") @pytest.mark.parametrize("module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key", ReadExcel(USERNAME).get_data()) def test_bpm(self, req_fix, db_fix, module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key): # 影响allure报告的输出 allure.dynamic.feature(module_name) allure.dynamic.story(api_name) allure.dynamic.title(case_title) allure.dynamic.severity(level) print(case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key) # 判断sql语句类型是否为delete，如果是，使用DB类对象调用delete方法执行删除的sql语句 if sql_type == "delete": # 使用DB类对象调用delete方法执行删除的sql语句, DB类对象就是自定义固件db_fix db_fix.delete(sql_data) # 判断sql语句的类型是否为select，如果是，使用DB类对象调用select方法执行查询语句，并接收查询的结果 elif sql_type == "select": # 使用DB类对象调用select方法执行查询语句，并接收查询的结果 select_result = db_fix.select(sql_data) # 将查询结果更新到用例数据中 case_data[update_key] = select_result # 判断sql语句的类型是否为select|delete 或者 delete|select ，如果是，使用DB类对象执行sql语句 elif sql_type == "select|delete" or sql_type == "delete|select": # 使用DB类对象调用delete方法执行删除的sql语句。 db_fix.delete(sql_data["delete"]) # 使用DB类对象调用select方法执行查询的sql语句, 并接收查询的结果 select_result = db_fix.select(sql_data["select"]) # 将查询结果更新到用例数据中 case_data[update_key] = select_result result = req_fix.request_all(req_method=case_method, req_url=case_url, req_mime=case_mime, case_data=case_data) print(result.text) try: for key in expect_data: > assert expect_data[key] == result.json().get(key) E AssertionError: assert '删除维度成功' == '' E E + 删除维度成功 test_case\test_lao_zhang\test_case.py:62: AssertionError During handling of the above exception, another exception occurred: self = <APIAutoTest_v3_1.test_case.test_lao_zhang.test_case.TestBPM object at 0x0000028C3CAEC0D0> req_fix = <APIAutoTest_v3_1.request_method.request_method.RequestMethod object at 0x0000028C3CC40250> db_fix = <APIAutoTest_v3_1.common.db.DB object at 0x0000028C3CBBAD60>, module_name = '维度管理', api_name = '根据维度编码删除维度', level = '中' case_title = '正向用例', case_method = 'DELETE', case_url = 'http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds', case_mime = 'query' case_data = {'ids': '1812776665760768000'}, expect_data = {'message': '删除维度成功'}, sql_type = 'select' sql_data = 'SELECT ID_ FROM uc_demension WHERE `CODE_`="test_dem_xyz_123";', update_key = 'ids' @log_decorator @allure.epic("BPM-张三") # @allure.feature("模块名称") # @allure.story("接口名称") # @allure.title("接口标题") # @allure.severity("用例级别") @pytest.mark.parametrize("module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key", ReadExcel(USERNAME).get_data()) def test_bpm(self, req_fix, db_fix, module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key): # 影响allure报告的输出 allure.dynamic.feature(module_name) allure.dynamic.story(api_name) allure.dynamic.title(case_title) allure.dynamic.severity(level) print(case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key) # 判断sql语句类型是否为delete，如果是，使用DB类对象调用delete方法执行删除的sql语句 if sql_type == "delete": # 使用DB类对象调用delete方法执行删除的sql语句, DB类对象就是自定义固件db_fix db_fix.delete(sql_data) # 判断sql语句的类型是否为select，如果是，使用DB类对象调用select方法执行查询语句，并接收查询的结果 elif sql_type == "select": # 使用DB类对象调用select方法执行查询语句，并接收查询的结果 select_result = db_fix.select(sql_data) # 将查询结果更新到用例数据中 case_data[update_key] = select_result # 判断sql语句的类型是否为select|delete 或者 delete|select ，如果是，使用DB类对象执行sql语句 elif sql_type == "select|delete" or sql_type == "delete|select": # 使用DB类对象调用delete方法执行删除的sql语句。 db_fix.delete(sql_data["delete"]) # 使用DB类对象调用select方法执行查询的sql语句, 并接收查询的结果 select_result = db_fix.select(sql_data["select"]) # 将查询结果更新到用例数据中 case_data[update_key] = select_result result = req_fix.request_all(req_method=case_method, req_url=case_url, req_mime=case_mime, case_data=case_data) print(result.text) try: for key in expect_data: assert expect_data[key] == result.json().get(key) except AssertionError: # log.error(f"断言失败, 用例数据为：{case_data}, 期望数据为：{expect_data}, 服务器返回的数据为：{result.text}") # raise AssertionError("断言失败，描述失败的原因") > raise AssertionError(f"断言失败, 用例数据为：{case_data}, 期望数据为：{expect_data}, 服务器返回的数据为：{result.text}") E AssertionError: 断言失败, 用例数据为：{'ids': '1812776665760768000'}, 期望数据为：{'message': '删除维度成功'}, 服务器返回的数据为：{"state":false,"message":"","code":200,"logId":"1812776667073585152"} test_case\test_lao_zhang\test_case.py:66: AssertionError ------------------------------Captured stdout call------------------------------ DELETE http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds query {'ids': '需要更新'} {'message': '删除维度成功'} select SELECT ID_ FROM uc_demension WHERE `CODE_`="test_dem_xyz_123"; ids {"state":true,"message":"删除维度成功！","value":"","code":200} -------------------------------Captured log call-------------------------------- INFO root:__init__.py:79 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_lao_zhang\test_case.py, 所在的行为：19 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1812776665760768000 HTTP/11" 200 None ERROR root:__init__.py:82 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_lao_zhang\test_case.py, 所在的行为：19报错，错误为：断言失败, 用例数据为：{'ids': '1812776665760768000'}, 期望数据为：{'message': '删除维度成功'}, 服务器返回的数据为：{"state":true,"message":"删除维度成功！","value":"","code":200} ------------------------------Captured stdout call------------------------------ DELETE http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds query {'ids': '1812776665760768000'} {'message': '删除维度成功'} select SELECT ID_ FROM uc_demension WHERE `CODE_`="test_dem_xyz_123"; ids {"state":false,"message":"","code":200,"logId":"1812776666738040832"} -------------------------------Captured log call-------------------------------- INFO root:__init__.py:79 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_lao_zhang\test_case.py, 所在的行为：19 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1812776665760768000 HTTP/11" 500 None ERROR root:__init__.py:82 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_lao_zhang\test_case.py, 所在的行为：19报错，错误为：断言失败, 用例数据为：{'ids': '1812776665760768000'}, 期望数据为：{'message': '删除维度成功'}, 服务器返回的数据为：{"state":false,"message":"","code":200,"logId":"1812776666738040832"} ------------------------------Captured stdout call------------------------------ DELETE http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds query {'ids': '1812776665760768000'} {'message': '删除维度成功'} select SELECT ID_ FROM uc_demension WHERE `CODE_`="test_dem_xyz_123"; ids {"state":false,"message":"","code":200,"logId":"1812776666901618688"} -------------------------------Captured log call-------------------------------- INFO root:__init__.py:79 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_lao_zhang\test_case.py, 所在的行为：19 DEBUG urllib3.connectionpool:connectionpool.py:291 Resetting dropped connection: 36.139.193.99 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1812776665760768000 HTTP/11" 500 None ERROR root:__init__.py:82 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_lao_zhang\test_case.py, 所在的行为：19报错，错误为：断言失败, 用例数据为：{'ids': '1812776665760768000'}, 期望数据为：{'message': '删除维度成功'}, 服务器返回的数据为：{"state":false,"message":"","code":200,"logId":"1812776666901618688"} ------------------------------Captured stdout call------------------------------ DELETE http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds query {'ids': '1812776665760768000'} {'message': '删除维度成功'} select SELECT ID_ FROM uc_demension WHERE `CODE_`="test_dem_xyz_123"; ids {"state":false,"message":"","code":200,"logId":"1812776667073585152"} -------------------------------Captured log call-------------------------------- INFO root:__init__.py:79 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_lao_zhang\test_case.py, 所在的行为：19 DEBUG urllib3.connectionpool:connectionpool.py:291 Resetting dropped connection: 36.139.193.99 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1812776665760768000 HTTP/11" 500 None ERROR root:__init__.py:82 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_lao_zhang\test_case.py, 所在的行为：19报错，错误为：断言失败, 用例数据为：{'ids': '1812776665760768000'}, 期望数据为：{'message': '删除维度成功'}, 服务器返回的数据为：{"state":false,"message":"","code":200,"logId":"1812776667073585152"}
Rerun | test_case/test_basic/test_case.py::TestBPM::test_bpm[认证接口-登录系统-中-反向用例-用户名正确-密码为空-POST-http://36.139.193.99:8088/auth-application/json-case_data5-expect_data5-None-None-None] | 0.02 |
self = <APIAutoTest_v3_1.test_case.test_basic.test_case.TestBPM object at 0x0000028C3CAA3AC0> req_fix = <APIAutoTest_v3_1.request_method.request_method.RequestMethod object at 0x0000028C3CAAA250> db_fix = <APIAutoTest_v3_1.common.db.DB object at 0x0000028C3CA9C190>, module_name = '认证接口', api_name = '登录系统', level = '中' case_title = '反向用例-用户名正确-密码为空', case_method = 'POST', case_url = 'http://36.139.193.99:8088/auth', case_mime = 'application/json' case_data = {'password': '', 'username': 'admin'}, expect_data = {'message': '账户错误或该租户未启用', 'state': False}, sql_type = None, sql_data = None update_key = None @log_decorator @allure.epic("BPM-Basic") # @allure.feature("模块名称") # @allure.story("接口名称") # @allure.title("接口标题") # @allure.severity("用例级别") @pytest.mark.parametrize("module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key", ReadExcel(USERNAME).get_data()) def test_bpm(self, req_fix, db_fix, module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key): # 影响allure报告的输出 allure.dynamic.feature(module_name) allure.dynamic.story(api_name) allure.dynamic.title(case_title) allure.dynamic.severity(level) print(case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key) # 判断sql语句类型是否为delete，如果是，使用DB类对象调用delete方法执行删除的sql语句 if sql_type == "delete": # 使用DB类对象调用delete方法执行删除的sql语句, DB类对象就是自定义固件db_fix db_fix.delete(sql_data) # 判断sql语句的类型是否为select，如果是，使用DB类对象调用select方法执行查询语句，并接收查询的结果 elif sql_type == "select": # 使用DB类对象调用select方法执行查询语句，并接收查询的结果 select_result = db_fix.select(sql_data) # 将查询结果更新到用例数据中 case_data[update_key] = select_result # 判断sql语句的类型是否为select|delete 或者 delete|select ，如果是，使用DB类对象执行sql语句 elif sql_type == "select|delete" or sql_type == "delete|select": # 使用DB类对象调用delete方法执行删除的sql语句。 db_fix.delete(sql_data["delete"]) # 使用DB类对象调用select方法执行查询的sql语句, 并接收查询的结果 select_result = db_fix.select(sql_data["select"]) # 将查询结果更新到用例数据中 case_data[update_key] = select_result result = req_fix.request_all(req_method=case_method, req_url=case_url, req_mime=case_mime, case_data=case_data) print(result.text) try: for key in expect_data: > assert expect_data[key] == result.json().get(key) E AssertionError: assert '账户错误或该租户未启用' == '账号或密码错误' E E - 账号或密码错误 E + 账户错误或该租户未启用 test_case\test_basic\test_case.py:61: AssertionError During handling of the above exception, another exception occurred: self = <APIAutoTest_v3_1.test_case.test_basic.test_case.TestBPM object at 0x0000028C3CAA3AC0> req_fix = <APIAutoTest_v3_1.request_method.request_method.RequestMethod object at 0x0000028C3CAAA250> db_fix = <APIAutoTest_v3_1.common.db.DB object at 0x0000028C3CA9C190>, module_name = '认证接口', api_name = '登录系统', level = '中' case_title = '反向用例-用户名正确-密码为空', case_method = 'POST', case_url = 'http://36.139.193.99:8088/auth', case_mime = 'application/json' case_data = {'password': '', 'username': 'admin'}, expect_data = {'message': '账户错误或该租户未启用', 'state': False}, sql_type = None, sql_data = None update_key = None @log_decorator @allure.epic("BPM-Basic") # @allure.feature("模块名称") # @allure.story("接口名称") # @allure.title("接口标题") # @allure.severity("用例级别") @pytest.mark.parametrize("module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key", ReadExcel(USERNAME).get_data()) def test_bpm(self, req_fix, db_fix, module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key): # 影响allure报告的输出 allure.dynamic.feature(module_name) allure.dynamic.story(api_name) allure.dynamic.title(case_title) allure.dynamic.severity(level) print(case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key) # 判断sql语句类型是否为delete，如果是，使用DB类对象调用delete方法执行删除的sql语句 if sql_type == "delete": # 使用DB类对象调用delete方法执行删除的sql语句, DB类对象就是自定义固件db_fix db_fix.delete(sql_data) # 判断sql语句的类型是否为select，如果是，使用DB类对象调用select方法执行查询语句，并接收查询的结果 elif sql_type == "select": # 使用DB类对象调用select方法执行查询语句，并接收查询的结果 select_result = db_fix.select(sql_data) # 将查询结果更新到用例数据中 case_data[update_key] = select_result # 判断sql语句的类型是否为select|delete 或者 delete|select ，如果是，使用DB类对象执行sql语句 elif sql_type == "select|delete" or sql_type == "delete|select": # 使用DB类对象调用delete方法执行删除的sql语句。 db_fix.delete(sql_data["delete"]) # 使用DB类对象调用select方法执行查询的sql语句, 并接收查询的结果 select_result = db_fix.select(sql_data["select"]) # 将查询结果更新到用例数据中 case_data[update_key] = select_result result = req_fix.request_all(req_method=case_method, req_url=case_url, req_mime=case_mime, case_data=case_data) print(result.text) try: for key in expect_data: assert expect_data[key] == result.json().get(key) except AssertionError: > raise AssertionError("断言失败，描述失败的原因") E AssertionError: 断言失败，描述失败的原因 test_case\test_basic\test_case.py:63: AssertionError ------------------------------Captured stdout call------------------------------ POST http://36.139.193.99:8088/auth application/json {'username': 'admin', 'password': ''} {'state': False, 'message': '账户错误或该租户未启用'} None None None {"state":false,"message":"账号或密码错误","code":200,"logId":"1812776659666444288"} -------------------------------Captured log call-------------------------------- INFO root:__init__.py:79 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18 DEBUG urllib3.connectionpool:connectionpool.py:291 Resetting dropped connection: 36.139.193.99 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "POST /auth HTTP/11" 500 None ERROR root:__init__.py:82 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18报错，错误为：断言失败，描述失败的原因
Rerun | test_case/test_basic/test_case.py::TestBPM::test_bpm[认证接口-登录系统-中-反向用例-用户名正确-密码为空-POST-http://36.139.193.99:8088/auth-application/json-case_data5-expect_data5-None-None-None] | 0.04 |
self = <APIAutoTest_v3_1.test_case.test_basic.test_case.TestBPM object at 0x0000028C3CAA3AC0> req_fix = <APIAutoTest_v3_1.request_method.request_method.RequestMethod object at 0x0000028C3CAAA250> db_fix = <APIAutoTest_v3_1.common.db.DB object at 0x0000028C3CA9C190>, module_name = '认证接口', api_name = '登录系统', level = '中' case_title = '反向用例-用户名正确-密码为空', case_method = 'POST', case_url = 'http://36.139.193.99:8088/auth', case_mime = 'application/json' case_data = {'password': '', 'username': 'admin'}, expect_data = {'message': '账户错误或该租户未启用', 'state': False}, sql_type = None, sql_data = None update_key = None @log_decorator @allure.epic("BPM-Basic") # @allure.feature("模块名称") # @allure.story("接口名称") # @allure.title("接口标题") # @allure.severity("用例级别") @pytest.mark.parametrize("module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key", ReadExcel(USERNAME).get_data()) def test_bpm(self, req_fix, db_fix, module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key): # 影响allure报告的输出 allure.dynamic.feature(module_name) allure.dynamic.story(api_name) allure.dynamic.title(case_title) allure.dynamic.severity(level) print(case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key) # 判断sql语句类型是否为delete，如果是，使用DB类对象调用delete方法执行删除的sql语句 if sql_type == "delete": # 使用DB类对象调用delete方法执行删除的sql语句, DB类对象就是自定义固件db_fix db_fix.delete(sql_data) # 判断sql语句的类型是否为select，如果是，使用DB类对象调用select方法执行查询语句，并接收查询的结果 elif sql_type == "select": # 使用DB类对象调用select方法执行查询语句，并接收查询的结果 select_result = db_fix.select(sql_data) # 将查询结果更新到用例数据中 case_data[update_key] = select_result # 判断sql语句的类型是否为select|delete 或者 delete|select ，如果是，使用DB类对象执行sql语句 elif sql_type == "select|delete" or sql_type == "delete|select": # 使用DB类对象调用delete方法执行删除的sql语句。 db_fix.delete(sql_data["delete"]) # 使用DB类对象调用select方法执行查询的sql语句, 并接收查询的结果 select_result = db_fix.select(sql_data["select"]) # 将查询结果更新到用例数据中 case_data[update_key] = select_result result = req_fix.request_all(req_method=case_method, req_url=case_url, req_mime=case_mime, case_data=case_data) print(result.text) try: for key in expect_data: > assert expect_data[key] == result.json().get(key) E AssertionError: assert '账户错误或该租户未启用' == '账号或密码错误' E E - 账号或密码错误 E + 账户错误或该租户未启用 test_case\test_basic\test_case.py:61: AssertionError During handling of the above exception, another exception occurred: self = <APIAutoTest_v3_1.test_case.test_basic.test_case.TestBPM object at 0x0000028C3CAA3AC0> req_fix = <APIAutoTest_v3_1.request_method.request_method.RequestMethod object at 0x0000028C3CAAA250> db_fix = <APIAutoTest_v3_1.common.db.DB object at 0x0000028C3CA9C190>, module_name = '认证接口', api_name = '登录系统', level = '中' case_title = '反向用例-用户名正确-密码为空', case_method = 'POST', case_url = 'http://36.139.193.99:8088/auth', case_mime = 'application/json' case_data = {'password': '', 'username': 'admin'}, expect_data = {'message': '账户错误或该租户未启用', 'state': False}, sql_type = None, sql_data = None update_key = None @log_decorator @allure.epic("BPM-Basic") # @allure.feature("模块名称") # @allure.story("接口名称") # @allure.title("接口标题") # @allure.severity("用例级别") @pytest.mark.parametrize("module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key", ReadExcel(USERNAME).get_data()) def test_bpm(self, req_fix, db_fix, module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key): # 影响allure报告的输出 allure.dynamic.feature(module_name) allure.dynamic.story(api_name) allure.dynamic.title(case_title) allure.dynamic.severity(level) print(case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key) # 判断sql语句类型是否为delete，如果是，使用DB类对象调用delete方法执行删除的sql语句 if sql_type == "delete": # 使用DB类对象调用delete方法执行删除的sql语句, DB类对象就是自定义固件db_fix db_fix.delete(sql_data) # 判断sql语句的类型是否为select，如果是，使用DB类对象调用select方法执行查询语句，并接收查询的结果 elif sql_type == "select": # 使用DB类对象调用select方法执行查询语句，并接收查询的结果 select_result = db_fix.select(sql_data) # 将查询结果更新到用例数据中 case_data[update_key] = select_result # 判断sql语句的类型是否为select|delete 或者 delete|select ，如果是，使用DB类对象执行sql语句 elif sql_type == "select|delete" or sql_type == "delete|select": # 使用DB类对象调用delete方法执行删除的sql语句。 db_fix.delete(sql_data["delete"]) # 使用DB类对象调用select方法执行查询的sql语句, 并接收查询的结果 select_result = db_fix.select(sql_data["select"]) # 将查询结果更新到用例数据中 case_data[update_key] = select_result result = req_fix.request_all(req_method=case_method, req_url=case_url, req_mime=case_mime, case_data=case_data) print(result.text) try: for key in expect_data: assert expect_data[key] == result.json().get(key) except AssertionError: > raise AssertionError("断言失败，描述失败的原因") E AssertionError: 断言失败，描述失败的原因 test_case\test_basic\test_case.py:63: AssertionError ------------------------------Captured stdout call------------------------------ POST http://36.139.193.99:8088/auth application/json {'username': 'admin', 'password': ''} {'state': False, 'message': '账户错误或该租户未启用'} None None None {"state":false,"message":"账号或密码错误","code":200,"logId":"1812776659666444288"} -------------------------------Captured log call-------------------------------- INFO root:__init__.py:79 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18 DEBUG urllib3.connectionpool:connectionpool.py:291 Resetting dropped connection: 36.139.193.99 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "POST /auth HTTP/11" 500 None ERROR root:__init__.py:82 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18报错，错误为：断言失败，描述失败的原因 ------------------------------Captured stdout call------------------------------ POST http://36.139.193.99:8088/auth application/json {'username': 'admin', 'password': ''} {'state': False, 'message': '账户错误或该租户未启用'} None None None {"state":false,"message":"账号或密码错误","code":200,"logId":"1812776660488527872"} -------------------------------Captured log call-------------------------------- INFO root:__init__.py:79 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18 DEBUG urllib3.connectionpool:connectionpool.py:291 Resetting dropped connection: 36.139.193.99 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "POST /auth HTTP/11" 500 None ERROR root:__init__.py:82 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18报错，错误为：断言失败，描述失败的原因
Rerun | test_case/test_basic/test_case.py::TestBPM::test_bpm[认证接口-登录系统-中-反向用例-用户名正确-密码为空-POST-http://36.139.193.99:8088/auth-application/json-case_data5-expect_data5-None-None-None] | 0.03 |
self = <APIAutoTest_v3_1.test_case.test_basic.test_case.TestBPM object at 0x0000028C3CAA3AC0> req_fix = <APIAutoTest_v3_1.request_method.request_method.RequestMethod object at 0x0000028C3CAAA250> db_fix = <APIAutoTest_v3_1.common.db.DB object at 0x0000028C3CA9C190>, module_name = '认证接口', api_name = '登录系统', level = '中' case_title = '反向用例-用户名正确-密码为空', case_method = 'POST', case_url = 'http://36.139.193.99:8088/auth', case_mime = 'application/json' case_data = {'password': '', 'username': 'admin'}, expect_data = {'message': '账户错误或该租户未启用', 'state': False}, sql_type = None, sql_data = None update_key = None @log_decorator @allure.epic("BPM-Basic") # @allure.feature("模块名称") # @allure.story("接口名称") # @allure.title("接口标题") # @allure.severity("用例级别") @pytest.mark.parametrize("module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key", ReadExcel(USERNAME).get_data()) def test_bpm(self, req_fix, db_fix, module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key): # 影响allure报告的输出 allure.dynamic.feature(module_name) allure.dynamic.story(api_name) allure.dynamic.title(case_title) allure.dynamic.severity(level) print(case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key) # 判断sql语句类型是否为delete，如果是，使用DB类对象调用delete方法执行删除的sql语句 if sql_type == "delete": # 使用DB类对象调用delete方法执行删除的sql语句, DB类对象就是自定义固件db_fix db_fix.delete(sql_data) # 判断sql语句的类型是否为select，如果是，使用DB类对象调用select方法执行查询语句，并接收查询的结果 elif sql_type == "select": # 使用DB类对象调用select方法执行查询语句，并接收查询的结果 select_result = db_fix.select(sql_data) # 将查询结果更新到用例数据中 case_data[update_key] = select_result # 判断sql语句的类型是否为select|delete 或者 delete|select ，如果是，使用DB类对象执行sql语句 elif sql_type == "select|delete" or sql_type == "delete|select": # 使用DB类对象调用delete方法执行删除的sql语句。 db_fix.delete(sql_data["delete"]) # 使用DB类对象调用select方法执行查询的sql语句, 并接收查询的结果 select_result = db_fix.select(sql_data["select"]) # 将查询结果更新到用例数据中 case_data[update_key] = select_result result = req_fix.request_all(req_method=case_method, req_url=case_url, req_mime=case_mime, case_data=case_data) print(result.text) try: for key in expect_data: > assert expect_data[key] == result.json().get(key) E AssertionError: assert '账户错误或该租户未启用' == '账号或密码错误' E E - 账号或密码错误 E + 账户错误或该租户未启用 test_case\test_basic\test_case.py:61: AssertionError During handling of the above exception, another exception occurred: self = <APIAutoTest_v3_1.test_case.test_basic.test_case.TestBPM object at 0x0000028C3CAA3AC0> req_fix = <APIAutoTest_v3_1.request_method.request_method.RequestMethod object at 0x0000028C3CAAA250> db_fix = <APIAutoTest_v3_1.common.db.DB object at 0x0000028C3CA9C190>, module_name = '认证接口', api_name = '登录系统', level = '中' case_title = '反向用例-用户名正确-密码为空', case_method = 'POST', case_url = 'http://36.139.193.99:8088/auth', case_mime = 'application/json' case_data = {'password': '', 'username': 'admin'}, expect_data = {'message': '账户错误或该租户未启用', 'state': False}, sql_type = None, sql_data = None update_key = None @log_decorator @allure.epic("BPM-Basic") # @allure.feature("模块名称") # @allure.story("接口名称") # @allure.title("接口标题") # @allure.severity("用例级别") @pytest.mark.parametrize("module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key", ReadExcel(USERNAME).get_data()) def test_bpm(self, req_fix, db_fix, module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key): # 影响allure报告的输出 allure.dynamic.feature(module_name) allure.dynamic.story(api_name) allure.dynamic.title(case_title) allure.dynamic.severity(level) print(case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key) # 判断sql语句类型是否为delete，如果是，使用DB类对象调用delete方法执行删除的sql语句 if sql_type == "delete": # 使用DB类对象调用delete方法执行删除的sql语句, DB类对象就是自定义固件db_fix db_fix.delete(sql_data) # 判断sql语句的类型是否为select，如果是，使用DB类对象调用select方法执行查询语句，并接收查询的结果 elif sql_type == "select": # 使用DB类对象调用select方法执行查询语句，并接收查询的结果 select_result = db_fix.select(sql_data) # 将查询结果更新到用例数据中 case_data[update_key] = select_result # 判断sql语句的类型是否为select|delete 或者 delete|select ，如果是，使用DB类对象执行sql语句 elif sql_type == "select|delete" or sql_type == "delete|select": # 使用DB类对象调用delete方法执行删除的sql语句。 db_fix.delete(sql_data["delete"]) # 使用DB类对象调用select方法执行查询的sql语句, 并接收查询的结果 select_result = db_fix.select(sql_data["select"]) # 将查询结果更新到用例数据中 case_data[update_key] = select_result result = req_fix.request_all(req_method=case_method, req_url=case_url, req_mime=case_mime, case_data=case_data) print(result.text) try: for key in expect_data: assert expect_data[key] == result.json().get(key) except AssertionError: > raise AssertionError("断言失败，描述失败的原因") E AssertionError: 断言失败，描述失败的原因 test_case\test_basic\test_case.py:63: AssertionError ------------------------------Captured stdout call------------------------------ POST http://36.139.193.99:8088/auth application/json {'username': 'admin', 'password': ''} {'state': False, 'message': '账户错误或该租户未启用'} None None None {"state":false,"message":"账号或密码错误","code":200,"logId":"1812776659666444288"} -------------------------------Captured log call-------------------------------- INFO root:__init__.py:79 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18 DEBUG urllib3.connectionpool:connectionpool.py:291 Resetting dropped connection: 36.139.193.99 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "POST /auth HTTP/11" 500 None ERROR root:__init__.py:82 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18报错，错误为：断言失败，描述失败的原因 ------------------------------Captured stdout call------------------------------ POST http://36.139.193.99:8088/auth application/json {'username': 'admin', 'password': ''} {'state': False, 'message': '账户错误或该租户未启用'} None None None {"state":false,"message":"账号或密码错误","code":200,"logId":"1812776660488527872"} -------------------------------Captured log call-------------------------------- INFO root:__init__.py:79 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18 DEBUG urllib3.connectionpool:connectionpool.py:291 Resetting dropped connection: 36.139.193.99 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "POST /auth HTTP/11" 500 None ERROR root:__init__.py:82 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18报错，错误为：断言失败，描述失败的原因 ------------------------------Captured stdout call------------------------------ POST http://36.139.193.99:8088/auth application/json {'username': 'admin', 'password': ''} {'state': False, 'message': '账户错误或该租户未启用'} None None None {"state":false,"message":"账号或密码错误","code":200,"logId":"1812776660677271552"} -------------------------------Captured log call-------------------------------- INFO root:__init__.py:79 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18 DEBUG urllib3.connectionpool:connectionpool.py:291 Resetting dropped connection: 36.139.193.99 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "POST /auth HTTP/11" 500 None ERROR root:__init__.py:82 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18报错，错误为：断言失败，描述失败的原因
Rerun | test_case/test_basic/test_case.py::TestBPM::test_bpm[认证接口-登录系统-中-反向用例-用户名正确-密码过长-POST-http://36.139.193.99:8088/auth-application/json-case_data6-expect_data6-None-None-None] | 0.03 |
self = <APIAutoTest_v3_1.test_case.test_basic.test_case.TestBPM object at 0x0000028C3CAA3CD0> req_fix = <APIAutoTest_v3_1.request_method.request_method.RequestMethod object at 0x0000028C3CAAA250> db_fix = <APIAutoTest_v3_1.common.db.DB object at 0x0000028C3CA9C190>, module_name = '认证接口', api_name = '登录系统', level = '中' case_title = '反向用例-用户名正确-密码过长', case_method = 'POST', case_url = 'http://36.139.193.99:8088/auth', case_mime = 'application/json' case_data = {'password': '1', 'username': 'admin'}, expect_data = {'message': '账户错误或该租户未启用', 'state': False}, sql_type = None, sql_data = None update_key = None @log_decorator @allure.epic("BPM-Basic") # @allure.feature("模块名称") # @allure.story("接口名称") # @allure.title("接口标题") # @allure.severity("用例级别") @pytest.mark.parametrize("module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key", ReadExcel(USERNAME).get_data()) def test_bpm(self, req_fix, db_fix, module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key): # 影响allure报告的输出 allure.dynamic.feature(module_name) allure.dynamic.story(api_name) allure.dynamic.title(case_title) allure.dynamic.severity(level) print(case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key) # 判断sql语句类型是否为delete，如果是，使用DB类对象调用delete方法执行删除的sql语句 if sql_type == "delete": # 使用DB类对象调用delete方法执行删除的sql语句, DB类对象就是自定义固件db_fix db_fix.delete(sql_data) # 判断sql语句的类型是否为select，如果是，使用DB类对象调用select方法执行查询语句，并接收查询的结果 elif sql_type == "select": # 使用DB类对象调用select方法执行查询语句，并接收查询的结果 select_result = db_fix.select(sql_data) # 将查询结果更新到用例数据中 case_data[update_key] = select_result # 判断sql语句的类型是否为select|delete 或者 delete|select ，如果是，使用DB类对象执行sql语句 elif sql_type == "select|delete" or sql_type == "delete|select": # 使用DB类对象调用delete方法执行删除的sql语句。 db_fix.delete(sql_data["delete"]) # 使用DB类对象调用select方法执行查询的sql语句, 并接收查询的结果 select_result = db_fix.select(sql_data["select"]) # 将查询结果更新到用例数据中 case_data[update_key] = select_result result = req_fix.request_all(req_method=case_method, req_url=case_url, req_mime=case_mime, case_data=case_data) print(result.text) try: for key in expect_data: > assert expect_data[key] == result.json().get(key) E AssertionError: assert '账户错误或该租户未启用' == '账号或密码错误' E E - 账号或密码错误 E + 账户错误或该租户未启用 test_case\test_basic\test_case.py:61: AssertionError During handling of the above exception, another exception occurred: self = <APIAutoTest_v3_1.test_case.test_basic.test_case.TestBPM object at 0x0000028C3CAA3CD0> req_fix = <APIAutoTest_v3_1.request_method.request_method.RequestMethod object at 0x0000028C3CAAA250> db_fix = <APIAutoTest_v3_1.common.db.DB object at 0x0000028C3CA9C190>, module_name = '认证接口', api_name = '登录系统', level = '中' case_title = '反向用例-用户名正确-密码过长', case_method = 'POST', case_url = 'http://36.139.193.99:8088/auth', case_mime = 'application/json' case_data = {'password': '1', 'username': 'admin'}, expect_data = {'message': '账户错误或该租户未启用', 'state': False}, sql_type = None, sql_data = None update_key = None @log_decorator @allure.epic("BPM-Basic") # @allure.feature("模块名称") # @allure.story("接口名称") # @allure.title("接口标题") # @allure.severity("用例级别") @pytest.mark.parametrize("module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key", ReadExcel(USERNAME).get_data()) def test_bpm(self, req_fix, db_fix, module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key): # 影响allure报告的输出 allure.dynamic.feature(module_name) allure.dynamic.story(api_name) allure.dynamic.title(case_title) allure.dynamic.severity(level) print(case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key) # 判断sql语句类型是否为delete，如果是，使用DB类对象调用delete方法执行删除的sql语句 if sql_type == "delete": # 使用DB类对象调用delete方法执行删除的sql语句, DB类对象就是自定义固件db_fix db_fix.delete(sql_data) # 判断sql语句的类型是否为select，如果是，使用DB类对象调用select方法执行查询语句，并接收查询的结果 elif sql_type == "select": # 使用DB类对象调用select方法执行查询语句，并接收查询的结果 select_result = db_fix.select(sql_data) # 将查询结果更新到用例数据中 case_data[update_key] = select_result # 判断sql语句的类型是否为select|delete 或者 delete|select ，如果是，使用DB类对象执行sql语句 elif sql_type == "select|delete" or sql_type == "delete|select": # 使用DB类对象调用delete方法执行删除的sql语句。 db_fix.delete(sql_data["delete"]) # 使用DB类对象调用select方法执行查询的sql语句, 并接收查询的结果 select_result = db_fix.select(sql_data["select"]) # 将查询结果更新到用例数据中 case_data[update_key] = select_result result = req_fix.request_all(req_method=case_method, req_url=case_url, req_mime=case_mime, case_data=case_data) print(result.text) try: for key in expect_data: assert expect_data[key] == result.json().get(key) except AssertionError: > raise AssertionError("断言失败，描述失败的原因") E AssertionError: 断言失败，描述失败的原因 test_case\test_basic\test_case.py:63: AssertionError ------------------------------Captured stdout call------------------------------ POST http://36.139.193.99:8088/auth application/json {'username': 'admin', 'password': '1'} {'state': False, 'message': '账户错误或该租户未启用'} None None None {"state":false,"message":"账号或密码错误","code":200,"logId":"1812776661021204480"} -------------------------------Captured log call-------------------------------- INFO root:__init__.py:79 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18 DEBUG urllib3.connectionpool:connectionpool.py:291 Resetting dropped connection: 36.139.193.99 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "POST /auth HTTP/11" 500 None ERROR root:__init__.py:82 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18报错，错误为：断言失败，描述失败的原因
Rerun | test_case/test_basic/test_case.py::TestBPM::test_bpm[认证接口-登录系统-中-反向用例-用户名正确-密码过长-POST-http://36.139.193.99:8088/auth-application/json-case_data6-expect_data6-None-None-None] | 0.04 |
self = <APIAutoTest_v3_1.test_case.test_basic.test_case.TestBPM object at 0x0000028C3CAA3CD0> req_fix = <APIAutoTest_v3_1.request_method.request_method.RequestMethod object at 0x0000028C3CAAA250> db_fix = <APIAutoTest_v3_1.common.db.DB object at 0x0000028C3CA9C190>, module_name = '认证接口', api_name = '登录系统', level = '中' case_title = '反向用例-用户名正确-密码过长', case_method = 'POST', case_url = 'http://36.139.193.99:8088/auth', case_mime = 'application/json' case_data = {'password': '1', 'username': 'admin'}, expect_data = {'message': '账户错误或该租户未启用', 'state': False}, sql_type = None, sql_data = None update_key = None @log_decorator @allure.epic("BPM-Basic") # @allure.feature("模块名称") # @allure.story("接口名称") # @allure.title("接口标题") # @allure.severity("用例级别") @pytest.mark.parametrize("module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key", ReadExcel(USERNAME).get_data()) def test_bpm(self, req_fix, db_fix, module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key): # 影响allure报告的输出 allure.dynamic.feature(module_name) allure.dynamic.story(api_name) allure.dynamic.title(case_title) allure.dynamic.severity(level) print(case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key) # 判断sql语句类型是否为delete，如果是，使用DB类对象调用delete方法执行删除的sql语句 if sql_type == "delete": # 使用DB类对象调用delete方法执行删除的sql语句, DB类对象就是自定义固件db_fix db_fix.delete(sql_data) # 判断sql语句的类型是否为select，如果是，使用DB类对象调用select方法执行查询语句，并接收查询的结果 elif sql_type == "select": # 使用DB类对象调用select方法执行查询语句，并接收查询的结果 select_result = db_fix.select(sql_data) # 将查询结果更新到用例数据中 case_data[update_key] = select_result # 判断sql语句的类型是否为select|delete 或者 delete|select ，如果是，使用DB类对象执行sql语句 elif sql_type == "select|delete" or sql_type == "delete|select": # 使用DB类对象调用delete方法执行删除的sql语句。 db_fix.delete(sql_data["delete"]) # 使用DB类对象调用select方法执行查询的sql语句, 并接收查询的结果 select_result = db_fix.select(sql_data["select"]) # 将查询结果更新到用例数据中 case_data[update_key] = select_result result = req_fix.request_all(req_method=case_method, req_url=case_url, req_mime=case_mime, case_data=case_data) print(result.text) try: for key in expect_data: > assert expect_data[key] == result.json().get(key) E AssertionError: assert '账户错误或该租户未启用' == '账号或密码错误' E E - 账号或密码错误 E + 账户错误或该租户未启用 test_case\test_basic\test_case.py:61: AssertionError During handling of the above exception, another exception occurred: self = <APIAutoTest_v3_1.test_case.test_basic.test_case.TestBPM object at 0x0000028C3CAA3CD0> req_fix = <APIAutoTest_v3_1.request_method.request_method.RequestMethod object at 0x0000028C3CAAA250> db_fix = <APIAutoTest_v3_1.common.db.DB object at 0x0000028C3CA9C190>, module_name = '认证接口', api_name = '登录系统', level = '中' case_title = '反向用例-用户名正确-密码过长', case_method = 'POST', case_url = 'http://36.139.193.99:8088/auth', case_mime = 'application/json' case_data = {'password': '1', 'username': 'admin'}, expect_data = {'message': '账户错误或该租户未启用', 'state': False}, sql_type = None, sql_data = None update_key = None @log_decorator @allure.epic("BPM-Basic") # @allure.feature("模块名称") # @allure.story("接口名称") # @allure.title("接口标题") # @allure.severity("用例级别") @pytest.mark.parametrize("module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key", ReadExcel(USERNAME).get_data()) def test_bpm(self, req_fix, db_fix, module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key): # 影响allure报告的输出 allure.dynamic.feature(module_name) allure.dynamic.story(api_name) allure.dynamic.title(case_title) allure.dynamic.severity(level) print(case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key) # 判断sql语句类型是否为delete，如果是，使用DB类对象调用delete方法执行删除的sql语句 if sql_type == "delete": # 使用DB类对象调用delete方法执行删除的sql语句, DB类对象就是自定义固件db_fix db_fix.delete(sql_data) # 判断sql语句的类型是否为select，如果是，使用DB类对象调用select方法执行查询语句，并接收查询的结果 elif sql_type == "select": # 使用DB类对象调用select方法执行查询语句，并接收查询的结果 select_result = db_fix.select(sql_data) # 将查询结果更新到用例数据中 case_data[update_key] = select_result # 判断sql语句的类型是否为select|delete 或者 delete|select ，如果是，使用DB类对象执行sql语句 elif sql_type == "select|delete" or sql_type == "delete|select": # 使用DB类对象调用delete方法执行删除的sql语句。 db_fix.delete(sql_data["delete"]) # 使用DB类对象调用select方法执行查询的sql语句, 并接收查询的结果 select_result = db_fix.select(sql_data["select"]) # 将查询结果更新到用例数据中 case_data[update_key] = select_result result = req_fix.request_all(req_method=case_method, req_url=case_url, req_mime=case_mime, case_data=case_data) print(result.text) try: for key in expect_data: assert expect_data[key] == result.json().get(key) except AssertionError: > raise AssertionError("断言失败，描述失败的原因") E AssertionError: 断言失败，描述失败的原因 test_case\test_basic\test_case.py:63: AssertionError ------------------------------Captured stdout call------------------------------ POST http://36.139.193.99:8088/auth application/json {'username': 'admin', 'password': '1'} {'state': False, 'message': '账户错误或该租户未启用'} None None None {"state":false,"message":"账号或密码错误","code":200,"logId":"1812776661021204480"} -------------------------------Captured log call-------------------------------- INFO root:__init__.py:79 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18 DEBUG urllib3.connectionpool:connectionpool.py:291 Resetting dropped connection: 36.139.193.99 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "POST /auth HTTP/11" 500 None ERROR root:__init__.py:82 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18报错，错误为：断言失败，描述失败的原因 ------------------------------Captured stdout call------------------------------ POST http://36.139.193.99:8088/auth application/json {'username': 'admin', 'password': '1'} {'state': False, 'message': '账户错误或该租户未启用'} None None None {"state":false,"message":"账号或密码错误","code":200,"logId":"1812776661251891200"} -------------------------------Captured log call-------------------------------- INFO root:__init__.py:79 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18 DEBUG urllib3.connectionpool:connectionpool.py:291 Resetting dropped connection: 36.139.193.99 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "POST /auth HTTP/11" 500 None ERROR root:__init__.py:82 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18报错，错误为：断言失败，描述失败的原因
Rerun | test_case/test_basic/test_case.py::TestBPM::test_bpm[认证接口-登录系统-中-反向用例-用户名正确-密码过长-POST-http://36.139.193.99:8088/auth-application/json-case_data6-expect_data6-None-None-None] | 0.02 |
self = <APIAutoTest_v3_1.test_case.test_basic.test_case.TestBPM object at 0x0000028C3CAA3CD0> req_fix = <APIAutoTest_v3_1.request_method.request_method.RequestMethod object at 0x0000028C3CAAA250> db_fix = <APIAutoTest_v3_1.common.db.DB object at 0x0000028C3CA9C190>, module_name = '认证接口', api_name = '登录系统', level = '中' case_title = '反向用例-用户名正确-密码过长', case_method = 'POST', case_url = 'http://36.139.193.99:8088/auth', case_mime = 'application/json' case_data = {'password': '1', 'username': 'admin'}, expect_data = {'message': '账户错误或该租户未启用', 'state': False}, sql_type = None, sql_data = None update_key = None @log_decorator @allure.epic("BPM-Basic") # @allure.feature("模块名称") # @allure.story("接口名称") # @allure.title("接口标题") # @allure.severity("用例级别") @pytest.mark.parametrize("module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key", ReadExcel(USERNAME).get_data()) def test_bpm(self, req_fix, db_fix, module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key): # 影响allure报告的输出 allure.dynamic.feature(module_name) allure.dynamic.story(api_name) allure.dynamic.title(case_title) allure.dynamic.severity(level) print(case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key) # 判断sql语句类型是否为delete，如果是，使用DB类对象调用delete方法执行删除的sql语句 if sql_type == "delete": # 使用DB类对象调用delete方法执行删除的sql语句, DB类对象就是自定义固件db_fix db_fix.delete(sql_data) # 判断sql语句的类型是否为select，如果是，使用DB类对象调用select方法执行查询语句，并接收查询的结果 elif sql_type == "select": # 使用DB类对象调用select方法执行查询语句，并接收查询的结果 select_result = db_fix.select(sql_data) # 将查询结果更新到用例数据中 case_data[update_key] = select_result # 判断sql语句的类型是否为select|delete 或者 delete|select ，如果是，使用DB类对象执行sql语句 elif sql_type == "select|delete" or sql_type == "delete|select": # 使用DB类对象调用delete方法执行删除的sql语句。 db_fix.delete(sql_data["delete"]) # 使用DB类对象调用select方法执行查询的sql语句, 并接收查询的结果 select_result = db_fix.select(sql_data["select"]) # 将查询结果更新到用例数据中 case_data[update_key] = select_result result = req_fix.request_all(req_method=case_method, req_url=case_url, req_mime=case_mime, case_data=case_data) print(result.text) try: for key in expect_data: > assert expect_data[key] == result.json().get(key) E AssertionError: assert '账户错误或该租户未启用' == '账号或密码错误' E E - 账号或密码错误 E + 账户错误或该租户未启用 test_case\test_basic\test_case.py:61: AssertionError During handling of the above exception, another exception occurred: self = <APIAutoTest_v3_1.test_case.test_basic.test_case.TestBPM object at 0x0000028C3CAA3CD0> req_fix = <APIAutoTest_v3_1.request_method.request_method.RequestMethod object at 0x0000028C3CAAA250> db_fix = <APIAutoTest_v3_1.common.db.DB object at 0x0000028C3CA9C190>, module_name = '认证接口', api_name = '登录系统', level = '中' case_title = '反向用例-用户名正确-密码过长', case_method = 'POST', case_url = 'http://36.139.193.99:8088/auth', case_mime = 'application/json' case_data = {'password': '1', 'username': 'admin'}, expect_data = {'message': '账户错误或该租户未启用', 'state': False}, sql_type = None, sql_data = None update_key = None @log_decorator @allure.epic("BPM-Basic") # @allure.feature("模块名称") # @allure.story("接口名称") # @allure.title("接口标题") # @allure.severity("用例级别") @pytest.mark.parametrize("module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key", ReadExcel(USERNAME).get_data()) def test_bpm(self, req_fix, db_fix, module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key): # 影响allure报告的输出 allure.dynamic.feature(module_name) allure.dynamic.story(api_name) allure.dynamic.title(case_title) allure.dynamic.severity(level) print(case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key) # 判断sql语句类型是否为delete，如果是，使用DB类对象调用delete方法执行删除的sql语句 if sql_type == "delete": # 使用DB类对象调用delete方法执行删除的sql语句, DB类对象就是自定义固件db_fix db_fix.delete(sql_data) # 判断sql语句的类型是否为select，如果是，使用DB类对象调用select方法执行查询语句，并接收查询的结果 elif sql_type == "select": # 使用DB类对象调用select方法执行查询语句，并接收查询的结果 select_result = db_fix.select(sql_data) # 将查询结果更新到用例数据中 case_data[update_key] = select_result # 判断sql语句的类型是否为select|delete 或者 delete|select ，如果是，使用DB类对象执行sql语句 elif sql_type == "select|delete" or sql_type == "delete|select": # 使用DB类对象调用delete方法执行删除的sql语句。 db_fix.delete(sql_data["delete"]) # 使用DB类对象调用select方法执行查询的sql语句, 并接收查询的结果 select_result = db_fix.select(sql_data["select"]) # 将查询结果更新到用例数据中 case_data[update_key] = select_result result = req_fix.request_all(req_method=case_method, req_url=case_url, req_mime=case_mime, case_data=case_data) print(result.text) try: for key in expect_data: assert expect_data[key] == result.json().get(key) except AssertionError: > raise AssertionError("断言失败，描述失败的原因") E AssertionError: 断言失败，描述失败的原因 test_case\test_basic\test_case.py:63: AssertionError ------------------------------Captured stdout call------------------------------ POST http://36.139.193.99:8088/auth application/json {'username': 'admin', 'password': '1'} {'state': False, 'message': '账户错误或该租户未启用'} None None None {"state":false,"message":"账号或密码错误","code":200,"logId":"1812776661021204480"} -------------------------------Captured log call-------------------------------- INFO root:__init__.py:79 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18 DEBUG urllib3.connectionpool:connectionpool.py:291 Resetting dropped connection: 36.139.193.99 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "POST /auth HTTP/11" 500 None ERROR root:__init__.py:82 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18报错，错误为：断言失败，描述失败的原因 ------------------------------Captured stdout call------------------------------ POST http://36.139.193.99:8088/auth application/json {'username': 'admin', 'password': '1'} {'state': False, 'message': '账户错误或该租户未启用'} None None None {"state":false,"message":"账号或密码错误","code":200,"logId":"1812776661251891200"} -------------------------------Captured log call-------------------------------- INFO root:__init__.py:79 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18 DEBUG urllib3.connectionpool:connectionpool.py:291 Resetting dropped connection: 36.139.193.99 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "POST /auth HTTP/11" 500 None ERROR root:__init__.py:82 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18报错，错误为：断言失败，描述失败的原因 ------------------------------Captured stdout call------------------------------ POST http://36.139.193.99:8088/auth application/json {'username': 'admin', 'password': '1'} {'state': False, 'message': '账户错误或该租户未启用'} None None None {"state":false,"message":"账号或密码错误","code":200,"logId":"1812776661415469056"} -------------------------------Captured log call-------------------------------- INFO root:__init__.py:79 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18 DEBUG urllib3.connectionpool:connectionpool.py:291 Resetting dropped connection: 36.139.193.99 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "POST /auth HTTP/11" 500 None ERROR root:__init__.py:82 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18报错，错误为：断言失败，描述失败的原因
Rerun | test_case/test_basic/test_case.py::TestBPM::test_bpm[认证接口-登录系统-中-反向用例-用户名正确-密码过短-POST-http://36.139.193.99:8088/auth-application/json-case_data7-expect_data7-None-None-None] | 0.03 |
self = <APIAutoTest_v3_1.test_case.test_basic.test_case.TestBPM object at 0x0000028C3CAA3D90> req_fix = <APIAutoTest_v3_1.request_method.request_method.RequestMethod object at 0x0000028C3CAAA250> db_fix = <APIAutoTest_v3_1.common.db.DB object at 0x0000028C3CA9C190>, module_name = '认证接口', api_name = '登录系统', level = '中' case_title = '反向用例-用户名正确-密码过短', case_method = 'POST', case_url = 'http://36.139.193.99:8088/auth', case_mime = 'application/json' case_data = {'password': 'F4/DVgPS/NEruLxVVRqHktsb1R2fVpw81t5VuGfFjwp0G7U4k6spHPr/ejPlw8XxIVilJ+SyIH0G5FbQStFEd/94mmI7+2Dw2c7MXXIE...5FbQStFEd/94mmI7+2Dw2c7MXXIERYKjd3XNe4gZR4ANJclCJHNGfE+mtnX5voprYwEo9m6ponCdmmXTMx9cWVEJ4K/nbR8=', 'username': 'admin'} expect_data = {'message': '账户错误或该租户未启用', 'state': False}, sql_type = None, sql_data = None, update_key = None @log_decorator @allure.epic("BPM-Basic") # @allure.feature("模块名称") # @allure.story("接口名称") # @allure.title("接口标题") # @allure.severity("用例级别") @pytest.mark.parametrize("module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key", ReadExcel(USERNAME).get_data()) def test_bpm(self, req_fix, db_fix, module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key): # 影响allure报告的输出 allure.dynamic.feature(module_name) allure.dynamic.story(api_name) allure.dynamic.title(case_title) allure.dynamic.severity(level) print(case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key) # 判断sql语句类型是否为delete，如果是，使用DB类对象调用delete方法执行删除的sql语句 if sql_type == "delete": # 使用DB类对象调用delete方法执行删除的sql语句, DB类对象就是自定义固件db_fix db_fix.delete(sql_data) # 判断sql语句的类型是否为select，如果是，使用DB类对象调用select方法执行查询语句，并接收查询的结果 elif sql_type == "select": # 使用DB类对象调用select方法执行查询语句，并接收查询的结果 select_result = db_fix.select(sql_data) # 将查询结果更新到用例数据中 case_data[update_key] = select_result # 判断sql语句的类型是否为select|delete 或者 delete|select ，如果是，使用DB类对象执行sql语句 elif sql_type == "select|delete" or sql_type == "delete|select": # 使用DB类对象调用delete方法执行删除的sql语句。 db_fix.delete(sql_data["delete"]) # 使用DB类对象调用select方法执行查询的sql语句, 并接收查询的结果 select_result = db_fix.select(sql_data["select"]) # 将查询结果更新到用例数据中 case_data[update_key] = select_result result = req_fix.request_all(req_method=case_method, req_url=case_url, req_mime=case_mime, case_data=case_data) print(result.text) try: for key in expect_data: > assert expect_data[key] == result.json().get(key) E AssertionError: assert False == None E + where None = <built-in method get of dict object at 0x0000028C3CBCAAC0>('state') E + where <built-in method get of dict object at 0x0000028C3CBCAAC0> = {'account': 'admin', 'expiration': 86400, 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjExMjEwMTAsImlhdCI6MTcyMTAzNDYxMH0.YAAt-e625AY68ttRh5eWDLGn8mBFvvSlIYlhRVZrZTwSmC5azd3S2XqWeY-apfUNgpQc4-iJngvqnx196fMngQ', ...}.get E + where {'account': 'admin', 'expiration': 86400, 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjExMjEwMTAsImlhdCI6MTcyMTAzNDYxMH0.YAAt-e625AY68ttRh5eWDLGn8mBFvvSlIYlhRVZrZTwSmC5azd3S2XqWeY-apfUNgpQc4-iJngvqnx196fMngQ', ...} = <bound method Response.json of <Response [200]>>() E + where <bound method Response.json of <Response [200]>> = <Response [200]>.json test_case\test_basic\test_case.py:61: AssertionError During handling of the above exception, another exception occurred: self = <APIAutoTest_v3_1.test_case.test_basic.test_case.TestBPM object at 0x0000028C3CAA3D90> req_fix = <APIAutoTest_v3_1.request_method.request_method.RequestMethod object at 0x0000028C3CAAA250> db_fix = <APIAutoTest_v3_1.common.db.DB object at 0x0000028C3CA9C190>, module_name = '认证接口', api_name = '登录系统', level = '中' case_title = '反向用例-用户名正确-密码过短', case_method = 'POST', case_url = 'http://36.139.193.99:8088/auth', case_mime = 'application/json' case_data = {'password': 'F4/DVgPS/NEruLxVVRqHktsb1R2fVpw81t5VuGfFjwp0G7U4k6spHPr/ejPlw8XxIVilJ+SyIH0G5FbQStFEd/94mmI7+2Dw2c7MXXIE...5FbQStFEd/94mmI7+2Dw2c7MXXIERYKjd3XNe4gZR4ANJclCJHNGfE+mtnX5voprYwEo9m6ponCdmmXTMx9cWVEJ4K/nbR8=', 'username': 'admin'} expect_data = {'message': '账户错误或该租户未启用', 'state': False}, sql_type = None, sql_data = None, update_key = None @log_decorator @allure.epic("BPM-Basic") # @allure.feature("模块名称") # @allure.story("接口名称") # @allure.title("接口标题") # @allure.severity("用例级别") @pytest.mark.parametrize("module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key", ReadExcel(USERNAME).get_data()) def test_bpm(self, req_fix, db_fix, module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key): # 影响allure报告的输出 allure.dynamic.feature(module_name) allure.dynamic.story(api_name) allure.dynamic.title(case_title) allure.dynamic.severity(level) print(case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key) # 判断sql语句类型是否为delete，如果是，使用DB类对象调用delete方法执行删除的sql语句 if sql_type == "delete": # 使用DB类对象调用delete方法执行删除的sql语句, DB类对象就是自定义固件db_fix db_fix.delete(sql_data) # 判断sql语句的类型是否为select，如果是，使用DB类对象调用select方法执行查询语句，并接收查询的结果 elif sql_type == "select": # 使用DB类对象调用select方法执行查询语句，并接收查询的结果 select_result = db_fix.select(sql_data) # 将查询结果更新到用例数据中 case_data[update_key] = select_result # 判断sql语句的类型是否为select|delete 或者 delete|select ，如果是，使用DB类对象执行sql语句 elif sql_type == "select|delete" or sql_type == "delete|select": # 使用DB类对象调用delete方法执行删除的sql语句。 db_fix.delete(sql_data["delete"]) # 使用DB类对象调用select方法执行查询的sql语句, 并接收查询的结果 select_result = db_fix.select(sql_data["select"]) # 将查询结果更新到用例数据中 case_data[update_key] = select_result result = req_fix.request_all(req_method=case_method, req_url=case_url, req_mime=case_mime, case_data=case_data) print(result.text) try: for key in expect_data: assert expect_data[key] == result.json().get(key) except AssertionError: > raise AssertionError("断言失败，描述失败的原因") E AssertionError: 断言失败，描述失败的原因 test_case\test_basic\test_case.py:63: AssertionError ------------------------------Captured stdout call------------------------------ POST http://36.139.193.99:8088/auth application/json {'username': 'admin', 'password': 'F4/DVgPS/NEruLxVVRqHktsb1R2fVpw81t5VuGfFjwp0G7U4k6spHPr/ejPlw8XxIVilJ+SyIH0G5FbQStFEd/94mmI7+2Dw2c7MXXIERYKjd3XNe4gZR4ANJclCJHNGfE+mtnX5voprYwEo9m6ponCdmmXTMx9cWVEJ4K/nbR8=F4/DVgPS/NEruLxVVRqHktsb1R2fVpw81t5VuGfFjwp0G7U4k6spHPr/ejPlw8XxIVilJ+SyIH0G5FbQStFEd/94mmI7+2Dw2c7MXXIERYKjd3XNe4gZR4ANJclCJHNGfE+mtnX5voprYwEo9m6ponCdmmXTMx9cWVEJ4K/nbR8='} {'state': False, 'message': '账户错误或该租户未启用'} None None None {"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjExMjEwMTAsImlhdCI6MTcyMTAzNDYxMH0.YAAt-e625AY68ttRh5eWDLGn8mBFvvSlIYlhRVZrZTwSmC5azd3S2XqWeY-apfUNgpQc4-iJngvqnx196fMngQ","username":"超级管理员","account":"admin","userId":"1","expiration":86400,"loginStatus":true,"userAttrs":{"tenantId":"-1"}} -------------------------------Captured log call-------------------------------- INFO root:__init__.py:79 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18 DEBUG urllib3.connectionpool:connectionpool.py:291 Resetting dropped connection: 36.139.193.99 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "POST /auth HTTP/11" 200 None ERROR root:__init__.py:82 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18报错，错误为：断言失败，描述失败的原因
Rerun | test_case/test_basic/test_case.py::TestBPM::test_bpm[认证接口-登录系统-中-反向用例-用户名正确-密码过短-POST-http://36.139.193.99:8088/auth-application/json-case_data7-expect_data7-None-None-None] | 0.03 |
self = <APIAutoTest_v3_1.test_case.test_basic.test_case.TestBPM object at 0x0000028C3CAA3D90> req_fix = <APIAutoTest_v3_1.request_method.request_method.RequestMethod object at 0x0000028C3CAAA250> db_fix = <APIAutoTest_v3_1.common.db.DB object at 0x0000028C3CA9C190>, module_name = '认证接口', api_name = '登录系统', level = '中' case_title = '反向用例-用户名正确-密码过短', case_method = 'POST', case_url = 'http://36.139.193.99:8088/auth', case_mime = 'application/json' case_data = {'password': 'F4/DVgPS/NEruLxVVRqHktsb1R2fVpw81t5VuGfFjwp0G7U4k6spHPr/ejPlw8XxIVilJ+SyIH0G5FbQStFEd/94mmI7+2Dw2c7MXXIE...5FbQStFEd/94mmI7+2Dw2c7MXXIERYKjd3XNe4gZR4ANJclCJHNGfE+mtnX5voprYwEo9m6ponCdmmXTMx9cWVEJ4K/nbR8=', 'username': 'admin'} expect_data = {'message': '账户错误或该租户未启用', 'state': False}, sql_type = None, sql_data = None, update_key = None @log_decorator @allure.epic("BPM-Basic") # @allure.feature("模块名称") # @allure.story("接口名称") # @allure.title("接口标题") # @allure.severity("用例级别") @pytest.mark.parametrize("module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key", ReadExcel(USERNAME).get_data()) def test_bpm(self, req_fix, db_fix, module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key): # 影响allure报告的输出 allure.dynamic.feature(module_name) allure.dynamic.story(api_name) allure.dynamic.title(case_title) allure.dynamic.severity(level) print(case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key) # 判断sql语句类型是否为delete，如果是，使用DB类对象调用delete方法执行删除的sql语句 if sql_type == "delete": # 使用DB类对象调用delete方法执行删除的sql语句, DB类对象就是自定义固件db_fix db_fix.delete(sql_data) # 判断sql语句的类型是否为select，如果是，使用DB类对象调用select方法执行查询语句，并接收查询的结果 elif sql_type == "select": # 使用DB类对象调用select方法执行查询语句，并接收查询的结果 select_result = db_fix.select(sql_data) # 将查询结果更新到用例数据中 case_data[update_key] = select_result # 判断sql语句的类型是否为select|delete 或者 delete|select ，如果是，使用DB类对象执行sql语句 elif sql_type == "select|delete" or sql_type == "delete|select": # 使用DB类对象调用delete方法执行删除的sql语句。 db_fix.delete(sql_data["delete"]) # 使用DB类对象调用select方法执行查询的sql语句, 并接收查询的结果 select_result = db_fix.select(sql_data["select"]) # 将查询结果更新到用例数据中 case_data[update_key] = select_result result = req_fix.request_all(req_method=case_method, req_url=case_url, req_mime=case_mime, case_data=case_data) print(result.text) try: for key in expect_data: > assert expect_data[key] == result.json().get(key) E AssertionError: assert False == None E + where None = <built-in method get of dict object at 0x0000028C3CB9A8C0>('state') E + where <built-in method get of dict object at 0x0000028C3CB9A8C0> = {'account': 'admin', 'expiration': 86400, 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjExMjEwMTAsImlhdCI6MTcyMTAzNDYxMH0.YAAt-e625AY68ttRh5eWDLGn8mBFvvSlIYlhRVZrZTwSmC5azd3S2XqWeY-apfUNgpQc4-iJngvqnx196fMngQ', ...}.get E + where {'account': 'admin', 'expiration': 86400, 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjExMjEwMTAsImlhdCI6MTcyMTAzNDYxMH0.YAAt-e625AY68ttRh5eWDLGn8mBFvvSlIYlhRVZrZTwSmC5azd3S2XqWeY-apfUNgpQc4-iJngvqnx196fMngQ', ...} = <bound method Response.json of <Response [200]>>() E + where <bound method Response.json of <Response [200]>> = <Response [200]>.json test_case\test_basic\test_case.py:61: AssertionError During handling of the above exception, another exception occurred: self = <APIAutoTest_v3_1.test_case.test_basic.test_case.TestBPM object at 0x0000028C3CAA3D90> req_fix = <APIAutoTest_v3_1.request_method.request_method.RequestMethod object at 0x0000028C3CAAA250> db_fix = <APIAutoTest_v3_1.common.db.DB object at 0x0000028C3CA9C190>, module_name = '认证接口', api_name = '登录系统', level = '中' case_title = '反向用例-用户名正确-密码过短', case_method = 'POST', case_url = 'http://36.139.193.99:8088/auth', case_mime = 'application/json' case_data = {'password': 'F4/DVgPS/NEruLxVVRqHktsb1R2fVpw81t5VuGfFjwp0G7U4k6spHPr/ejPlw8XxIVilJ+SyIH0G5FbQStFEd/94mmI7+2Dw2c7MXXIE...5FbQStFEd/94mmI7+2Dw2c7MXXIERYKjd3XNe4gZR4ANJclCJHNGfE+mtnX5voprYwEo9m6ponCdmmXTMx9cWVEJ4K/nbR8=', 'username': 'admin'} expect_data = {'message': '账户错误或该租户未启用', 'state': False}, sql_type = None, sql_data = None, update_key = None @log_decorator @allure.epic("BPM-Basic") # @allure.feature("模块名称") # @allure.story("接口名称") # @allure.title("接口标题") # @allure.severity("用例级别") @pytest.mark.parametrize("module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key", ReadExcel(USERNAME).get_data()) def test_bpm(self, req_fix, db_fix, module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key): # 影响allure报告的输出 allure.dynamic.feature(module_name) allure.dynamic.story(api_name) allure.dynamic.title(case_title) allure.dynamic.severity(level) print(case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key) # 判断sql语句类型是否为delete，如果是，使用DB类对象调用delete方法执行删除的sql语句 if sql_type == "delete": # 使用DB类对象调用delete方法执行删除的sql语句, DB类对象就是自定义固件db_fix db_fix.delete(sql_data) # 判断sql语句的类型是否为select，如果是，使用DB类对象调用select方法执行查询语句，并接收查询的结果 elif sql_type == "select": # 使用DB类对象调用select方法执行查询语句，并接收查询的结果 select_result = db_fix.select(sql_data) # 将查询结果更新到用例数据中 case_data[update_key] = select_result # 判断sql语句的类型是否为select|delete 或者 delete|select ，如果是，使用DB类对象执行sql语句 elif sql_type == "select|delete" or sql_type == "delete|select": # 使用DB类对象调用delete方法执行删除的sql语句。 db_fix.delete(sql_data["delete"]) # 使用DB类对象调用select方法执行查询的sql语句, 并接收查询的结果 select_result = db_fix.select(sql_data["select"]) # 将查询结果更新到用例数据中 case_data[update_key] = select_result result = req_fix.request_all(req_method=case_method, req_url=case_url, req_mime=case_mime, case_data=case_data) print(result.text) try: for key in expect_data: assert expect_data[key] == result.json().get(key) except AssertionError: > raise AssertionError("断言失败，描述失败的原因") E AssertionError: 断言失败，描述失败的原因 test_case\test_basic\test_case.py:63: AssertionError ------------------------------Captured stdout call------------------------------ POST http://36.139.193.99:8088/auth application/json {'username': 'admin', 'password': 'F4/DVgPS/NEruLxVVRqHktsb1R2fVpw81t5VuGfFjwp0G7U4k6spHPr/ejPlw8XxIVilJ+SyIH0G5FbQStFEd/94mmI7+2Dw2c7MXXIERYKjd3XNe4gZR4ANJclCJHNGfE+mtnX5voprYwEo9m6ponCdmmXTMx9cWVEJ4K/nbR8=F4/DVgPS/NEruLxVVRqHktsb1R2fVpw81t5VuGfFjwp0G7U4k6spHPr/ejPlw8XxIVilJ+SyIH0G5FbQStFEd/94mmI7+2Dw2c7MXXIERYKjd3XNe4gZR4ANJclCJHNGfE+mtnX5voprYwEo9m6ponCdmmXTMx9cWVEJ4K/nbR8='} {'state': False, 'message': '账户错误或该租户未启用'} None None None {"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjExMjEwMTAsImlhdCI6MTcyMTAzNDYxMH0.YAAt-e625AY68ttRh5eWDLGn8mBFvvSlIYlhRVZrZTwSmC5azd3S2XqWeY-apfUNgpQc4-iJngvqnx196fMngQ","username":"超级管理员","account":"admin","userId":"1","expiration":86400,"loginStatus":true,"userAttrs":{"tenantId":"-1"}} -------------------------------Captured log call-------------------------------- INFO root:__init__.py:79 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18 DEBUG urllib3.connectionpool:connectionpool.py:291 Resetting dropped connection: 36.139.193.99 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "POST /auth HTTP/11" 200 None ERROR root:__init__.py:82 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18报错，错误为：断言失败，描述失败的原因 ------------------------------Captured stdout call------------------------------ POST http://36.139.193.99:8088/auth application/json {'username': 'admin', 'password': 'F4/DVgPS/NEruLxVVRqHktsb1R2fVpw81t5VuGfFjwp0G7U4k6spHPr/ejPlw8XxIVilJ+SyIH0G5FbQStFEd/94mmI7+2Dw2c7MXXIERYKjd3XNe4gZR4ANJclCJHNGfE+mtnX5voprYwEo9m6ponCdmmXTMx9cWVEJ4K/nbR8=F4/DVgPS/NEruLxVVRqHktsb1R2fVpw81t5VuGfFjwp0G7U4k6spHPr/ejPlw8XxIVilJ+SyIH0G5FbQStFEd/94mmI7+2Dw2c7MXXIERYKjd3XNe4gZR4ANJclCJHNGfE+mtnX5voprYwEo9m6ponCdmmXTMx9cWVEJ4K/nbR8='} {'state': False, 'message': '账户错误或该租户未启用'} None None None {"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjExMjEwMTAsImlhdCI6MTcyMTAzNDYxMH0.YAAt-e625AY68ttRh5eWDLGn8mBFvvSlIYlhRVZrZTwSmC5azd3S2XqWeY-apfUNgpQc4-iJngvqnx196fMngQ","username":"超级管理员","account":"admin","userId":"1","expiration":86400,"loginStatus":true,"userAttrs":{"tenantId":"-1"}} -------------------------------Captured log call-------------------------------- INFO root:__init__.py:79 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "POST /auth HTTP/11" 200 None ERROR root:__init__.py:82 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18报错，错误为：断言失败，描述失败的原因
Rerun | test_case/test_basic/test_case.py::TestBPM::test_bpm[认证接口-登录系统-中-反向用例-用户名正确-密码过短-POST-http://36.139.193.99:8088/auth-application/json-case_data7-expect_data7-None-None-None] | 0.02 |
self = <APIAutoTest_v3_1.test_case.test_basic.test_case.TestBPM object at 0x0000028C3CAA3D90> req_fix = <APIAutoTest_v3_1.request_method.request_method.RequestMethod object at 0x0000028C3CAAA250> db_fix = <APIAutoTest_v3_1.common.db.DB object at 0x0000028C3CA9C190>, module_name = '认证接口', api_name = '登录系统', level = '中' case_title = '反向用例-用户名正确-密码过短', case_method = 'POST', case_url = 'http://36.139.193.99:8088/auth', case_mime = 'application/json' case_data = {'password': 'F4/DVgPS/NEruLxVVRqHktsb1R2fVpw81t5VuGfFjwp0G7U4k6spHPr/ejPlw8XxIVilJ+SyIH0G5FbQStFEd/94mmI7+2Dw2c7MXXIE...5FbQStFEd/94mmI7+2Dw2c7MXXIERYKjd3XNe4gZR4ANJclCJHNGfE+mtnX5voprYwEo9m6ponCdmmXTMx9cWVEJ4K/nbR8=', 'username': 'admin'} expect_data = {'message': '账户错误或该租户未启用', 'state': False}, sql_type = None, sql_data = None, update_key = None @log_decorator @allure.epic("BPM-Basic") # @allure.feature("模块名称") # @allure.story("接口名称") # @allure.title("接口标题") # @allure.severity("用例级别") @pytest.mark.parametrize("module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key", ReadExcel(USERNAME).get_data()) def test_bpm(self, req_fix, db_fix, module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key): # 影响allure报告的输出 allure.dynamic.feature(module_name) allure.dynamic.story(api_name) allure.dynamic.title(case_title) allure.dynamic.severity(level) print(case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key) # 判断sql语句类型是否为delete，如果是，使用DB类对象调用delete方法执行删除的sql语句 if sql_type == "delete": # 使用DB类对象调用delete方法执行删除的sql语句, DB类对象就是自定义固件db_fix db_fix.delete(sql_data) # 判断sql语句的类型是否为select，如果是，使用DB类对象调用select方法执行查询语句，并接收查询的结果 elif sql_type == "select": # 使用DB类对象调用select方法执行查询语句，并接收查询的结果 select_result = db_fix.select(sql_data) # 将查询结果更新到用例数据中 case_data[update_key] = select_result # 判断sql语句的类型是否为select|delete 或者 delete|select ，如果是，使用DB类对象执行sql语句 elif sql_type == "select|delete" or sql_type == "delete|select": # 使用DB类对象调用delete方法执行删除的sql语句。 db_fix.delete(sql_data["delete"]) # 使用DB类对象调用select方法执行查询的sql语句, 并接收查询的结果 select_result = db_fix.select(sql_data["select"]) # 将查询结果更新到用例数据中 case_data[update_key] = select_result result = req_fix.request_all(req_method=case_method, req_url=case_url, req_mime=case_mime, case_data=case_data) print(result.text) try: for key in expect_data: > assert expect_data[key] == result.json().get(key) E AssertionError: assert False == None E + where None = <built-in method get of dict object at 0x0000028C3CB8B9C0>('state') E + where <built-in method get of dict object at 0x0000028C3CB8B9C0> = {'account': 'admin', 'expiration': 86400, 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjExMjEwMTAsImlhdCI6MTcyMTAzNDYxMH0.YAAt-e625AY68ttRh5eWDLGn8mBFvvSlIYlhRVZrZTwSmC5azd3S2XqWeY-apfUNgpQc4-iJngvqnx196fMngQ', ...}.get E + where {'account': 'admin', 'expiration': 86400, 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjExMjEwMTAsImlhdCI6MTcyMTAzNDYxMH0.YAAt-e625AY68ttRh5eWDLGn8mBFvvSlIYlhRVZrZTwSmC5azd3S2XqWeY-apfUNgpQc4-iJngvqnx196fMngQ', ...} = <bound method Response.json of <Response [200]>>() E + where <bound method Response.json of <Response [200]>> = <Response [200]>.json test_case\test_basic\test_case.py:61: AssertionError During handling of the above exception, another exception occurred: self = <APIAutoTest_v3_1.test_case.test_basic.test_case.TestBPM object at 0x0000028C3CAA3D90> req_fix = <APIAutoTest_v3_1.request_method.request_method.RequestMethod object at 0x0000028C3CAAA250> db_fix = <APIAutoTest_v3_1.common.db.DB object at 0x0000028C3CA9C190>, module_name = '认证接口', api_name = '登录系统', level = '中' case_title = '反向用例-用户名正确-密码过短', case_method = 'POST', case_url = 'http://36.139.193.99:8088/auth', case_mime = 'application/json' case_data = {'password': 'F4/DVgPS/NEruLxVVRqHktsb1R2fVpw81t5VuGfFjwp0G7U4k6spHPr/ejPlw8XxIVilJ+SyIH0G5FbQStFEd/94mmI7+2Dw2c7MXXIE...5FbQStFEd/94mmI7+2Dw2c7MXXIERYKjd3XNe4gZR4ANJclCJHNGfE+mtnX5voprYwEo9m6ponCdmmXTMx9cWVEJ4K/nbR8=', 'username': 'admin'} expect_data = {'message': '账户错误或该租户未启用', 'state': False}, sql_type = None, sql_data = None, update_key = None @log_decorator @allure.epic("BPM-Basic") # @allure.feature("模块名称") # @allure.story("接口名称") # @allure.title("接口标题") # @allure.severity("用例级别") @pytest.mark.parametrize("module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key", ReadExcel(USERNAME).get_data()) def test_bpm(self, req_fix, db_fix, module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key): # 影响allure报告的输出 allure.dynamic.feature(module_name) allure.dynamic.story(api_name) allure.dynamic.title(case_title) allure.dynamic.severity(level) print(case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key) # 判断sql语句类型是否为delete，如果是，使用DB类对象调用delete方法执行删除的sql语句 if sql_type == "delete": # 使用DB类对象调用delete方法执行删除的sql语句, DB类对象就是自定义固件db_fix db_fix.delete(sql_data) # 判断sql语句的类型是否为select，如果是，使用DB类对象调用select方法执行查询语句，并接收查询的结果 elif sql_type == "select": # 使用DB类对象调用select方法执行查询语句，并接收查询的结果 select_result = db_fix.select(sql_data) # 将查询结果更新到用例数据中 case_data[update_key] = select_result # 判断sql语句的类型是否为select|delete 或者 delete|select ，如果是，使用DB类对象执行sql语句 elif sql_type == "select|delete" or sql_type == "delete|select": # 使用DB类对象调用delete方法执行删除的sql语句。 db_fix.delete(sql_data["delete"]) # 使用DB类对象调用select方法执行查询的sql语句, 并接收查询的结果 select_result = db_fix.select(sql_data["select"]) # 将查询结果更新到用例数据中 case_data[update_key] = select_result result = req_fix.request_all(req_method=case_method, req_url=case_url, req_mime=case_mime, case_data=case_data) print(result.text) try: for key in expect_data: assert expect_data[key] == result.json().get(key) except AssertionError: > raise AssertionError("断言失败，描述失败的原因") E AssertionError: 断言失败，描述失败的原因 test_case\test_basic\test_case.py:63: AssertionError ------------------------------Captured stdout call------------------------------ POST http://36.139.193.99:8088/auth application/json {'username': 'admin', 'password': 'F4/DVgPS/NEruLxVVRqHktsb1R2fVpw81t5VuGfFjwp0G7U4k6spHPr/ejPlw8XxIVilJ+SyIH0G5FbQStFEd/94mmI7+2Dw2c7MXXIERYKjd3XNe4gZR4ANJclCJHNGfE+mtnX5voprYwEo9m6ponCdmmXTMx9cWVEJ4K/nbR8=F4/DVgPS/NEruLxVVRqHktsb1R2fVpw81t5VuGfFjwp0G7U4k6spHPr/ejPlw8XxIVilJ+SyIH0G5FbQStFEd/94mmI7+2Dw2c7MXXIERYKjd3XNe4gZR4ANJclCJHNGfE+mtnX5voprYwEo9m6ponCdmmXTMx9cWVEJ4K/nbR8='} {'state': False, 'message': '账户错误或该租户未启用'} None None None {"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjExMjEwMTAsImlhdCI6MTcyMTAzNDYxMH0.YAAt-e625AY68ttRh5eWDLGn8mBFvvSlIYlhRVZrZTwSmC5azd3S2XqWeY-apfUNgpQc4-iJngvqnx196fMngQ","username":"超级管理员","account":"admin","userId":"1","expiration":86400,"loginStatus":true,"userAttrs":{"tenantId":"-1"}} -------------------------------Captured log call-------------------------------- INFO root:__init__.py:79 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18 DEBUG urllib3.connectionpool:connectionpool.py:291 Resetting dropped connection: 36.139.193.99 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "POST /auth HTTP/11" 200 None ERROR root:__init__.py:82 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18报错，错误为：断言失败，描述失败的原因 ------------------------------Captured stdout call------------------------------ POST http://36.139.193.99:8088/auth application/json {'username': 'admin', 'password': 'F4/DVgPS/NEruLxVVRqHktsb1R2fVpw81t5VuGfFjwp0G7U4k6spHPr/ejPlw8XxIVilJ+SyIH0G5FbQStFEd/94mmI7+2Dw2c7MXXIERYKjd3XNe4gZR4ANJclCJHNGfE+mtnX5voprYwEo9m6ponCdmmXTMx9cWVEJ4K/nbR8=F4/DVgPS/NEruLxVVRqHktsb1R2fVpw81t5VuGfFjwp0G7U4k6spHPr/ejPlw8XxIVilJ+SyIH0G5FbQStFEd/94mmI7+2Dw2c7MXXIERYKjd3XNe4gZR4ANJclCJHNGfE+mtnX5voprYwEo9m6ponCdmmXTMx9cWVEJ4K/nbR8='} {'state': False, 'message': '账户错误或该租户未启用'} None None None {"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjExMjEwMTAsImlhdCI6MTcyMTAzNDYxMH0.YAAt-e625AY68ttRh5eWDLGn8mBFvvSlIYlhRVZrZTwSmC5azd3S2XqWeY-apfUNgpQc4-iJngvqnx196fMngQ","username":"超级管理员","account":"admin","userId":"1","expiration":86400,"loginStatus":true,"userAttrs":{"tenantId":"-1"}} -------------------------------Captured log call-------------------------------- INFO root:__init__.py:79 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "POST /auth HTTP/11" 200 None ERROR root:__init__.py:82 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18报错，错误为：断言失败，描述失败的原因 ------------------------------Captured stdout call------------------------------ POST http://36.139.193.99:8088/auth application/json {'username': 'admin', 'password': 'F4/DVgPS/NEruLxVVRqHktsb1R2fVpw81t5VuGfFjwp0G7U4k6spHPr/ejPlw8XxIVilJ+SyIH0G5FbQStFEd/94mmI7+2Dw2c7MXXIERYKjd3XNe4gZR4ANJclCJHNGfE+mtnX5voprYwEo9m6ponCdmmXTMx9cWVEJ4K/nbR8=F4/DVgPS/NEruLxVVRqHktsb1R2fVpw81t5VuGfFjwp0G7U4k6spHPr/ejPlw8XxIVilJ+SyIH0G5FbQStFEd/94mmI7+2Dw2c7MXXIERYKjd3XNe4gZR4ANJclCJHNGfE+mtnX5voprYwEo9m6ponCdmmXTMx9cWVEJ4K/nbR8='} {'state': False, 'message': '账户错误或该租户未启用'} None None None {"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjExMjEwMTAsImlhdCI6MTcyMTAzNDYxMH0.YAAt-e625AY68ttRh5eWDLGn8mBFvvSlIYlhRVZrZTwSmC5azd3S2XqWeY-apfUNgpQc4-iJngvqnx196fMngQ","username":"超级管理员","account":"admin","userId":"1","expiration":86400,"loginStatus":true,"userAttrs":{"tenantId":"-1"}} -------------------------------Captured log call-------------------------------- INFO root:__init__.py:79 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "POST /auth HTTP/11" 200 None ERROR root:__init__.py:82 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18报错，错误为：断言失败，描述失败的原因
Rerun | test_case/test_basic/test_case.py::TestBPM::test_bpm[认证接口-刷新token-高-正向用例-GET-http://36.139.193.99:8088/refresh-None-None-expect_data8-None-None-None] | 0.02 |
self = <APIAutoTest_v3_1.test_case.test_basic.test_case.TestBPM object at 0x0000028C3CAA3E50> req_fix = <APIAutoTest_v3_1.request_method.request_method.RequestMethod object at 0x0000028C3CAAA250> db_fix = <APIAutoTest_v3_1.common.db.DB object at 0x0000028C3CA9C190>, module_name = '认证接口', api_name = '刷新token', level = '高' case_title = '正向用例', case_method = 'GET', case_url = 'http://36.139.193.99:8088/refresh', case_mime = None, case_data = None expect_data = {'message': '刷新成功'}, sql_type = None, sql_data = None, update_key = None @log_decorator @allure.epic("BPM-Basic") # @allure.feature("模块名称") # @allure.story("接口名称") # @allure.title("接口标题") # @allure.severity("用例级别") @pytest.mark.parametrize("module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key", ReadExcel(USERNAME).get_data()) def test_bpm(self, req_fix, db_fix, module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key): # 影响allure报告的输出 allure.dynamic.feature(module_name) allure.dynamic.story(api_name) allure.dynamic.title(case_title) allure.dynamic.severity(level) print(case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key) # 判断sql语句类型是否为delete，如果是，使用DB类对象调用delete方法执行删除的sql语句 if sql_type == "delete": # 使用DB类对象调用delete方法执行删除的sql语句, DB类对象就是自定义固件db_fix db_fix.delete(sql_data) # 判断sql语句的类型是否为select，如果是，使用DB类对象调用select方法执行查询语句，并接收查询的结果 elif sql_type == "select": # 使用DB类对象调用select方法执行查询语句，并接收查询的结果 select_result = db_fix.select(sql_data) # 将查询结果更新到用例数据中 case_data[update_key] = select_result # 判断sql语句的类型是否为select|delete 或者 delete|select ，如果是，使用DB类对象执行sql语句 elif sql_type == "select|delete" or sql_type == "delete|select": # 使用DB类对象调用delete方法执行删除的sql语句。 db_fix.delete(sql_data["delete"]) # 使用DB类对象调用select方法执行查询的sql语句, 并接收查询的结果 select_result = db_fix.select(sql_data["select"]) # 将查询结果更新到用例数据中 case_data[update_key] = select_result result = req_fix.request_all(req_method=case_method, req_url=case_url, req_mime=case_mime, case_data=case_data) print(result.text) try: for key in expect_data: > assert expect_data[key] == result.json().get(key) E AssertionError: assert '刷新成功' == None E + where None = <built-in method get of dict object at 0x0000028C3CA96D40>('message') E + where <built-in method get of dict object at 0x0000028C3CA96D40> = {'account': 'admin', 'expiration': 86400, 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjExMjEwMTAsImlhdCI6MTcyMTAzNDYxMH0.YAAt-e625AY68ttRh5eWDLGn8mBFvvSlIYlhRVZrZTwSmC5azd3S2XqWeY-apfUNgpQc4-iJngvqnx196fMngQ', ...}.get E + where {'account': 'admin', 'expiration': 86400, 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjExMjEwMTAsImlhdCI6MTcyMTAzNDYxMH0.YAAt-e625AY68ttRh5eWDLGn8mBFvvSlIYlhRVZrZTwSmC5azd3S2XqWeY-apfUNgpQc4-iJngvqnx196fMngQ', ...} = <bound method Response.json of <Response [200]>>() E + where <bound method Response.json of <Response [200]>> = <Response [200]>.json test_case\test_basic\test_case.py:61: AssertionError During handling of the above exception, another exception occurred: self = <APIAutoTest_v3_1.test_case.test_basic.test_case.TestBPM object at 0x0000028C3CAA3E50> req_fix = <APIAutoTest_v3_1.request_method.request_method.RequestMethod object at 0x0000028C3CAAA250> db_fix = <APIAutoTest_v3_1.common.db.DB object at 0x0000028C3CA9C190>, module_name = '认证接口', api_name = '刷新token', level = '高' case_title = '正向用例', case_method = 'GET', case_url = 'http://36.139.193.99:8088/refresh', case_mime = None, case_data = None expect_data = {'message': '刷新成功'}, sql_type = None, sql_data = None, update_key = None @log_decorator @allure.epic("BPM-Basic") # @allure.feature("模块名称") # @allure.story("接口名称") # @allure.title("接口标题") # @allure.severity("用例级别") @pytest.mark.parametrize("module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key", ReadExcel(USERNAME).get_data()) def test_bpm(self, req_fix, db_fix, module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key): # 影响allure报告的输出 allure.dynamic.feature(module_name) allure.dynamic.story(api_name) allure.dynamic.title(case_title) allure.dynamic.severity(level) print(case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key) # 判断sql语句类型是否为delete，如果是，使用DB类对象调用delete方法执行删除的sql语句 if sql_type == "delete": # 使用DB类对象调用delete方法执行删除的sql语句, DB类对象就是自定义固件db_fix db_fix.delete(sql_data) # 判断sql语句的类型是否为select，如果是，使用DB类对象调用select方法执行查询语句，并接收查询的结果 elif sql_type == "select": # 使用DB类对象调用select方法执行查询语句，并接收查询的结果 select_result = db_fix.select(sql_data) # 将查询结果更新到用例数据中 case_data[update_key] = select_result # 判断sql语句的类型是否为select|delete 或者 delete|select ，如果是，使用DB类对象执行sql语句 elif sql_type == "select|delete" or sql_type == "delete|select": # 使用DB类对象调用delete方法执行删除的sql语句。 db_fix.delete(sql_data["delete"]) # 使用DB类对象调用select方法执行查询的sql语句, 并接收查询的结果 select_result = db_fix.select(sql_data["select"]) # 将查询结果更新到用例数据中 case_data[update_key] = select_result result = req_fix.request_all(req_method=case_method, req_url=case_url, req_mime=case_mime, case_data=case_data) print(result.text) try: for key in expect_data: assert expect_data[key] == result.json().get(key) except AssertionError: > raise AssertionError("断言失败，描述失败的原因") E AssertionError: 断言失败，描述失败的原因 test_case\test_basic\test_case.py:63: AssertionError ------------------------------Captured stdout call------------------------------ GET http://36.139.193.99:8088/refresh None None {'message': '刷新成功'} None None None {"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjExMjEwMTAsImlhdCI6MTcyMTAzNDYxMH0.YAAt-e625AY68ttRh5eWDLGn8mBFvvSlIYlhRVZrZTwSmC5azd3S2XqWeY-apfUNgpQc4-iJngvqnx196fMngQ","username":"admin","account":"admin","userId":"","expiration":86400,"loginStatus":true} -------------------------------Captured log call-------------------------------- INFO root:__init__.py:79 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "GET /refresh HTTP/11" 200 None ERROR root:__init__.py:82 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18报错，错误为：断言失败，描述失败的原因
Rerun | test_case/test_basic/test_case.py::TestBPM::test_bpm[认证接口-刷新token-高-正向用例-GET-http://36.139.193.99:8088/refresh-None-None-expect_data8-None-None-None] | 0.02 |
self = <APIAutoTest_v3_1.test_case.test_basic.test_case.TestBPM object at 0x0000028C3CAA3E50> req_fix = <APIAutoTest_v3_1.request_method.request_method.RequestMethod object at 0x0000028C3CAAA250> db_fix = <APIAutoTest_v3_1.common.db.DB object at 0x0000028C3CA9C190>, module_name = '认证接口', api_name = '刷新token', level = '高' case_title = '正向用例', case_method = 'GET', case_url = 'http://36.139.193.99:8088/refresh', case_mime = None, case_data = None expect_data = {'message': '刷新成功'}, sql_type = None, sql_data = None, update_key = None @log_decorator @allure.epic("BPM-Basic") # @allure.feature("模块名称") # @allure.story("接口名称") # @allure.title("接口标题") # @allure.severity("用例级别") @pytest.mark.parametrize("module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key", ReadExcel(USERNAME).get_data()) def test_bpm(self, req_fix, db_fix, module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key): # 影响allure报告的输出 allure.dynamic.feature(module_name) allure.dynamic.story(api_name) allure.dynamic.title(case_title) allure.dynamic.severity(level) print(case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key) # 判断sql语句类型是否为delete，如果是，使用DB类对象调用delete方法执行删除的sql语句 if sql_type == "delete": # 使用DB类对象调用delete方法执行删除的sql语句, DB类对象就是自定义固件db_fix db_fix.delete(sql_data) # 判断sql语句的类型是否为select，如果是，使用DB类对象调用select方法执行查询语句，并接收查询的结果 elif sql_type == "select": # 使用DB类对象调用select方法执行查询语句，并接收查询的结果 select_result = db_fix.select(sql_data) # 将查询结果更新到用例数据中 case_data[update_key] = select_result # 判断sql语句的类型是否为select|delete 或者 delete|select ，如果是，使用DB类对象执行sql语句 elif sql_type == "select|delete" or sql_type == "delete|select": # 使用DB类对象调用delete方法执行删除的sql语句。 db_fix.delete(sql_data["delete"]) # 使用DB类对象调用select方法执行查询的sql语句, 并接收查询的结果 select_result = db_fix.select(sql_data["select"]) # 将查询结果更新到用例数据中 case_data[update_key] = select_result result = req_fix.request_all(req_method=case_method, req_url=case_url, req_mime=case_mime, case_data=case_data) print(result.text) try: for key in expect_data: > assert expect_data[key] == result.json().get(key) E AssertionError: assert '刷新成功' == None E + where None = <built-in method get of dict object at 0x0000028C3CBFFE40>('message') E + where <built-in method get of dict object at 0x0000028C3CBFFE40> = {'account': 'admin', 'expiration': 86400, 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjExMjEwMTAsImlhdCI6MTcyMTAzNDYxMH0.YAAt-e625AY68ttRh5eWDLGn8mBFvvSlIYlhRVZrZTwSmC5azd3S2XqWeY-apfUNgpQc4-iJngvqnx196fMngQ', ...}.get E + where {'account': 'admin', 'expiration': 86400, 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjExMjEwMTAsImlhdCI6MTcyMTAzNDYxMH0.YAAt-e625AY68ttRh5eWDLGn8mBFvvSlIYlhRVZrZTwSmC5azd3S2XqWeY-apfUNgpQc4-iJngvqnx196fMngQ', ...} = <bound method Response.json of <Response [200]>>() E + where <bound method Response.json of <Response [200]>> = <Response [200]>.json test_case\test_basic\test_case.py:61: AssertionError During handling of the above exception, another exception occurred: self = <APIAutoTest_v3_1.test_case.test_basic.test_case.TestBPM object at 0x0000028C3CAA3E50> req_fix = <APIAutoTest_v3_1.request_method.request_method.RequestMethod object at 0x0000028C3CAAA250> db_fix = <APIAutoTest_v3_1.common.db.DB object at 0x0000028C3CA9C190>, module_name = '认证接口', api_name = '刷新token', level = '高' case_title = '正向用例', case_method = 'GET', case_url = 'http://36.139.193.99:8088/refresh', case_mime = None, case_data = None expect_data = {'message': '刷新成功'}, sql_type = None, sql_data = None, update_key = None @log_decorator @allure.epic("BPM-Basic") # @allure.feature("模块名称") # @allure.story("接口名称") # @allure.title("接口标题") # @allure.severity("用例级别") @pytest.mark.parametrize("module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key", ReadExcel(USERNAME).get_data()) def test_bpm(self, req_fix, db_fix, module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key): # 影响allure报告的输出 allure.dynamic.feature(module_name) allure.dynamic.story(api_name) allure.dynamic.title(case_title) allure.dynamic.severity(level) print(case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key) # 判断sql语句类型是否为delete，如果是，使用DB类对象调用delete方法执行删除的sql语句 if sql_type == "delete": # 使用DB类对象调用delete方法执行删除的sql语句, DB类对象就是自定义固件db_fix db_fix.delete(sql_data) # 判断sql语句的类型是否为select，如果是，使用DB类对象调用select方法执行查询语句，并接收查询的结果 elif sql_type == "select": # 使用DB类对象调用select方法执行查询语句，并接收查询的结果 select_result = db_fix.select(sql_data) # 将查询结果更新到用例数据中 case_data[update_key] = select_result # 判断sql语句的类型是否为select|delete 或者 delete|select ，如果是，使用DB类对象执行sql语句 elif sql_type == "select|delete" or sql_type == "delete|select": # 使用DB类对象调用delete方法执行删除的sql语句。 db_fix.delete(sql_data["delete"]) # 使用DB类对象调用select方法执行查询的sql语句, 并接收查询的结果 select_result = db_fix.select(sql_data["select"]) # 将查询结果更新到用例数据中 case_data[update_key] = select_result result = req_fix.request_all(req_method=case_method, req_url=case_url, req_mime=case_mime, case_data=case_data) print(result.text) try: for key in expect_data: assert expect_data[key] == result.json().get(key) except AssertionError: > raise AssertionError("断言失败，描述失败的原因") E AssertionError: 断言失败，描述失败的原因 test_case\test_basic\test_case.py:63: AssertionError ------------------------------Captured stdout call------------------------------ GET http://36.139.193.99:8088/refresh None None {'message': '刷新成功'} None None None {"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjExMjEwMTAsImlhdCI6MTcyMTAzNDYxMH0.YAAt-e625AY68ttRh5eWDLGn8mBFvvSlIYlhRVZrZTwSmC5azd3S2XqWeY-apfUNgpQc4-iJngvqnx196fMngQ","username":"admin","account":"admin","userId":"","expiration":86400,"loginStatus":true} -------------------------------Captured log call-------------------------------- INFO root:__init__.py:79 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "GET /refresh HTTP/11" 200 None ERROR root:__init__.py:82 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18报错，错误为：断言失败，描述失败的原因 ------------------------------Captured stdout call------------------------------ GET http://36.139.193.99:8088/refresh None None {'message': '刷新成功'} None None None {"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjExMjEwMTAsImlhdCI6MTcyMTAzNDYxMH0.YAAt-e625AY68ttRh5eWDLGn8mBFvvSlIYlhRVZrZTwSmC5azd3S2XqWeY-apfUNgpQc4-iJngvqnx196fMngQ","username":"admin","account":"admin","userId":"","expiration":86400,"loginStatus":true} -------------------------------Captured log call-------------------------------- INFO root:__init__.py:79 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "GET /refresh HTTP/11" 200 None ERROR root:__init__.py:82 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18报错，错误为：断言失败，描述失败的原因
Rerun | test_case/test_basic/test_case.py::TestBPM::test_bpm[认证接口-刷新token-高-正向用例-GET-http://36.139.193.99:8088/refresh-None-None-expect_data8-None-None-None] | 0.02 |
self = <APIAutoTest_v3_1.test_case.test_basic.test_case.TestBPM object at 0x0000028C3CAA3E50> req_fix = <APIAutoTest_v3_1.request_method.request_method.RequestMethod object at 0x0000028C3CAAA250> db_fix = <APIAutoTest_v3_1.common.db.DB object at 0x0000028C3CA9C190>, module_name = '认证接口', api_name = '刷新token', level = '高' case_title = '正向用例', case_method = 'GET', case_url = 'http://36.139.193.99:8088/refresh', case_mime = None, case_data = None expect_data = {'message': '刷新成功'}, sql_type = None, sql_data = None, update_key = None @log_decorator @allure.epic("BPM-Basic") # @allure.feature("模块名称") # @allure.story("接口名称") # @allure.title("接口标题") # @allure.severity("用例级别") @pytest.mark.parametrize("module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key", ReadExcel(USERNAME).get_data()) def test_bpm(self, req_fix, db_fix, module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key): # 影响allure报告的输出 allure.dynamic.feature(module_name) allure.dynamic.story(api_name) allure.dynamic.title(case_title) allure.dynamic.severity(level) print(case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key) # 判断sql语句类型是否为delete，如果是，使用DB类对象调用delete方法执行删除的sql语句 if sql_type == "delete": # 使用DB类对象调用delete方法执行删除的sql语句, DB类对象就是自定义固件db_fix db_fix.delete(sql_data) # 判断sql语句的类型是否为select，如果是，使用DB类对象调用select方法执行查询语句，并接收查询的结果 elif sql_type == "select": # 使用DB类对象调用select方法执行查询语句，并接收查询的结果 select_result = db_fix.select(sql_data) # 将查询结果更新到用例数据中 case_data[update_key] = select_result # 判断sql语句的类型是否为select|delete 或者 delete|select ，如果是，使用DB类对象执行sql语句 elif sql_type == "select|delete" or sql_type == "delete|select": # 使用DB类对象调用delete方法执行删除的sql语句。 db_fix.delete(sql_data["delete"]) # 使用DB类对象调用select方法执行查询的sql语句, 并接收查询的结果 select_result = db_fix.select(sql_data["select"]) # 将查询结果更新到用例数据中 case_data[update_key] = select_result result = req_fix.request_all(req_method=case_method, req_url=case_url, req_mime=case_mime, case_data=case_data) print(result.text) try: for key in expect_data: > assert expect_data[key] == result.json().get(key) E AssertionError: assert '刷新成功' == None E + where None = <built-in method get of dict object at 0x0000028C3CC0A300>('message') E + where <built-in method get of dict object at 0x0000028C3CC0A300> = {'account': 'admin', 'expiration': 86400, 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjExMjEwMTAsImlhdCI6MTcyMTAzNDYxMH0.YAAt-e625AY68ttRh5eWDLGn8mBFvvSlIYlhRVZrZTwSmC5azd3S2XqWeY-apfUNgpQc4-iJngvqnx196fMngQ', ...}.get E + where {'account': 'admin', 'expiration': 86400, 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjExMjEwMTAsImlhdCI6MTcyMTAzNDYxMH0.YAAt-e625AY68ttRh5eWDLGn8mBFvvSlIYlhRVZrZTwSmC5azd3S2XqWeY-apfUNgpQc4-iJngvqnx196fMngQ', ...} = <bound method Response.json of <Response [200]>>() E + where <bound method Response.json of <Response [200]>> = <Response [200]>.json test_case\test_basic\test_case.py:61: AssertionError During handling of the above exception, another exception occurred: self = <APIAutoTest_v3_1.test_case.test_basic.test_case.TestBPM object at 0x0000028C3CAA3E50> req_fix = <APIAutoTest_v3_1.request_method.request_method.RequestMethod object at 0x0000028C3CAAA250> db_fix = <APIAutoTest_v3_1.common.db.DB object at 0x0000028C3CA9C190>, module_name = '认证接口', api_name = '刷新token', level = '高' case_title = '正向用例', case_method = 'GET', case_url = 'http://36.139.193.99:8088/refresh', case_mime = None, case_data = None expect_data = {'message': '刷新成功'}, sql_type = None, sql_data = None, update_key = None @log_decorator @allure.epic("BPM-Basic") # @allure.feature("模块名称") # @allure.story("接口名称") # @allure.title("接口标题") # @allure.severity("用例级别") @pytest.mark.parametrize("module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key", ReadExcel(USERNAME).get_data()) def test_bpm(self, req_fix, db_fix, module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key): # 影响allure报告的输出 allure.dynamic.feature(module_name) allure.dynamic.story(api_name) allure.dynamic.title(case_title) allure.dynamic.severity(level) print(case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key) # 判断sql语句类型是否为delete，如果是，使用DB类对象调用delete方法执行删除的sql语句 if sql_type == "delete": # 使用DB类对象调用delete方法执行删除的sql语句, DB类对象就是自定义固件db_fix db_fix.delete(sql_data) # 判断sql语句的类型是否为select，如果是，使用DB类对象调用select方法执行查询语句，并接收查询的结果 elif sql_type == "select": # 使用DB类对象调用select方法执行查询语句，并接收查询的结果 select_result = db_fix.select(sql_data) # 将查询结果更新到用例数据中 case_data[update_key] = select_result # 判断sql语句的类型是否为select|delete 或者 delete|select ，如果是，使用DB类对象执行sql语句 elif sql_type == "select|delete" or sql_type == "delete|select": # 使用DB类对象调用delete方法执行删除的sql语句。 db_fix.delete(sql_data["delete"]) # 使用DB类对象调用select方法执行查询的sql语句, 并接收查询的结果 select_result = db_fix.select(sql_data["select"]) # 将查询结果更新到用例数据中 case_data[update_key] = select_result result = req_fix.request_all(req_method=case_method, req_url=case_url, req_mime=case_mime, case_data=case_data) print(result.text) try: for key in expect_data: assert expect_data[key] == result.json().get(key) except AssertionError: > raise AssertionError("断言失败，描述失败的原因") E AssertionError: 断言失败，描述失败的原因 test_case\test_basic\test_case.py:63: AssertionError ------------------------------Captured stdout call------------------------------ GET http://36.139.193.99:8088/refresh None None {'message': '刷新成功'} None None None {"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjExMjEwMTAsImlhdCI6MTcyMTAzNDYxMH0.YAAt-e625AY68ttRh5eWDLGn8mBFvvSlIYlhRVZrZTwSmC5azd3S2XqWeY-apfUNgpQc4-iJngvqnx196fMngQ","username":"admin","account":"admin","userId":"","expiration":86400,"loginStatus":true} -------------------------------Captured log call-------------------------------- INFO root:__init__.py:79 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "GET /refresh HTTP/11" 200 None ERROR root:__init__.py:82 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18报错，错误为：断言失败，描述失败的原因 ------------------------------Captured stdout call------------------------------ GET http://36.139.193.99:8088/refresh None None {'message': '刷新成功'} None None None {"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjExMjEwMTAsImlhdCI6MTcyMTAzNDYxMH0.YAAt-e625AY68ttRh5eWDLGn8mBFvvSlIYlhRVZrZTwSmC5azd3S2XqWeY-apfUNgpQc4-iJngvqnx196fMngQ","username":"admin","account":"admin","userId":"","expiration":86400,"loginStatus":true} -------------------------------Captured log call-------------------------------- INFO root:__init__.py:79 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "GET /refresh HTTP/11" 200 None ERROR root:__init__.py:82 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18报错，错误为：断言失败，描述失败的原因 ------------------------------Captured stdout call------------------------------ GET http://36.139.193.99:8088/refresh None None {'message': '刷新成功'} None None None {"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjExMjEwMTAsImlhdCI6MTcyMTAzNDYxMH0.YAAt-e625AY68ttRh5eWDLGn8mBFvvSlIYlhRVZrZTwSmC5azd3S2XqWeY-apfUNgpQc4-iJngvqnx196fMngQ","username":"admin","account":"admin","userId":"","expiration":86400,"loginStatus":true} -------------------------------Captured log call-------------------------------- INFO root:__init__.py:79 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "GET /refresh HTTP/11" 200 None ERROR root:__init__.py:82 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18报错，错误为：断言失败，描述失败的原因
Rerun | test_case/test_basic/test_case.py::TestBPM::test_bpm[维度管理-根据维度编码删除维度-中-正向用例-DELETE-http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds-query-case_data14-expect_data14-select-SELECT ID_ FROM uc_demension WHERE `CODE_`="test_dem_xyz_123";-ids] | 0.03 |
self = <APIAutoTest_v3_1.test_case.test_basic.test_case.TestBPM object at 0x0000028C3CADA310> req_fix = <APIAutoTest_v3_1.request_method.request_method.RequestMethod object at 0x0000028C3CAAA250> db_fix = <APIAutoTest_v3_1.common.db.DB object at 0x0000028C3CA9C190>, module_name = '维度管理', api_name = '根据维度编码删除维度', level = '中' case_title = '正向用例', case_method = 'DELETE', case_url = 'http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds', case_mime = 'query' case_data = {'ids': '1812776663009304576'}, expect_data = {'message': '删除维度成功'}, sql_type = 'select' sql_data = 'SELECT ID_ FROM uc_demension WHERE `CODE_`="test_dem_xyz_123";', update_key = 'ids' @log_decorator @allure.epic("BPM-Basic") # @allure.feature("模块名称") # @allure.story("接口名称") # @allure.title("接口标题") # @allure.severity("用例级别") @pytest.mark.parametrize("module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key", ReadExcel(USERNAME).get_data()) def test_bpm(self, req_fix, db_fix, module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key): # 影响allure报告的输出 allure.dynamic.feature(module_name) allure.dynamic.story(api_name) allure.dynamic.title(case_title) allure.dynamic.severity(level) print(case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key) # 判断sql语句类型是否为delete，如果是，使用DB类对象调用delete方法执行删除的sql语句 if sql_type == "delete": # 使用DB类对象调用delete方法执行删除的sql语句, DB类对象就是自定义固件db_fix db_fix.delete(sql_data) # 判断sql语句的类型是否为select，如果是，使用DB类对象调用select方法执行查询语句，并接收查询的结果 elif sql_type == "select": # 使用DB类对象调用select方法执行查询语句，并接收查询的结果 select_result = db_fix.select(sql_data) # 将查询结果更新到用例数据中 case_data[update_key] = select_result # 判断sql语句的类型是否为select|delete 或者 delete|select ，如果是，使用DB类对象执行sql语句 elif sql_type == "select|delete" or sql_type == "delete|select": # 使用DB类对象调用delete方法执行删除的sql语句。 db_fix.delete(sql_data["delete"]) # 使用DB类对象调用select方法执行查询的sql语句, 并接收查询的结果 select_result = db_fix.select(sql_data["select"]) # 将查询结果更新到用例数据中 case_data[update_key] = select_result result = req_fix.request_all(req_method=case_method, req_url=case_url, req_mime=case_mime, case_data=case_data) print(result.text) try: for key in expect_data: > assert expect_data[key] == result.json().get(key) E AssertionError: assert '删除维度成功' == '删除维度成功！' E E - 删除维度成功！ E ? - E + 删除维度成功 test_case\test_basic\test_case.py:61: AssertionError During handling of the above exception, another exception occurred: self = <APIAutoTest_v3_1.test_case.test_basic.test_case.TestBPM object at 0x0000028C3CADA310> req_fix = <APIAutoTest_v3_1.request_method.request_method.RequestMethod object at 0x0000028C3CAAA250> db_fix = <APIAutoTest_v3_1.common.db.DB object at 0x0000028C3CA9C190>, module_name = '维度管理', api_name = '根据维度编码删除维度', level = '中' case_title = '正向用例', case_method = 'DELETE', case_url = 'http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds', case_mime = 'query' case_data = {'ids': '1812776663009304576'}, expect_data = {'message': '删除维度成功'}, sql_type = 'select' sql_data = 'SELECT ID_ FROM uc_demension WHERE `CODE_`="test_dem_xyz_123";', update_key = 'ids' @log_decorator @allure.epic("BPM-Basic") # @allure.feature("模块名称") # @allure.story("接口名称") # @allure.title("接口标题") # @allure.severity("用例级别") @pytest.mark.parametrize("module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key", ReadExcel(USERNAME).get_data()) def test_bpm(self, req_fix, db_fix, module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key): # 影响allure报告的输出 allure.dynamic.feature(module_name) allure.dynamic.story(api_name) allure.dynamic.title(case_title) allure.dynamic.severity(level) print(case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key) # 判断sql语句类型是否为delete，如果是，使用DB类对象调用delete方法执行删除的sql语句 if sql_type == "delete": # 使用DB类对象调用delete方法执行删除的sql语句, DB类对象就是自定义固件db_fix db_fix.delete(sql_data) # 判断sql语句的类型是否为select，如果是，使用DB类对象调用select方法执行查询语句，并接收查询的结果 elif sql_type == "select": # 使用DB类对象调用select方法执行查询语句，并接收查询的结果 select_result = db_fix.select(sql_data) # 将查询结果更新到用例数据中 case_data[update_key] = select_result # 判断sql语句的类型是否为select|delete 或者 delete|select ，如果是，使用DB类对象执行sql语句 elif sql_type == "select|delete" or sql_type == "delete|select": # 使用DB类对象调用delete方法执行删除的sql语句。 db_fix.delete(sql_data["delete"]) # 使用DB类对象调用select方法执行查询的sql语句, 并接收查询的结果 select_result = db_fix.select(sql_data["select"]) # 将查询结果更新到用例数据中 case_data[update_key] = select_result result = req_fix.request_all(req_method=case_method, req_url=case_url, req_mime=case_mime, case_data=case_data) print(result.text) try: for key in expect_data: assert expect_data[key] == result.json().get(key) except AssertionError: > raise AssertionError("断言失败，描述失败的原因") E AssertionError: 断言失败，描述失败的原因 test_case\test_basic\test_case.py:63: AssertionError ------------------------------Captured stdout call------------------------------ DELETE http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds query {'ids': '需要更新'} {'message': '删除维度成功'} select SELECT ID_ FROM uc_demension WHERE `CODE_`="test_dem_xyz_123"; ids {"state":true,"message":"删除维度成功！","value":"","code":200} -------------------------------Captured log call-------------------------------- INFO root:__init__.py:79 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1812776663009304576 HTTP/11" 200 None ERROR root:__init__.py:82 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18报错，错误为：断言失败，描述失败的原因
Rerun | test_case/test_basic/test_case.py::TestBPM::test_bpm[维度管理-根据维度编码删除维度-中-正向用例-DELETE-http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds-query-case_data14-expect_data14-select-SELECT ID_ FROM uc_demension WHERE `CODE_`="test_dem_xyz_123";-ids] | 0.02 |
self = <APIAutoTest_v3_1.test_case.test_basic.test_case.TestBPM object at 0x0000028C3CADA310> req_fix = <APIAutoTest_v3_1.request_method.request_method.RequestMethod object at 0x0000028C3CAAA250> db_fix = <APIAutoTest_v3_1.common.db.DB object at 0x0000028C3CA9C190>, module_name = '维度管理', api_name = '根据维度编码删除维度', level = '中' case_title = '正向用例', case_method = 'DELETE', case_url = 'http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds', case_mime = 'query' case_data = {'ids': '1812776663009304576'}, expect_data = {'message': '删除维度成功'}, sql_type = 'select' sql_data = 'SELECT ID_ FROM uc_demension WHERE `CODE_`="test_dem_xyz_123";', update_key = 'ids' @log_decorator @allure.epic("BPM-Basic") # @allure.feature("模块名称") # @allure.story("接口名称") # @allure.title("接口标题") # @allure.severity("用例级别") @pytest.mark.parametrize("module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key", ReadExcel(USERNAME).get_data()) def test_bpm(self, req_fix, db_fix, module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key): # 影响allure报告的输出 allure.dynamic.feature(module_name) allure.dynamic.story(api_name) allure.dynamic.title(case_title) allure.dynamic.severity(level) print(case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key) # 判断sql语句类型是否为delete，如果是，使用DB类对象调用delete方法执行删除的sql语句 if sql_type == "delete": # 使用DB类对象调用delete方法执行删除的sql语句, DB类对象就是自定义固件db_fix db_fix.delete(sql_data) # 判断sql语句的类型是否为select，如果是，使用DB类对象调用select方法执行查询语句，并接收查询的结果 elif sql_type == "select": # 使用DB类对象调用select方法执行查询语句，并接收查询的结果 select_result = db_fix.select(sql_data) # 将查询结果更新到用例数据中 case_data[update_key] = select_result # 判断sql语句的类型是否为select|delete 或者 delete|select ，如果是，使用DB类对象执行sql语句 elif sql_type == "select|delete" or sql_type == "delete|select": # 使用DB类对象调用delete方法执行删除的sql语句。 db_fix.delete(sql_data["delete"]) # 使用DB类对象调用select方法执行查询的sql语句, 并接收查询的结果 select_result = db_fix.select(sql_data["select"]) # 将查询结果更新到用例数据中 case_data[update_key] = select_result result = req_fix.request_all(req_method=case_method, req_url=case_url, req_mime=case_mime, case_data=case_data) print(result.text) try: for key in expect_data: > assert expect_data[key] == result.json().get(key) E AssertionError: assert '删除维度成功' == '' E E + 删除维度成功 test_case\test_basic\test_case.py:61: AssertionError During handling of the above exception, another exception occurred: self = <APIAutoTest_v3_1.test_case.test_basic.test_case.TestBPM object at 0x0000028C3CADA310> req_fix = <APIAutoTest_v3_1.request_method.request_method.RequestMethod object at 0x0000028C3CAAA250> db_fix = <APIAutoTest_v3_1.common.db.DB object at 0x0000028C3CA9C190>, module_name = '维度管理', api_name = '根据维度编码删除维度', level = '中' case_title = '正向用例', case_method = 'DELETE', case_url = 'http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds', case_mime = 'query' case_data = {'ids': '1812776663009304576'}, expect_data = {'message': '删除维度成功'}, sql_type = 'select' sql_data = 'SELECT ID_ FROM uc_demension WHERE `CODE_`="test_dem_xyz_123";', update_key = 'ids' @log_decorator @allure.epic("BPM-Basic") # @allure.feature("模块名称") # @allure.story("接口名称") # @allure.title("接口标题") # @allure.severity("用例级别") @pytest.mark.parametrize("module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key", ReadExcel(USERNAME).get_data()) def test_bpm(self, req_fix, db_fix, module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key): # 影响allure报告的输出 allure.dynamic.feature(module_name) allure.dynamic.story(api_name) allure.dynamic.title(case_title) allure.dynamic.severity(level) print(case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key) # 判断sql语句类型是否为delete，如果是，使用DB类对象调用delete方法执行删除的sql语句 if sql_type == "delete": # 使用DB类对象调用delete方法执行删除的sql语句, DB类对象就是自定义固件db_fix db_fix.delete(sql_data) # 判断sql语句的类型是否为select，如果是，使用DB类对象调用select方法执行查询语句，并接收查询的结果 elif sql_type == "select": # 使用DB类对象调用select方法执行查询语句，并接收查询的结果 select_result = db_fix.select(sql_data) # 将查询结果更新到用例数据中 case_data[update_key] = select_result # 判断sql语句的类型是否为select|delete 或者 delete|select ，如果是，使用DB类对象执行sql语句 elif sql_type == "select|delete" or sql_type == "delete|select": # 使用DB类对象调用delete方法执行删除的sql语句。 db_fix.delete(sql_data["delete"]) # 使用DB类对象调用select方法执行查询的sql语句, 并接收查询的结果 select_result = db_fix.select(sql_data["select"]) # 将查询结果更新到用例数据中 case_data[update_key] = select_result result = req_fix.request_all(req_method=case_method, req_url=case_url, req_mime=case_mime, case_data=case_data) print(result.text) try: for key in expect_data: assert expect_data[key] == result.json().get(key) except AssertionError: > raise AssertionError("断言失败，描述失败的原因") E AssertionError: 断言失败，描述失败的原因 test_case\test_basic\test_case.py:63: AssertionError ------------------------------Captured stdout call------------------------------ DELETE http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds query {'ids': '需要更新'} {'message': '删除维度成功'} select SELECT ID_ FROM uc_demension WHERE `CODE_`="test_dem_xyz_123"; ids {"state":true,"message":"删除维度成功！","value":"","code":200} -------------------------------Captured log call-------------------------------- INFO root:__init__.py:79 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1812776663009304576 HTTP/11" 200 None ERROR root:__init__.py:82 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18报错，错误为：断言失败，描述失败的原因 ------------------------------Captured stdout call------------------------------ DELETE http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds query {'ids': '1812776663009304576'} {'message': '删除维度成功'} select SELECT ID_ FROM uc_demension WHERE `CODE_`="test_dem_xyz_123"; ids {"state":false,"message":"","code":200,"logId":"1812776664234041344"} -------------------------------Captured log call-------------------------------- INFO root:__init__.py:79 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1812776663009304576 HTTP/11" 500 None ERROR root:__init__.py:82 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18报错，错误为：断言失败，描述失败的原因
Rerun | test_case/test_basic/test_case.py::TestBPM::test_bpm[维度管理-根据维度编码删除维度-中-正向用例-DELETE-http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds-query-case_data14-expect_data14-select-SELECT ID_ FROM uc_demension WHERE `CODE_`="test_dem_xyz_123";-ids] | 0.03 |
self = <APIAutoTest_v3_1.test_case.test_basic.test_case.TestBPM object at 0x0000028C3CADA310> req_fix = <APIAutoTest_v3_1.request_method.request_method.RequestMethod object at 0x0000028C3CAAA250> db_fix = <APIAutoTest_v3_1.common.db.DB object at 0x0000028C3CA9C190>, module_name = '维度管理', api_name = '根据维度编码删除维度', level = '中' case_title = '正向用例', case_method = 'DELETE', case_url = 'http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds', case_mime = 'query' case_data = {'ids': '1812776663009304576'}, expect_data = {'message': '删除维度成功'}, sql_type = 'select' sql_data = 'SELECT ID_ FROM uc_demension WHERE `CODE_`="test_dem_xyz_123";', update_key = 'ids' @log_decorator @allure.epic("BPM-Basic") # @allure.feature("模块名称") # @allure.story("接口名称") # @allure.title("接口标题") # @allure.severity("用例级别") @pytest.mark.parametrize("module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key", ReadExcel(USERNAME).get_data()) def test_bpm(self, req_fix, db_fix, module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key): # 影响allure报告的输出 allure.dynamic.feature(module_name) allure.dynamic.story(api_name) allure.dynamic.title(case_title) allure.dynamic.severity(level) print(case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key) # 判断sql语句类型是否为delete，如果是，使用DB类对象调用delete方法执行删除的sql语句 if sql_type == "delete": # 使用DB类对象调用delete方法执行删除的sql语句, DB类对象就是自定义固件db_fix db_fix.delete(sql_data) # 判断sql语句的类型是否为select，如果是，使用DB类对象调用select方法执行查询语句，并接收查询的结果 elif sql_type == "select": # 使用DB类对象调用select方法执行查询语句，并接收查询的结果 select_result = db_fix.select(sql_data) # 将查询结果更新到用例数据中 case_data[update_key] = select_result # 判断sql语句的类型是否为select|delete 或者 delete|select ，如果是，使用DB类对象执行sql语句 elif sql_type == "select|delete" or sql_type == "delete|select": # 使用DB类对象调用delete方法执行删除的sql语句。 db_fix.delete(sql_data["delete"]) # 使用DB类对象调用select方法执行查询的sql语句, 并接收查询的结果 select_result = db_fix.select(sql_data["select"]) # 将查询结果更新到用例数据中 case_data[update_key] = select_result result = req_fix.request_all(req_method=case_method, req_url=case_url, req_mime=case_mime, case_data=case_data) print(result.text) try: for key in expect_data: > assert expect_data[key] == result.json().get(key) E AssertionError: assert '删除维度成功' == '' E E + 删除维度成功 test_case\test_basic\test_case.py:61: AssertionError During handling of the above exception, another exception occurred: self = <APIAutoTest_v3_1.test_case.test_basic.test_case.TestBPM object at 0x0000028C3CADA310> req_fix = <APIAutoTest_v3_1.request_method.request_method.RequestMethod object at 0x0000028C3CAAA250> db_fix = <APIAutoTest_v3_1.common.db.DB object at 0x0000028C3CA9C190>, module_name = '维度管理', api_name = '根据维度编码删除维度', level = '中' case_title = '正向用例', case_method = 'DELETE', case_url = 'http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds', case_mime = 'query' case_data = {'ids': '1812776663009304576'}, expect_data = {'message': '删除维度成功'}, sql_type = 'select' sql_data = 'SELECT ID_ FROM uc_demension WHERE `CODE_`="test_dem_xyz_123";', update_key = 'ids' @log_decorator @allure.epic("BPM-Basic") # @allure.feature("模块名称") # @allure.story("接口名称") # @allure.title("接口标题") # @allure.severity("用例级别") @pytest.mark.parametrize("module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key", ReadExcel(USERNAME).get_data()) def test_bpm(self, req_fix, db_fix, module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key): # 影响allure报告的输出 allure.dynamic.feature(module_name) allure.dynamic.story(api_name) allure.dynamic.title(case_title) allure.dynamic.severity(level) print(case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key) # 判断sql语句类型是否为delete，如果是，使用DB类对象调用delete方法执行删除的sql语句 if sql_type == "delete": # 使用DB类对象调用delete方法执行删除的sql语句, DB类对象就是自定义固件db_fix db_fix.delete(sql_data) # 判断sql语句的类型是否为select，如果是，使用DB类对象调用select方法执行查询语句，并接收查询的结果 elif sql_type == "select": # 使用DB类对象调用select方法执行查询语句，并接收查询的结果 select_result = db_fix.select(sql_data) # 将查询结果更新到用例数据中 case_data[update_key] = select_result # 判断sql语句的类型是否为select|delete 或者 delete|select ，如果是，使用DB类对象执行sql语句 elif sql_type == "select|delete" or sql_type == "delete|select": # 使用DB类对象调用delete方法执行删除的sql语句。 db_fix.delete(sql_data["delete"]) # 使用DB类对象调用select方法执行查询的sql语句, 并接收查询的结果 select_result = db_fix.select(sql_data["select"]) # 将查询结果更新到用例数据中 case_data[update_key] = select_result result = req_fix.request_all(req_method=case_method, req_url=case_url, req_mime=case_mime, case_data=case_data) print(result.text) try: for key in expect_data: assert expect_data[key] == result.json().get(key) except AssertionError: > raise AssertionError("断言失败，描述失败的原因") E AssertionError: 断言失败，描述失败的原因 test_case\test_basic\test_case.py:63: AssertionError ------------------------------Captured stdout call------------------------------ DELETE http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds query {'ids': '需要更新'} {'message': '删除维度成功'} select SELECT ID_ FROM uc_demension WHERE `CODE_`="test_dem_xyz_123"; ids {"state":true,"message":"删除维度成功！","value":"","code":200} -------------------------------Captured log call-------------------------------- INFO root:__init__.py:79 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1812776663009304576 HTTP/11" 200 None ERROR root:__init__.py:82 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18报错，错误为：断言失败，描述失败的原因 ------------------------------Captured stdout call------------------------------ DELETE http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds query {'ids': '1812776663009304576'} {'message': '删除维度成功'} select SELECT ID_ FROM uc_demension WHERE `CODE_`="test_dem_xyz_123"; ids {"state":false,"message":"","code":200,"logId":"1812776664234041344"} -------------------------------Captured log call-------------------------------- INFO root:__init__.py:79 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1812776663009304576 HTTP/11" 500 None ERROR root:__init__.py:82 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18报错，错误为：断言失败，描述失败的原因 ------------------------------Captured stdout call------------------------------ DELETE http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds query {'ids': '1812776663009304576'} {'message': '删除维度成功'} select SELECT ID_ FROM uc_demension WHERE `CODE_`="test_dem_xyz_123"; ids {"state":false,"message":"","code":200,"logId":"1812776664393424896"} -------------------------------Captured log call-------------------------------- INFO root:__init__.py:79 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18 DEBUG urllib3.connectionpool:connectionpool.py:291 Resetting dropped connection: 36.139.193.99 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1812776663009304576 HTTP/11" 500 None ERROR root:__init__.py:82 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18报错，错误为：断言失败，描述失败的原因
Rerun | test_case/test_lao_zhang/test_case.py::TestBPM::test_bpm[维度管理-根据维度编码删除维度-中-正向用例-DELETE-http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds-query-case_data5-expect_data5-select-SELECT ID_ FROM uc_demension WHERE `CODE_`="test_dem_xyz_123";-ids] | 0.03 |
self = <APIAutoTest_v3_1.test_case.test_lao_zhang.test_case.TestBPM object at 0x0000028C3CAEC0D0> req_fix = <APIAutoTest_v3_1.request_method.request_method.RequestMethod object at 0x0000028C3CC40250> db_fix = <APIAutoTest_v3_1.common.db.DB object at 0x0000028C3CBBAD60>, module_name = '维度管理', api_name = '根据维度编码删除维度', level = '中' case_title = '正向用例', case_method = 'DELETE', case_url = 'http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds', case_mime = 'query' case_data = {'ids': '1812776665760768000'}, expect_data = {'message': '删除维度成功'}, sql_type = 'select' sql_data = 'SELECT ID_ FROM uc_demension WHERE `CODE_`="test_dem_xyz_123";', update_key = 'ids' @log_decorator @allure.epic("BPM-张三") # @allure.feature("模块名称") # @allure.story("接口名称") # @allure.title("接口标题") # @allure.severity("用例级别") @pytest.mark.parametrize("module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key", ReadExcel(USERNAME).get_data()) def test_bpm(self, req_fix, db_fix, module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key): # 影响allure报告的输出 allure.dynamic.feature(module_name) allure.dynamic.story(api_name) allure.dynamic.title(case_title) allure.dynamic.severity(level) print(case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key) # 判断sql语句类型是否为delete，如果是，使用DB类对象调用delete方法执行删除的sql语句 if sql_type == "delete": # 使用DB类对象调用delete方法执行删除的sql语句, DB类对象就是自定义固件db_fix db_fix.delete(sql_data) # 判断sql语句的类型是否为select，如果是，使用DB类对象调用select方法执行查询语句，并接收查询的结果 elif sql_type == "select": # 使用DB类对象调用select方法执行查询语句，并接收查询的结果 select_result = db_fix.select(sql_data) # 将查询结果更新到用例数据中 case_data[update_key] = select_result # 判断sql语句的类型是否为select|delete 或者 delete|select ，如果是，使用DB类对象执行sql语句 elif sql_type == "select|delete" or sql_type == "delete|select": # 使用DB类对象调用delete方法执行删除的sql语句。 db_fix.delete(sql_data["delete"]) # 使用DB类对象调用select方法执行查询的sql语句, 并接收查询的结果 select_result = db_fix.select(sql_data["select"]) # 将查询结果更新到用例数据中 case_data[update_key] = select_result result = req_fix.request_all(req_method=case_method, req_url=case_url, req_mime=case_mime, case_data=case_data) print(result.text) try: for key in expect_data: > assert expect_data[key] == result.json().get(key) E AssertionError: assert '删除维度成功' == '删除维度成功！' E E - 删除维度成功！ E ? - E + 删除维度成功 test_case\test_lao_zhang\test_case.py:62: AssertionError During handling of the above exception, another exception occurred: self = <APIAutoTest_v3_1.test_case.test_lao_zhang.test_case.TestBPM object at 0x0000028C3CAEC0D0> req_fix = <APIAutoTest_v3_1.request_method.request_method.RequestMethod object at 0x0000028C3CC40250> db_fix = <APIAutoTest_v3_1.common.db.DB object at 0x0000028C3CBBAD60>, module_name = '维度管理', api_name = '根据维度编码删除维度', level = '中' case_title = '正向用例', case_method = 'DELETE', case_url = 'http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds', case_mime = 'query' case_data = {'ids': '1812776665760768000'}, expect_data = {'message': '删除维度成功'}, sql_type = 'select' sql_data = 'SELECT ID_ FROM uc_demension WHERE `CODE_`="test_dem_xyz_123";', update_key = 'ids' @log_decorator @allure.epic("BPM-张三") # @allure.feature("模块名称") # @allure.story("接口名称") # @allure.title("接口标题") # @allure.severity("用例级别") @pytest.mark.parametrize("module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key", ReadExcel(USERNAME).get_data()) def test_bpm(self, req_fix, db_fix, module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key): # 影响allure报告的输出 allure.dynamic.feature(module_name) allure.dynamic.story(api_name) allure.dynamic.title(case_title) allure.dynamic.severity(level) print(case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key) # 判断sql语句类型是否为delete，如果是，使用DB类对象调用delete方法执行删除的sql语句 if sql_type == "delete": # 使用DB类对象调用delete方法执行删除的sql语句, DB类对象就是自定义固件db_fix db_fix.delete(sql_data) # 判断sql语句的类型是否为select，如果是，使用DB类对象调用select方法执行查询语句，并接收查询的结果 elif sql_type == "select": # 使用DB类对象调用select方法执行查询语句，并接收查询的结果 select_result = db_fix.select(sql_data) # 将查询结果更新到用例数据中 case_data[update_key] = select_result # 判断sql语句的类型是否为select|delete 或者 delete|select ，如果是，使用DB类对象执行sql语句 elif sql_type == "select|delete" or sql_type == "delete|select": # 使用DB类对象调用delete方法执行删除的sql语句。 db_fix.delete(sql_data["delete"]) # 使用DB类对象调用select方法执行查询的sql语句, 并接收查询的结果 select_result = db_fix.select(sql_data["select"]) # 将查询结果更新到用例数据中 case_data[update_key] = select_result result = req_fix.request_all(req_method=case_method, req_url=case_url, req_mime=case_mime, case_data=case_data) print(result.text) try: for key in expect_data: assert expect_data[key] == result.json().get(key) except AssertionError: # log.error(f"断言失败, 用例数据为：{case_data}, 期望数据为：{expect_data}, 服务器返回的数据为：{result.text}") # raise AssertionError("断言失败，描述失败的原因") > raise AssertionError(f"断言失败, 用例数据为：{case_data}, 期望数据为：{expect_data}, 服务器返回的数据为：{result.text}") E AssertionError: 断言失败, 用例数据为：{'ids': '1812776665760768000'}, 期望数据为：{'message': '删除维度成功'}, 服务器返回的数据为：{"state":true,"message":"删除维度成功！","value":"","code":200} test_case\test_lao_zhang\test_case.py:66: AssertionError ------------------------------Captured stdout call------------------------------ DELETE http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds query {'ids': '需要更新'} {'message': '删除维度成功'} select SELECT ID_ FROM uc_demension WHERE `CODE_`="test_dem_xyz_123"; ids {"state":true,"message":"删除维度成功！","value":"","code":200} -------------------------------Captured log call-------------------------------- INFO root:__init__.py:79 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_lao_zhang\test_case.py, 所在的行为：19 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1812776665760768000 HTTP/11" 200 None ERROR root:__init__.py:82 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_lao_zhang\test_case.py, 所在的行为：19报错，错误为：断言失败, 用例数据为：{'ids': '1812776665760768000'}, 期望数据为：{'message': '删除维度成功'}, 服务器返回的数据为：{"state":true,"message":"删除维度成功！","value":"","code":200}
Rerun | test_case/test_lao_zhang/test_case.py::TestBPM::test_bpm[维度管理-根据维度编码删除维度-中-正向用例-DELETE-http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds-query-case_data5-expect_data5-select-SELECT ID_ FROM uc_demension WHERE `CODE_`="test_dem_xyz_123";-ids] | 0.02 |
self = <APIAutoTest_v3_1.test_case.test_lao_zhang.test_case.TestBPM object at 0x0000028C3CAEC0D0> req_fix = <APIAutoTest_v3_1.request_method.request_method.RequestMethod object at 0x0000028C3CC40250> db_fix = <APIAutoTest_v3_1.common.db.DB object at 0x0000028C3CBBAD60>, module_name = '维度管理', api_name = '根据维度编码删除维度', level = '中' case_title = '正向用例', case_method = 'DELETE', case_url = 'http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds', case_mime = 'query' case_data = {'ids': '1812776665760768000'}, expect_data = {'message': '删除维度成功'}, sql_type = 'select' sql_data = 'SELECT ID_ FROM uc_demension WHERE `CODE_`="test_dem_xyz_123";', update_key = 'ids' @log_decorator @allure.epic("BPM-张三") # @allure.feature("模块名称") # @allure.story("接口名称") # @allure.title("接口标题") # @allure.severity("用例级别") @pytest.mark.parametrize("module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key", ReadExcel(USERNAME).get_data()) def test_bpm(self, req_fix, db_fix, module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key): # 影响allure报告的输出 allure.dynamic.feature(module_name) allure.dynamic.story(api_name) allure.dynamic.title(case_title) allure.dynamic.severity(level) print(case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key) # 判断sql语句类型是否为delete，如果是，使用DB类对象调用delete方法执行删除的sql语句 if sql_type == "delete": # 使用DB类对象调用delete方法执行删除的sql语句, DB类对象就是自定义固件db_fix db_fix.delete(sql_data) # 判断sql语句的类型是否为select，如果是，使用DB类对象调用select方法执行查询语句，并接收查询的结果 elif sql_type == "select": # 使用DB类对象调用select方法执行查询语句，并接收查询的结果 select_result = db_fix.select(sql_data) # 将查询结果更新到用例数据中 case_data[update_key] = select_result # 判断sql语句的类型是否为select|delete 或者 delete|select ，如果是，使用DB类对象执行sql语句 elif sql_type == "select|delete" or sql_type == "delete|select": # 使用DB类对象调用delete方法执行删除的sql语句。 db_fix.delete(sql_data["delete"]) # 使用DB类对象调用select方法执行查询的sql语句, 并接收查询的结果 select_result = db_fix.select(sql_data["select"]) # 将查询结果更新到用例数据中 case_data[update_key] = select_result result = req_fix.request_all(req_method=case_method, req_url=case_url, req_mime=case_mime, case_data=case_data) print(result.text) try: for key in expect_data: > assert expect_data[key] == result.json().get(key) E AssertionError: assert '删除维度成功' == '' E E + 删除维度成功 test_case\test_lao_zhang\test_case.py:62: AssertionError During handling of the above exception, another exception occurred: self = <APIAutoTest_v3_1.test_case.test_lao_zhang.test_case.TestBPM object at 0x0000028C3CAEC0D0> req_fix = <APIAutoTest_v3_1.request_method.request_method.RequestMethod object at 0x0000028C3CC40250> db_fix = <APIAutoTest_v3_1.common.db.DB object at 0x0000028C3CBBAD60>, module_name = '维度管理', api_name = '根据维度编码删除维度', level = '中' case_title = '正向用例', case_method = 'DELETE', case_url = 'http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds', case_mime = 'query' case_data = {'ids': '1812776665760768000'}, expect_data = {'message': '删除维度成功'}, sql_type = 'select' sql_data = 'SELECT ID_ FROM uc_demension WHERE `CODE_`="test_dem_xyz_123";', update_key = 'ids' @log_decorator @allure.epic("BPM-张三") # @allure.feature("模块名称") # @allure.story("接口名称") # @allure.title("接口标题") # @allure.severity("用例级别") @pytest.mark.parametrize("module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key", ReadExcel(USERNAME).get_data()) def test_bpm(self, req_fix, db_fix, module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key): # 影响allure报告的输出 allure.dynamic.feature(module_name) allure.dynamic.story(api_name) allure.dynamic.title(case_title) allure.dynamic.severity(level) print(case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key) # 判断sql语句类型是否为delete，如果是，使用DB类对象调用delete方法执行删除的sql语句 if sql_type == "delete": # 使用DB类对象调用delete方法执行删除的sql语句, DB类对象就是自定义固件db_fix db_fix.delete(sql_data) # 判断sql语句的类型是否为select，如果是，使用DB类对象调用select方法执行查询语句，并接收查询的结果 elif sql_type == "select": # 使用DB类对象调用select方法执行查询语句，并接收查询的结果 select_result = db_fix.select(sql_data) # 将查询结果更新到用例数据中 case_data[update_key] = select_result # 判断sql语句的类型是否为select|delete 或者 delete|select ，如果是，使用DB类对象执行sql语句 elif sql_type == "select|delete" or sql_type == "delete|select": # 使用DB类对象调用delete方法执行删除的sql语句。 db_fix.delete(sql_data["delete"]) # 使用DB类对象调用select方法执行查询的sql语句, 并接收查询的结果 select_result = db_fix.select(sql_data["select"]) # 将查询结果更新到用例数据中 case_data[update_key] = select_result result = req_fix.request_all(req_method=case_method, req_url=case_url, req_mime=case_mime, case_data=case_data) print(result.text) try: for key in expect_data: assert expect_data[key] == result.json().get(key) except AssertionError: # log.error(f"断言失败, 用例数据为：{case_data}, 期望数据为：{expect_data}, 服务器返回的数据为：{result.text}") # raise AssertionError("断言失败，描述失败的原因") > raise AssertionError(f"断言失败, 用例数据为：{case_data}, 期望数据为：{expect_data}, 服务器返回的数据为：{result.text}") E AssertionError: 断言失败, 用例数据为：{'ids': '1812776665760768000'}, 期望数据为：{'message': '删除维度成功'}, 服务器返回的数据为：{"state":false,"message":"","code":200,"logId":"1812776666738040832"} test_case\test_lao_zhang\test_case.py:66: AssertionError ------------------------------Captured stdout call------------------------------ DELETE http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds query {'ids': '需要更新'} {'message': '删除维度成功'} select SELECT ID_ FROM uc_demension WHERE `CODE_`="test_dem_xyz_123"; ids {"state":true,"message":"删除维度成功！","value":"","code":200} -------------------------------Captured log call-------------------------------- INFO root:__init__.py:79 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_lao_zhang\test_case.py, 所在的行为：19 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1812776665760768000 HTTP/11" 200 None ERROR root:__init__.py:82 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_lao_zhang\test_case.py, 所在的行为：19报错，错误为：断言失败, 用例数据为：{'ids': '1812776665760768000'}, 期望数据为：{'message': '删除维度成功'}, 服务器返回的数据为：{"state":true,"message":"删除维度成功！","value":"","code":200} ------------------------------Captured stdout call------------------------------ DELETE http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds query {'ids': '1812776665760768000'} {'message': '删除维度成功'} select SELECT ID_ FROM uc_demension WHERE `CODE_`="test_dem_xyz_123"; ids {"state":false,"message":"","code":200,"logId":"1812776666738040832"} -------------------------------Captured log call-------------------------------- INFO root:__init__.py:79 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_lao_zhang\test_case.py, 所在的行为：19 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1812776665760768000 HTTP/11" 500 None ERROR root:__init__.py:82 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_lao_zhang\test_case.py, 所在的行为：19报错，错误为：断言失败, 用例数据为：{'ids': '1812776665760768000'}, 期望数据为：{'message': '删除维度成功'}, 服务器返回的数据为：{"state":false,"message":"","code":200,"logId":"1812776666738040832"}
Rerun | test_case/test_lao_zhang/test_case.py::TestBPM::test_bpm[维度管理-根据维度编码删除维度-中-正向用例-DELETE-http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds-query-case_data5-expect_data5-select-SELECT ID_ FROM uc_demension WHERE `CODE_`="test_dem_xyz_123";-ids] | 0.02 |
self = <APIAutoTest_v3_1.test_case.test_lao_zhang.test_case.TestBPM object at 0x0000028C3CAEC0D0> req_fix = <APIAutoTest_v3_1.request_method.request_method.RequestMethod object at 0x0000028C3CC40250> db_fix = <APIAutoTest_v3_1.common.db.DB object at 0x0000028C3CBBAD60>, module_name = '维度管理', api_name = '根据维度编码删除维度', level = '中' case_title = '正向用例', case_method = 'DELETE', case_url = 'http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds', case_mime = 'query' case_data = {'ids': '1812776665760768000'}, expect_data = {'message': '删除维度成功'}, sql_type = 'select' sql_data = 'SELECT ID_ FROM uc_demension WHERE `CODE_`="test_dem_xyz_123";', update_key = 'ids' @log_decorator @allure.epic("BPM-张三") # @allure.feature("模块名称") # @allure.story("接口名称") # @allure.title("接口标题") # @allure.severity("用例级别") @pytest.mark.parametrize("module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key", ReadExcel(USERNAME).get_data()) def test_bpm(self, req_fix, db_fix, module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key): # 影响allure报告的输出 allure.dynamic.feature(module_name) allure.dynamic.story(api_name) allure.dynamic.title(case_title) allure.dynamic.severity(level) print(case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key) # 判断sql语句类型是否为delete，如果是，使用DB类对象调用delete方法执行删除的sql语句 if sql_type == "delete": # 使用DB类对象调用delete方法执行删除的sql语句, DB类对象就是自定义固件db_fix db_fix.delete(sql_data) # 判断sql语句的类型是否为select，如果是，使用DB类对象调用select方法执行查询语句，并接收查询的结果 elif sql_type == "select": # 使用DB类对象调用select方法执行查询语句，并接收查询的结果 select_result = db_fix.select(sql_data) # 将查询结果更新到用例数据中 case_data[update_key] = select_result # 判断sql语句的类型是否为select|delete 或者 delete|select ，如果是，使用DB类对象执行sql语句 elif sql_type == "select|delete" or sql_type == "delete|select": # 使用DB类对象调用delete方法执行删除的sql语句。 db_fix.delete(sql_data["delete"]) # 使用DB类对象调用select方法执行查询的sql语句, 并接收查询的结果 select_result = db_fix.select(sql_data["select"]) # 将查询结果更新到用例数据中 case_data[update_key] = select_result result = req_fix.request_all(req_method=case_method, req_url=case_url, req_mime=case_mime, case_data=case_data) print(result.text) try: for key in expect_data: > assert expect_data[key] == result.json().get(key) E AssertionError: assert '删除维度成功' == '' E E + 删除维度成功 test_case\test_lao_zhang\test_case.py:62: AssertionError During handling of the above exception, another exception occurred: self = <APIAutoTest_v3_1.test_case.test_lao_zhang.test_case.TestBPM object at 0x0000028C3CAEC0D0> req_fix = <APIAutoTest_v3_1.request_method.request_method.RequestMethod object at 0x0000028C3CC40250> db_fix = <APIAutoTest_v3_1.common.db.DB object at 0x0000028C3CBBAD60>, module_name = '维度管理', api_name = '根据维度编码删除维度', level = '中' case_title = '正向用例', case_method = 'DELETE', case_url = 'http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds', case_mime = 'query' case_data = {'ids': '1812776665760768000'}, expect_data = {'message': '删除维度成功'}, sql_type = 'select' sql_data = 'SELECT ID_ FROM uc_demension WHERE `CODE_`="test_dem_xyz_123";', update_key = 'ids' @log_decorator @allure.epic("BPM-张三") # @allure.feature("模块名称") # @allure.story("接口名称") # @allure.title("接口标题") # @allure.severity("用例级别") @pytest.mark.parametrize("module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key", ReadExcel(USERNAME).get_data()) def test_bpm(self, req_fix, db_fix, module_name, api_name, level, case_title, case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key): # 影响allure报告的输出 allure.dynamic.feature(module_name) allure.dynamic.story(api_name) allure.dynamic.title(case_title) allure.dynamic.severity(level) print(case_method, case_url, case_mime, case_data, expect_data, sql_type, sql_data, update_key) # 判断sql语句类型是否为delete，如果是，使用DB类对象调用delete方法执行删除的sql语句 if sql_type == "delete": # 使用DB类对象调用delete方法执行删除的sql语句, DB类对象就是自定义固件db_fix db_fix.delete(sql_data) # 判断sql语句的类型是否为select，如果是，使用DB类对象调用select方法执行查询语句，并接收查询的结果 elif sql_type == "select": # 使用DB类对象调用select方法执行查询语句，并接收查询的结果 select_result = db_fix.select(sql_data) # 将查询结果更新到用例数据中 case_data[update_key] = select_result # 判断sql语句的类型是否为select|delete 或者 delete|select ，如果是，使用DB类对象执行sql语句 elif sql_type == "select|delete" or sql_type == "delete|select": # 使用DB类对象调用delete方法执行删除的sql语句。 db_fix.delete(sql_data["delete"]) # 使用DB类对象调用select方法执行查询的sql语句, 并接收查询的结果 select_result = db_fix.select(sql_data["select"]) # 将查询结果更新到用例数据中 case_data[update_key] = select_result result = req_fix.request_all(req_method=case_method, req_url=case_url, req_mime=case_mime, case_data=case_data) print(result.text) try: for key in expect_data: assert expect_data[key] == result.json().get(key) except AssertionError: # log.error(f"断言失败, 用例数据为：{case_data}, 期望数据为：{expect_data}, 服务器返回的数据为：{result.text}") # raise AssertionError("断言失败，描述失败的原因") > raise AssertionError(f"断言失败, 用例数据为：{case_data}, 期望数据为：{expect_data}, 服务器返回的数据为：{result.text}") E AssertionError: 断言失败, 用例数据为：{'ids': '1812776665760768000'}, 期望数据为：{'message': '删除维度成功'}, 服务器返回的数据为：{"state":false,"message":"","code":200,"logId":"1812776666901618688"} test_case\test_lao_zhang\test_case.py:66: AssertionError ------------------------------Captured stdout call------------------------------ DELETE http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds query {'ids': '需要更新'} {'message': '删除维度成功'} select SELECT ID_ FROM uc_demension WHERE `CODE_`="test_dem_xyz_123"; ids {"state":true,"message":"删除维度成功！","value":"","code":200} -------------------------------Captured log call-------------------------------- INFO root:__init__.py:79 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_lao_zhang\test_case.py, 所在的行为：19 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1812776665760768000 HTTP/11" 200 None ERROR root:__init__.py:82 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_lao_zhang\test_case.py, 所在的行为：19报错，错误为：断言失败, 用例数据为：{'ids': '1812776665760768000'}, 期望数据为：{'message': '删除维度成功'}, 服务器返回的数据为：{"state":true,"message":"删除维度成功！","value":"","code":200} ------------------------------Captured stdout call------------------------------ DELETE http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds query {'ids': '1812776665760768000'} {'message': '删除维度成功'} select SELECT ID_ FROM uc_demension WHERE `CODE_`="test_dem_xyz_123"; ids {"state":false,"message":"","code":200,"logId":"1812776666738040832"} -------------------------------Captured log call-------------------------------- INFO root:__init__.py:79 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_lao_zhang\test_case.py, 所在的行为：19 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1812776665760768000 HTTP/11" 500 None ERROR root:__init__.py:82 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_lao_zhang\test_case.py, 所在的行为：19报错，错误为：断言失败, 用例数据为：{'ids': '1812776665760768000'}, 期望数据为：{'message': '删除维度成功'}, 服务器返回的数据为：{"state":false,"message":"","code":200,"logId":"1812776666738040832"} ------------------------------Captured stdout call------------------------------ DELETE http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds query {'ids': '1812776665760768000'} {'message': '删除维度成功'} select SELECT ID_ FROM uc_demension WHERE `CODE_`="test_dem_xyz_123"; ids {"state":false,"message":"","code":200,"logId":"1812776666901618688"} -------------------------------Captured log call-------------------------------- INFO root:__init__.py:79 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_lao_zhang\test_case.py, 所在的行为：19 DEBUG urllib3.connectionpool:connectionpool.py:291 Resetting dropped connection: 36.139.193.99 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1812776665760768000 HTTP/11" 500 None ERROR root:__init__.py:82 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_lao_zhang\test_case.py, 所在的行为：19报错，错误为：断言失败, 用例数据为：{'ids': '1812776665760768000'}, 期望数据为：{'message': '删除维度成功'}, 服务器返回的数据为：{"state":false,"message":"","code":200,"logId":"1812776666901618688"}
Passed | test_case/test_basic/test_case.py::TestBPM::test_bpm[认证接口-登录系统-高-正向用例-用户名和密码正确-POST-http://36.139.193.99:8088/auth-application/json-case_data0-expect_data0-None-None-None] | 0.10 |
-------------------------------Captured log setup------------------------------- DEBUG urllib3.connectionpool:connectionpool.py:243 Starting new HTTP connection (1): 36.139.193.99:8088 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "POST /auth HTTP/11" 200 None ------------------------------Captured stdout call------------------------------ POST http://36.139.193.99:8088/auth application/json {'username': 'admin', 'password': 'F4/DVgPS/NEruLxVVRqHktsb1R2fVpw81t5VuGfFjwp0G7U4k6spHPr/ejPlw8XxIVilJ+SyIH0G5FbQStFEd/94mmI7+2Dw2c7MXXIERYKjd3XNe4gZR4ANJclCJHNGfE+mtnX5voprYwEo9m6ponCdmmXTMx9cWVEJ4K/nbR8='} {'username': '超级管理员', 'account': 'admin', 'userId': '1', 'expiration': 86400} None None None {"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjExMjEwMDksImlhdCI6MTcyMTAzNDYwOX0.1YLS477EpB79ynKUZ6hn6ALV1JDL_u2cLEmAzc2YaBGPcXKE1hrcNOgzN81oFfJfN08IWIcEucrzFgfRFo_gtQ","username":"超级管理员","account":"admin","userId":"1","expiration":86400,"loginStatus":true,"userAttrs":{"tenantId":"-1"}} 断言成功 -------------------------------Captured log call-------------------------------- INFO root:__init__.py:79 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "POST /auth HTTP/11" 200 None
Passed | test_case/test_basic/test_case.py::TestBPM::test_bpm[认证接口-登录系统-中-反向用例-用户名为空-密码正确-POST-http://36.139.193.99:8088/auth-application/json-case_data1-expect_data1-None-None-None] | 0.02 |
------------------------------Captured stdout call------------------------------ POST http://36.139.193.99:8088/auth application/json {'username': '', 'password': 'F4/DVgPS/NEruLxVVRqHktsb1R2fVpw81t5VuGfFjwp0G7U4k6spHPr/ejPlw8XxIVilJ+SyIH0G5FbQStFEd/94mmI7+2Dw2c7MXXIERYKjd3XNe4gZR4ANJclCJHNGfE+mtnX5voprYwEo9m6ponCdmmXTMx9cWVEJ4K/nbR8='} {'state': False, 'message': '账户错误或该租户未启用'} None None None {"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1812776659070853120"} 断言成功 -------------------------------Captured log call-------------------------------- INFO root:__init__.py:79 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "POST /auth HTTP/11" 500 None
Passed | test_case/test_basic/test_case.py::TestBPM::test_bpm[认证接口-登录系统-中-反向用例-用户名过短-密码正确-POST-http://36.139.193.99:8088/auth-application/json-case_data2-expect_data2-None-None-None] | 0.03 |
------------------------------Captured stdout call------------------------------ POST http://36.139.193.99:8088/auth application/json {'username': 'a', 'password': 'F4/DVgPS/NEruLxVVRqHktsb1R2fVpw81t5VuGfFjwp0G7U4k6spHPr/ejPlw8XxIVilJ+SyIH0G5FbQStFEd/94mmI7+2Dw2c7MXXIERYKjd3XNe4gZR4ANJclCJHNGfE+mtnX5voprYwEo9m6ponCdmmXTMx9cWVEJ4K/nbR8='} {'state': False, 'message': '账户错误或该租户未启用'} None None None {"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1812776659226042368"} 断言成功 -------------------------------Captured log call-------------------------------- INFO root:__init__.py:79 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18 DEBUG urllib3.connectionpool:connectionpool.py:291 Resetting dropped connection: 36.139.193.99 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "POST /auth HTTP/11" 500 None
Passed | test_case/test_basic/test_case.py::TestBPM::test_bpm[认证接口-登录系统-中-反向用例-用户名过长-密码正确-POST-http://36.139.193.99:8088/auth-application/json-case_data3-expect_data3-None-None-None] | 0.03 |
------------------------------Captured stdout call------------------------------ POST http://36.139.193.99:8088/auth application/json {'username': 'adminadminadminadminadminadminadminadminadminadminadminadminadminadminadminadminadminadminadminadminadminadmin', 'password': 'F4/DVgPS/NEruLxVVRqHktsb1R2fVpw81t5VuGfFjwp0G7U4k6spHPr/ejPlw8XxIVilJ+SyIH0G5FbQStFEd/94mmI7+2Dw2c7MXXIERYKjd3XNe4gZR4ANJclCJHNGfE+mtnX5voprYwEo9m6ponCdmmXTMx9cWVEJ4K/nbR8='} {'state': False, 'message': '账户错误或该租户未启用'} None None None {"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1812776659360260096"} 断言成功 -------------------------------Captured log call-------------------------------- INFO root:__init__.py:79 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18 DEBUG urllib3.connectionpool:connectionpool.py:291 Resetting dropped connection: 36.139.193.99 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "POST /auth HTTP/11" 500 None
Passed | test_case/test_basic/test_case.py::TestBPM::test_bpm[认证接口-登录系统-中-反向用例-用户名为特殊字符-密码正确-POST-http://36.139.193.99:8088/auth-application/json-case_data4-expect_data4-None-None-None] | 0.04 |
------------------------------Captured stdout call------------------------------ POST http://36.139.193.99:8088/auth application/json {'username': '♡♣♤♥♦♧♨♩ε', 'password': 'F4/DVgPS/NEruLxVVRqHktsb1R2fVpw81t5VuGfFjwp0G7U4k6spHPr/ejPlw8XxIVilJ+SyIH0G5FbQStFEd/94mmI7+2Dw2c7MXXIERYKjd3XNe4gZR4ANJclCJHNGfE+mtnX5voprYwEo9m6ponCdmmXTMx9cWVEJ4K/nbR8='} {'state': False, 'message': '账户错误或该租户未启用'} None None None {"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1812776659532226560"} 断言成功 -------------------------------Captured log call-------------------------------- INFO root:__init__.py:79 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18 DEBUG urllib3.connectionpool:connectionpool.py:291 Resetting dropped connection: 36.139.193.99 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "POST /auth HTTP/11" 500 None
Passed | test_case/test_basic/test_case.py::TestBPM::test_bpm[维度管理-添加维度-高-正向用例-post-http://36.139.193.99:8088/api/demension/v1/dem/addDem-json-case_data9-expect_data9-delete-DELETE FROM uc_demension WHERE `CODE_`="test_dem_xyz_123";-None] | 0.03 |
------------------------------Captured stdout call------------------------------ post http://36.139.193.99:8088/api/demension/v1/dem/addDem json {'code': 'test_dem_xyz_123', 'description': '测试维度', 'isDefault': 0, 'name': 'xyz测试维度'} {'message': '添加维度成功！'} delete DELETE FROM uc_demension WHERE `CODE_`="test_dem_xyz_123"; None {"state":true,"message":"添加维度成功！","value":"","code":200} 断言成功 -------------------------------Captured log call-------------------------------- INFO root:__init__.py:79 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "POST /api/demension/v1/dem/addDem HTTP/11" 200 None
Passed | test_case/test_basic/test_case.py::TestBPM::test_bpm[维度管理-设置默认维度-中-正向用例-PUT-http://36.139.193.99:8088/api/demension/v1/dem/setDefaultDem-query-case_data10-expect_data10-None-None-None] | 0.02 |
------------------------------Captured stdout call------------------------------ PUT http://36.139.193.99:8088/api/demension/v1/dem/setDefaultDem query {'code': 'test_dem_xyz_123'} {'message': '设置默认维度成功！'} None None None {"state":true,"message":"设置默认维度成功！","value":"","code":200} 断言成功 -------------------------------Captured log call-------------------------------- INFO root:__init__.py:79 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "PUT /api/demension/v1/dem/setDefaultDem?code=test_dem_xyz_123 HTTP/11" 200 None
Passed | test_case/test_basic/test_case.py::TestBPM::test_bpm[组织管理-添加组织-高-正向用例-post-http://36.139.193.99:8088/api/org/v1/org/addOrg-json-case_data11-expect_data11-select|delete-sql_data11-demId] | 0.04 |
------------------------------Captured stdout call------------------------------ post http://36.139.193.99:8088/api/org/v1/org/addOrg json {'code': 'test_org', 'demId': '需要更新', 'exceedLimitNum': 0, 'grade': '', 'limitNum': 0, 'name': '测试组织', 'nowNum': 0, 'orderNo': 0, 'parentId': '0'} {'message': '添加组织成功！'} select|delete {'select': 'SELECT ID_ FROM uc_demension WHERE `CODE_`="test_dem_xyz_123";', 'delete': 'delete from uc_org where CODE_="test_org";'} demId {"state":true,"message":"添加组织成功！","value":"","code":200} 断言成功 -------------------------------Captured log call-------------------------------- INFO root:__init__.py:79 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "POST /api/org/v1/org/addOrg HTTP/11" 200 None
Passed | test_case/test_basic/test_case.py::TestBPM::test_bpm[组织管理-保存组织参数-中-正向用例-post-http://36.139.193.99:8088/api/org/v1/orgParam/saveOrgParams-query|json-case_data12-expect_data12-None-None-None] | 0.06 |
------------------------------Captured stdout call------------------------------ post http://36.139.193.99:8088/api/org/v1/orgParam/saveOrgParams query|json {'query': {'orgCode': 'test_org'}, 'body': [{'alias': 'sr', 'value': 'dog'}]} {'state': True, 'message': '保存组织参数成功！'} None None None {"state":true,"message":"保存组织参数成功！","value":"","code":200} 断言成功 -------------------------------Captured log call-------------------------------- INFO root:__init__.py:79 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "POST /api/org/v1/orgParam/saveOrgParams?orgCode=test_org HTTP/11" 200 None
Passed | test_case/test_basic/test_case.py::TestBPM::test_bpm[组织管理-删除组织-中-正向用例-post-http://36.139.193.99:8088/api/org/v1/org/deleteOrg-form-test_org-expect_data13-None-None-None] | 0.06 |
------------------------------Captured stdout call------------------------------ post http://36.139.193.99:8088/api/org/v1/org/deleteOrg form test_org {'state': True, 'message': '删除组织成功！'} None None None {"state":true,"message":"删除组织成功！","value":"","code":200} 断言成功 -------------------------------Captured log call-------------------------------- INFO root:__init__.py:79 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_basic\test_case.py, 所在的行为：18 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "POST /api/org/v1/org/deleteOrg HTTP/11" 200 None
Passed | test_case/test_bpm_dependency/test_pytest_decorator.py::TestBPM::test_login | 0.03 |
-------------------------------Captured log call-------------------------------- DEBUG urllib3.connectionpool:connectionpool.py:243 Starting new HTTP connection (1): 36.139.193.99:8088 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "POST /auth HTTP/11" 200 None
Passed | test_case/test_bpm_dependency/test_pytest_decorator.py::TestBPM::test_add_dem | 0.04 |
-------------------------------Captured log setup------------------------------- DEBUG pytest_dependency:pytest_dependency.py:87 check dependencies of test_add_dem in module scope ... DEBUG pytest_dependency:pytest_dependency.py:92 ... TestBPM::test_login succeeded -------------------------------Captured log call-------------------------------- DEBUG urllib3.connectionpool:connectionpool.py:243 Starting new HTTP connection (1): 36.139.193.99:8088 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "POST /api/demension/v1/dem/addDem HTTP/11" 200 None
Passed | test_case/test_bpm_dependency/test_pytest_decorator.py::TestBPM::test_get_dem_msg[case_data0-expect_data0-正向用例] | 0.01 |
-------------------------------Captured log setup------------------------------- DEBUG pytest_dependency:pytest_dependency.py:87 check dependencies of test_get_dem_msg[case_data0-expect_data0-\u6b63\u5411\u7528\u4f8b] in module scope ... DEBUG pytest_dependency:pytest_dependency.py:92 ... TestBPM::test_add_dem succeeded ------------------------------Captured stdout call------------------------------ 断言成功 -------------------------------Captured log call-------------------------------- DEBUG urllib3.connectionpool:connectionpool.py:243 Starting new HTTP connection (1): 36.139.193.99:8088 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "GET /api/demension/v1/dem/getDem?code=pUNXnRswcotk HTTP/11" 200 None
Passed | test_case/test_bpm_dependency/test_pytest_decorator.py::TestBPM::test_get_dem_msg[case_data1-expect_data1-反向用例1] | 0.01 |
-------------------------------Captured log setup------------------------------- DEBUG pytest_dependency:pytest_dependency.py:87 check dependencies of test_get_dem_msg[case_data1-expect_data1-\u53cd\u5411\u7528\u4f8b1] in module scope ... DEBUG pytest_dependency:pytest_dependency.py:92 ... TestBPM::test_add_dem succeeded ------------------------------Captured stdout call------------------------------ 断言成功 -------------------------------Captured log call-------------------------------- DEBUG urllib3.connectionpool:connectionpool.py:243 Starting new HTTP connection (1): 36.139.193.99:8088 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "GET /api/demension/v1/dem/getDem?code= HTTP/11" 500 None
Passed | test_case/test_bpm_dependency/test_pytest_decorator.py::TestBPM::test_get_dem_msg[case_data2-expect_data2-反向用例2] | 0.02 |
-------------------------------Captured log setup------------------------------- DEBUG pytest_dependency:pytest_dependency.py:87 check dependencies of test_get_dem_msg[case_data2-expect_data2-\u53cd\u5411\u7528\u4f8b2] in module scope ... DEBUG pytest_dependency:pytest_dependency.py:92 ... TestBPM::test_add_dem succeeded ------------------------------Captured stdout call------------------------------ 断言成功 -------------------------------Captured log call-------------------------------- DEBUG urllib3.connectionpool:connectionpool.py:243 Starting new HTTP connection (1): 36.139.193.99:8088 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "GET /api/demension/v1/dem/getDem?=abctest HTTP/11" 500 None
Passed | test_case/test_lao_zhang/test_case.py::TestBPM::test_bpm[维度管理-添加维度-高-正向用例-post-http://36.139.193.99:8088/api/demension/v1/dem/addDem-json-case_data0-expect_data0-delete-DELETE FROM uc_demension WHERE `CODE_`="test_dem_xyz_123";-None] | 0.12 |
-------------------------------Captured log setup------------------------------- DEBUG urllib3.connectionpool:connectionpool.py:243 Starting new HTTP connection (1): 36.139.193.99:8088 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "POST /auth HTTP/11" 200 None ------------------------------Captured stdout call------------------------------ post http://36.139.193.99:8088/api/demension/v1/dem/addDem json {'code': 'test_dem_xyz_123', 'description': '测试维度', 'isDefault': 0, 'name': 'xyz测试维度'} {'message': '添加维度成功！'} delete DELETE FROM uc_demension WHERE `CODE_`="test_dem_xyz_123"; None {"state":true,"message":"添加维度成功！","value":"","code":200} 断言成功 -------------------------------Captured log call-------------------------------- INFO root:__init__.py:79 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_lao_zhang\test_case.py, 所在的行为：19 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "POST /api/demension/v1/dem/addDem HTTP/11" 200 None
Passed | test_case/test_lao_zhang/test_case.py::TestBPM::test_bpm[维度管理-设置默认维度-中-正向用例-PUT-http://36.139.193.99:8088/api/demension/v1/dem/setDefaultDem-query-case_data1-expect_data1-None-None-None] | 0.02 |
------------------------------Captured stdout call------------------------------ PUT http://36.139.193.99:8088/api/demension/v1/dem/setDefaultDem query {'code': 'test_dem_xyz_123'} {'message': '设置默认维度成功！'} None None None {"state":true,"message":"设置默认维度成功！","value":"","code":200} 断言成功 -------------------------------Captured log call-------------------------------- INFO root:__init__.py:79 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_lao_zhang\test_case.py, 所在的行为：19 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "PUT /api/demension/v1/dem/setDefaultDem?code=test_dem_xyz_123 HTTP/11" 200 None
Passed | test_case/test_lao_zhang/test_case.py::TestBPM::test_bpm[组织管理-添加组织-高-正向用例-post-http://36.139.193.99:8088/api/org/v1/org/addOrg-json-case_data2-expect_data2-select|delete-sql_data2-demId] | 0.04 |
------------------------------Captured stdout call------------------------------ post http://36.139.193.99:8088/api/org/v1/org/addOrg json {'code': 'test_org', 'demId': '需要更新', 'exceedLimitNum': 0, 'grade': '', 'limitNum': 0, 'name': '测试组织', 'nowNum': 0, 'orderNo': 0, 'parentId': '0'} {'message': '添加组织成功！'} select|delete {'select': 'SELECT ID_ FROM uc_demension WHERE `CODE_`="test_dem_xyz_123";', 'delete': 'delete from uc_org where CODE_="test_org";'} demId {"state":true,"message":"添加组织成功！","value":"","code":200} 断言成功 -------------------------------Captured log call-------------------------------- INFO root:__init__.py:79 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_lao_zhang\test_case.py, 所在的行为：19 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "POST /api/org/v1/org/addOrg HTTP/11" 200 None
Passed | test_case/test_lao_zhang/test_case.py::TestBPM::test_bpm[组织管理-保存组织参数-中-正向用例-post-http://36.139.193.99:8088/api/org/v1/orgParam/saveOrgParams-query|json-case_data3-expect_data3-None-None-None] | 0.03 |
------------------------------Captured stdout call------------------------------ post http://36.139.193.99:8088/api/org/v1/orgParam/saveOrgParams query|json {'query': {'orgCode': 'test_org'}, 'body': [{'alias': 'sr', 'value': 'dog'}]} {'state': True, 'message': '保存组织参数成功！'} None None None {"state":true,"message":"保存组织参数成功！","value":"","code":200} 断言成功 -------------------------------Captured log call-------------------------------- INFO root:__init__.py:79 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_lao_zhang\test_case.py, 所在的行为：19 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "POST /api/org/v1/orgParam/saveOrgParams?orgCode=test_org HTTP/11" 200 None
Passed | test_case/test_lao_zhang/test_case.py::TestBPM::test_bpm[组织管理-删除组织-中-正向用例-post-http://36.139.193.99:8088/api/org/v1/org/deleteOrg-form-test_org-expect_data4-None-None-None] | 0.03 |
------------------------------Captured stdout call------------------------------ post http://36.139.193.99:8088/api/org/v1/org/deleteOrg form test_org {'state': True, 'message': '删除组织成功！'} None None None {"state":true,"message":"删除组织成功！","value":"","code":200} 断言成功 -------------------------------Captured log call-------------------------------- INFO root:__init__.py:79 执行的功能名称为：test_bpm, 功能所在的文件为：D:\Project\PythonDoc\test61\test61\APIAutoTest_v3_1\test_case\test_lao_zhang\test_case.py, 所在的行为：19 DEBUG urllib3.connectionpool:connectionpool.py:546 http://36.139.193.99:8088 "POST /api/org/v1/org/deleteOrg HTTP/11" 200 None