# 报告.html

Report generated on 07-Aug-2023 at 17:02:38 by pytest-html v3.1.0

## Summary

16 tests ran in 13.53 seconds.

(Un)check the boxes to filter the results.

14 passed, 0 skipped, 2 failed, 0 errors, 0 expected failures, 0 unexpected passes, 10 rerun

## Results

Result | Test | Duration | Links
--- | --- | --- | ---
No results found. Try to check the filters
Failed | test_bpm.py::TestBPM::test_bpm[è®¤è¯æ¥å£-å·æ°token-æ£åç¨ä¾-ä¸-get-http://120.46.172.186:8080/refresh-None-None-expect10-None-None-None] | 0.06 |
self = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x0000022281DA2910> req_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x0000022281DED070> db_fix = <InterfaceAutoTest.common.db.DB object at 0x0000022281E32F10>, module = '认证接口', interface = '刷新token', title = '正向用例' level = '中', method = 'get', url = 'http://120.46.172.186:8080/refresh', mime = None, data = None, expect = {'message': '刷新token成功'} sql_type = None, sql_sentence = None, update_key = None @allure.epic("BPM系统") @pytest.mark.parametrize("module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key", ReadExcel().get_data()) def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key): allure.dynamic.feature(module) allure.dynamic.story(interface) allure.dynamic.title(title) allure.dynamic.severity(level) # 1.1：判断sql语句的类型是否为delete if sql_type == "delete": # 1.2 使用DB类对象，调用delete方法执行删除的sql语句 db_fix.delete(sql_sentence) # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求 # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # 2.1 判断sql语句的类型是否为select elif sql_type == "select": # 2.2 使用DB类对象，调用select方法执行查询的sql语句，并接收查询结果 select_result = db_fix.select(sql_sentence) # 2.3 将查询结果更新到用例数据中 data[update_key] = select_result # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求 # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # 3.1 判断sql语句的类型是否delete|select或者为select|delete elif sql_type == "delete|select" or sql_type == "select|delete": # 3.2 使用DB类对象，调用delete方法执行删除的sql语句 db_fix.delete(sql_sentence["delete"]) # 3.3 使用DB类对象，调用select方法执行查询的sql语句，并接收查询结果 select_result = db_fix.select(sql_sentence["select"]) # 3.4 将查询结果更新到用例数据中 data[update_key] = select_result # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求 # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # # else: # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # 断言 try: for key in expect: > assert expect[key] == result.json().get(key) E AssertionError: assert '刷新token成功' == None E + where None = <built-in method get of dict object at 0x0000022281F56EC0>('message') E + where <built-in method get of dict object at 0x0000022281F56EC0> = {'account': '', 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODUzNTEsImlhdCI6MTY5MTM5ODk1MX0.-UBJtx2T-YGwrygBuk2eH3T4qIsFcLyHJTcPWSxmJqqiL8MZ7s9c98T8C_1iZ3hO-srwnhOLGzdnH_xTyz8OnA', 'userAttrs': {}, ...}.get E + where {'account': '', 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODUzNTEsImlhdCI6MTY5MTM5ODk1MX0.-UBJtx2T-YGwrygBuk2eH3T4qIsFcLyHJTcPWSxmJqqiL8MZ7s9c98T8C_1iZ3hO-srwnhOLGzdnH_xTyz8OnA', 'userAttrs': {}, ...} = <bound method Response.json of <Response [200]>>() E + where <bound method Response.json of <Response [200]>> = <Response [200]>.json test_bpm.py:61: AssertionError During handling of the above exception, another exception occurred: self = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x0000022281DA2910> req_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x0000022281DED070> db_fix = <InterfaceAutoTest.common.db.DB object at 0x0000022281E32F10>, module = '认证接口', interface = '刷新token', title = '正向用例' level = '中', method = 'get', url = 'http://120.46.172.186:8080/refresh', mime = None, data = None, expect = {'message': '刷新token成功'} sql_type = None, sql_sentence = None, update_key = None @allure.epic("BPM系统") @pytest.mark.parametrize("module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key", ReadExcel().get_data()) def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key): allure.dynamic.feature(module) allure.dynamic.story(interface) allure.dynamic.title(title) allure.dynamic.severity(level) # 1.1：判断sql语句的类型是否为delete if sql_type == "delete": # 1.2 使用DB类对象，调用delete方法执行删除的sql语句 db_fix.delete(sql_sentence) # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求 # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # 2.1 判断sql语句的类型是否为select elif sql_type == "select": # 2.2 使用DB类对象，调用select方法执行查询的sql语句，并接收查询结果 select_result = db_fix.select(sql_sentence) # 2.3 将查询结果更新到用例数据中 data[update_key] = select_result # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求 # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # 3.1 判断sql语句的类型是否delete|select或者为select|delete elif sql_type == "delete|select" or sql_type == "select|delete": # 3.2 使用DB类对象，调用delete方法执行删除的sql语句 db_fix.delete(sql_sentence["delete"]) # 3.3 使用DB类对象，调用select方法执行查询的sql语句，并接收查询结果 select_result = db_fix.select(sql_sentence["select"]) # 3.4 将查询结果更新到用例数据中 data[update_key] = select_result # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求 # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # # else: # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # 断言 try: for key in expect: assert expect[key] == result.json().get(key) except: print("断言失败") logging.error("断言失败, 模块名称为：{}，接口名称为：{}，用例标题：{}，用例为：{}，期望结果为：{}，服务器返回数据为：{}".format(module, interface, title, str(data), str(expect), result.text)) > raise AssertionError("断言失败") E AssertionError: 断言失败 test_bpm.py:65: AssertionError ------------------------------Captured stdout call------------------------------ 断言失败 -------------------------------Captured log call-------------------------------- DEBUG--2023-08-07 17:02:26--Resetting dropped connection: 120.46.172.186 DEBUG--2023-08-07 17:02:26--http://120.46.172.186:8080 "GET /refresh HTTP/1.1" 200 None ERROR--2023-08-07 17:02:26--断言失败, 模块名称为：认证接口，接口名称为：刷新token，用例标题：正向用例，用例为：None，期望结果为：{'message': '刷新token成功'}，服务器返回数据为：{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODUzNDUsImlhdCI6MTY5MTM5ODk0NX0.KmIyRQCDMctD_PUlD4yTzmfqjx03E1gOHnY8L8ciCd9R_Ifd6kR1QyaSxyFa728Exw9kAHix6Y4wSzDaawAusg","username":"","account":"","userId":"","loginStatus":true,"userAttrs":{}} ------------------------------Captured stdout call------------------------------ 断言失败 -------------------------------Captured log call-------------------------------- DEBUG--2023-08-07 17:02:27--http://120.46.172.186:8080 "GET /refresh HTTP/1.1" 200 None ERROR--2023-08-07 17:02:27--断言失败, 模块名称为：认证接口，接口名称为：刷新token，用例标题：正向用例，用例为：None，期望结果为：{'message': '刷新token成功'}，服务器返回数据为：{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODUzNDYsImlhdCI6MTY5MTM5ODk0Nn0.2-6CB-jd8JizeFRPXKILUIKAzg5WDblLPVcljUkRf8pv8gzA0rSIHjSUlr89yY1Gw-feZ94Q1sCa2IT7_fqpfw","username":"","account":"","userId":"","loginStatus":true,"userAttrs":{}} ------------------------------Captured stdout call------------------------------ 断言失败 -------------------------------Captured log call-------------------------------- DEBUG--2023-08-07 17:02:28--http://120.46.172.186:8080 "GET /refresh HTTP/1.1" 200 None ERROR--2023-08-07 17:02:28--断言失败, 模块名称为：认证接口，接口名称为：刷新token，用例标题：正向用例，用例为：None，期望结果为：{'message': '刷新token成功'}，服务器返回数据为：{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODUzNDgsImlhdCI6MTY5MTM5ODk0OH0.1gfPOxI1TNfjMEQdHmWHn02Tt10jpl1TaxN54rqJdFFa3h-mmWKb7Psb6oemtKrxN-QHkjMGcrsotUJvMVONyw","username":"","account":"","userId":"","loginStatus":true,"userAttrs":{}} ------------------------------Captured stdout call------------------------------ 断言失败 -------------------------------Captured log call-------------------------------- DEBUG--2023-08-07 17:02:29--http://120.46.172.186:8080 "GET /refresh HTTP/1.1" 200 None ERROR--2023-08-07 17:02:29--断言失败, 模块名称为：认证接口，接口名称为：刷新token，用例标题：正向用例，用例为：None，期望结果为：{'message': '刷新token成功'}，服务器返回数据为：{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODUzNDksImlhdCI6MTY5MTM5ODk0OX0.o-l3mCXklV-b5_c_dUWBxXWSt6yhuDEp865u5170XY7OVYQMD6wwS-9IEbcFauPVg6uV7hxvYdSbhJegUWSB-A","username":"","account":"","userId":"","loginStatus":true,"userAttrs":{}} ------------------------------Captured stdout call------------------------------ 断言失败 -------------------------------Captured log call-------------------------------- DEBUG--2023-08-07 17:02:31--http://120.46.172.186:8080 "GET /refresh HTTP/1.1" 200 None ERROR--2023-08-07 17:02:31--断言失败, 模块名称为：认证接口，接口名称为：刷新token，用例标题：正向用例，用例为：None，期望结果为：{'message': '刷新token成功'}，服务器返回数据为：{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODUzNTAsImlhdCI6MTY5MTM5ODk1MH0.l7g1UOdwEFIMPqLUNi2XjHOQpBG_MamIHJ21GraCyOF-Jh_xZWydqlZ_wbdW542VelFcv_qYM317zpPh24cFGA","username":"","account":"","userId":"","loginStatus":true,"userAttrs":{}} ------------------------------Captured stdout call------------------------------ 断言失败 -------------------------------Captured log call-------------------------------- DEBUG--2023-08-07 17:02:32--http://120.46.172.186:8080 "GET /refresh HTTP/1.1" 200 None ERROR--2023-08-07 17:02:32--断言失败, 模块名称为：认证接口，接口名称为：刷新token，用例标题：正向用例，用例为：None，期望结果为：{'message': '刷新token成功'}，服务器返回数据为：{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODUzNTEsImlhdCI6MTY5MTM5ODk1MX0.-UBJtx2T-YGwrygBuk2eH3T4qIsFcLyHJTcPWSxmJqqiL8MZ7s9c98T8C_1iZ3hO-srwnhOLGzdnH_xTyz8OnA","username":"","account":"","userId":"","loginStatus":true,"userAttrs":{}}
Failed | test_bpm.py::TestBPM::test_bpm[ç»´åº¦ç®¡ç-æ ¹æ®ç»´åº¦ç¼ç å é¤ç»´åº¦-æ£åç¨ä¾-é«-DELETE-http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds-query-data15-expect15-select-SELECT ID_ FROM uc_demension WHERE `CODE_`="test56_dem";-ids] | 0.14 |
self = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x0000022281DB6E20> req_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x0000022281DED070> db_fix = <InterfaceAutoTest.common.db.DB object at 0x0000022281E32F10>, module = '维度管理', interface = '根据维度编码删除维度', title = '正向用例' level = '高', method = 'DELETE', url = 'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds', mime = 'query' data = {'ids': '1688475697716150272'}, expect = {'message': '删除维度成功', 'state': True}, sql_type = 'select' sql_sentence = 'SELECT ID_ FROM uc_demension WHERE `CODE_`="test56_dem";', update_key = 'ids' @allure.epic("BPM系统") @pytest.mark.parametrize("module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key", ReadExcel().get_data()) def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key): allure.dynamic.feature(module) allure.dynamic.story(interface) allure.dynamic.title(title) allure.dynamic.severity(level) # 1.1：判断sql语句的类型是否为delete if sql_type == "delete": # 1.2 使用DB类对象，调用delete方法执行删除的sql语句 db_fix.delete(sql_sentence) # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求 # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # 2.1 判断sql语句的类型是否为select elif sql_type == "select": # 2.2 使用DB类对象，调用select方法执行查询的sql语句，并接收查询结果 select_result = db_fix.select(sql_sentence) # 2.3 将查询结果更新到用例数据中 data[update_key] = select_result # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求 # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # 3.1 判断sql语句的类型是否delete|select或者为select|delete elif sql_type == "delete|select" or sql_type == "select|delete": # 3.2 使用DB类对象，调用delete方法执行删除的sql语句 db_fix.delete(sql_sentence["delete"]) # 3.3 使用DB类对象，调用select方法执行查询的sql语句，并接收查询结果 select_result = db_fix.select(sql_sentence["select"]) # 3.4 将查询结果更新到用例数据中 data[update_key] = select_result # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求 # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # # else: # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # 断言 try: for key in expect: > assert expect[key] == result.json().get(key) E AssertionError: assert True == False E + where False = <built-in method get of dict object at 0x0000022281FA5F00>('state') E + where <built-in method get of dict object at 0x0000022281FA5F00> = {'logId': '1688475723376902144', 'message': '', 'state': False}.get E + where {'logId': '1688475723376902144', 'message': '', 'state': False} = <bound method Response.json of <Response [500]>>() E + where <bound method Response.json of <Response [500]>> = <Response [500]>.json test_bpm.py:61: AssertionError During handling of the above exception, another exception occurred: self = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x0000022281DB6E20> req_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x0000022281DED070> db_fix = <InterfaceAutoTest.common.db.DB object at 0x0000022281E32F10>, module = '维度管理', interface = '根据维度编码删除维度', title = '正向用例' level = '高', method = 'DELETE', url = 'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds', mime = 'query' data = {'ids': '1688475697716150272'}, expect = {'message': '删除维度成功', 'state': True}, sql_type = 'select' sql_sentence = 'SELECT ID_ FROM uc_demension WHERE `CODE_`="test56_dem";', update_key = 'ids' @allure.epic("BPM系统") @pytest.mark.parametrize("module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key", ReadExcel().get_data()) def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key): allure.dynamic.feature(module) allure.dynamic.story(interface) allure.dynamic.title(title) allure.dynamic.severity(level) # 1.1：判断sql语句的类型是否为delete if sql_type == "delete": # 1.2 使用DB类对象，调用delete方法执行删除的sql语句 db_fix.delete(sql_sentence) # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求 # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # 2.1 判断sql语句的类型是否为select elif sql_type == "select": # 2.2 使用DB类对象，调用select方法执行查询的sql语句，并接收查询结果 select_result = db_fix.select(sql_sentence) # 2.3 将查询结果更新到用例数据中 data[update_key] = select_result # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求 # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # 3.1 判断sql语句的类型是否delete|select或者为select|delete elif sql_type == "delete|select" or sql_type == "select|delete": # 3.2 使用DB类对象，调用delete方法执行删除的sql语句 db_fix.delete(sql_sentence["delete"]) # 3.3 使用DB类对象，调用select方法执行查询的sql语句，并接收查询结果 select_result = db_fix.select(sql_sentence["select"]) # 3.4 将查询结果更新到用例数据中 data[update_key] = select_result # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求 # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # # else: # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # 断言 try: for key in expect: assert expect[key] == result.json().get(key) except: print("断言失败") logging.error("断言失败, 模块名称为：{}，接口名称为：{}，用例标题：{}，用例为：{}，期望结果为：{}，服务器返回数据为：{}".format(module, interface, title, str(data), str(expect), result.text)) > raise AssertionError("断言失败") E AssertionError: 断言失败 test_bpm.py:65: AssertionError ------------------------------Captured stdout call------------------------------ 断言失败 -------------------------------Captured log call-------------------------------- DEBUG--2023-08-07 17:02:32--http://120.46.172.186:8080 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1688475697716150272 HTTP/1.1" 200 None ERROR--2023-08-07 17:02:32--断言失败, 模块名称为：维度管理，接口名称为：根据维度编码删除维度，用例标题：正向用例，用例为：{'ids': '1688475697716150272'}，期望结果为：{'state': True, 'message': '删除维度成功'}，服务器返回数据为：{"state":true,"message":"删除维度成功！","value":""} ------------------------------Captured stdout call------------------------------ 断言失败 -------------------------------Captured log call-------------------------------- DEBUG--2023-08-07 17:02:33--http://120.46.172.186:8080 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1688475697716150272 HTTP/1.1" 500 None ERROR--2023-08-07 17:02:33--断言失败, 模块名称为：维度管理，接口名称为：根据维度编码删除维度，用例标题：正向用例，用例为：{'ids': '1688475697716150272'}，期望结果为：{'state': True, 'message': '删除维度成功'}，服务器返回数据为：{"state":false,"message":"","logId":"1688475704070520832"} ------------------------------Captured stdout call------------------------------ 断言失败 -------------------------------Captured log call-------------------------------- DEBUG--2023-08-07 17:02:34--Resetting dropped connection: 120.46.172.186 DEBUG--2023-08-07 17:02:34--http://120.46.172.186:8080 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1688475697716150272 HTTP/1.1" 500 None ERROR--2023-08-07 17:02:34--断言失败, 模块名称为：维度管理，接口名称为：根据维度编码删除维度，用例标题：正向用例，用例为：{'ids': '1688475697716150272'}，期望结果为：{'state': True, 'message': '删除维度成功'}，服务器返回数据为：{"state":false,"message":"","logId":"1688475708889776128"} ------------------------------Captured stdout call------------------------------ 断言失败 -------------------------------Captured log call-------------------------------- DEBUG--2023-08-07 17:02:35--Resetting dropped connection: 120.46.172.186 DEBUG--2023-08-07 17:02:36--http://120.46.172.186:8080 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1688475697716150272 HTTP/1.1" 500 None ERROR--2023-08-07 17:02:36--断言失败, 模块名称为：维度管理，接口名称为：根据维度编码删除维度，用例标题：正向用例，用例为：{'ids': '1688475697716150272'}，期望结果为：{'state': True, 'message': '删除维度成功'}，服务器返回数据为：{"state":false,"message":"","logId":"1688475713730002944"} ------------------------------Captured stdout call------------------------------ 断言失败 -------------------------------Captured log call-------------------------------- DEBUG--2023-08-07 17:02:37--Resetting dropped connection: 120.46.172.186 DEBUG--2023-08-07 17:02:37--http://120.46.172.186:8080 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1688475697716150272 HTTP/1.1" 500 None ERROR--2023-08-07 17:02:37--断言失败, 模块名称为：维度管理，接口名称为：根据维度编码删除维度，用例标题：正向用例，用例为：{'ids': '1688475697716150272'}，期望结果为：{'state': True, 'message': '删除维度成功'}，服务器返回数据为：{"state":false,"message":"","logId":"1688475718570229760"} ------------------------------Captured stdout call------------------------------ 断言失败 -------------------------------Captured log call-------------------------------- DEBUG--2023-08-07 17:02:38--Resetting dropped connection: 120.46.172.186 DEBUG--2023-08-07 17:02:38--http://120.46.172.186:8080 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1688475697716150272 HTTP/1.1" 500 None ERROR--2023-08-07 17:02:38--断言失败, 模块名称为：维度管理，接口名称为：根据维度编码删除维度，用例标题：正向用例，用例为：{'ids': '1688475697716150272'}，期望结果为：{'state': True, 'message': '删除维度成功'}，服务器返回数据为：{"state":false,"message":"","logId":"1688475723376902144"}
Rerun | test_bpm.py::TestBPM::test_bpm[è®¤è¯æ¥å£-å·æ°token-æ£åç¨ä¾-ä¸-get-http://120.46.172.186:8080/refresh-None-None-expect10-None-None-None] | 0.09 |
self = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x0000022281DA2910> req_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x0000022281DED070> db_fix = <InterfaceAutoTest.common.db.DB object at 0x0000022281E32F10>, module = '认证接口', interface = '刷新token', title = '正向用例' level = '中', method = 'get', url = 'http://120.46.172.186:8080/refresh', mime = None, data = None, expect = {'message': '刷新token成功'} sql_type = None, sql_sentence = None, update_key = None @allure.epic("BPM系统") @pytest.mark.parametrize("module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key", ReadExcel().get_data()) def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key): allure.dynamic.feature(module) allure.dynamic.story(interface) allure.dynamic.title(title) allure.dynamic.severity(level) # 1.1：判断sql语句的类型是否为delete if sql_type == "delete": # 1.2 使用DB类对象，调用delete方法执行删除的sql语句 db_fix.delete(sql_sentence) # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求 # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # 2.1 判断sql语句的类型是否为select elif sql_type == "select": # 2.2 使用DB类对象，调用select方法执行查询的sql语句，并接收查询结果 select_result = db_fix.select(sql_sentence) # 2.3 将查询结果更新到用例数据中 data[update_key] = select_result # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求 # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # 3.1 判断sql语句的类型是否delete|select或者为select|delete elif sql_type == "delete|select" or sql_type == "select|delete": # 3.2 使用DB类对象，调用delete方法执行删除的sql语句 db_fix.delete(sql_sentence["delete"]) # 3.3 使用DB类对象，调用select方法执行查询的sql语句，并接收查询结果 select_result = db_fix.select(sql_sentence["select"]) # 3.4 将查询结果更新到用例数据中 data[update_key] = select_result # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求 # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # # else: # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # 断言 try: for key in expect: > assert expect[key] == result.json().get(key) E AssertionError: assert '刷新token成功' == None E + where None = <built-in method get of dict object at 0x0000022281EAB040>('message') E + where <built-in method get of dict object at 0x0000022281EAB040> = {'account': '', 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODUzNDUsImlhdCI6MTY5MTM5ODk0NX0.KmIyRQCDMctD_PUlD4yTzmfqjx03E1gOHnY8L8ciCd9R_Ifd6kR1QyaSxyFa728Exw9kAHix6Y4wSzDaawAusg', 'userAttrs': {}, ...}.get E + where {'account': '', 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODUzNDUsImlhdCI6MTY5MTM5ODk0NX0.KmIyRQCDMctD_PUlD4yTzmfqjx03E1gOHnY8L8ciCd9R_Ifd6kR1QyaSxyFa728Exw9kAHix6Y4wSzDaawAusg', 'userAttrs': {}, ...} = <bound method Response.json of <Response [200]>>() E + where <bound method Response.json of <Response [200]>> = <Response [200]>.json test_bpm.py:61: AssertionError During handling of the above exception, another exception occurred: self = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x0000022281DA2910> req_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x0000022281DED070> db_fix = <InterfaceAutoTest.common.db.DB object at 0x0000022281E32F10>, module = '认证接口', interface = '刷新token', title = '正向用例' level = '中', method = 'get', url = 'http://120.46.172.186:8080/refresh', mime = None, data = None, expect = {'message': '刷新token成功'} sql_type = None, sql_sentence = None, update_key = None @allure.epic("BPM系统") @pytest.mark.parametrize("module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key", ReadExcel().get_data()) def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key): allure.dynamic.feature(module) allure.dynamic.story(interface) allure.dynamic.title(title) allure.dynamic.severity(level) # 1.1：判断sql语句的类型是否为delete if sql_type == "delete": # 1.2 使用DB类对象，调用delete方法执行删除的sql语句 db_fix.delete(sql_sentence) # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求 # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # 2.1 判断sql语句的类型是否为select elif sql_type == "select": # 2.2 使用DB类对象，调用select方法执行查询的sql语句，并接收查询结果 select_result = db_fix.select(sql_sentence) # 2.3 将查询结果更新到用例数据中 data[update_key] = select_result # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求 # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # 3.1 判断sql语句的类型是否delete|select或者为select|delete elif sql_type == "delete|select" or sql_type == "select|delete": # 3.2 使用DB类对象，调用delete方法执行删除的sql语句 db_fix.delete(sql_sentence["delete"]) # 3.3 使用DB类对象，调用select方法执行查询的sql语句，并接收查询结果 select_result = db_fix.select(sql_sentence["select"]) # 3.4 将查询结果更新到用例数据中 data[update_key] = select_result # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求 # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # # else: # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # 断言 try: for key in expect: assert expect[key] == result.json().get(key) except: print("断言失败") logging.error("断言失败, 模块名称为：{}，接口名称为：{}，用例标题：{}，用例为：{}，期望结果为：{}，服务器返回数据为：{}".format(module, interface, title, str(data), str(expect), result.text)) > raise AssertionError("断言失败") E AssertionError: 断言失败 test_bpm.py:65: AssertionError ------------------------------Captured stdout call------------------------------ 断言失败 -------------------------------Captured log call-------------------------------- DEBUG--2023-08-07 17:02:26--Resetting dropped connection: 120.46.172.186 DEBUG--2023-08-07 17:02:26--http://120.46.172.186:8080 "GET /refresh HTTP/1.1" 200 None ERROR--2023-08-07 17:02:26--断言失败, 模块名称为：认证接口，接口名称为：刷新token，用例标题：正向用例，用例为：None，期望结果为：{'message': '刷新token成功'}，服务器返回数据为：{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODUzNDUsImlhdCI6MTY5MTM5ODk0NX0.KmIyRQCDMctD_PUlD4yTzmfqjx03E1gOHnY8L8ciCd9R_Ifd6kR1QyaSxyFa728Exw9kAHix6Y4wSzDaawAusg","username":"","account":"","userId":"","loginStatus":true,"userAttrs":{}}
Rerun | test_bpm.py::TestBPM::test_bpm[è®¤è¯æ¥å£-å·æ°token-æ£åç¨ä¾-ä¸-get-http://120.46.172.186:8080/refresh-None-None-expect10-None-None-None] | 0.05 |
self = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x0000022281DA2910> req_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x0000022281DED070> db_fix = <InterfaceAutoTest.common.db.DB object at 0x0000022281E32F10>, module = '认证接口', interface = '刷新token', title = '正向用例' level = '中', method = 'get', url = 'http://120.46.172.186:8080/refresh', mime = None, data = None, expect = {'message': '刷新token成功'} sql_type = None, sql_sentence = None, update_key = None @allure.epic("BPM系统") @pytest.mark.parametrize("module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key", ReadExcel().get_data()) def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key): allure.dynamic.feature(module) allure.dynamic.story(interface) allure.dynamic.title(title) allure.dynamic.severity(level) # 1.1：判断sql语句的类型是否为delete if sql_type == "delete": # 1.2 使用DB类对象，调用delete方法执行删除的sql语句 db_fix.delete(sql_sentence) # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求 # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # 2.1 判断sql语句的类型是否为select elif sql_type == "select": # 2.2 使用DB类对象，调用select方法执行查询的sql语句，并接收查询结果 select_result = db_fix.select(sql_sentence) # 2.3 将查询结果更新到用例数据中 data[update_key] = select_result # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求 # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # 3.1 判断sql语句的类型是否delete|select或者为select|delete elif sql_type == "delete|select" or sql_type == "select|delete": # 3.2 使用DB类对象，调用delete方法执行删除的sql语句 db_fix.delete(sql_sentence["delete"]) # 3.3 使用DB类对象，调用select方法执行查询的sql语句，并接收查询结果 select_result = db_fix.select(sql_sentence["select"]) # 3.4 将查询结果更新到用例数据中 data[update_key] = select_result # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求 # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # # else: # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # 断言 try: for key in expect: > assert expect[key] == result.json().get(key) E AssertionError: assert '刷新token成功' == None E + where None = <built-in method get of dict object at 0x0000022281F41380>('message') E + where <built-in method get of dict object at 0x0000022281F41380> = {'account': '', 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODUzNDYsImlhdCI6MTY5MTM5ODk0Nn0.2-6CB-jd8JizeFRPXKILUIKAzg5WDblLPVcljUkRf8pv8gzA0rSIHjSUlr89yY1Gw-feZ94Q1sCa2IT7_fqpfw', 'userAttrs': {}, ...}.get E + where {'account': '', 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODUzNDYsImlhdCI6MTY5MTM5ODk0Nn0.2-6CB-jd8JizeFRPXKILUIKAzg5WDblLPVcljUkRf8pv8gzA0rSIHjSUlr89yY1Gw-feZ94Q1sCa2IT7_fqpfw', 'userAttrs': {}, ...} = <bound method Response.json of <Response [200]>>() E + where <bound method Response.json of <Response [200]>> = <Response [200]>.json test_bpm.py:61: AssertionError During handling of the above exception, another exception occurred: self = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x0000022281DA2910> req_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x0000022281DED070> db_fix = <InterfaceAutoTest.common.db.DB object at 0x0000022281E32F10>, module = '认证接口', interface = '刷新token', title = '正向用例' level = '中', method = 'get', url = 'http://120.46.172.186:8080/refresh', mime = None, data = None, expect = {'message': '刷新token成功'} sql_type = None, sql_sentence = None, update_key = None @allure.epic("BPM系统") @pytest.mark.parametrize("module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key", ReadExcel().get_data()) def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key): allure.dynamic.feature(module) allure.dynamic.story(interface) allure.dynamic.title(title) allure.dynamic.severity(level) # 1.1：判断sql语句的类型是否为delete if sql_type == "delete": # 1.2 使用DB类对象，调用delete方法执行删除的sql语句 db_fix.delete(sql_sentence) # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求 # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # 2.1 判断sql语句的类型是否为select elif sql_type == "select": # 2.2 使用DB类对象，调用select方法执行查询的sql语句，并接收查询结果 select_result = db_fix.select(sql_sentence) # 2.3 将查询结果更新到用例数据中 data[update_key] = select_result # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求 # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # 3.1 判断sql语句的类型是否delete|select或者为select|delete elif sql_type == "delete|select" or sql_type == "select|delete": # 3.2 使用DB类对象，调用delete方法执行删除的sql语句 db_fix.delete(sql_sentence["delete"]) # 3.3 使用DB类对象，调用select方法执行查询的sql语句，并接收查询结果 select_result = db_fix.select(sql_sentence["select"]) # 3.4 将查询结果更新到用例数据中 data[update_key] = select_result # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求 # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # # else: # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # 断言 try: for key in expect: assert expect[key] == result.json().get(key) except: print("断言失败") logging.error("断言失败, 模块名称为：{}，接口名称为：{}，用例标题：{}，用例为：{}，期望结果为：{}，服务器返回数据为：{}".format(module, interface, title, str(data), str(expect), result.text)) > raise AssertionError("断言失败") E AssertionError: 断言失败 test_bpm.py:65: AssertionError ------------------------------Captured stdout call------------------------------ 断言失败 -------------------------------Captured log call-------------------------------- DEBUG--2023-08-07 17:02:26--Resetting dropped connection: 120.46.172.186 DEBUG--2023-08-07 17:02:26--http://120.46.172.186:8080 "GET /refresh HTTP/1.1" 200 None ERROR--2023-08-07 17:02:26--断言失败, 模块名称为：认证接口，接口名称为：刷新token，用例标题：正向用例，用例为：None，期望结果为：{'message': '刷新token成功'}，服务器返回数据为：{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODUzNDUsImlhdCI6MTY5MTM5ODk0NX0.KmIyRQCDMctD_PUlD4yTzmfqjx03E1gOHnY8L8ciCd9R_Ifd6kR1QyaSxyFa728Exw9kAHix6Y4wSzDaawAusg","username":"","account":"","userId":"","loginStatus":true,"userAttrs":{}} ------------------------------Captured stdout call------------------------------ 断言失败 -------------------------------Captured log call-------------------------------- DEBUG--2023-08-07 17:02:27--http://120.46.172.186:8080 "GET /refresh HTTP/1.1" 200 None ERROR--2023-08-07 17:02:27--断言失败, 模块名称为：认证接口，接口名称为：刷新token，用例标题：正向用例，用例为：None，期望结果为：{'message': '刷新token成功'}，服务器返回数据为：{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODUzNDYsImlhdCI6MTY5MTM5ODk0Nn0.2-6CB-jd8JizeFRPXKILUIKAzg5WDblLPVcljUkRf8pv8gzA0rSIHjSUlr89yY1Gw-feZ94Q1sCa2IT7_fqpfw","username":"","account":"","userId":"","loginStatus":true,"userAttrs":{}}
Rerun | test_bpm.py::TestBPM::test_bpm[è®¤è¯æ¥å£-å·æ°token-æ£åç¨ä¾-ä¸-get-http://120.46.172.186:8080/refresh-None-None-expect10-None-None-None] | 0.05 |
self = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x0000022281DA2910> req_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x0000022281DED070> db_fix = <InterfaceAutoTest.common.db.DB object at 0x0000022281E32F10>, module = '认证接口', interface = '刷新token', title = '正向用例' level = '中', method = 'get', url = 'http://120.46.172.186:8080/refresh', mime = None, data = None, expect = {'message': '刷新token成功'} sql_type = None, sql_sentence = None, update_key = None @allure.epic("BPM系统") @pytest.mark.parametrize("module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key", ReadExcel().get_data()) def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key): allure.dynamic.feature(module) allure.dynamic.story(interface) allure.dynamic.title(title) allure.dynamic.severity(level) # 1.1：判断sql语句的类型是否为delete if sql_type == "delete": # 1.2 使用DB类对象，调用delete方法执行删除的sql语句 db_fix.delete(sql_sentence) # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求 # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # 2.1 判断sql语句的类型是否为select elif sql_type == "select": # 2.2 使用DB类对象，调用select方法执行查询的sql语句，并接收查询结果 select_result = db_fix.select(sql_sentence) # 2.3 将查询结果更新到用例数据中 data[update_key] = select_result # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求 # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # 3.1 判断sql语句的类型是否delete|select或者为select|delete elif sql_type == "delete|select" or sql_type == "select|delete": # 3.2 使用DB类对象，调用delete方法执行删除的sql语句 db_fix.delete(sql_sentence["delete"]) # 3.3 使用DB类对象，调用select方法执行查询的sql语句，并接收查询结果 select_result = db_fix.select(sql_sentence["select"]) # 3.4 将查询结果更新到用例数据中 data[update_key] = select_result # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求 # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # # else: # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # 断言 try: for key in expect: > assert expect[key] == result.json().get(key) E AssertionError: assert '刷新token成功' == None E + where None = <built-in method get of dict object at 0x0000022281D76C40>('message') E + where <built-in method get of dict object at 0x0000022281D76C40> = {'account': '', 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODUzNDgsImlhdCI6MTY5MTM5ODk0OH0.1gfPOxI1TNfjMEQdHmWHn02Tt10jpl1TaxN54rqJdFFa3h-mmWKb7Psb6oemtKrxN-QHkjMGcrsotUJvMVONyw', 'userAttrs': {}, ...}.get E + where {'account': '', 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODUzNDgsImlhdCI6MTY5MTM5ODk0OH0.1gfPOxI1TNfjMEQdHmWHn02Tt10jpl1TaxN54rqJdFFa3h-mmWKb7Psb6oemtKrxN-QHkjMGcrsotUJvMVONyw', 'userAttrs': {}, ...} = <bound method Response.json of <Response [200]>>() E + where <bound method Response.json of <Response [200]>> = <Response [200]>.json test_bpm.py:61: AssertionError During handling of the above exception, another exception occurred: self = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x0000022281DA2910> req_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x0000022281DED070> db_fix = <InterfaceAutoTest.common.db.DB object at 0x0000022281E32F10>, module = '认证接口', interface = '刷新token', title = '正向用例' level = '中', method = 'get', url = 'http://120.46.172.186:8080/refresh', mime = None, data = None, expect = {'message': '刷新token成功'} sql_type = None, sql_sentence = None, update_key = None @allure.epic("BPM系统") @pytest.mark.parametrize("module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key", ReadExcel().get_data()) def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key): allure.dynamic.feature(module) allure.dynamic.story(interface) allure.dynamic.title(title) allure.dynamic.severity(level) # 1.1：判断sql语句的类型是否为delete if sql_type == "delete": # 1.2 使用DB类对象，调用delete方法执行删除的sql语句 db_fix.delete(sql_sentence) # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求 # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # 2.1 判断sql语句的类型是否为select elif sql_type == "select": # 2.2 使用DB类对象，调用select方法执行查询的sql语句，并接收查询结果 select_result = db_fix.select(sql_sentence) # 2.3 将查询结果更新到用例数据中 data[update_key] = select_result # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求 # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # 3.1 判断sql语句的类型是否delete|select或者为select|delete elif sql_type == "delete|select" or sql_type == "select|delete": # 3.2 使用DB类对象，调用delete方法执行删除的sql语句 db_fix.delete(sql_sentence["delete"]) # 3.3 使用DB类对象，调用select方法执行查询的sql语句，并接收查询结果 select_result = db_fix.select(sql_sentence["select"]) # 3.4 将查询结果更新到用例数据中 data[update_key] = select_result # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求 # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # # else: # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # 断言 try: for key in expect: assert expect[key] == result.json().get(key) except: print("断言失败") logging.error("断言失败, 模块名称为：{}，接口名称为：{}，用例标题：{}，用例为：{}，期望结果为：{}，服务器返回数据为：{}".format(module, interface, title, str(data), str(expect), result.text)) > raise AssertionError("断言失败") E AssertionError: 断言失败 test_bpm.py:65: AssertionError ------------------------------Captured stdout call------------------------------ 断言失败 -------------------------------Captured log call-------------------------------- DEBUG--2023-08-07 17:02:26--Resetting dropped connection: 120.46.172.186 DEBUG--2023-08-07 17:02:26--http://120.46.172.186:8080 "GET /refresh HTTP/1.1" 200 None ERROR--2023-08-07 17:02:26--断言失败, 模块名称为：认证接口，接口名称为：刷新token，用例标题：正向用例，用例为：None，期望结果为：{'message': '刷新token成功'}，服务器返回数据为：{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODUzNDUsImlhdCI6MTY5MTM5ODk0NX0.KmIyRQCDMctD_PUlD4yTzmfqjx03E1gOHnY8L8ciCd9R_Ifd6kR1QyaSxyFa728Exw9kAHix6Y4wSzDaawAusg","username":"","account":"","userId":"","loginStatus":true,"userAttrs":{}} ------------------------------Captured stdout call------------------------------ 断言失败 -------------------------------Captured log call-------------------------------- DEBUG--2023-08-07 17:02:27--http://120.46.172.186:8080 "GET /refresh HTTP/1.1" 200 None ERROR--2023-08-07 17:02:27--断言失败, 模块名称为：认证接口，接口名称为：刷新token，用例标题：正向用例，用例为：None，期望结果为：{'message': '刷新token成功'}，服务器返回数据为：{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODUzNDYsImlhdCI6MTY5MTM5ODk0Nn0.2-6CB-jd8JizeFRPXKILUIKAzg5WDblLPVcljUkRf8pv8gzA0rSIHjSUlr89yY1Gw-feZ94Q1sCa2IT7_fqpfw","username":"","account":"","userId":"","loginStatus":true,"userAttrs":{}} ------------------------------Captured stdout call------------------------------ 断言失败 -------------------------------Captured log call-------------------------------- DEBUG--2023-08-07 17:02:28--http://120.46.172.186:8080 "GET /refresh HTTP/1.1" 200 None ERROR--2023-08-07 17:02:28--断言失败, 模块名称为：认证接口，接口名称为：刷新token，用例标题：正向用例，用例为：None，期望结果为：{'message': '刷新token成功'}，服务器返回数据为：{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODUzNDgsImlhdCI6MTY5MTM5ODk0OH0.1gfPOxI1TNfjMEQdHmWHn02Tt10jpl1TaxN54rqJdFFa3h-mmWKb7Psb6oemtKrxN-QHkjMGcrsotUJvMVONyw","username":"","account":"","userId":"","loginStatus":true,"userAttrs":{}}
Rerun | test_bpm.py::TestBPM::test_bpm[è®¤è¯æ¥å£-å·æ°token-æ£åç¨ä¾-ä¸-get-http://120.46.172.186:8080/refresh-None-None-expect10-None-None-None] | 0.05 |
self = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x0000022281DA2910> req_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x0000022281DED070> db_fix = <InterfaceAutoTest.common.db.DB object at 0x0000022281E32F10>, module = '认证接口', interface = '刷新token', title = '正向用例' level = '中', method = 'get', url = 'http://120.46.172.186:8080/refresh', mime = None, data = None, expect = {'message': '刷新token成功'} sql_type = None, sql_sentence = None, update_key = None @allure.epic("BPM系统") @pytest.mark.parametrize("module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key", ReadExcel().get_data()) def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key): allure.dynamic.feature(module) allure.dynamic.story(interface) allure.dynamic.title(title) allure.dynamic.severity(level) # 1.1：判断sql语句的类型是否为delete if sql_type == "delete": # 1.2 使用DB类对象，调用delete方法执行删除的sql语句 db_fix.delete(sql_sentence) # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求 # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # 2.1 判断sql语句的类型是否为select elif sql_type == "select": # 2.2 使用DB类对象，调用select方法执行查询的sql语句，并接收查询结果 select_result = db_fix.select(sql_sentence) # 2.3 将查询结果更新到用例数据中 data[update_key] = select_result # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求 # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # 3.1 判断sql语句的类型是否delete|select或者为select|delete elif sql_type == "delete|select" or sql_type == "select|delete": # 3.2 使用DB类对象，调用delete方法执行删除的sql语句 db_fix.delete(sql_sentence["delete"]) # 3.3 使用DB类对象，调用select方法执行查询的sql语句，并接收查询结果 select_result = db_fix.select(sql_sentence["select"]) # 3.4 将查询结果更新到用例数据中 data[update_key] = select_result # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求 # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # # else: # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # 断言 try: for key in expect: > assert expect[key] == result.json().get(key) E AssertionError: assert '刷新token成功' == None E + where None = <built-in method get of dict object at 0x0000022281F4CF80>('message') E + where <built-in method get of dict object at 0x0000022281F4CF80> = {'account': '', 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODUzNDksImlhdCI6MTY5MTM5ODk0OX0.o-l3mCXklV-b5_c_dUWBxXWSt6yhuDEp865u5170XY7OVYQMD6wwS-9IEbcFauPVg6uV7hxvYdSbhJegUWSB-A', 'userAttrs': {}, ...}.get E + where {'account': '', 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODUzNDksImlhdCI6MTY5MTM5ODk0OX0.o-l3mCXklV-b5_c_dUWBxXWSt6yhuDEp865u5170XY7OVYQMD6wwS-9IEbcFauPVg6uV7hxvYdSbhJegUWSB-A', 'userAttrs': {}, ...} = <bound method Response.json of <Response [200]>>() E + where <bound method Response.json of <Response [200]>> = <Response [200]>.json test_bpm.py:61: AssertionError During handling of the above exception, another exception occurred: self = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x0000022281DA2910> req_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x0000022281DED070> db_fix = <InterfaceAutoTest.common.db.DB object at 0x0000022281E32F10>, module = '认证接口', interface = '刷新token', title = '正向用例' level = '中', method = 'get', url = 'http://120.46.172.186:8080/refresh', mime = None, data = None, expect = {'message': '刷新token成功'} sql_type = None, sql_sentence = None, update_key = None @allure.epic("BPM系统") @pytest.mark.parametrize("module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key", ReadExcel().get_data()) def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key): allure.dynamic.feature(module) allure.dynamic.story(interface) allure.dynamic.title(title) allure.dynamic.severity(level) # 1.1：判断sql语句的类型是否为delete if sql_type == "delete": # 1.2 使用DB类对象，调用delete方法执行删除的sql语句 db_fix.delete(sql_sentence) # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求 # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # 2.1 判断sql语句的类型是否为select elif sql_type == "select": # 2.2 使用DB类对象，调用select方法执行查询的sql语句，并接收查询结果 select_result = db_fix.select(sql_sentence) # 2.3 将查询结果更新到用例数据中 data[update_key] = select_result # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求 # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # 3.1 判断sql语句的类型是否delete|select或者为select|delete elif sql_type == "delete|select" or sql_type == "select|delete": # 3.2 使用DB类对象，调用delete方法执行删除的sql语句 db_fix.delete(sql_sentence["delete"]) # 3.3 使用DB类对象，调用select方法执行查询的sql语句，并接收查询结果 select_result = db_fix.select(sql_sentence["select"]) # 3.4 将查询结果更新到用例数据中 data[update_key] = select_result # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求 # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # # else: # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # 断言 try: for key in expect: assert expect[key] == result.json().get(key) except: print("断言失败") logging.error("断言失败, 模块名称为：{}，接口名称为：{}，用例标题：{}，用例为：{}，期望结果为：{}，服务器返回数据为：{}".format(module, interface, title, str(data), str(expect), result.text)) > raise AssertionError("断言失败") E AssertionError: 断言失败 test_bpm.py:65: AssertionError ------------------------------Captured stdout call------------------------------ 断言失败 -------------------------------Captured log call-------------------------------- DEBUG--2023-08-07 17:02:26--Resetting dropped connection: 120.46.172.186 DEBUG--2023-08-07 17:02:26--http://120.46.172.186:8080 "GET /refresh HTTP/1.1" 200 None ERROR--2023-08-07 17:02:26--断言失败, 模块名称为：认证接口，接口名称为：刷新token，用例标题：正向用例，用例为：None，期望结果为：{'message': '刷新token成功'}，服务器返回数据为：{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODUzNDUsImlhdCI6MTY5MTM5ODk0NX0.KmIyRQCDMctD_PUlD4yTzmfqjx03E1gOHnY8L8ciCd9R_Ifd6kR1QyaSxyFa728Exw9kAHix6Y4wSzDaawAusg","username":"","account":"","userId":"","loginStatus":true,"userAttrs":{}} ------------------------------Captured stdout call------------------------------ 断言失败 -------------------------------Captured log call-------------------------------- DEBUG--2023-08-07 17:02:27--http://120.46.172.186:8080 "GET /refresh HTTP/1.1" 200 None ERROR--2023-08-07 17:02:27--断言失败, 模块名称为：认证接口，接口名称为：刷新token，用例标题：正向用例，用例为：None，期望结果为：{'message': '刷新token成功'}，服务器返回数据为：{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODUzNDYsImlhdCI6MTY5MTM5ODk0Nn0.2-6CB-jd8JizeFRPXKILUIKAzg5WDblLPVcljUkRf8pv8gzA0rSIHjSUlr89yY1Gw-feZ94Q1sCa2IT7_fqpfw","username":"","account":"","userId":"","loginStatus":true,"userAttrs":{}} ------------------------------Captured stdout call------------------------------ 断言失败 -------------------------------Captured log call-------------------------------- DEBUG--2023-08-07 17:02:28--http://120.46.172.186:8080 "GET /refresh HTTP/1.1" 200 None ERROR--2023-08-07 17:02:28--断言失败, 模块名称为：认证接口，接口名称为：刷新token，用例标题：正向用例，用例为：None，期望结果为：{'message': '刷新token成功'}，服务器返回数据为：{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODUzNDgsImlhdCI6MTY5MTM5ODk0OH0.1gfPOxI1TNfjMEQdHmWHn02Tt10jpl1TaxN54rqJdFFa3h-mmWKb7Psb6oemtKrxN-QHkjMGcrsotUJvMVONyw","username":"","account":"","userId":"","loginStatus":true,"userAttrs":{}} ------------------------------Captured stdout call------------------------------ 断言失败 -------------------------------Captured log call-------------------------------- DEBUG--2023-08-07 17:02:29--http://120.46.172.186:8080 "GET /refresh HTTP/1.1" 200 None ERROR--2023-08-07 17:02:29--断言失败, 模块名称为：认证接口，接口名称为：刷新token，用例标题：正向用例，用例为：None，期望结果为：{'message': '刷新token成功'}，服务器返回数据为：{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODUzNDksImlhdCI6MTY5MTM5ODk0OX0.o-l3mCXklV-b5_c_dUWBxXWSt6yhuDEp865u5170XY7OVYQMD6wwS-9IEbcFauPVg6uV7hxvYdSbhJegUWSB-A","username":"","account":"","userId":"","loginStatus":true,"userAttrs":{}}
Rerun | test_bpm.py::TestBPM::test_bpm[è®¤è¯æ¥å£-å·æ°token-æ£åç¨ä¾-ä¸-get-http://120.46.172.186:8080/refresh-None-None-expect10-None-None-None] | 0.05 |
self = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x0000022281DA2910> req_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x0000022281DED070> db_fix = <InterfaceAutoTest.common.db.DB object at 0x0000022281E32F10>, module = '认证接口', interface = '刷新token', title = '正向用例' level = '中', method = 'get', url = 'http://120.46.172.186:8080/refresh', mime = None, data = None, expect = {'message': '刷新token成功'} sql_type = None, sql_sentence = None, update_key = None @allure.epic("BPM系统") @pytest.mark.parametrize("module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key", ReadExcel().get_data()) def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key): allure.dynamic.feature(module) allure.dynamic.story(interface) allure.dynamic.title(title) allure.dynamic.severity(level) # 1.1：判断sql语句的类型是否为delete if sql_type == "delete": # 1.2 使用DB类对象，调用delete方法执行删除的sql语句 db_fix.delete(sql_sentence) # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求 # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # 2.1 判断sql语句的类型是否为select elif sql_type == "select": # 2.2 使用DB类对象，调用select方法执行查询的sql语句，并接收查询结果 select_result = db_fix.select(sql_sentence) # 2.3 将查询结果更新到用例数据中 data[update_key] = select_result # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求 # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # 3.1 判断sql语句的类型是否delete|select或者为select|delete elif sql_type == "delete|select" or sql_type == "select|delete": # 3.2 使用DB类对象，调用delete方法执行删除的sql语句 db_fix.delete(sql_sentence["delete"]) # 3.3 使用DB类对象，调用select方法执行查询的sql语句，并接收查询结果 select_result = db_fix.select(sql_sentence["select"]) # 3.4 将查询结果更新到用例数据中 data[update_key] = select_result # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求 # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # # else: # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # 断言 try: for key in expect: > assert expect[key] == result.json().get(key) E AssertionError: assert '刷新token成功' == None E + where None = <built-in method get of dict object at 0x0000022281F5EF00>('message') E + where <built-in method get of dict object at 0x0000022281F5EF00> = {'account': '', 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODUzNTAsImlhdCI6MTY5MTM5ODk1MH0.l7g1UOdwEFIMPqLUNi2XjHOQpBG_MamIHJ21GraCyOF-Jh_xZWydqlZ_wbdW542VelFcv_qYM317zpPh24cFGA', 'userAttrs': {}, ...}.get E + where {'account': '', 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODUzNTAsImlhdCI6MTY5MTM5ODk1MH0.l7g1UOdwEFIMPqLUNi2XjHOQpBG_MamIHJ21GraCyOF-Jh_xZWydqlZ_wbdW542VelFcv_qYM317zpPh24cFGA', 'userAttrs': {}, ...} = <bound method Response.json of <Response [200]>>() E + where <bound method Response.json of <Response [200]>> = <Response [200]>.json test_bpm.py:61: AssertionError During handling of the above exception, another exception occurred: self = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x0000022281DA2910> req_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x0000022281DED070> db_fix = <InterfaceAutoTest.common.db.DB object at 0x0000022281E32F10>, module = '认证接口', interface = '刷新token', title = '正向用例' level = '中', method = 'get', url = 'http://120.46.172.186:8080/refresh', mime = None, data = None, expect = {'message': '刷新token成功'} sql_type = None, sql_sentence = None, update_key = None @allure.epic("BPM系统") @pytest.mark.parametrize("module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key", ReadExcel().get_data()) def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key): allure.dynamic.feature(module) allure.dynamic.story(interface) allure.dynamic.title(title) allure.dynamic.severity(level) # 1.1：判断sql语句的类型是否为delete if sql_type == "delete": # 1.2 使用DB类对象，调用delete方法执行删除的sql语句 db_fix.delete(sql_sentence) # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求 # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # 2.1 判断sql语句的类型是否为select elif sql_type == "select": # 2.2 使用DB类对象，调用select方法执行查询的sql语句，并接收查询结果 select_result = db_fix.select(sql_sentence) # 2.3 将查询结果更新到用例数据中 data[update_key] = select_result # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求 # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # 3.1 判断sql语句的类型是否delete|select或者为select|delete elif sql_type == "delete|select" or sql_type == "select|delete": # 3.2 使用DB类对象，调用delete方法执行删除的sql语句 db_fix.delete(sql_sentence["delete"]) # 3.3 使用DB类对象，调用select方法执行查询的sql语句，并接收查询结果 select_result = db_fix.select(sql_sentence["select"]) # 3.4 将查询结果更新到用例数据中 data[update_key] = select_result # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求 # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # # else: # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # 断言 try: for key in expect: assert expect[key] == result.json().get(key) except: print("断言失败") logging.error("断言失败, 模块名称为：{}，接口名称为：{}，用例标题：{}，用例为：{}，期望结果为：{}，服务器返回数据为：{}".format(module, interface, title, str(data), str(expect), result.text)) > raise AssertionError("断言失败") E AssertionError: 断言失败 test_bpm.py:65: AssertionError ------------------------------Captured stdout call------------------------------ 断言失败 -------------------------------Captured log call-------------------------------- DEBUG--2023-08-07 17:02:26--Resetting dropped connection: 120.46.172.186 DEBUG--2023-08-07 17:02:26--http://120.46.172.186:8080 "GET /refresh HTTP/1.1" 200 None ERROR--2023-08-07 17:02:26--断言失败, 模块名称为：认证接口，接口名称为：刷新token，用例标题：正向用例，用例为：None，期望结果为：{'message': '刷新token成功'}，服务器返回数据为：{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODUzNDUsImlhdCI6MTY5MTM5ODk0NX0.KmIyRQCDMctD_PUlD4yTzmfqjx03E1gOHnY8L8ciCd9R_Ifd6kR1QyaSxyFa728Exw9kAHix6Y4wSzDaawAusg","username":"","account":"","userId":"","loginStatus":true,"userAttrs":{}} ------------------------------Captured stdout call------------------------------ 断言失败 -------------------------------Captured log call-------------------------------- DEBUG--2023-08-07 17:02:27--http://120.46.172.186:8080 "GET /refresh HTTP/1.1" 200 None ERROR--2023-08-07 17:02:27--断言失败, 模块名称为：认证接口，接口名称为：刷新token，用例标题：正向用例，用例为：None，期望结果为：{'message': '刷新token成功'}，服务器返回数据为：{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODUzNDYsImlhdCI6MTY5MTM5ODk0Nn0.2-6CB-jd8JizeFRPXKILUIKAzg5WDblLPVcljUkRf8pv8gzA0rSIHjSUlr89yY1Gw-feZ94Q1sCa2IT7_fqpfw","username":"","account":"","userId":"","loginStatus":true,"userAttrs":{}} ------------------------------Captured stdout call------------------------------ 断言失败 -------------------------------Captured log call-------------------------------- DEBUG--2023-08-07 17:02:28--http://120.46.172.186:8080 "GET /refresh HTTP/1.1" 200 None ERROR--2023-08-07 17:02:28--断言失败, 模块名称为：认证接口，接口名称为：刷新token，用例标题：正向用例，用例为：None，期望结果为：{'message': '刷新token成功'}，服务器返回数据为：{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODUzNDgsImlhdCI6MTY5MTM5ODk0OH0.1gfPOxI1TNfjMEQdHmWHn02Tt10jpl1TaxN54rqJdFFa3h-mmWKb7Psb6oemtKrxN-QHkjMGcrsotUJvMVONyw","username":"","account":"","userId":"","loginStatus":true,"userAttrs":{}} ------------------------------Captured stdout call------------------------------ 断言失败 -------------------------------Captured log call-------------------------------- DEBUG--2023-08-07 17:02:29--http://120.46.172.186:8080 "GET /refresh HTTP/1.1" 200 None ERROR--2023-08-07 17:02:29--断言失败, 模块名称为：认证接口，接口名称为：刷新token，用例标题：正向用例，用例为：None，期望结果为：{'message': '刷新token成功'}，服务器返回数据为：{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODUzNDksImlhdCI6MTY5MTM5ODk0OX0.o-l3mCXklV-b5_c_dUWBxXWSt6yhuDEp865u5170XY7OVYQMD6wwS-9IEbcFauPVg6uV7hxvYdSbhJegUWSB-A","username":"","account":"","userId":"","loginStatus":true,"userAttrs":{}} ------------------------------Captured stdout call------------------------------ 断言失败 -------------------------------Captured log call-------------------------------- DEBUG--2023-08-07 17:02:31--http://120.46.172.186:8080 "GET /refresh HTTP/1.1" 200 None ERROR--2023-08-07 17:02:31--断言失败, 模块名称为：认证接口，接口名称为：刷新token，用例标题：正向用例，用例为：None，期望结果为：{'message': '刷新token成功'}，服务器返回数据为：{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0ODUzNTAsImlhdCI6MTY5MTM5ODk1MH0.l7g1UOdwEFIMPqLUNi2XjHOQpBG_MamIHJ21GraCyOF-Jh_xZWydqlZ_wbdW542VelFcv_qYM317zpPh24cFGA","username":"","account":"","userId":"","loginStatus":true,"userAttrs":{}}
Rerun | test_bpm.py::TestBPM::test_bpm[ç»´åº¦ç®¡ç-æ ¹æ®ç»´åº¦ç¼ç å é¤ç»´åº¦-æ£åç¨ä¾-é«-DELETE-http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds-query-data15-expect15-select-SELECT ID_ FROM uc_demension WHERE `CODE_`="test56_dem";-ids] | 0.09 |
self = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x0000022281DB6E20> req_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x0000022281DED070> db_fix = <InterfaceAutoTest.common.db.DB object at 0x0000022281E32F10>, module = '维度管理', interface = '根据维度编码删除维度', title = '正向用例' level = '高', method = 'DELETE', url = 'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds', mime = 'query' data = {'ids': '1688475697716150272'}, expect = {'message': '删除维度成功', 'state': True}, sql_type = 'select' sql_sentence = 'SELECT ID_ FROM uc_demension WHERE `CODE_`="test56_dem";', update_key = 'ids' @allure.epic("BPM系统") @pytest.mark.parametrize("module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key", ReadExcel().get_data()) def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key): allure.dynamic.feature(module) allure.dynamic.story(interface) allure.dynamic.title(title) allure.dynamic.severity(level) # 1.1：判断sql语句的类型是否为delete if sql_type == "delete": # 1.2 使用DB类对象，调用delete方法执行删除的sql语句 db_fix.delete(sql_sentence) # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求 # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # 2.1 判断sql语句的类型是否为select elif sql_type == "select": # 2.2 使用DB类对象，调用select方法执行查询的sql语句，并接收查询结果 select_result = db_fix.select(sql_sentence) # 2.3 将查询结果更新到用例数据中 data[update_key] = select_result # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求 # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # 3.1 判断sql语句的类型是否delete|select或者为select|delete elif sql_type == "delete|select" or sql_type == "select|delete": # 3.2 使用DB类对象，调用delete方法执行删除的sql语句 db_fix.delete(sql_sentence["delete"]) # 3.3 使用DB类对象，调用select方法执行查询的sql语句，并接收查询结果 select_result = db_fix.select(sql_sentence["select"]) # 3.4 将查询结果更新到用例数据中 data[update_key] = select_result # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求 # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # # else: # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # 断言 try: for key in expect: > assert expect[key] == result.json().get(key) E AssertionError: assert '删除维度成功' == '删除维度成功！' E - 删除维度成功！ E ? - E + 删除维度成功 test_bpm.py:61: AssertionError During handling of the above exception, another exception occurred: self = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x0000022281DB6E20> req_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x0000022281DED070> db_fix = <InterfaceAutoTest.common.db.DB object at 0x0000022281E32F10>, module = '维度管理', interface = '根据维度编码删除维度', title = '正向用例' level = '高', method = 'DELETE', url = 'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds', mime = 'query' data = {'ids': '1688475697716150272'}, expect = {'message': '删除维度成功', 'state': True}, sql_type = 'select' sql_sentence = 'SELECT ID_ FROM uc_demension WHERE `CODE_`="test56_dem";', update_key = 'ids' @allure.epic("BPM系统") @pytest.mark.parametrize("module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key", ReadExcel().get_data()) def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key): allure.dynamic.feature(module) allure.dynamic.story(interface) allure.dynamic.title(title) allure.dynamic.severity(level) # 1.1：判断sql语句的类型是否为delete if sql_type == "delete": # 1.2 使用DB类对象，调用delete方法执行删除的sql语句 db_fix.delete(sql_sentence) # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求 # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # 2.1 判断sql语句的类型是否为select elif sql_type == "select": # 2.2 使用DB类对象，调用select方法执行查询的sql语句，并接收查询结果 select_result = db_fix.select(sql_sentence) # 2.3 将查询结果更新到用例数据中 data[update_key] = select_result # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求 # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # 3.1 判断sql语句的类型是否delete|select或者为select|delete elif sql_type == "delete|select" or sql_type == "select|delete": # 3.2 使用DB类对象，调用delete方法执行删除的sql语句 db_fix.delete(sql_sentence["delete"]) # 3.3 使用DB类对象，调用select方法执行查询的sql语句，并接收查询结果 select_result = db_fix.select(sql_sentence["select"]) # 3.4 将查询结果更新到用例数据中 data[update_key] = select_result # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求 # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # # else: # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # 断言 try: for key in expect: assert expect[key] == result.json().get(key) except: print("断言失败") logging.error("断言失败, 模块名称为：{}，接口名称为：{}，用例标题：{}，用例为：{}，期望结果为：{}，服务器返回数据为：{}".format(module, interface, title, str(data), str(expect), result.text)) > raise AssertionError("断言失败") E AssertionError: 断言失败 test_bpm.py:65: AssertionError ------------------------------Captured stdout call------------------------------ 断言失败 -------------------------------Captured log call-------------------------------- DEBUG--2023-08-07 17:02:32--http://120.46.172.186:8080 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1688475697716150272 HTTP/1.1" 200 None ERROR--2023-08-07 17:02:32--断言失败, 模块名称为：维度管理，接口名称为：根据维度编码删除维度，用例标题：正向用例，用例为：{'ids': '1688475697716150272'}，期望结果为：{'state': True, 'message': '删除维度成功'}，服务器返回数据为：{"state":true,"message":"删除维度成功！","value":""}
Rerun | test_bpm.py::TestBPM::test_bpm[ç»´åº¦ç®¡ç-æ ¹æ®ç»´åº¦ç¼ç å é¤ç»´åº¦-æ£åç¨ä¾-é«-DELETE-http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds-query-data15-expect15-select-SELECT ID_ FROM uc_demension WHERE `CODE_`="test56_dem";-ids] | 0.09 |
self = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x0000022281DB6E20> req_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x0000022281DED070> db_fix = <InterfaceAutoTest.common.db.DB object at 0x0000022281E32F10>, module = '维度管理', interface = '根据维度编码删除维度', title = '正向用例' level = '高', method = 'DELETE', url = 'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds', mime = 'query' data = {'ids': '1688475697716150272'}, expect = {'message': '删除维度成功', 'state': True}, sql_type = 'select' sql_sentence = 'SELECT ID_ FROM uc_demension WHERE `CODE_`="test56_dem";', update_key = 'ids' @allure.epic("BPM系统") @pytest.mark.parametrize("module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key", ReadExcel().get_data()) def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key): allure.dynamic.feature(module) allure.dynamic.story(interface) allure.dynamic.title(title) allure.dynamic.severity(level) # 1.1：判断sql语句的类型是否为delete if sql_type == "delete": # 1.2 使用DB类对象，调用delete方法执行删除的sql语句 db_fix.delete(sql_sentence) # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求 # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # 2.1 判断sql语句的类型是否为select elif sql_type == "select": # 2.2 使用DB类对象，调用select方法执行查询的sql语句，并接收查询结果 select_result = db_fix.select(sql_sentence) # 2.3 将查询结果更新到用例数据中 data[update_key] = select_result # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求 # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # 3.1 判断sql语句的类型是否delete|select或者为select|delete elif sql_type == "delete|select" or sql_type == "select|delete": # 3.2 使用DB类对象，调用delete方法执行删除的sql语句 db_fix.delete(sql_sentence["delete"]) # 3.3 使用DB类对象，调用select方法执行查询的sql语句，并接收查询结果 select_result = db_fix.select(sql_sentence["select"]) # 3.4 将查询结果更新到用例数据中 data[update_key] = select_result # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求 # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # # else: # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # 断言 try: for key in expect: > assert expect[key] == result.json().get(key) E AssertionError: assert True == False E + where False = <built-in method get of dict object at 0x0000022281F7E6C0>('state') E + where <built-in method get of dict object at 0x0000022281F7E6C0> = {'logId': '1688475704070520832', 'message': '', 'state': False}.get E + where {'logId': '1688475704070520832', 'message': '', 'state': False} = <bound method Response.json of <Response [500]>>() E + where <bound method Response.json of <Response [500]>> = <Response [500]>.json test_bpm.py:61: AssertionError During handling of the above exception, another exception occurred: self = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x0000022281DB6E20> req_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x0000022281DED070> db_fix = <InterfaceAutoTest.common.db.DB object at 0x0000022281E32F10>, module = '维度管理', interface = '根据维度编码删除维度', title = '正向用例' level = '高', method = 'DELETE', url = 'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds', mime = 'query' data = {'ids': '1688475697716150272'}, expect = {'message': '删除维度成功', 'state': True}, sql_type = 'select' sql_sentence = 'SELECT ID_ FROM uc_demension WHERE `CODE_`="test56_dem";', update_key = 'ids' @allure.epic("BPM系统") @pytest.mark.parametrize("module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key", ReadExcel().get_data()) def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key): allure.dynamic.feature(module) allure.dynamic.story(interface) allure.dynamic.title(title) allure.dynamic.severity(level) # 1.1：判断sql语句的类型是否为delete if sql_type == "delete": # 1.2 使用DB类对象，调用delete方法执行删除的sql语句 db_fix.delete(sql_sentence) # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求 # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # 2.1 判断sql语句的类型是否为select elif sql_type == "select": # 2.2 使用DB类对象，调用select方法执行查询的sql语句，并接收查询结果 select_result = db_fix.select(sql_sentence) # 2.3 将查询结果更新到用例数据中 data[update_key] = select_result # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求 # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # 3.1 判断sql语句的类型是否delete|select或者为select|delete elif sql_type == "delete|select" or sql_type == "select|delete": # 3.2 使用DB类对象，调用delete方法执行删除的sql语句 db_fix.delete(sql_sentence["delete"]) # 3.3 使用DB类对象，调用select方法执行查询的sql语句，并接收查询结果 select_result = db_fix.select(sql_sentence["select"]) # 3.4 将查询结果更新到用例数据中 data[update_key] = select_result # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求 # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # # else: # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # 断言 try: for key in expect: assert expect[key] == result.json().get(key) except: print("断言失败") logging.error("断言失败, 模块名称为：{}，接口名称为：{}，用例标题：{}，用例为：{}，期望结果为：{}，服务器返回数据为：{}".format(module, interface, title, str(data), str(expect), result.text)) > raise AssertionError("断言失败") E AssertionError: 断言失败 test_bpm.py:65: AssertionError ------------------------------Captured stdout call------------------------------ 断言失败 -------------------------------Captured log call-------------------------------- DEBUG--2023-08-07 17:02:32--http://120.46.172.186:8080 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1688475697716150272 HTTP/1.1" 200 None ERROR--2023-08-07 17:02:32--断言失败, 模块名称为：维度管理，接口名称为：根据维度编码删除维度，用例标题：正向用例，用例为：{'ids': '1688475697716150272'}，期望结果为：{'state': True, 'message': '删除维度成功'}，服务器返回数据为：{"state":true,"message":"删除维度成功！","value":""} ------------------------------Captured stdout call------------------------------ 断言失败 -------------------------------Captured log call-------------------------------- DEBUG--2023-08-07 17:02:33--http://120.46.172.186:8080 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1688475697716150272 HTTP/1.1" 500 None ERROR--2023-08-07 17:02:33--断言失败, 模块名称为：维度管理，接口名称为：根据维度编码删除维度，用例标题：正向用例，用例为：{'ids': '1688475697716150272'}，期望结果为：{'state': True, 'message': '删除维度成功'}，服务器返回数据为：{"state":false,"message":"","logId":"1688475704070520832"}
Rerun | test_bpm.py::TestBPM::test_bpm[ç»´åº¦ç®¡ç-æ ¹æ®ç»´åº¦ç¼ç å é¤ç»´åº¦-æ£åç¨ä¾-é«-DELETE-http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds-query-data15-expect15-select-SELECT ID_ FROM uc_demension WHERE `CODE_`="test56_dem";-ids] | 0.13 |
self = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x0000022281DB6E20> req_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x0000022281DED070> db_fix = <InterfaceAutoTest.common.db.DB object at 0x0000022281E32F10>, module = '维度管理', interface = '根据维度编码删除维度', title = '正向用例' level = '高', method = 'DELETE', url = 'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds', mime = 'query' data = {'ids': '1688475697716150272'}, expect = {'message': '删除维度成功', 'state': True}, sql_type = 'select' sql_sentence = 'SELECT ID_ FROM uc_demension WHERE `CODE_`="test56_dem";', update_key = 'ids' @allure.epic("BPM系统") @pytest.mark.parametrize("module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key", ReadExcel().get_data()) def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key): allure.dynamic.feature(module) allure.dynamic.story(interface) allure.dynamic.title(title) allure.dynamic.severity(level) # 1.1：判断sql语句的类型是否为delete if sql_type == "delete": # 1.2 使用DB类对象，调用delete方法执行删除的sql语句 db_fix.delete(sql_sentence) # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求 # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # 2.1 判断sql语句的类型是否为select elif sql_type == "select": # 2.2 使用DB类对象，调用select方法执行查询的sql语句，并接收查询结果 select_result = db_fix.select(sql_sentence) # 2.3 将查询结果更新到用例数据中 data[update_key] = select_result # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求 # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # 3.1 判断sql语句的类型是否delete|select或者为select|delete elif sql_type == "delete|select" or sql_type == "select|delete": # 3.2 使用DB类对象，调用delete方法执行删除的sql语句 db_fix.delete(sql_sentence["delete"]) # 3.3 使用DB类对象，调用select方法执行查询的sql语句，并接收查询结果 select_result = db_fix.select(sql_sentence["select"]) # 3.4 将查询结果更新到用例数据中 data[update_key] = select_result # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求 # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # # else: # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # 断言 try: for key in expect: > assert expect[key] == result.json().get(key) E AssertionError: assert True == False E + where False = <built-in method get of dict object at 0x0000022281F83AC0>('state') E + where <built-in method get of dict object at 0x0000022281F83AC0> = {'logId': '1688475708889776128', 'message': '', 'state': False}.get E + where {'logId': '1688475708889776128', 'message': '', 'state': False} = <bound method Response.json of <Response [500]>>() E + where <bound method Response.json of <Response [500]>> = <Response [500]>.json test_bpm.py:61: AssertionError During handling of the above exception, another exception occurred: self = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x0000022281DB6E20> req_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x0000022281DED070> db_fix = <InterfaceAutoTest.common.db.DB object at 0x0000022281E32F10>, module = '维度管理', interface = '根据维度编码删除维度', title = '正向用例' level = '高', method = 'DELETE', url = 'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds', mime = 'query' data = {'ids': '1688475697716150272'}, expect = {'message': '删除维度成功', 'state': True}, sql_type = 'select' sql_sentence = 'SELECT ID_ FROM uc_demension WHERE `CODE_`="test56_dem";', update_key = 'ids' @allure.epic("BPM系统") @pytest.mark.parametrize("module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key", ReadExcel().get_data()) def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key): allure.dynamic.feature(module) allure.dynamic.story(interface) allure.dynamic.title(title) allure.dynamic.severity(level) # 1.1：判断sql语句的类型是否为delete if sql_type == "delete": # 1.2 使用DB类对象，调用delete方法执行删除的sql语句 db_fix.delete(sql_sentence) # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求 # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # 2.1 判断sql语句的类型是否为select elif sql_type == "select": # 2.2 使用DB类对象，调用select方法执行查询的sql语句，并接收查询结果 select_result = db_fix.select(sql_sentence) # 2.3 将查询结果更新到用例数据中 data[update_key] = select_result # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求 # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # 3.1 判断sql语句的类型是否delete|select或者为select|delete elif sql_type == "delete|select" or sql_type == "select|delete": # 3.2 使用DB类对象，调用delete方法执行删除的sql语句 db_fix.delete(sql_sentence["delete"]) # 3.3 使用DB类对象，调用select方法执行查询的sql语句，并接收查询结果 select_result = db_fix.select(sql_sentence["select"]) # 3.4 将查询结果更新到用例数据中 data[update_key] = select_result # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求 # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # # else: # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # 断言 try: for key in expect: assert expect[key] == result.json().get(key) except: print("断言失败") logging.error("断言失败, 模块名称为：{}，接口名称为：{}，用例标题：{}，用例为：{}，期望结果为：{}，服务器返回数据为：{}".format(module, interface, title, str(data), str(expect), result.text)) > raise AssertionError("断言失败") E AssertionError: 断言失败 test_bpm.py:65: AssertionError ------------------------------Captured stdout call------------------------------ 断言失败 -------------------------------Captured log call-------------------------------- DEBUG--2023-08-07 17:02:32--http://120.46.172.186:8080 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1688475697716150272 HTTP/1.1" 200 None ERROR--2023-08-07 17:02:32--断言失败, 模块名称为：维度管理，接口名称为：根据维度编码删除维度，用例标题：正向用例，用例为：{'ids': '1688475697716150272'}，期望结果为：{'state': True, 'message': '删除维度成功'}，服务器返回数据为：{"state":true,"message":"删除维度成功！","value":""} ------------------------------Captured stdout call------------------------------ 断言失败 -------------------------------Captured log call-------------------------------- DEBUG--2023-08-07 17:02:33--http://120.46.172.186:8080 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1688475697716150272 HTTP/1.1" 500 None ERROR--2023-08-07 17:02:33--断言失败, 模块名称为：维度管理，接口名称为：根据维度编码删除维度，用例标题：正向用例，用例为：{'ids': '1688475697716150272'}，期望结果为：{'state': True, 'message': '删除维度成功'}，服务器返回数据为：{"state":false,"message":"","logId":"1688475704070520832"} ------------------------------Captured stdout call------------------------------ 断言失败 -------------------------------Captured log call-------------------------------- DEBUG--2023-08-07 17:02:34--Resetting dropped connection: 120.46.172.186 DEBUG--2023-08-07 17:02:34--http://120.46.172.186:8080 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1688475697716150272 HTTP/1.1" 500 None ERROR--2023-08-07 17:02:34--断言失败, 模块名称为：维度管理，接口名称为：根据维度编码删除维度，用例标题：正向用例，用例为：{'ids': '1688475697716150272'}，期望结果为：{'state': True, 'message': '删除维度成功'}，服务器返回数据为：{"state":false,"message":"","logId":"1688475708889776128"}
Rerun | test_bpm.py::TestBPM::test_bpm[ç»´åº¦ç®¡ç-æ ¹æ®ç»´åº¦ç¼ç å é¤ç»´åº¦-æ£åç¨ä¾-é«-DELETE-http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds-query-data15-expect15-select-SELECT ID_ FROM uc_demension WHERE `CODE_`="test56_dem";-ids] | 0.13 |
self = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x0000022281DB6E20> req_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x0000022281DED070> db_fix = <InterfaceAutoTest.common.db.DB object at 0x0000022281E32F10>, module = '维度管理', interface = '根据维度编码删除维度', title = '正向用例' level = '高', method = 'DELETE', url = 'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds', mime = 'query' data = {'ids': '1688475697716150272'}, expect = {'message': '删除维度成功', 'state': True}, sql_type = 'select' sql_sentence = 'SELECT ID_ FROM uc_demension WHERE `CODE_`="test56_dem";', update_key = 'ids' @allure.epic("BPM系统") @pytest.mark.parametrize("module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key", ReadExcel().get_data()) def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key): allure.dynamic.feature(module) allure.dynamic.story(interface) allure.dynamic.title(title) allure.dynamic.severity(level) # 1.1：判断sql语句的类型是否为delete if sql_type == "delete": # 1.2 使用DB类对象，调用delete方法执行删除的sql语句 db_fix.delete(sql_sentence) # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求 # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # 2.1 判断sql语句的类型是否为select elif sql_type == "select": # 2.2 使用DB类对象，调用select方法执行查询的sql语句，并接收查询结果 select_result = db_fix.select(sql_sentence) # 2.3 将查询结果更新到用例数据中 data[update_key] = select_result # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求 # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # 3.1 判断sql语句的类型是否delete|select或者为select|delete elif sql_type == "delete|select" or sql_type == "select|delete": # 3.2 使用DB类对象，调用delete方法执行删除的sql语句 db_fix.delete(sql_sentence["delete"]) # 3.3 使用DB类对象，调用select方法执行查询的sql语句，并接收查询结果 select_result = db_fix.select(sql_sentence["select"]) # 3.4 将查询结果更新到用例数据中 data[update_key] = select_result # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求 # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # # else: # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # 断言 try: for key in expect: > assert expect[key] == result.json().get(key) E AssertionError: assert True == False E + where False = <built-in method get of dict object at 0x0000022281F99740>('state') E + where <built-in method get of dict object at 0x0000022281F99740> = {'logId': '1688475713730002944', 'message': '', 'state': False}.get E + where {'logId': '1688475713730002944', 'message': '', 'state': False} = <bound method Response.json of <Response [500]>>() E + where <bound method Response.json of <Response [500]>> = <Response [500]>.json test_bpm.py:61: AssertionError During handling of the above exception, another exception occurred: self = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x0000022281DB6E20> req_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x0000022281DED070> db_fix = <InterfaceAutoTest.common.db.DB object at 0x0000022281E32F10>, module = '维度管理', interface = '根据维度编码删除维度', title = '正向用例' level = '高', method = 'DELETE', url = 'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds', mime = 'query' data = {'ids': '1688475697716150272'}, expect = {'message': '删除维度成功', 'state': True}, sql_type = 'select' sql_sentence = 'SELECT ID_ FROM uc_demension WHERE `CODE_`="test56_dem";', update_key = 'ids' @allure.epic("BPM系统") @pytest.mark.parametrize("module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key", ReadExcel().get_data()) def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key): allure.dynamic.feature(module) allure.dynamic.story(interface) allure.dynamic.title(title) allure.dynamic.severity(level) # 1.1：判断sql语句的类型是否为delete if sql_type == "delete": # 1.2 使用DB类对象，调用delete方法执行删除的sql语句 db_fix.delete(sql_sentence) # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求 # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # 2.1 判断sql语句的类型是否为select elif sql_type == "select": # 2.2 使用DB类对象，调用select方法执行查询的sql语句，并接收查询结果 select_result = db_fix.select(sql_sentence) # 2.3 将查询结果更新到用例数据中 data[update_key] = select_result # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求 # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # 3.1 判断sql语句的类型是否delete|select或者为select|delete elif sql_type == "delete|select" or sql_type == "select|delete": # 3.2 使用DB类对象，调用delete方法执行删除的sql语句 db_fix.delete(sql_sentence["delete"]) # 3.3 使用DB类对象，调用select方法执行查询的sql语句，并接收查询结果 select_result = db_fix.select(sql_sentence["select"]) # 3.4 将查询结果更新到用例数据中 data[update_key] = select_result # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求 # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # # else: # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # 断言 try: for key in expect: assert expect[key] == result.json().get(key) except: print("断言失败") logging.error("断言失败, 模块名称为：{}，接口名称为：{}，用例标题：{}，用例为：{}，期望结果为：{}，服务器返回数据为：{}".format(module, interface, title, str(data), str(expect), result.text)) > raise AssertionError("断言失败") E AssertionError: 断言失败 test_bpm.py:65: AssertionError ------------------------------Captured stdout call------------------------------ 断言失败 -------------------------------Captured log call-------------------------------- DEBUG--2023-08-07 17:02:32--http://120.46.172.186:8080 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1688475697716150272 HTTP/1.1" 200 None ERROR--2023-08-07 17:02:32--断言失败, 模块名称为：维度管理，接口名称为：根据维度编码删除维度，用例标题：正向用例，用例为：{'ids': '1688475697716150272'}，期望结果为：{'state': True, 'message': '删除维度成功'}，服务器返回数据为：{"state":true,"message":"删除维度成功！","value":""} ------------------------------Captured stdout call------------------------------ 断言失败 -------------------------------Captured log call-------------------------------- DEBUG--2023-08-07 17:02:33--http://120.46.172.186:8080 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1688475697716150272 HTTP/1.1" 500 None ERROR--2023-08-07 17:02:33--断言失败, 模块名称为：维度管理，接口名称为：根据维度编码删除维度，用例标题：正向用例，用例为：{'ids': '1688475697716150272'}，期望结果为：{'state': True, 'message': '删除维度成功'}，服务器返回数据为：{"state":false,"message":"","logId":"1688475704070520832"} ------------------------------Captured stdout call------------------------------ 断言失败 -------------------------------Captured log call-------------------------------- DEBUG--2023-08-07 17:02:34--Resetting dropped connection: 120.46.172.186 DEBUG--2023-08-07 17:02:34--http://120.46.172.186:8080 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1688475697716150272 HTTP/1.1" 500 None ERROR--2023-08-07 17:02:34--断言失败, 模块名称为：维度管理，接口名称为：根据维度编码删除维度，用例标题：正向用例，用例为：{'ids': '1688475697716150272'}，期望结果为：{'state': True, 'message': '删除维度成功'}，服务器返回数据为：{"state":false,"message":"","logId":"1688475708889776128"} ------------------------------Captured stdout call------------------------------ 断言失败 -------------------------------Captured log call-------------------------------- DEBUG--2023-08-07 17:02:35--Resetting dropped connection: 120.46.172.186 DEBUG--2023-08-07 17:02:36--http://120.46.172.186:8080 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1688475697716150272 HTTP/1.1" 500 None ERROR--2023-08-07 17:02:36--断言失败, 模块名称为：维度管理，接口名称为：根据维度编码删除维度，用例标题：正向用例，用例为：{'ids': '1688475697716150272'}，期望结果为：{'state': True, 'message': '删除维度成功'}，服务器返回数据为：{"state":false,"message":"","logId":"1688475713730002944"}
Rerun | test_bpm.py::TestBPM::test_bpm[ç»´åº¦ç®¡ç-æ ¹æ®ç»´åº¦ç¼ç å é¤ç»´åº¦-æ£åç¨ä¾-é«-DELETE-http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds-query-data15-expect15-select-SELECT ID_ FROM uc_demension WHERE `CODE_`="test56_dem";-ids] | 0.13 |
self = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x0000022281DB6E20> req_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x0000022281DED070> db_fix = <InterfaceAutoTest.common.db.DB object at 0x0000022281E32F10>, module = '维度管理', interface = '根据维度编码删除维度', title = '正向用例' level = '高', method = 'DELETE', url = 'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds', mime = 'query' data = {'ids': '1688475697716150272'}, expect = {'message': '删除维度成功', 'state': True}, sql_type = 'select' sql_sentence = 'SELECT ID_ FROM uc_demension WHERE `CODE_`="test56_dem";', update_key = 'ids' @allure.epic("BPM系统") @pytest.mark.parametrize("module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key", ReadExcel().get_data()) def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key): allure.dynamic.feature(module) allure.dynamic.story(interface) allure.dynamic.title(title) allure.dynamic.severity(level) # 1.1：判断sql语句的类型是否为delete if sql_type == "delete": # 1.2 使用DB类对象，调用delete方法执行删除的sql语句 db_fix.delete(sql_sentence) # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求 # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # 2.1 判断sql语句的类型是否为select elif sql_type == "select": # 2.2 使用DB类对象，调用select方法执行查询的sql语句，并接收查询结果 select_result = db_fix.select(sql_sentence) # 2.3 将查询结果更新到用例数据中 data[update_key] = select_result # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求 # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # 3.1 判断sql语句的类型是否delete|select或者为select|delete elif sql_type == "delete|select" or sql_type == "select|delete": # 3.2 使用DB类对象，调用delete方法执行删除的sql语句 db_fix.delete(sql_sentence["delete"]) # 3.3 使用DB类对象，调用select方法执行查询的sql语句，并接收查询结果 select_result = db_fix.select(sql_sentence["select"]) # 3.4 将查询结果更新到用例数据中 data[update_key] = select_result # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求 # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # # else: # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # 断言 try: for key in expect: > assert expect[key] == result.json().get(key) E AssertionError: assert True == False E + where False = <built-in method get of dict object at 0x0000022281F98340>('state') E + where <built-in method get of dict object at 0x0000022281F98340> = {'logId': '1688475718570229760', 'message': '', 'state': False}.get E + where {'logId': '1688475718570229760', 'message': '', 'state': False} = <bound method Response.json of <Response [500]>>() E + where <bound method Response.json of <Response [500]>> = <Response [500]>.json test_bpm.py:61: AssertionError During handling of the above exception, another exception occurred: self = <InterfaceAutoTest.test_case.test_bpm.TestBPM object at 0x0000022281DB6E20> req_fix = <InterfaceAutoTest.requests_method.requests_method.RequestsMethod object at 0x0000022281DED070> db_fix = <InterfaceAutoTest.common.db.DB object at 0x0000022281E32F10>, module = '维度管理', interface = '根据维度编码删除维度', title = '正向用例' level = '高', method = 'DELETE', url = 'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds', mime = 'query' data = {'ids': '1688475697716150272'}, expect = {'message': '删除维度成功', 'state': True}, sql_type = 'select' sql_sentence = 'SELECT ID_ FROM uc_demension WHERE `CODE_`="test56_dem";', update_key = 'ids' @allure.epic("BPM系统") @pytest.mark.parametrize("module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key", ReadExcel().get_data()) def test_bpm(self, req_fix, db_fix, module, interface, title, level, method, url, mime, data, expect, sql_type, sql_sentence, update_key): allure.dynamic.feature(module) allure.dynamic.story(interface) allure.dynamic.title(title) allure.dynamic.severity(level) # 1.1：判断sql语句的类型是否为delete if sql_type == "delete": # 1.2 使用DB类对象，调用delete方法执行删除的sql语句 db_fix.delete(sql_sentence) # # 1.3 使用RequestsMethod类对象调用request_all方法发送请求 # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # 2.1 判断sql语句的类型是否为select elif sql_type == "select": # 2.2 使用DB类对象，调用select方法执行查询的sql语句，并接收查询结果 select_result = db_fix.select(sql_sentence) # 2.3 将查询结果更新到用例数据中 data[update_key] = select_result # # 2.3 使用RequestsMethod类对象调用request_all方法发送请求 # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # 3.1 判断sql语句的类型是否delete|select或者为select|delete elif sql_type == "delete|select" or sql_type == "select|delete": # 3.2 使用DB类对象，调用delete方法执行删除的sql语句 db_fix.delete(sql_sentence["delete"]) # 3.3 使用DB类对象，调用select方法执行查询的sql语句，并接收查询结果 select_result = db_fix.select(sql_sentence["select"]) # 3.4 将查询结果更新到用例数据中 data[update_key] = select_result # # 3.5 使用RequestsMethod类对象调用request_all方法发送请求 # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # # else: # result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) result = req_fix.request_all(req_method=method, req_url=url, req_mime=mime, case_data=data) # 断言 try: for key in expect: assert expect[key] == result.json().get(key) except: print("断言失败") logging.error("断言失败, 模块名称为：{}，接口名称为：{}，用例标题：{}，用例为：{}，期望结果为：{}，服务器返回数据为：{}".format(module, interface, title, str(data), str(expect), result.text)) > raise AssertionError("断言失败") E AssertionError: 断言失败 test_bpm.py:65: AssertionError ------------------------------Captured stdout call------------------------------ 断言失败 -------------------------------Captured log call-------------------------------- DEBUG--2023-08-07 17:02:32--http://120.46.172.186:8080 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1688475697716150272 HTTP/1.1" 200 None ERROR--2023-08-07 17:02:32--断言失败, 模块名称为：维度管理，接口名称为：根据维度编码删除维度，用例标题：正向用例，用例为：{'ids': '1688475697716150272'}，期望结果为：{'state': True, 'message': '删除维度成功'}，服务器返回数据为：{"state":true,"message":"删除维度成功！","value":""} ------------------------------Captured stdout call------------------------------ 断言失败 -------------------------------Captured log call-------------------------------- DEBUG--2023-08-07 17:02:33--http://120.46.172.186:8080 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1688475697716150272 HTTP/1.1" 500 None ERROR--2023-08-07 17:02:33--断言失败, 模块名称为：维度管理，接口名称为：根据维度编码删除维度，用例标题：正向用例，用例为：{'ids': '1688475697716150272'}，期望结果为：{'state': True, 'message': '删除维度成功'}，服务器返回数据为：{"state":false,"message":"","logId":"1688475704070520832"} ------------------------------Captured stdout call------------------------------ 断言失败 -------------------------------Captured log call-------------------------------- DEBUG--2023-08-07 17:02:34--Resetting dropped connection: 120.46.172.186 DEBUG--2023-08-07 17:02:34--http://120.46.172.186:8080 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1688475697716150272 HTTP/1.1" 500 None ERROR--2023-08-07 17:02:34--断言失败, 模块名称为：维度管理，接口名称为：根据维度编码删除维度，用例标题：正向用例，用例为：{'ids': '1688475697716150272'}，期望结果为：{'state': True, 'message': '删除维度成功'}，服务器返回数据为：{"state":false,"message":"","logId":"1688475708889776128"} ------------------------------Captured stdout call------------------------------ 断言失败 -------------------------------Captured log call-------------------------------- DEBUG--2023-08-07 17:02:35--Resetting dropped connection: 120.46.172.186 DEBUG--2023-08-07 17:02:36--http://120.46.172.186:8080 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1688475697716150272 HTTP/1.1" 500 None ERROR--2023-08-07 17:02:36--断言失败, 模块名称为：维度管理，接口名称为：根据维度编码删除维度，用例标题：正向用例，用例为：{'ids': '1688475697716150272'}，期望结果为：{'state': True, 'message': '删除维度成功'}，服务器返回数据为：{"state":false,"message":"","logId":"1688475713730002944"} ------------------------------Captured stdout call------------------------------ 断言失败 -------------------------------Captured log call-------------------------------- DEBUG--2023-08-07 17:02:37--Resetting dropped connection: 120.46.172.186 DEBUG--2023-08-07 17:02:37--http://120.46.172.186:8080 "DELETE /api/demension/v1/dem/deleteDemByIds?ids=1688475697716150272 HTTP/1.1" 500 None ERROR--2023-08-07 17:02:37--断言失败, 模块名称为：维度管理，接口名称为：根据维度编码删除维度，用例标题：正向用例，用例为：{'ids': '1688475697716150272'}，期望结果为：{'state': True, 'message': '删除维度成功'}，服务器返回数据为：{"state":false,"message":"","logId":"1688475718570229760"}
Passed | test_bpm.py::TestBPM::test_bpm[è®¤è¯æ¥å£-ç»å½ç³»ç»-æ£åç¨ä¾-é«-POST-http://120.46.172.186:8080/auth-application/json-data0-expect0-None-None-None] | 0.48 |
-------------------------------Captured log setup------------------------------- DEBUG--2023-08-07 17:02:25--Looking for locale `en_US` in provider `faker.providers.address`. DEBUG--2023-08-07 17:02:25--Provider `faker.providers.address` has been localized to `en_US`. DEBUG--2023-08-07 17:02:25--Looking for locale `en_US` in provider `faker.providers.automotive`. DEBUG--2023-08-07 17:02:25--Provider `faker.providers.automotive` has been localized to `en_US`. DEBUG--2023-08-07 17:02:25--Looking for locale `en_US` in provider `faker.providers.bank`. DEBUG--2023-08-07 17:02:25--Specified locale `en_US` is not available for provider `faker.providers.bank`. Locale reset to `en_GB` for this provider. DEBUG--2023-08-07 17:02:25--Looking for locale `en_US` in provider `faker.providers.barcode`. DEBUG--2023-08-07 17:02:25--Provider `faker.providers.barcode` has been localized to `en_US`. DEBUG--2023-08-07 17:02:25--Looking for locale `en_US` in provider `faker.providers.color`. DEBUG--2023-08-07 17:02:25--Provider `faker.providers.color` has been localized to `en_US`. DEBUG--2023-08-07 17:02:25--Looking for locale `en_US` in provider `faker.providers.company`. DEBUG--2023-08-07 17:02:25--Provider `faker.providers.company` has been localized to `en_US`. DEBUG--2023-08-07 17:02:25--Looking for locale `en_US` in provider `faker.providers.credit_card`. DEBUG--2023-08-07 17:02:25--Provider `faker.providers.credit_card` has been localized to `en_US`. DEBUG--2023-08-07 17:02:25--Looking for locale `en_US` in provider `faker.providers.currency`. DEBUG--2023-08-07 17:02:25--Provider `faker.providers.currency` has been localized to `en_US`. DEBUG--2023-08-07 17:02:25--Looking for locale `en_US` in provider `faker.providers.date_time`. DEBUG--2023-08-07 17:02:25--Provider `faker.providers.date_time` has been localized to `en_US`. DEBUG--2023-08-07 17:02:25--Provider `faker.providers.emoji` does not feature localization. Specified locale `en_US` is not utilized for this provider. DEBUG--2023-08-07 17:02:25--Provider `faker.providers.file` does not feature localization. Specified locale `en_US` is not utilized for this provider. DEBUG--2023-08-07 17:02:25--Looking for locale `en_US` in provider `faker.providers.geo`. DEBUG--2023-08-07 17:02:25--Provider `faker.providers.geo` has been localized to `en_US`. DEBUG--2023-08-07 17:02:25--Looking for locale `en_US` in provider `faker.providers.internet`. DEBUG--2023-08-07 17:02:25--Provider `faker.providers.internet` has been localized to `en_US`. DEBUG--2023-08-07 17:02:25--Provider `faker.providers.isbn` does not feature localization. Specified locale `en_US` is not utilized for this provider. DEBUG--2023-08-07 17:02:25--Looking for locale `en_US` in provider `faker.providers.job`. DEBUG--2023-08-07 17:02:25--Provider `faker.providers.job` has been localized to `en_US`. DEBUG--2023-08-07 17:02:25--Looking for locale `en_US` in provider `faker.providers.lorem`. DEBUG--2023-08-07 17:02:25--Provider `faker.providers.lorem` has been localized to `en_US`. DEBUG--2023-08-07 17:02:25--Looking for locale `en_US` in provider `faker.providers.misc`. DEBUG--2023-08-07 17:02:25--Provider `faker.providers.misc` has been localized to `en_US`. DEBUG--2023-08-07 17:02:25--Looking for locale `en_US` in provider `faker.providers.passport`. DEBUG--2023-08-07 17:02:25--Provider `faker.providers.passport` has been localized to `en_US`. DEBUG--2023-08-07 17:02:25--Looking for locale `en_US` in provider `faker.providers.person`. DEBUG--2023-08-07 17:02:25--Provider `faker.providers.person` has been localized to `en_US`. DEBUG--2023-08-07 17:02:25--Looking for locale `en_US` in provider `faker.providers.phone_number`. DEBUG--2023-08-07 17:02:25--Provider `faker.providers.phone_number` has been localized to `en_US`. DEBUG--2023-08-07 17:02:25--Provider `faker.providers.profile` does not feature localization. Specified locale `en_US` is not utilized for this provider. DEBUG--2023-08-07 17:02:25--Provider `faker.providers.python` does not feature localization. Specified locale `en_US` is not utilized for this provider. DEBUG--2023-08-07 17:02:25--Provider `faker.providers.sbn` does not feature localization. Specified locale `en_US` is not utilized for this provider. DEBUG--2023-08-07 17:02:25--Looking for locale `en_US` in provider `faker.providers.ssn`. DEBUG--2023-08-07 17:02:25--Provider `faker.providers.ssn` has been localized to `en_US`. DEBUG--2023-08-07 17:02:25--Provider `faker.providers.user_agent` does not feature localization. Specified locale `en_US` is not utilized for this provider. DEBUG--2023-08-07 17:02:25--Starting new HTTP connection (1): 120.46.172.186:8080 DEBUG--2023-08-07 17:02:25--http://120.46.172.186:8080 "POST /auth HTTP/1.1" 200 None ------------------------------Captured stdout call------------------------------ 断言成功 -------------------------------Captured log call-------------------------------- DEBUG--2023-08-07 17:02:25--http://120.46.172.186:8080 "POST /auth HTTP/1.1" 200 None
Passed | test_bpm.py::TestBPM::test_bpm[è®¤è¯æ¥å£-ç»å½ç³»ç»-ååç¨ä¾-ç¨æ·åä¸ºç©º-ä¸-POST-http://120.46.172.186:8080/auth-application/json-data1-expect1-None-None-None] | 0.05 |
------------------------------Captured stdout call------------------------------ 断言成功 -------------------------------Captured log call-------------------------------- DEBUG--2023-08-07 17:02:25--http://120.46.172.186:8080 "POST /auth HTTP/1.1" 500 None
Passed | test_bpm.py::TestBPM::test_bpm[è®¤è¯æ¥å£-ç»å½ç³»ç»-ååç¨ä¾-ç¨æ·åè¿é¿-ä¸-POST-http://120.46.172.186:8080/auth-application/json-data2-expect2-None-None-None] | 0.09 |
------------------------------Captured stdout call------------------------------ 断言成功 -------------------------------Captured log call-------------------------------- DEBUG--2023-08-07 17:02:25--Resetting dropped connection: 120.46.172.186 DEBUG--2023-08-07 17:02:25--http://120.46.172.186:8080 "POST /auth HTTP/1.1" 500 None
Passed | test_bpm.py::TestBPM::test_bpm[è®¤è¯æ¥å£-ç»å½ç³»ç»-ååç¨ä¾-ç¨æ·åè¿ç-ä¸-POST-http://120.46.172.186:8080/auth-application/json-data3-expect3-None-None-None] | 0.09 |
------------------------------Captured stdout call------------------------------ 断言成功 -------------------------------Captured log call-------------------------------- DEBUG--2023-08-07 17:02:25--Resetting dropped connection: 120.46.172.186 DEBUG--2023-08-07 17:02:25--http://120.46.172.186:8080 "POST /auth HTTP/1.1" 500 None
Passed | test_bpm.py::TestBPM::test_bpm[è®¤è¯æ¥å£-ç»å½ç³»ç»-ååç¨ä¾-ç¨æ·åç¹æ®åç¬¦-ä¸-POST-http://120.46.172.186:8080/auth-application/json-data4-expect4-None-None-None] | 0.09 |
------------------------------Captured stdout call------------------------------ 断言成功 -------------------------------Captured log call-------------------------------- DEBUG--2023-08-07 17:02:25--Resetting dropped connection: 120.46.172.186 DEBUG--2023-08-07 17:02:25--http://120.46.172.186:8080 "POST /auth HTTP/1.1" 500 None
Passed | test_bpm.py::TestBPM::test_bpm[è®¤è¯æ¥å£-ç»å½ç³»ç»-ååç¨ä¾-ç¨æ·åéè¯¯-ä¸-POST-http://120.46.172.186:8080/auth-json-data5-expect5-None-None-None] | 0.09 |
------------------------------Captured stdout call------------------------------ 断言成功 -------------------------------Captured log call-------------------------------- DEBUG--2023-08-07 17:02:25--Resetting dropped connection: 120.46.172.186 DEBUG--2023-08-07 17:02:26--http://120.46.172.186:8080 "POST /auth HTTP/1.1" 500 None
Passed | test_bpm.py::TestBPM::test_bpm[è®¤è¯æ¥å£-ç»å½ç³»ç»-ååç¨ä¾-å¯ç ä¸ºç©º-ä¸-POST-http://120.46.172.186:8080/auth-application/json-data6-expect6-None-None-None] | 0.09 |
------------------------------Captured stdout call------------------------------ 断言成功 -------------------------------Captured log call-------------------------------- DEBUG--2023-08-07 17:02:26--Resetting dropped connection: 120.46.172.186 DEBUG--2023-08-07 17:02:26--http://120.46.172.186:8080 "POST /auth HTTP/1.1" 500 None
Passed | test_bpm.py::TestBPM::test_bpm[è®¤è¯æ¥å£-ç»å½ç³»ç»-ååç¨ä¾-å¯ç ä¸ºé¿-ä¸-POST-http://120.46.172.186:8080/auth-application/json-data7-expect7-None-None-None] | 0.09 |
------------------------------Captured stdout call------------------------------ 断言成功 -------------------------------Captured log call-------------------------------- DEBUG--2023-08-07 17:02:26--Resetting dropped connection: 120.46.172.186 DEBUG--2023-08-07 17:02:26--http://120.46.172.186:8080 "POST /auth HTTP/1.1" 500 None
Passed | test_bpm.py::TestBPM::test_bpm[è®¤è¯æ¥å£-ç»å½ç³»ç»-ååç¨ä¾-å¯ç ä¸ºè¿ç-ä¸-PoST-http://120.46.172.186:8080/auth-application/json-data8-expect8-None-None-None] | 0.09 |
------------------------------Captured stdout call------------------------------ 断言成功 -------------------------------Captured log call-------------------------------- DEBUG--2023-08-07 17:02:26--Resetting dropped connection: 120.46.172.186 DEBUG--2023-08-07 17:02:26--http://120.46.172.186:8080 "POST /auth HTTP/1.1" 500 None
Passed | test_bpm.py::TestBPM::test_bpm[è®¤è¯æ¥å£-ç»å½ç³»ç»-ååç¨ä¾-å¯ç ä¸ºç¹æ®åç¬¦-ä¸-POST-http://120.46.172.186:8080/auth-application/json-data9-expect9-None-None-None] | 0.09 |
------------------------------Captured stdout call------------------------------ 断言成功 -------------------------------Captured log call-------------------------------- DEBUG--2023-08-07 17:02:26--Resetting dropped connection: 120.46.172.186 DEBUG--2023-08-07 17:02:26--http://120.46.172.186:8080 "POST /auth HTTP/1.1" 500 None
Passed | test_bpm.py::TestBPM::test_bpm[ç»´åº¦ç®¡ç-æ·»å ç»´åº¦-æ£åç¨ä¾-é«-post-http://120.46.172.186:8080/api/demension/v1/dem/addDem-application/json-data11-expect11-delete-DELETE FROM uc_demension WHERE `CODE_`="test56_dem";-None] | 0.13 |
------------------------------Captured stdout call------------------------------ 断言成功 -------------------------------Captured log call-------------------------------- DEBUG--2023-08-07 17:02:32--http://120.46.172.186:8080 "POST /api/demension/v1/dem/addDem HTTP/1.1" 200 None
Passed | test_bpm.py::TestBPM::test_bpm[ç»ç»ç®¡ç-æ·»å ç»ç»-æ£åç¨ä¾-é«-post-http://120.46.172.186:8080/api/org/v1/org/addOrg-application/json-data12-expect12-delete|select-sql_sentence12-demId] | 0.17 |
------------------------------Captured stdout call------------------------------ 断言成功 -------------------------------Captured log call-------------------------------- DEBUG--2023-08-07 17:02:32--http://120.46.172.186:8080 "POST /api/org/v1/org/addOrg HTTP/1.1" 200 None
Passed | test_bpm.py::TestBPM::test_bpm[ç»ç»ç®¡ç-ä¿åç»ç»åæ°-æ£åç¨ä¾-é«-post-http://120.46.172.186:8080/api/org/v1/orgParam/saveOrgParams-application/json|query-data13-expect13-None-None-None] | 0.07 |
------------------------------Captured stdout call------------------------------ 断言成功 -------------------------------Captured log call-------------------------------- DEBUG--2023-08-07 17:02:32--http://120.46.172.186:8080 "POST /api/org/v1/orgParam/saveOrgParams?orgCode=test56_org HTTP/1.1" 200 None
Passed | test_bpm.py::TestBPM::test_bpm[ç»ç»ç®¡ç-å é¤ç»ç»-æ£åç¨ä¾-é«-post-http://120.46.172.186:8080/api/org/v1/org/deleteOrg-text/plain-test56_org-expect14-None-None-None] | 0.05 |
------------------------------Captured stdout call------------------------------ 断言成功 -------------------------------Captured log call-------------------------------- DEBUG--2023-08-07 17:02:32--http://120.46.172.186:8080 "POST /api/org/v1/org/deleteOrg HTTP/1.1" 200 None