# bpm.html

Report generated on 05-Sep-2024 at 15:12:19 by pytest-html v3.1.0

## Summary

19 tests ran in 6.03 seconds.

(Un)check the boxes to filter the results.

5 passed, 0 skipped, 14 failed, 0 errors, 0 expected failures, 0 unexpected passes, 70 rerun

## Results

Result | Test | Duration | Links
--- | --- | --- | ---
No results found. Try to check the filters
Failed | test_case/test_ls/test_bpm.py::TestBpm::test_bpm[维度管理-添加维度-正向用例-高-http://36.139.193.99:8088/api/demension/v1/dem/addDem-post-application/json-case0-expect0-sql0-delete-None] | 0.40 |

self = <MyApiAutoTest_v3.test_case.test_ls.test_bpm.TestBpm object at 0x000001860F9BF0E0>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186102AE5A0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x000001860F9BF110>
module = '维度管理', api = '添加维度', title = '正向用例', level = '高', url = 'http://36.139.193.99:8088/api/demension/v1/dem/addDem', method = 'post', mediatype = 'application/json'
case = {'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 1, 'name': 'requests添加的维度'}, expect = {'message': '添加维度成功'}
sql = {'delete': 'dELETE FROM uc_demension WHERE `CODE_`="requestsAddDem";'}, sql_type = 'delete', update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize('module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key', readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E AssertionError: assert '添加维度成功' == '添加维度成功！'
E
E - 添加维度成功！
E ? -
E + 添加维度成功
test_case\test_ls\test_bpm.py:47: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_ls.test_bpm.TestBpm object at 0x000001860F9BF0E0>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186102AE5A0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x000001860F9BF110>
module = '维度管理', api = '添加维度', title = '正向用例', level = '高', url = 'http://36.139.193.99:8088/api/demension/v1/dem/addDem', method = 'post', mediatype = 'application/json'
case = {'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 1, 'name': 'requests添加的维度'}, expect = {'message': '添加维度成功'}
sql = {'delete': 'dELETE FROM uc_demension WHERE `CODE_`="requestsAddDem";'}, sql_type = 'delete', update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize('module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key', readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_ls\test_bpm.py:50: AssertionError
-----------------------------Captured stdout setup------------------------------
D:\CeShiShiXun\Project\PythonProject\PythonProject_1\MyApiAutoTest_v3\data_config D:\CeShiShiXun\Project\PythonProject\PythonProject_1\MyApiAutoTest_v2\data_config
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/demension/v1/dem/addDem post application/json {'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 1, 'name': 'requests添加的维度'} {'message': '添加维度成功'} {'delete': 'dELETE FROM uc_demension WHERE `CODE_`="requestsAddDem";'} delete None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/demension/v1/dem/addDem, 用例数据:{'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 1, 'name': 'requests添加的维度'}, 期望数据:{'message': '添加维度成功'}, 服务器返回数据:{"state":true,"message":"添加维度成功！","value":"","code":200}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/demension/v1/dem/addDem post application/json {'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 1, 'name': 'requests添加的维度'} {'message': '添加维度成功'} {'delete': 'dELETE FROM uc_demension WHERE `CODE_`="requestsAddDem";'} delete None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/demension/v1/dem/addDem, 用例数据:{'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 1, 'name': 'requests添加的维度'}, 期望数据:{'message': '添加维度成功'}, 服务器返回数据:{"state":true,"message":"添加维度成功！","value":"","code":200}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/demension/v1/dem/addDem post application/json {'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 1, 'name': 'requests添加的维度'} {'message': '添加维度成功'} {'delete': 'dELETE FROM uc_demension WHERE `CODE_`="requestsAddDem";'} delete None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/demension/v1/dem/addDem, 用例数据:{'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 1, 'name': 'requests添加的维度'}, 期望数据:{'message': '添加维度成功'}, 服务器返回数据:{"state":true,"message":"添加维度成功！","value":"","code":200}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/demension/v1/dem/addDem post application/json {'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 1, 'name': 'requests添加的维度'} {'message': '添加维度成功'} {'delete': 'dELETE FROM uc_demension WHERE `CODE_`="requestsAddDem";'} delete None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/demension/v1/dem/addDem, 用例数据:{'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 1, 'name': 'requests添加的维度'}, 期望数据:{'message': '添加维度成功'}, 服务器返回数据:{"state":true,"message":"添加维度成功！","value":"","code":200}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/demension/v1/dem/addDem post application/json {'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 1, 'name': 'requests添加的维度'} {'message': '添加维度成功'} {'delete': 'dELETE FROM uc_demension WHERE `CODE_`="requestsAddDem";'} delete None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/demension/v1/dem/addDem, 用例数据:{'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 1, 'name': 'requests添加的维度'}, 期望数据:{'message': '添加维度成功'}, 服务器返回数据:{"state":true,"message":"添加维度成功！","value":"","code":200}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/demension/v1/dem/addDem post application/json {'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 1, 'name': 'requests添加的维度'} {'message': '添加维度成功'} {'delete': 'dELETE FROM uc_demension WHERE `CODE_`="requestsAddDem";'} delete None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/demension/v1/dem/addDem, 用例数据:{'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 1, 'name': 'requests添加的维度'}, 期望数据:{'message': '添加维度成功'}, 服务器返回数据:{"state":true,"message":"添加维度成功！","value":"","code":200}

Failed | test_case/test_ls/test_bpm.py::TestBpm::test_bpm[维度管理-更新维度-正向用例-中-http://36.139.193.99:8088/api/demension/v1/dem/updateDem-put-json-case1-expect1-None-None-None] | 0.03 |

self = <MyApiAutoTest_v3.test_case.test_ls.test_bpm.TestBpm object at 0x0000018610189880>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186102AE5A0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x000001860F9BF110>
module = '维度管理', api = '更新维度', title = '正向用例', level = '中', url = 'http://36.139.193.99:8088/api/demension/v1/dem/updateDem', method = 'put', mediatype = 'json'
case = {'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 0, 'name': 'requestsAddDem'}, expect = {'message': '更新维度成功'}, sql = None, sql_type = None
update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize('module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key', readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E AssertionError: assert '更新维度成功' == '更新维度成功！'
E
E - 更新维度成功！
E ? -
E + 更新维度成功
test_case\test_ls\test_bpm.py:47: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_ls.test_bpm.TestBpm object at 0x0000018610189880>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186102AE5A0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x000001860F9BF110>
module = '维度管理', api = '更新维度', title = '正向用例', level = '中', url = 'http://36.139.193.99:8088/api/demension/v1/dem/updateDem', method = 'put', mediatype = 'json'
case = {'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 0, 'name': 'requestsAddDem'}, expect = {'message': '更新维度成功'}, sql = None, sql_type = None
update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize('module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key', readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_ls\test_bpm.py:50: AssertionError
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/demension/v1/dem/updateDem put json {'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 0, 'name': 'requestsAddDem'} {'message': '更新维度成功'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/demension/v1/dem/updateDem, 用例数据:{'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 0, 'name': 'requestsAddDem'}, 期望数据:{'message': '更新维度成功'}, 服务器返回数据:{"state":true,"message":"更新维度成功！","value":"","code":200}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/demension/v1/dem/updateDem put json {'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 0, 'name': 'requestsAddDem'} {'message': '更新维度成功'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/demension/v1/dem/updateDem, 用例数据:{'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 0, 'name': 'requestsAddDem'}, 期望数据:{'message': '更新维度成功'}, 服务器返回数据:{"state":true,"message":"更新维度成功！","value":"","code":200}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/demension/v1/dem/updateDem put json {'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 0, 'name': 'requestsAddDem'} {'message': '更新维度成功'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/demension/v1/dem/updateDem, 用例数据:{'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 0, 'name': 'requestsAddDem'}, 期望数据:{'message': '更新维度成功'}, 服务器返回数据:{"state":true,"message":"更新维度成功！","value":"","code":200}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/demension/v1/dem/updateDem put json {'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 0, 'name': 'requestsAddDem'} {'message': '更新维度成功'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/demension/v1/dem/updateDem, 用例数据:{'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 0, 'name': 'requestsAddDem'}, 期望数据:{'message': '更新维度成功'}, 服务器返回数据:{"state":true,"message":"更新维度成功！","value":"","code":200}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/demension/v1/dem/updateDem put json {'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 0, 'name': 'requestsAddDem'} {'message': '更新维度成功'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/demension/v1/dem/updateDem, 用例数据:{'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 0, 'name': 'requestsAddDem'}, 期望数据:{'message': '更新维度成功'}, 服务器返回数据:{"state":true,"message":"更新维度成功！","value":"","code":200}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/demension/v1/dem/updateDem put json {'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 0, 'name': 'requestsAddDem'} {'message': '更新维度成功'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/demension/v1/dem/updateDem, 用例数据:{'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 0, 'name': 'requestsAddDem'}, 期望数据:{'message': '更新维度成功'}, 服务器返回数据:{"state":true,"message":"更新维度成功！","value":"","code":200}

Failed | test_case/test_ls/test_bpm.py::TestBpm::test_bpm[组织管理-添加组织-正向用例-高-http://36.139.193.99:8088/api/org/v1/org/addOrg-POST-json-case2-expect2-sql2-delete|select-demId] | 0.22 |

self = <MyApiAutoTest_v3.test_case.test_ls.test_bpm.TestBpm object at 0x000001860FD16240>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186102AE5A0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x000001860F9BF110>
module = '组织管理', api = '添加组织', title = '正向用例', level = '高', url = 'http://36.139.193.99:8088/api/org/v1/org/addOrg', method = 'POST', mediatype = 'json'
case = {'code': 'testAddOrg', 'demId': '1831590704632668160', 'exceedLimitNum': 0, 'grade': '', ...}, expect = {'message': '添加组织成功'}
sql = {'delete': 'delete from uc_org where CODE_="testAddOrg";', 'select': 'select ID_ from uc_demension where CODE_="requestsAddDem"; '}, sql_type = 'delete|select'
update_key = 'demId'
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize('module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key', readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E AssertionError: assert '添加组织成功' == '添加组织成功！'
E
E - 添加组织成功！
E ? -
E + 添加组织成功
test_case\test_ls\test_bpm.py:47: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_ls.test_bpm.TestBpm object at 0x000001860FD16240>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186102AE5A0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x000001860F9BF110>
module = '组织管理', api = '添加组织', title = '正向用例', level = '高', url = 'http://36.139.193.99:8088/api/org/v1/org/addOrg', method = 'POST', mediatype = 'json'
case = {'code': 'testAddOrg', 'demId': '1831590704632668160', 'exceedLimitNum': 0, 'grade': '', ...}, expect = {'message': '添加组织成功'}
sql = {'delete': 'delete from uc_org where CODE_="testAddOrg";', 'select': 'select ID_ from uc_demension where CODE_="requestsAddDem"; '}, sql_type = 'delete|select'
update_key = 'demId'
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize('module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key', readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_ls\test_bpm.py:50: AssertionError
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/org/v1/org/addOrg POST json {'code': 'testAddOrg', 'demId': '需要更新', 'exceedLimitNum': 0, 'grade': '', 'limitNum': 0, 'name': '测试添加的组织', 'nowNum': 0, 'orderNo': 0, 'parentId': '0'} {'message': '添加组织成功'} {'select': 'select ID_ from uc_demension where CODE_="requestsAddDem"; ', 'delete': 'delete from uc_org where CODE_="testAddOrg";'} delete|select demId
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/org/v1/org/addOrg, 用例数据:{'code': 'testAddOrg', 'demId': '1831590704632668160', 'exceedLimitNum': 0, 'grade': '', 'limitNum': 0, 'name': '测试添加的组织', 'nowNum': 0, 'orderNo': 0, 'parentId': '0'}, 期望数据:{'message': '添加组织成功'}, 服务器返回数据:{"state":true,"message":"添加组织成功！","value":"","code":200}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/org/v1/org/addOrg POST json {'code': 'testAddOrg', 'demId': '1831590704632668160', 'exceedLimitNum': 0, 'grade': '', 'limitNum': 0, 'name': '测试添加的组织', 'nowNum': 0, 'orderNo': 0, 'parentId': '0'} {'message': '添加组织成功'} {'select': 'select ID_ from uc_demension where CODE_="requestsAddDem"; ', 'delete': 'delete from uc_org where CODE_="testAddOrg";'} delete|select demId
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/org/v1/org/addOrg, 用例数据:{'code': 'testAddOrg', 'demId': '1831590704632668160', 'exceedLimitNum': 0, 'grade': '', 'limitNum': 0, 'name': '测试添加的组织', 'nowNum': 0, 'orderNo': 0, 'parentId': '0'}, 期望数据:{'message': '添加组织成功'}, 服务器返回数据:{"state":true,"message":"添加组织成功！","value":"","code":200}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/org/v1/org/addOrg POST json {'code': 'testAddOrg', 'demId': '1831590704632668160', 'exceedLimitNum': 0, 'grade': '', 'limitNum': 0, 'name': '测试添加的组织', 'nowNum': 0, 'orderNo': 0, 'parentId': '0'} {'message': '添加组织成功'} {'select': 'select ID_ from uc_demension where CODE_="requestsAddDem"; ', 'delete': 'delete from uc_org where CODE_="testAddOrg";'} delete|select demId
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/org/v1/org/addOrg, 用例数据:{'code': 'testAddOrg', 'demId': '1831590704632668160', 'exceedLimitNum': 0, 'grade': '', 'limitNum': 0, 'name': '测试添加的组织', 'nowNum': 0, 'orderNo': 0, 'parentId': '0'}, 期望数据:{'message': '添加组织成功'}, 服务器返回数据:{"state":true,"message":"添加组织成功！","value":"","code":200}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/org/v1/org/addOrg POST json {'code': 'testAddOrg', 'demId': '1831590704632668160', 'exceedLimitNum': 0, 'grade': '', 'limitNum': 0, 'name': '测试添加的组织', 'nowNum': 0, 'orderNo': 0, 'parentId': '0'} {'message': '添加组织成功'} {'select': 'select ID_ from uc_demension where CODE_="requestsAddDem"; ', 'delete': 'delete from uc_org where CODE_="testAddOrg";'} delete|select demId
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/org/v1/org/addOrg, 用例数据:{'code': 'testAddOrg', 'demId': '1831590704632668160', 'exceedLimitNum': 0, 'grade': '', 'limitNum': 0, 'name': '测试添加的组织', 'nowNum': 0, 'orderNo': 0, 'parentId': '0'}, 期望数据:{'message': '添加组织成功'}, 服务器返回数据:{"state":true,"message":"添加组织成功！","value":"","code":200}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/org/v1/org/addOrg POST json {'code': 'testAddOrg', 'demId': '1831590704632668160', 'exceedLimitNum': 0, 'grade': '', 'limitNum': 0, 'name': '测试添加的组织', 'nowNum': 0, 'orderNo': 0, 'parentId': '0'} {'message': '添加组织成功'} {'select': 'select ID_ from uc_demension where CODE_="requestsAddDem"; ', 'delete': 'delete from uc_org where CODE_="testAddOrg";'} delete|select demId
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/org/v1/org/addOrg, 用例数据:{'code': 'testAddOrg', 'demId': '1831590704632668160', 'exceedLimitNum': 0, 'grade': '', 'limitNum': 0, 'name': '测试添加的组织', 'nowNum': 0, 'orderNo': 0, 'parentId': '0'}, 期望数据:{'message': '添加组织成功'}, 服务器返回数据:{"state":true,"message":"添加组织成功！","value":"","code":200}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/org/v1/org/addOrg POST json {'code': 'testAddOrg', 'demId': '1831590704632668160', 'exceedLimitNum': 0, 'grade': '', 'limitNum': 0, 'name': '测试添加的组织', 'nowNum': 0, 'orderNo': 0, 'parentId': '0'} {'message': '添加组织成功'} {'select': 'select ID_ from uc_demension where CODE_="requestsAddDem"; ', 'delete': 'delete from uc_org where CODE_="testAddOrg";'} delete|select demId
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/org/v1/org/addOrg, 用例数据:{'code': 'testAddOrg', 'demId': '1831590704632668160', 'exceedLimitNum': 0, 'grade': '', 'limitNum': 0, 'name': '测试添加的组织', 'nowNum': 0, 'orderNo': 0, 'parentId': '0'}, 期望数据:{'message': '添加组织成功'}, 服务器返回数据:{"state":true,"message":"添加组织成功！","value":"","code":200}

Failed | test_case/test_ls/test_bpm.py::TestBpm::test_bpm[组织管理-删除组织-正向用例-中-http://36.139.193.99:8088/api/org/v1/org/deleteOrg-POST-json-testAddOrg-expect5-None-None-None] | 0.02 |

self = <MyApiAutoTest_v3.test_case.test_ls.test_bpm.TestBpm object at 0x000001860FD07560>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186102AE5A0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x000001860F9BF110>
module = '组织管理', api = '删除组织', title = '正向用例', level = '中', url = 'http://36.139.193.99:8088/api/org/v1/org/deleteOrg', method = 'POST', mediatype = 'json', case = 'testAddOrg'
expect = {'message': '删除组织成功！'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize('module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key', readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E assert '删除组织成功！' == '部分删除成功，其中编码为【"testAddOrg"】的组织不存在；'
E
E - 部分删除成功，其中编码为【"testAddOrg"】的组织不存在；
E + 删除组织成功！
test_case\test_ls\test_bpm.py:47: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_ls.test_bpm.TestBpm object at 0x000001860FD07560>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186102AE5A0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x000001860F9BF110>
module = '组织管理', api = '删除组织', title = '正向用例', level = '中', url = 'http://36.139.193.99:8088/api/org/v1/org/deleteOrg', method = 'POST', mediatype = 'json', case = 'testAddOrg'
expect = {'message': '删除组织成功！'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize('module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key', readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_ls\test_bpm.py:50: AssertionError
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/org/v1/org/deleteOrg POST json testAddOrg {'message': '删除组织成功！'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/org/v1/org/deleteOrg, 用例数据:testAddOrg, 期望数据:{'message': '删除组织成功！'}, 服务器返回数据:{"state":true,"message":"部分删除成功，其中编码为【\"testAddOrg\"】的组织不存在；","value":"","code":200}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/org/v1/org/deleteOrg POST json testAddOrg {'message': '删除组织成功！'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/org/v1/org/deleteOrg, 用例数据:testAddOrg, 期望数据:{'message': '删除组织成功！'}, 服务器返回数据:{"state":true,"message":"部分删除成功，其中编码为【\"testAddOrg\"】的组织不存在；","value":"","code":200}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/org/v1/org/deleteOrg POST json testAddOrg {'message': '删除组织成功！'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/org/v1/org/deleteOrg, 用例数据:testAddOrg, 期望数据:{'message': '删除组织成功！'}, 服务器返回数据:{"state":true,"message":"部分删除成功，其中编码为【\"testAddOrg\"】的组织不存在；","value":"","code":200}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/org/v1/org/deleteOrg POST json testAddOrg {'message': '删除组织成功！'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/org/v1/org/deleteOrg, 用例数据:testAddOrg, 期望数据:{'message': '删除组织成功！'}, 服务器返回数据:{"state":true,"message":"部分删除成功，其中编码为【\"testAddOrg\"】的组织不存在；","value":"","code":200}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/org/v1/org/deleteOrg POST json testAddOrg {'message': '删除组织成功！'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/org/v1/org/deleteOrg, 用例数据:testAddOrg, 期望数据:{'message': '删除组织成功！'}, 服务器返回数据:{"state":true,"message":"部分删除成功，其中编码为【\"testAddOrg\"】的组织不存在；","value":"","code":200}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/org/v1/org/deleteOrg POST json testAddOrg {'message': '删除组织成功！'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/org/v1/org/deleteOrg, 用例数据:testAddOrg, 期望数据:{'message': '删除组织成功！'}, 服务器返回数据:{"state":true,"message":"部分删除成功，其中编码为【\"testAddOrg\"】的组织不存在；","value":"","code":200}

Failed | test_case/test_ls/test_bpm.py::TestBpm::test_bpm[维度管理-根据维度编码删除维度-正向用例-中-http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds-delete-query-case6-expect6-sql6-select-ids] | 0.03 |

self = <MyApiAutoTest_v3.test_case.test_ls.test_bpm.TestBpm object at 0x0000018610146C60>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186102AE5A0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x000001860F9BF110>
module = '维度管理', api = '根据维度编码删除维度', title = '正向用例', level = '中', url = 'http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds', method = 'delete', mediatype = 'query'
case = {'ids': '1831590704632668160'}, expect = {'message': '删除维度成功！'}, sql = {'select': 'select ID_ from uc_demension where CODE_="requestsAddDem";'}, sql_type = 'select'
update_key = 'ids'
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize('module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key', readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E AssertionError: assert '删除维度成功！' == '【requestsAddDem(requestsAddDem)】的维度下存在组织，不允许删除 '
E
E - 【requestsAddDem(requestsAddDem)】的维度下存在组织，不允许删除
E + 删除维度成功！
test_case\test_ls\test_bpm.py:47: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_ls.test_bpm.TestBpm object at 0x0000018610146C60>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186102AE5A0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x000001860F9BF110>
module = '维度管理', api = '根据维度编码删除维度', title = '正向用例', level = '中', url = 'http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds', method = 'delete', mediatype = 'query'
case = {'ids': '1831590704632668160'}, expect = {'message': '删除维度成功！'}, sql = {'select': 'select ID_ from uc_demension where CODE_="requestsAddDem";'}, sql_type = 'select'
update_key = 'ids'
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize('module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key', readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_ls\test_bpm.py:50: AssertionError
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds delete query {'ids': '需要更新'} {'message': '删除维度成功！'} {'select': 'select ID_ from uc_demension where CODE_="requestsAddDem";'} select ids
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds, 用例数据:{'ids': '1831590704632668160'}, 期望数据:{'message': '删除维度成功！'}, 服务器返回数据:{"state":false,"message":"【requestsAddDem(requestsAddDem)】的维度下存在组织，不允许删除 ","value":"","code":200}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds delete query {'ids': '1831590704632668160'} {'message': '删除维度成功！'} {'select': 'select ID_ from uc_demension where CODE_="requestsAddDem";'} select ids
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds, 用例数据:{'ids': '1831590704632668160'}, 期望数据:{'message': '删除维度成功！'}, 服务器返回数据:{"state":false,"message":"【requestsAddDem(requestsAddDem)】的维度下存在组织，不允许删除 ","value":"","code":200}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds delete query {'ids': '1831590704632668160'} {'message': '删除维度成功！'} {'select': 'select ID_ from uc_demension where CODE_="requestsAddDem";'} select ids
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds, 用例数据:{'ids': '1831590704632668160'}, 期望数据:{'message': '删除维度成功！'}, 服务器返回数据:{"state":false,"message":"【requestsAddDem(requestsAddDem)】的维度下存在组织，不允许删除 ","value":"","code":200}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds delete query {'ids': '1831590704632668160'} {'message': '删除维度成功！'} {'select': 'select ID_ from uc_demension where CODE_="requestsAddDem";'} select ids
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds, 用例数据:{'ids': '1831590704632668160'}, 期望数据:{'message': '删除维度成功！'}, 服务器返回数据:{"state":false,"message":"【requestsAddDem(requestsAddDem)】的维度下存在组织，不允许删除 ","value":"","code":200}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds delete query {'ids': '1831590704632668160'} {'message': '删除维度成功！'} {'select': 'select ID_ from uc_demension where CODE_="requestsAddDem";'} select ids
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds, 用例数据:{'ids': '1831590704632668160'}, 期望数据:{'message': '删除维度成功！'}, 服务器返回数据:{"state":false,"message":"【requestsAddDem(requestsAddDem)】的维度下存在组织，不允许删除 ","value":"","code":200}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds delete query {'ids': '1831590704632668160'} {'message': '删除维度成功！'} {'select': 'select ID_ from uc_demension where CODE_="requestsAddDem";'} select ids
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds, 用例数据:{'ids': '1831590704632668160'}, 期望数据:{'message': '删除维度成功！'}, 服务器返回数据:{"state":false,"message":"【requestsAddDem(requestsAddDem)】的维度下存在组织，不允许删除 ","value":"","code":200}

Failed | test_case/test_zs/test_bpm.py::TestBpm::test_bpm[认证接口-登录系统-反向用例-username为空-中-http://36.139.193.99:8088/auth-POST-application/json-case1-expect1-None-None-None] | 0.03 |

self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x0000018610265340>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-username为空', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'application/json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ=', 'username': ''}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E AssertionError: assert '账号或密码错误' == '账户错误或该租户未启用'
E
E - 账户错误或该租户未启用
E + 账号或密码错误
test_case\test_zs\test_bpm.py:50: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x0000018610265340>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-username为空', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'application/json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ=', 'username': ''}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_zs\test_bpm.py:53: AssertionError
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': '', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': '', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590711054147584"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': '', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': '', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590711209336832"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': '', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': '', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590711356137472"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': '', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': '', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590711498743808"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': '', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': '', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590711641350144"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': '', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': '', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590711779762176"}

Failed | test_case/test_zs/test_bpm.py::TestBpm::test_bpm[认证接口-登录系统-反向用例-username为特殊字符-中-http://36.139.193.99:8088/auth-POST-application/json-case2-expect2-None-None-None] | 0.04 |

self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x00000186102658E0>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-username为特殊字符', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'application/json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ=', 'username': '#!$!@#!@#'}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E AssertionError: assert '账号或密码错误' == '账户错误或该租户未启用'
E
E - 账户错误或该租户未启用
E + 账号或密码错误
test_case\test_zs\test_bpm.py:50: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x00000186102658E0>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-username为特殊字符', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'application/json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ=', 'username': '#!$!@#!@#'}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_zs\test_bpm.py:53: AssertionError
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': '#!$!@#!@#', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': '#!$!@#!@#', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590711934951424"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': '#!$!@#!@#', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': '#!$!@#!@#', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590712094334976"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': '#!$!@#!@#', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': '#!$!@#!@#', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590712262107136"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': '#!$!@#!@#', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': '#!$!@#!@#', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590712434073600"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': '#!$!@#!@#', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': '#!$!@#!@#', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590712593457152"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': '#!$!@#!@#', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': '#!$!@#!@#', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590712740257792"}

Failed | test_case/test_zs/test_bpm.py::TestBpm::test_bpm[认证接口-登录系统-反向用例-username过长-中-http://36.139.193.99:8088/auth-POST-application/json-case3-expect3-None-None-None] | 0.04 |

self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x0000018610265310>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-username过长', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'application/json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQraz...2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ=', 'username': 'adminadminadminadminadminadminadminadminadmin'}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E AssertionError: assert '账号或密码错误' == '账户错误或该租户未启用'
E
E - 账户错误或该租户未启用
E + 账号或密码错误
test_case\test_zs\test_bpm.py:50: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x0000018610265310>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-username过长', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'application/json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQraz...2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ=', 'username': 'adminadminadminadminadminadminadminadminadmin'}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_zs\test_bpm.py:53: AssertionError
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'adminadminadminadminadminadminadminadminadmin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'adminadminadminadminadminadminadminadminadmin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590712908029952"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'adminadminadminadminadminadminadminadminadmin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'adminadminadminadminadminadminadminadminadmin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590713067413504"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'adminadminadminadminadminadminadminadminadmin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'adminadminadminadminadminadminadminadminadmin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590713230991360"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'adminadminadminadminadminadminadminadminadmin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'adminadminadminadminadminadminadminadminadmin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590713411346432"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'adminadminadminadminadminadminadminadminadmin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'adminadminadminadminadminadminadminadminadmin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590713574924288"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'adminadminadminadminadminadminadminadminadmin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'adminadminadminadminadminadminadminadminadmin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590713738502144"}

Failed | test_case/test_zs/test_bpm.py::TestBpm::test_bpm[认证接口-登录系统-反向用例-username短-中-http://36.139.193.99:8088/auth-POST-json-case4-expect4-None-None-None] | 0.04 |

self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x00000186102655B0>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-username短', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ=', 'username': 'a'}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E AssertionError: assert '账号或密码错误' == '账户错误或该租户未启用'
E
E - 账户错误或该租户未启用
E + 账号或密码错误
test_case\test_zs\test_bpm.py:50: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x00000186102655B0>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-username短', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ=', 'username': 'a'}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_zs\test_bpm.py:53: AssertionError
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST json {'username': 'a', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'a', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590713914662912"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST json {'username': 'a', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'a', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590714082435072"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST json {'username': 'a', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'a', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590714275373056"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST json {'username': 'a', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'a', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590714438950912"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST json {'username': 'a', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'a', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590714598334464"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST json {'username': 'a', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'a', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590714745135104"}

Failed | test_case/test_zs/test_bpm.py::TestBpm::test_bpm[认证接口-登录系统-反向用例-username错误-中-http://36.139.193.99:8088/auth-POST-application/json-case5-expect5-None-None-None] | 0.04 |

self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x0000018610265940>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-username错误', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'application/json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ=', 'username': 'adminxyz'}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E AssertionError: assert '账号或密码错误' == '账户错误或该租户未启用'
E
E - 账户错误或该租户未启用
E + 账号或密码错误
test_case\test_zs\test_bpm.py:50: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x0000018610265940>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-username错误', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'application/json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ=', 'username': 'adminxyz'}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_zs\test_bpm.py:53: AssertionError
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'adminxyz', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'adminxyz', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590714908712960"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'adminxyz', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'adminxyz', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590715076485120"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'adminxyz', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'adminxyz', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590715227480064"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'adminxyz', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'adminxyz', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590715391057920"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'adminxyz', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'adminxyz', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590715546247168"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'adminxyz', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'adminxyz', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590715701436416"}

Failed | test_case/test_zs/test_bpm.py::TestBpm::test_bpm[认证接口-登录系统-反向用例-password过长-中-http://36.139.193.99:8088/auth-post-application/json-case8-expect8-None-None-None] | 0.03 |

self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x0000018610266060>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-password过长', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'post', mediatype = 'application/json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQraz...aEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn', 'username': 'admin'}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E AssertionError: assert '账号或密码错误' == '解密密码异常，请检查RSA公钥和私钥配置'
E
E - 解密密码异常，请检查RSA公钥和私钥配置
E + 账号或密码错误
test_case\test_zs\test_bpm.py:50: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x0000018610266060>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-password过长', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'post', mediatype = 'application/json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQraz...aEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn', 'username': 'admin'}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_zs\test_bpm.py:53: AssertionError
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth post application/json {'username': 'admin', 'password': ' '} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'admin', 'password': ' '}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"解密密码异常，请检查RSA公钥和私钥配置","code":200,"logId":"1831590716083118080"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth post application/json {'username': 'admin', 'password': ' '} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'admin', 'password': ' '}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"解密密码异常，请检查RSA公钥和私钥配置","code":200,"logId":"1831590716213141504"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth post application/json {'username': 'admin', 'password': ' '} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'admin', 'password': ' '}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"解密密码异常，请检查RSA公钥和私钥配置","code":200,"logId":"1831590716347359232"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth post application/json {'username': 'admin', 'password': ' '} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'admin', 'password': ' '}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"解密密码异常，请检查RSA公钥和私钥配置","code":200,"logId":"1831590716498354176"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth post application/json {'username': 'admin', 'password': ' '} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'admin', 'password': ' '}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"解密密码异常，请检查RSA公钥和私钥配置","code":200,"logId":"1831590716619988992"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth post application/json {'username': 'admin', 'password': ' '} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'admin', 'password': ' '}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"解密密码异常，请检查RSA公钥和私钥配置","code":200,"logId":"1831590716758401024"}

Failed | test_case/test_zs/test_bpm.py::TestBpm::test_bpm[认证接口-登录系统-反向用例-password过短-中-http://36.139.193.99:8088/auth-POST-application/json-case9-expect9-None-None-None] | 0.03 |

self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x0000018610265850>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-password过短', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'application/json'
case = {'password': '123456', 'username': 'admin'}, expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E AssertionError: assert '账号或密码错误' == '解密密码异常，请检查RSA公钥和私钥配置'
E
E - 解密密码异常，请检查RSA公钥和私钥配置
E + 账号或密码错误
test_case\test_zs\test_bpm.py:50: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x0000018610265850>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-password过短', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'application/json'
case = {'password': '123456', 'username': 'admin'}, expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_zs\test_bpm.py:53: AssertionError
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'admin', 'password': '123456'} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'admin', 'password': '123456'}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"解密密码异常，请检查RSA公钥和私钥配置","code":200,"logId":"1831590716875841536"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'admin', 'password': '123456'} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'admin', 'password': '123456'}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"解密密码异常，请检查RSA公钥和私钥配置","code":200,"logId":"1831590717018447872"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'admin', 'password': '123456'} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'admin', 'password': '123456'}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"解密密码异常，请检查RSA公钥和私钥配置","code":200,"logId":"1831590717152665600"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'admin', 'password': '123456'} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'admin', 'password': '123456'}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"解密密码异常，请检查RSA公钥和私钥配置","code":200,"logId":"1831590717278494720"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'admin', 'password': '123456'} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'admin', 'password': '123456'}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"解密密码异常，请检查RSA公钥和私钥配置","code":200,"logId":"1831590717395935232"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'admin', 'password': '123456'} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'admin', 'password': '123456'}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"解密密码异常，请检查RSA公钥和私钥配置","code":200,"logId":"1831590717530152960"}

Failed | test_case/test_zs/test_bpm.py::TestBpm::test_bpm[认证接口-登录系统-反向用例-password错误-中-http://36.139.193.99:8088/auth-POST-application/json-case10-expect10-None-None-None] | 0.04 |

self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x00000186102659A0>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-password错误', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'application/json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ', 'username': 'admin'}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E AssertionError: assert '账号或密码错误' == None
E + where None = <built-in method get of dict object at 0x000001861054AA40>('message')
E + where <built-in method get of dict object at 0x000001861054AA40> = {'account': 'admin', 'expiration': 86400, 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjU2MDY2MzEsImlhdCI6MTcyNTUyMDIzMX0.HcxGSgiPrOfZLIPWhDVF_2EFnkaJkpmH3VSY2x1uw7WVa1g7FIW1xdmPnASO8ZYeXkhox18_Q-SVTJp-kkLS-w', ...}.get
E + where {'account': 'admin', 'expiration': 86400, 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjU2MDY2MzEsImlhdCI6MTcyNTUyMDIzMX0.HcxGSgiPrOfZLIPWhDVF_2EFnkaJkpmH3VSY2x1uw7WVa1g7FIW1xdmPnASO8ZYeXkhox18_Q-SVTJp-kkLS-w', ...} = json()
E + where json = <Response [200]>.json
test_case\test_zs\test_bpm.py:50: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x00000186102659A0>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-password错误', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'application/json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ', 'username': 'admin'}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_zs\test_bpm.py:53: AssertionError
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'admin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ'} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'admin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ'}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjU2MDY2MzEsImlhdCI6MTcyNTUyMDIzMX0.HcxGSgiPrOfZLIPWhDVF_2EFnkaJkpmH3VSY2x1uw7WVa1g7FIW1xdmPnASO8ZYeXkhox18_Q-SVTJp-kkLS-w","username":"超级管理员","account":"admin","userId":"1","expiration":86400,"loginStatus":true,"userAttrs":{"tenantId":"-1"}}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'admin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ'} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'admin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ'}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjU2MDY2MzEsImlhdCI6MTcyNTUyMDIzMX0.HcxGSgiPrOfZLIPWhDVF_2EFnkaJkpmH3VSY2x1uw7WVa1g7FIW1xdmPnASO8ZYeXkhox18_Q-SVTJp-kkLS-w","username":"超级管理员","account":"admin","userId":"1","expiration":86400,"loginStatus":true,"userAttrs":{"tenantId":"-1"}}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'admin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ'} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'admin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ'}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjU2MDY2MzEsImlhdCI6MTcyNTUyMDIzMX0.HcxGSgiPrOfZLIPWhDVF_2EFnkaJkpmH3VSY2x1uw7WVa1g7FIW1xdmPnASO8ZYeXkhox18_Q-SVTJp-kkLS-w","username":"超级管理员","account":"admin","userId":"1","expiration":86400,"loginStatus":true,"userAttrs":{"tenantId":"-1"}}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'admin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ'} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'admin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ'}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjU2MDY2MzEsImlhdCI6MTcyNTUyMDIzMX0.HcxGSgiPrOfZLIPWhDVF_2EFnkaJkpmH3VSY2x1uw7WVa1g7FIW1xdmPnASO8ZYeXkhox18_Q-SVTJp-kkLS-w","username":"超级管理员","account":"admin","userId":"1","expiration":86400,"loginStatus":true,"userAttrs":{"tenantId":"-1"}}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'admin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ'} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'admin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ'}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjU2MDY2MzEsImlhdCI6MTcyNTUyMDIzMX0.HcxGSgiPrOfZLIPWhDVF_2EFnkaJkpmH3VSY2x1uw7WVa1g7FIW1xdmPnASO8ZYeXkhox18_Q-SVTJp-kkLS-w","username":"超级管理员","account":"admin","userId":"1","expiration":86400,"loginStatus":true,"userAttrs":{"tenantId":"-1"}}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'admin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ'} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'admin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ'}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjU2MDY2MzEsImlhdCI6MTcyNTUyMDIzMX0.HcxGSgiPrOfZLIPWhDVF_2EFnkaJkpmH3VSY2x1uw7WVa1g7FIW1xdmPnASO8ZYeXkhox18_Q-SVTJp-kkLS-w","username":"超级管理员","account":"admin","userId":"1","expiration":86400,"loginStatus":true,"userAttrs":{"tenantId":"-1"}}

Failed | test_case/test_zs/test_bpm.py::TestBpm::test_bpm[认证接口-刷新token-正向用例-高-http://36.139.193.99:8088/refresh-GET-None-None-expect11-None-None-None] | 0.03 |

self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x0000018610265A30>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '刷新token', title = '正向用例', level = '高', url = 'http://36.139.193.99:8088/refresh', method = 'GET', mediatype = None, case = None
expect = {'message': '刷新token成功'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E AssertionError: assert '刷新token成功' == None
E + where None = <built-in method get of dict object at 0x000001861055A500>('message')
E + where <built-in method get of dict object at 0x000001861055A500> = {'account': 'admin', 'expiration': 86400, 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjU2MDY2MzEsImlhdCI6MTcyNTUyMDIzMX0.HcxGSgiPrOfZLIPWhDVF_2EFnkaJkpmH3VSY2x1uw7WVa1g7FIW1xdmPnASO8ZYeXkhox18_Q-SVTJp-kkLS-w', ...}.get
E + where {'account': 'admin', 'expiration': 86400, 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjU2MDY2MzEsImlhdCI6MTcyNTUyMDIzMX0.HcxGSgiPrOfZLIPWhDVF_2EFnkaJkpmH3VSY2x1uw7WVa1g7FIW1xdmPnASO8ZYeXkhox18_Q-SVTJp-kkLS-w', ...} = json()
E + where json = <Response [200]>.json
test_case\test_zs\test_bpm.py:50: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x0000018610265A30>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '刷新token', title = '正向用例', level = '高', url = 'http://36.139.193.99:8088/refresh', method = 'GET', mediatype = None, case = None
expect = {'message': '刷新token成功'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_zs\test_bpm.py:53: AssertionError
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/refresh GET None None {'message': '刷新token成功'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/refresh, 用例数据:None, 期望数据:{'message': '刷新token成功'}, 服务器返回数据:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjU2MDY2MzEsImlhdCI6MTcyNTUyMDIzMX0.HcxGSgiPrOfZLIPWhDVF_2EFnkaJkpmH3VSY2x1uw7WVa1g7FIW1xdmPnASO8ZYeXkhox18_Q-SVTJp-kkLS-w","username":"admin","account":"admin","userId":"","expiration":86400,"loginStatus":true}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/refresh GET None None {'message': '刷新token成功'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/refresh, 用例数据:None, 期望数据:{'message': '刷新token成功'}, 服务器返回数据:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjU2MDY2MzEsImlhdCI6MTcyNTUyMDIzMX0.HcxGSgiPrOfZLIPWhDVF_2EFnkaJkpmH3VSY2x1uw7WVa1g7FIW1xdmPnASO8ZYeXkhox18_Q-SVTJp-kkLS-w","username":"admin","account":"admin","userId":"","expiration":86400,"loginStatus":true}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/refresh GET None None {'message': '刷新token成功'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/refresh, 用例数据:None, 期望数据:{'message': '刷新token成功'}, 服务器返回数据:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjU2MDY2MzEsImlhdCI6MTcyNTUyMDIzMX0.HcxGSgiPrOfZLIPWhDVF_2EFnkaJkpmH3VSY2x1uw7WVa1g7FIW1xdmPnASO8ZYeXkhox18_Q-SVTJp-kkLS-w","username":"admin","account":"admin","userId":"","expiration":86400,"loginStatus":true}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/refresh GET None None {'message': '刷新token成功'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/refresh, 用例数据:None, 期望数据:{'message': '刷新token成功'}, 服务器返回数据:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjU2MDY2MzEsImlhdCI6MTcyNTUyMDIzMX0.HcxGSgiPrOfZLIPWhDVF_2EFnkaJkpmH3VSY2x1uw7WVa1g7FIW1xdmPnASO8ZYeXkhox18_Q-SVTJp-kkLS-w","username":"admin","account":"admin","userId":"","expiration":86400,"loginStatus":true}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/refresh GET None None {'message': '刷新token成功'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/refresh, 用例数据:None, 期望数据:{'message': '刷新token成功'}, 服务器返回数据:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjU2MDY2MzEsImlhdCI6MTcyNTUyMDIzMX0.HcxGSgiPrOfZLIPWhDVF_2EFnkaJkpmH3VSY2x1uw7WVa1g7FIW1xdmPnASO8ZYeXkhox18_Q-SVTJp-kkLS-w","username":"admin","account":"admin","userId":"","expiration":86400,"loginStatus":true}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/refresh GET None None {'message': '刷新token成功'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/refresh, 用例数据:None, 期望数据:{'message': '刷新token成功'}, 服务器返回数据:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjU2MDY2MzEsImlhdCI6MTcyNTUyMDIzMX0.HcxGSgiPrOfZLIPWhDVF_2EFnkaJkpmH3VSY2x1uw7WVa1g7FIW1xdmPnASO8ZYeXkhox18_Q-SVTJp-kkLS-w","username":"admin","account":"admin","userId":"","expiration":86400,"loginStatus":true}

Rerun | test_case/test_ls/test_bpm.py::TestBpm::test_bpm[维度管理-添加维度-正向用例-高-http://36.139.193.99:8088/api/demension/v1/dem/addDem-post-application/json-case0-expect0-sql0-delete-None] | 0.05 |

self = <MyApiAutoTest_v3.test_case.test_ls.test_bpm.TestBpm object at 0x000001860F9BF0E0>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186102AE5A0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x000001860F9BF110>
module = '维度管理', api = '添加维度', title = '正向用例', level = '高', url = 'http://36.139.193.99:8088/api/demension/v1/dem/addDem', method = 'post', mediatype = 'application/json'
case = {'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 1, 'name': 'requests添加的维度'}, expect = {'message': '添加维度成功'}
sql = {'delete': 'dELETE FROM uc_demension WHERE `CODE_`="requestsAddDem";'}, sql_type = 'delete', update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize('module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key', readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E AssertionError: assert '添加维度成功' == '添加维度成功！'
E
E - 添加维度成功！
E ? -
E + 添加维度成功
test_case\test_ls\test_bpm.py:47: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_ls.test_bpm.TestBpm object at 0x000001860F9BF0E0>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186102AE5A0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x000001860F9BF110>
module = '维度管理', api = '添加维度', title = '正向用例', level = '高', url = 'http://36.139.193.99:8088/api/demension/v1/dem/addDem', method = 'post', mediatype = 'application/json'
case = {'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 1, 'name': 'requests添加的维度'}, expect = {'message': '添加维度成功'}
sql = {'delete': 'dELETE FROM uc_demension WHERE `CODE_`="requestsAddDem";'}, sql_type = 'delete', update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize('module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key', readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_ls\test_bpm.py:50: AssertionError
-----------------------------Captured stdout setup------------------------------
D:\CeShiShiXun\Project\PythonProject\PythonProject_1\MyApiAutoTest_v3\data_config D:\CeShiShiXun\Project\PythonProject\PythonProject_1\MyApiAutoTest_v2\data_config
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/demension/v1/dem/addDem post application/json {'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 1, 'name': 'requests添加的维度'} {'message': '添加维度成功'} {'delete': 'dELETE FROM uc_demension WHERE `CODE_`="requestsAddDem";'} delete None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/demension/v1/dem/addDem, 用例数据:{'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 1, 'name': 'requests添加的维度'}, 期望数据:{'message': '添加维度成功'}, 服务器返回数据:{"state":true,"message":"添加维度成功！","value":"","code":200}

Rerun | test_case/test_ls/test_bpm.py::TestBpm::test_bpm[维度管理-添加维度-正向用例-高-http://36.139.193.99:8088/api/demension/v1/dem/addDem-post-application/json-case0-expect0-sql0-delete-None] | 0.10 |

self = <MyApiAutoTest_v3.test_case.test_ls.test_bpm.TestBpm object at 0x000001860F9BF0E0>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186102AE5A0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x000001860F9BF110>
module = '维度管理', api = '添加维度', title = '正向用例', level = '高', url = 'http://36.139.193.99:8088/api/demension/v1/dem/addDem', method = 'post', mediatype = 'application/json'
case = {'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 1, 'name': 'requests添加的维度'}, expect = {'message': '添加维度成功'}
sql = {'delete': 'dELETE FROM uc_demension WHERE `CODE_`="requestsAddDem";'}, sql_type = 'delete', update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize('module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key', readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E AssertionError: assert '添加维度成功' == '添加维度成功！'
E
E - 添加维度成功！
E ? -
E + 添加维度成功
test_case\test_ls\test_bpm.py:47: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_ls.test_bpm.TestBpm object at 0x000001860F9BF0E0>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186102AE5A0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x000001860F9BF110>
module = '维度管理', api = '添加维度', title = '正向用例', level = '高', url = 'http://36.139.193.99:8088/api/demension/v1/dem/addDem', method = 'post', mediatype = 'application/json'
case = {'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 1, 'name': 'requests添加的维度'}, expect = {'message': '添加维度成功'}
sql = {'delete': 'dELETE FROM uc_demension WHERE `CODE_`="requestsAddDem";'}, sql_type = 'delete', update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize('module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key', readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_ls\test_bpm.py:50: AssertionError
-----------------------------Captured stdout setup------------------------------
D:\CeShiShiXun\Project\PythonProject\PythonProject_1\MyApiAutoTest_v3\data_config D:\CeShiShiXun\Project\PythonProject\PythonProject_1\MyApiAutoTest_v2\data_config
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/demension/v1/dem/addDem post application/json {'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 1, 'name': 'requests添加的维度'} {'message': '添加维度成功'} {'delete': 'dELETE FROM uc_demension WHERE `CODE_`="requestsAddDem";'} delete None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/demension/v1/dem/addDem, 用例数据:{'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 1, 'name': 'requests添加的维度'}, 期望数据:{'message': '添加维度成功'}, 服务器返回数据:{"state":true,"message":"添加维度成功！","value":"","code":200}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/demension/v1/dem/addDem post application/json {'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 1, 'name': 'requests添加的维度'} {'message': '添加维度成功'} {'delete': 'dELETE FROM uc_demension WHERE `CODE_`="requestsAddDem";'} delete None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/demension/v1/dem/addDem, 用例数据:{'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 1, 'name': 'requests添加的维度'}, 期望数据:{'message': '添加维度成功'}, 服务器返回数据:{"state":true,"message":"添加维度成功！","value":"","code":200}

Rerun | test_case/test_ls/test_bpm.py::TestBpm::test_bpm[维度管理-添加维度-正向用例-高-http://36.139.193.99:8088/api/demension/v1/dem/addDem-post-application/json-case0-expect0-sql0-delete-None] | 0.05 |

self = <MyApiAutoTest_v3.test_case.test_ls.test_bpm.TestBpm object at 0x000001860F9BF0E0>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186102AE5A0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x000001860F9BF110>
module = '维度管理', api = '添加维度', title = '正向用例', level = '高', url = 'http://36.139.193.99:8088/api/demension/v1/dem/addDem', method = 'post', mediatype = 'application/json'
case = {'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 1, 'name': 'requests添加的维度'}, expect = {'message': '添加维度成功'}
sql = {'delete': 'dELETE FROM uc_demension WHERE `CODE_`="requestsAddDem";'}, sql_type = 'delete', update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize('module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key', readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E AssertionError: assert '添加维度成功' == '添加维度成功！'
E
E - 添加维度成功！
E ? -
E + 添加维度成功
test_case\test_ls\test_bpm.py:47: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_ls.test_bpm.TestBpm object at 0x000001860F9BF0E0>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186102AE5A0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x000001860F9BF110>
module = '维度管理', api = '添加维度', title = '正向用例', level = '高', url = 'http://36.139.193.99:8088/api/demension/v1/dem/addDem', method = 'post', mediatype = 'application/json'
case = {'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 1, 'name': 'requests添加的维度'}, expect = {'message': '添加维度成功'}
sql = {'delete': 'dELETE FROM uc_demension WHERE `CODE_`="requestsAddDem";'}, sql_type = 'delete', update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize('module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key', readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_ls\test_bpm.py:50: AssertionError
-----------------------------Captured stdout setup------------------------------
D:\CeShiShiXun\Project\PythonProject\PythonProject_1\MyApiAutoTest_v3\data_config D:\CeShiShiXun\Project\PythonProject\PythonProject_1\MyApiAutoTest_v2\data_config
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/demension/v1/dem/addDem post application/json {'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 1, 'name': 'requests添加的维度'} {'message': '添加维度成功'} {'delete': 'dELETE FROM uc_demension WHERE `CODE_`="requestsAddDem";'} delete None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/demension/v1/dem/addDem, 用例数据:{'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 1, 'name': 'requests添加的维度'}, 期望数据:{'message': '添加维度成功'}, 服务器返回数据:{"state":true,"message":"添加维度成功！","value":"","code":200}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/demension/v1/dem/addDem post application/json {'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 1, 'name': 'requests添加的维度'} {'message': '添加维度成功'} {'delete': 'dELETE FROM uc_demension WHERE `CODE_`="requestsAddDem";'} delete None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/demension/v1/dem/addDem, 用例数据:{'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 1, 'name': 'requests添加的维度'}, 期望数据:{'message': '添加维度成功'}, 服务器返回数据:{"state":true,"message":"添加维度成功！","value":"","code":200}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/demension/v1/dem/addDem post application/json {'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 1, 'name': 'requests添加的维度'} {'message': '添加维度成功'} {'delete': 'dELETE FROM uc_demension WHERE `CODE_`="requestsAddDem";'} delete None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/demension/v1/dem/addDem, 用例数据:{'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 1, 'name': 'requests添加的维度'}, 期望数据:{'message': '添加维度成功'}, 服务器返回数据:{"state":true,"message":"添加维度成功！","value":"","code":200}

Rerun | test_case/test_ls/test_bpm.py::TestBpm::test_bpm[维度管理-添加维度-正向用例-高-http://36.139.193.99:8088/api/demension/v1/dem/addDem-post-application/json-case0-expect0-sql0-delete-None] | 0.08 |

self = <MyApiAutoTest_v3.test_case.test_ls.test_bpm.TestBpm object at 0x000001860F9BF0E0>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186102AE5A0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x000001860F9BF110>
module = '维度管理', api = '添加维度', title = '正向用例', level = '高', url = 'http://36.139.193.99:8088/api/demension/v1/dem/addDem', method = 'post', mediatype = 'application/json'
case = {'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 1, 'name': 'requests添加的维度'}, expect = {'message': '添加维度成功'}
sql = {'delete': 'dELETE FROM uc_demension WHERE `CODE_`="requestsAddDem";'}, sql_type = 'delete', update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize('module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key', readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E AssertionError: assert '添加维度成功' == '添加维度成功！'
E
E - 添加维度成功！
E ? -
E + 添加维度成功
test_case\test_ls\test_bpm.py:47: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_ls.test_bpm.TestBpm object at 0x000001860F9BF0E0>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186102AE5A0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x000001860F9BF110>
module = '维度管理', api = '添加维度', title = '正向用例', level = '高', url = 'http://36.139.193.99:8088/api/demension/v1/dem/addDem', method = 'post', mediatype = 'application/json'
case = {'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 1, 'name': 'requests添加的维度'}, expect = {'message': '添加维度成功'}
sql = {'delete': 'dELETE FROM uc_demension WHERE `CODE_`="requestsAddDem";'}, sql_type = 'delete', update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize('module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key', readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_ls\test_bpm.py:50: AssertionError
-----------------------------Captured stdout setup------------------------------
D:\CeShiShiXun\Project\PythonProject\PythonProject_1\MyApiAutoTest_v3\data_config D:\CeShiShiXun\Project\PythonProject\PythonProject_1\MyApiAutoTest_v2\data_config
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/demension/v1/dem/addDem post application/json {'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 1, 'name': 'requests添加的维度'} {'message': '添加维度成功'} {'delete': 'dELETE FROM uc_demension WHERE `CODE_`="requestsAddDem";'} delete None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/demension/v1/dem/addDem, 用例数据:{'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 1, 'name': 'requests添加的维度'}, 期望数据:{'message': '添加维度成功'}, 服务器返回数据:{"state":true,"message":"添加维度成功！","value":"","code":200}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/demension/v1/dem/addDem post application/json {'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 1, 'name': 'requests添加的维度'} {'message': '添加维度成功'} {'delete': 'dELETE FROM uc_demension WHERE `CODE_`="requestsAddDem";'} delete None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/demension/v1/dem/addDem, 用例数据:{'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 1, 'name': 'requests添加的维度'}, 期望数据:{'message': '添加维度成功'}, 服务器返回数据:{"state":true,"message":"添加维度成功！","value":"","code":200}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/demension/v1/dem/addDem post application/json {'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 1, 'name': 'requests添加的维度'} {'message': '添加维度成功'} {'delete': 'dELETE FROM uc_demension WHERE `CODE_`="requestsAddDem";'} delete None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/demension/v1/dem/addDem, 用例数据:{'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 1, 'name': 'requests添加的维度'}, 期望数据:{'message': '添加维度成功'}, 服务器返回数据:{"state":true,"message":"添加维度成功！","value":"","code":200}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/demension/v1/dem/addDem post application/json {'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 1, 'name': 'requests添加的维度'} {'message': '添加维度成功'} {'delete': 'dELETE FROM uc_demension WHERE `CODE_`="requestsAddDem";'} delete None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/demension/v1/dem/addDem, 用例数据:{'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 1, 'name': 'requests添加的维度'}, 期望数据:{'message': '添加维度成功'}, 服务器返回数据:{"state":true,"message":"添加维度成功！","value":"","code":200}

Rerun | test_case/test_ls/test_bpm.py::TestBpm::test_bpm[维度管理-添加维度-正向用例-高-http://36.139.193.99:8088/api/demension/v1/dem/addDem-post-application/json-case0-expect0-sql0-delete-None] | 0.04 |

self = <MyApiAutoTest_v3.test_case.test_ls.test_bpm.TestBpm object at 0x000001860F9BF0E0>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186102AE5A0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x000001860F9BF110>
module = '维度管理', api = '添加维度', title = '正向用例', level = '高', url = 'http://36.139.193.99:8088/api/demension/v1/dem/addDem', method = 'post', mediatype = 'application/json'
case = {'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 1, 'name': 'requests添加的维度'}, expect = {'message': '添加维度成功'}
sql = {'delete': 'dELETE FROM uc_demension WHERE `CODE_`="requestsAddDem";'}, sql_type = 'delete', update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize('module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key', readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E AssertionError: assert '添加维度成功' == '添加维度成功！'
E
E - 添加维度成功！
E ? -
E + 添加维度成功
test_case\test_ls\test_bpm.py:47: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_ls.test_bpm.TestBpm object at 0x000001860F9BF0E0>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186102AE5A0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x000001860F9BF110>
module = '维度管理', api = '添加维度', title = '正向用例', level = '高', url = 'http://36.139.193.99:8088/api/demension/v1/dem/addDem', method = 'post', mediatype = 'application/json'
case = {'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 1, 'name': 'requests添加的维度'}, expect = {'message': '添加维度成功'}
sql = {'delete': 'dELETE FROM uc_demension WHERE `CODE_`="requestsAddDem";'}, sql_type = 'delete', update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize('module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key', readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_ls\test_bpm.py:50: AssertionError
-----------------------------Captured stdout setup------------------------------
D:\CeShiShiXun\Project\PythonProject\PythonProject_1\MyApiAutoTest_v3\data_config D:\CeShiShiXun\Project\PythonProject\PythonProject_1\MyApiAutoTest_v2\data_config
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/demension/v1/dem/addDem post application/json {'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 1, 'name': 'requests添加的维度'} {'message': '添加维度成功'} {'delete': 'dELETE FROM uc_demension WHERE `CODE_`="requestsAddDem";'} delete None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/demension/v1/dem/addDem, 用例数据:{'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 1, 'name': 'requests添加的维度'}, 期望数据:{'message': '添加维度成功'}, 服务器返回数据:{"state":true,"message":"添加维度成功！","value":"","code":200}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/demension/v1/dem/addDem post application/json {'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 1, 'name': 'requests添加的维度'} {'message': '添加维度成功'} {'delete': 'dELETE FROM uc_demension WHERE `CODE_`="requestsAddDem";'} delete None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/demension/v1/dem/addDem, 用例数据:{'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 1, 'name': 'requests添加的维度'}, 期望数据:{'message': '添加维度成功'}, 服务器返回数据:{"state":true,"message":"添加维度成功！","value":"","code":200}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/demension/v1/dem/addDem post application/json {'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 1, 'name': 'requests添加的维度'} {'message': '添加维度成功'} {'delete': 'dELETE FROM uc_demension WHERE `CODE_`="requestsAddDem";'} delete None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/demension/v1/dem/addDem, 用例数据:{'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 1, 'name': 'requests添加的维度'}, 期望数据:{'message': '添加维度成功'}, 服务器返回数据:{"state":true,"message":"添加维度成功！","value":"","code":200}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/demension/v1/dem/addDem post application/json {'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 1, 'name': 'requests添加的维度'} {'message': '添加维度成功'} {'delete': 'dELETE FROM uc_demension WHERE `CODE_`="requestsAddDem";'} delete None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/demension/v1/dem/addDem, 用例数据:{'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 1, 'name': 'requests添加的维度'}, 期望数据:{'message': '添加维度成功'}, 服务器返回数据:{"state":true,"message":"添加维度成功！","value":"","code":200}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/demension/v1/dem/addDem post application/json {'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 1, 'name': 'requests添加的维度'} {'message': '添加维度成功'} {'delete': 'dELETE FROM uc_demension WHERE `CODE_`="requestsAddDem";'} delete None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/demension/v1/dem/addDem, 用例数据:{'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 1, 'name': 'requests添加的维度'}, 期望数据:{'message': '添加维度成功'}, 服务器返回数据:{"state":true,"message":"添加维度成功！","value":"","code":200}

Rerun | test_case/test_ls/test_bpm.py::TestBpm::test_bpm[维度管理-更新维度-正向用例-中-http://36.139.193.99:8088/api/demension/v1/dem/updateDem-put-json-case1-expect1-None-None-None] | 0.15 |

self = <MyApiAutoTest_v3.test_case.test_ls.test_bpm.TestBpm object at 0x0000018610189880>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186102AE5A0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x000001860F9BF110>
module = '维度管理', api = '更新维度', title = '正向用例', level = '中', url = 'http://36.139.193.99:8088/api/demension/v1/dem/updateDem', method = 'put', mediatype = 'json'
case = {'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 0, 'name': 'requestsAddDem'}, expect = {'message': '更新维度成功'}, sql = None, sql_type = None
update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize('module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key', readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E AssertionError: assert '更新维度成功' == '更新维度成功！'
E
E - 更新维度成功！
E ? -
E + 更新维度成功
test_case\test_ls\test_bpm.py:47: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_ls.test_bpm.TestBpm object at 0x0000018610189880>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186102AE5A0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x000001860F9BF110>
module = '维度管理', api = '更新维度', title = '正向用例', level = '中', url = 'http://36.139.193.99:8088/api/demension/v1/dem/updateDem', method = 'put', mediatype = 'json'
case = {'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 0, 'name': 'requestsAddDem'}, expect = {'message': '更新维度成功'}, sql = None, sql_type = None
update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize('module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key', readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_ls\test_bpm.py:50: AssertionError
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/demension/v1/dem/updateDem put json {'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 0, 'name': 'requestsAddDem'} {'message': '更新维度成功'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/demension/v1/dem/updateDem, 用例数据:{'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 0, 'name': 'requestsAddDem'}, 期望数据:{'message': '更新维度成功'}, 服务器返回数据:{"state":true,"message":"更新维度成功！","value":"","code":200}

Rerun | test_case/test_ls/test_bpm.py::TestBpm::test_bpm[维度管理-更新维度-正向用例-中-http://36.139.193.99:8088/api/demension/v1/dem/updateDem-put-json-case1-expect1-None-None-None] | 0.02 |

self = <MyApiAutoTest_v3.test_case.test_ls.test_bpm.TestBpm object at 0x0000018610189880>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186102AE5A0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x000001860F9BF110>
module = '维度管理', api = '更新维度', title = '正向用例', level = '中', url = 'http://36.139.193.99:8088/api/demension/v1/dem/updateDem', method = 'put', mediatype = 'json'
case = {'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 0, 'name': 'requestsAddDem'}, expect = {'message': '更新维度成功'}, sql = None, sql_type = None
update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize('module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key', readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E AssertionError: assert '更新维度成功' == '更新维度成功！'
E
E - 更新维度成功！
E ? -
E + 更新维度成功
test_case\test_ls\test_bpm.py:47: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_ls.test_bpm.TestBpm object at 0x0000018610189880>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186102AE5A0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x000001860F9BF110>
module = '维度管理', api = '更新维度', title = '正向用例', level = '中', url = 'http://36.139.193.99:8088/api/demension/v1/dem/updateDem', method = 'put', mediatype = 'json'
case = {'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 0, 'name': 'requestsAddDem'}, expect = {'message': '更新维度成功'}, sql = None, sql_type = None
update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize('module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key', readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_ls\test_bpm.py:50: AssertionError
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/demension/v1/dem/updateDem put json {'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 0, 'name': 'requestsAddDem'} {'message': '更新维度成功'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/demension/v1/dem/updateDem, 用例数据:{'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 0, 'name': 'requestsAddDem'}, 期望数据:{'message': '更新维度成功'}, 服务器返回数据:{"state":true,"message":"更新维度成功！","value":"","code":200}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/demension/v1/dem/updateDem put json {'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 0, 'name': 'requestsAddDem'} {'message': '更新维度成功'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/demension/v1/dem/updateDem, 用例数据:{'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 0, 'name': 'requestsAddDem'}, 期望数据:{'message': '更新维度成功'}, 服务器返回数据:{"state":true,"message":"更新维度成功！","value":"","code":200}

Rerun | test_case/test_ls/test_bpm.py::TestBpm::test_bpm[维度管理-更新维度-正向用例-中-http://36.139.193.99:8088/api/demension/v1/dem/updateDem-put-json-case1-expect1-None-None-None] | 0.02 |

self = <MyApiAutoTest_v3.test_case.test_ls.test_bpm.TestBpm object at 0x0000018610189880>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186102AE5A0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x000001860F9BF110>
module = '维度管理', api = '更新维度', title = '正向用例', level = '中', url = 'http://36.139.193.99:8088/api/demension/v1/dem/updateDem', method = 'put', mediatype = 'json'
case = {'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 0, 'name': 'requestsAddDem'}, expect = {'message': '更新维度成功'}, sql = None, sql_type = None
update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize('module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key', readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E AssertionError: assert '更新维度成功' == '更新维度成功！'
E
E - 更新维度成功！
E ? -
E + 更新维度成功
test_case\test_ls\test_bpm.py:47: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_ls.test_bpm.TestBpm object at 0x0000018610189880>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186102AE5A0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x000001860F9BF110>
module = '维度管理', api = '更新维度', title = '正向用例', level = '中', url = 'http://36.139.193.99:8088/api/demension/v1/dem/updateDem', method = 'put', mediatype = 'json'
case = {'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 0, 'name': 'requestsAddDem'}, expect = {'message': '更新维度成功'}, sql = None, sql_type = None
update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize('module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key', readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_ls\test_bpm.py:50: AssertionError
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/demension/v1/dem/updateDem put json {'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 0, 'name': 'requestsAddDem'} {'message': '更新维度成功'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/demension/v1/dem/updateDem, 用例数据:{'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 0, 'name': 'requestsAddDem'}, 期望数据:{'message': '更新维度成功'}, 服务器返回数据:{"state":true,"message":"更新维度成功！","value":"","code":200}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/demension/v1/dem/updateDem put json {'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 0, 'name': 'requestsAddDem'} {'message': '更新维度成功'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/demension/v1/dem/updateDem, 用例数据:{'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 0, 'name': 'requestsAddDem'}, 期望数据:{'message': '更新维度成功'}, 服务器返回数据:{"state":true,"message":"更新维度成功！","value":"","code":200}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/demension/v1/dem/updateDem put json {'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 0, 'name': 'requestsAddDem'} {'message': '更新维度成功'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/demension/v1/dem/updateDem, 用例数据:{'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 0, 'name': 'requestsAddDem'}, 期望数据:{'message': '更新维度成功'}, 服务器返回数据:{"state":true,"message":"更新维度成功！","value":"","code":200}

Rerun | test_case/test_ls/test_bpm.py::TestBpm::test_bpm[维度管理-更新维度-正向用例-中-http://36.139.193.99:8088/api/demension/v1/dem/updateDem-put-json-case1-expect1-None-None-None] | 0.02 |

self = <MyApiAutoTest_v3.test_case.test_ls.test_bpm.TestBpm object at 0x0000018610189880>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186102AE5A0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x000001860F9BF110>
module = '维度管理', api = '更新维度', title = '正向用例', level = '中', url = 'http://36.139.193.99:8088/api/demension/v1/dem/updateDem', method = 'put', mediatype = 'json'
case = {'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 0, 'name': 'requestsAddDem'}, expect = {'message': '更新维度成功'}, sql = None, sql_type = None
update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize('module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key', readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E AssertionError: assert '更新维度成功' == '更新维度成功！'
E
E - 更新维度成功！
E ? -
E + 更新维度成功
test_case\test_ls\test_bpm.py:47: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_ls.test_bpm.TestBpm object at 0x0000018610189880>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186102AE5A0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x000001860F9BF110>
module = '维度管理', api = '更新维度', title = '正向用例', level = '中', url = 'http://36.139.193.99:8088/api/demension/v1/dem/updateDem', method = 'put', mediatype = 'json'
case = {'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 0, 'name': 'requestsAddDem'}, expect = {'message': '更新维度成功'}, sql = None, sql_type = None
update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize('module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key', readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_ls\test_bpm.py:50: AssertionError
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/demension/v1/dem/updateDem put json {'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 0, 'name': 'requestsAddDem'} {'message': '更新维度成功'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/demension/v1/dem/updateDem, 用例数据:{'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 0, 'name': 'requestsAddDem'}, 期望数据:{'message': '更新维度成功'}, 服务器返回数据:{"state":true,"message":"更新维度成功！","value":"","code":200}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/demension/v1/dem/updateDem put json {'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 0, 'name': 'requestsAddDem'} {'message': '更新维度成功'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/demension/v1/dem/updateDem, 用例数据:{'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 0, 'name': 'requestsAddDem'}, 期望数据:{'message': '更新维度成功'}, 服务器返回数据:{"state":true,"message":"更新维度成功！","value":"","code":200}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/demension/v1/dem/updateDem put json {'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 0, 'name': 'requestsAddDem'} {'message': '更新维度成功'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/demension/v1/dem/updateDem, 用例数据:{'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 0, 'name': 'requestsAddDem'}, 期望数据:{'message': '更新维度成功'}, 服务器返回数据:{"state":true,"message":"更新维度成功！","value":"","code":200}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/demension/v1/dem/updateDem put json {'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 0, 'name': 'requestsAddDem'} {'message': '更新维度成功'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/demension/v1/dem/updateDem, 用例数据:{'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 0, 'name': 'requestsAddDem'}, 期望数据:{'message': '更新维度成功'}, 服务器返回数据:{"state":true,"message":"更新维度成功！","value":"","code":200}

Rerun | test_case/test_ls/test_bpm.py::TestBpm::test_bpm[维度管理-更新维度-正向用例-中-http://36.139.193.99:8088/api/demension/v1/dem/updateDem-put-json-case1-expect1-None-None-None] | 0.01 |

self = <MyApiAutoTest_v3.test_case.test_ls.test_bpm.TestBpm object at 0x0000018610189880>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186102AE5A0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x000001860F9BF110>
module = '维度管理', api = '更新维度', title = '正向用例', level = '中', url = 'http://36.139.193.99:8088/api/demension/v1/dem/updateDem', method = 'put', mediatype = 'json'
case = {'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 0, 'name': 'requestsAddDem'}, expect = {'message': '更新维度成功'}, sql = None, sql_type = None
update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize('module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key', readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E AssertionError: assert '更新维度成功' == '更新维度成功！'
E
E - 更新维度成功！
E ? -
E + 更新维度成功
test_case\test_ls\test_bpm.py:47: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_ls.test_bpm.TestBpm object at 0x0000018610189880>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186102AE5A0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x000001860F9BF110>
module = '维度管理', api = '更新维度', title = '正向用例', level = '中', url = 'http://36.139.193.99:8088/api/demension/v1/dem/updateDem', method = 'put', mediatype = 'json'
case = {'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 0, 'name': 'requestsAddDem'}, expect = {'message': '更新维度成功'}, sql = None, sql_type = None
update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize('module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key', readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_ls\test_bpm.py:50: AssertionError
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/demension/v1/dem/updateDem put json {'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 0, 'name': 'requestsAddDem'} {'message': '更新维度成功'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/demension/v1/dem/updateDem, 用例数据:{'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 0, 'name': 'requestsAddDem'}, 期望数据:{'message': '更新维度成功'}, 服务器返回数据:{"state":true,"message":"更新维度成功！","value":"","code":200}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/demension/v1/dem/updateDem put json {'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 0, 'name': 'requestsAddDem'} {'message': '更新维度成功'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/demension/v1/dem/updateDem, 用例数据:{'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 0, 'name': 'requestsAddDem'}, 期望数据:{'message': '更新维度成功'}, 服务器返回数据:{"state":true,"message":"更新维度成功！","value":"","code":200}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/demension/v1/dem/updateDem put json {'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 0, 'name': 'requestsAddDem'} {'message': '更新维度成功'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/demension/v1/dem/updateDem, 用例数据:{'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 0, 'name': 'requestsAddDem'}, 期望数据:{'message': '更新维度成功'}, 服务器返回数据:{"state":true,"message":"更新维度成功！","value":"","code":200}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/demension/v1/dem/updateDem put json {'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 0, 'name': 'requestsAddDem'} {'message': '更新维度成功'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/demension/v1/dem/updateDem, 用例数据:{'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 0, 'name': 'requestsAddDem'}, 期望数据:{'message': '更新维度成功'}, 服务器返回数据:{"state":true,"message":"更新维度成功！","value":"","code":200}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/demension/v1/dem/updateDem put json {'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 0, 'name': 'requestsAddDem'} {'message': '更新维度成功'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/demension/v1/dem/updateDem, 用例数据:{'code': 'requestsAddDem', 'description': 'requestsAddDem', 'isDefault': 0, 'name': 'requestsAddDem'}, 期望数据:{'message': '更新维度成功'}, 服务器返回数据:{"state":true,"message":"更新维度成功！","value":"","code":200}

Rerun | test_case/test_ls/test_bpm.py::TestBpm::test_bpm[组织管理-添加组织-正向用例-高-http://36.139.193.99:8088/api/org/v1/org/addOrg-POST-json-case2-expect2-sql2-delete|select-demId] | 0.05 |

self = <MyApiAutoTest_v3.test_case.test_ls.test_bpm.TestBpm object at 0x000001860FD16240>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186102AE5A0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x000001860F9BF110>
module = '组织管理', api = '添加组织', title = '正向用例', level = '高', url = 'http://36.139.193.99:8088/api/org/v1/org/addOrg', method = 'POST', mediatype = 'json'
case = {'code': 'testAddOrg', 'demId': '1831590704632668160', 'exceedLimitNum': 0, 'grade': '', ...}, expect = {'message': '添加组织成功'}
sql = {'delete': 'delete from uc_org where CODE_="testAddOrg";', 'select': 'select ID_ from uc_demension where CODE_="requestsAddDem"; '}, sql_type = 'delete|select'
update_key = 'demId'
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize('module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key', readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E AssertionError: assert '添加组织成功' == '添加组织成功！'
E
E - 添加组织成功！
E ? -
E + 添加组织成功
test_case\test_ls\test_bpm.py:47: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_ls.test_bpm.TestBpm object at 0x000001860FD16240>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186102AE5A0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x000001860F9BF110>
module = '组织管理', api = '添加组织', title = '正向用例', level = '高', url = 'http://36.139.193.99:8088/api/org/v1/org/addOrg', method = 'POST', mediatype = 'json'
case = {'code': 'testAddOrg', 'demId': '1831590704632668160', 'exceedLimitNum': 0, 'grade': '', ...}, expect = {'message': '添加组织成功'}
sql = {'delete': 'delete from uc_org where CODE_="testAddOrg";', 'select': 'select ID_ from uc_demension where CODE_="requestsAddDem"; '}, sql_type = 'delete|select'
update_key = 'demId'
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize('module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key', readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_ls\test_bpm.py:50: AssertionError
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/org/v1/org/addOrg POST json {'code': 'testAddOrg', 'demId': '需要更新', 'exceedLimitNum': 0, 'grade': '', 'limitNum': 0, 'name': '测试添加的组织', 'nowNum': 0, 'orderNo': 0, 'parentId': '0'} {'message': '添加组织成功'} {'select': 'select ID_ from uc_demension where CODE_="requestsAddDem"; ', 'delete': 'delete from uc_org where CODE_="testAddOrg";'} delete|select demId
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/org/v1/org/addOrg, 用例数据:{'code': 'testAddOrg', 'demId': '1831590704632668160', 'exceedLimitNum': 0, 'grade': '', 'limitNum': 0, 'name': '测试添加的组织', 'nowNum': 0, 'orderNo': 0, 'parentId': '0'}, 期望数据:{'message': '添加组织成功'}, 服务器返回数据:{"state":true,"message":"添加组织成功！","value":"","code":200}

Rerun | test_case/test_ls/test_bpm.py::TestBpm::test_bpm[组织管理-添加组织-正向用例-高-http://36.139.193.99:8088/api/org/v1/org/addOrg-POST-json-case2-expect2-sql2-delete|select-demId] | 0.04 |

self = <MyApiAutoTest_v3.test_case.test_ls.test_bpm.TestBpm object at 0x000001860FD16240>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186102AE5A0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x000001860F9BF110>
module = '组织管理', api = '添加组织', title = '正向用例', level = '高', url = 'http://36.139.193.99:8088/api/org/v1/org/addOrg', method = 'POST', mediatype = 'json'
case = {'code': 'testAddOrg', 'demId': '1831590704632668160', 'exceedLimitNum': 0, 'grade': '', ...}, expect = {'message': '添加组织成功'}
sql = {'delete': 'delete from uc_org where CODE_="testAddOrg";', 'select': 'select ID_ from uc_demension where CODE_="requestsAddDem"; '}, sql_type = 'delete|select'
update_key = 'demId'
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize('module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key', readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E AssertionError: assert '添加组织成功' == '添加组织成功！'
E
E - 添加组织成功！
E ? -
E + 添加组织成功
test_case\test_ls\test_bpm.py:47: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_ls.test_bpm.TestBpm object at 0x000001860FD16240>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186102AE5A0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x000001860F9BF110>
module = '组织管理', api = '添加组织', title = '正向用例', level = '高', url = 'http://36.139.193.99:8088/api/org/v1/org/addOrg', method = 'POST', mediatype = 'json'
case = {'code': 'testAddOrg', 'demId': '1831590704632668160', 'exceedLimitNum': 0, 'grade': '', ...}, expect = {'message': '添加组织成功'}
sql = {'delete': 'delete from uc_org where CODE_="testAddOrg";', 'select': 'select ID_ from uc_demension where CODE_="requestsAddDem"; '}, sql_type = 'delete|select'
update_key = 'demId'
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize('module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key', readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_ls\test_bpm.py:50: AssertionError
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/org/v1/org/addOrg POST json {'code': 'testAddOrg', 'demId': '需要更新', 'exceedLimitNum': 0, 'grade': '', 'limitNum': 0, 'name': '测试添加的组织', 'nowNum': 0, 'orderNo': 0, 'parentId': '0'} {'message': '添加组织成功'} {'select': 'select ID_ from uc_demension where CODE_="requestsAddDem"; ', 'delete': 'delete from uc_org where CODE_="testAddOrg";'} delete|select demId
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/org/v1/org/addOrg, 用例数据:{'code': 'testAddOrg', 'demId': '1831590704632668160', 'exceedLimitNum': 0, 'grade': '', 'limitNum': 0, 'name': '测试添加的组织', 'nowNum': 0, 'orderNo': 0, 'parentId': '0'}, 期望数据:{'message': '添加组织成功'}, 服务器返回数据:{"state":true,"message":"添加组织成功！","value":"","code":200}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/org/v1/org/addOrg POST json {'code': 'testAddOrg', 'demId': '1831590704632668160', 'exceedLimitNum': 0, 'grade': '', 'limitNum': 0, 'name': '测试添加的组织', 'nowNum': 0, 'orderNo': 0, 'parentId': '0'} {'message': '添加组织成功'} {'select': 'select ID_ from uc_demension where CODE_="requestsAddDem"; ', 'delete': 'delete from uc_org where CODE_="testAddOrg";'} delete|select demId
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/org/v1/org/addOrg, 用例数据:{'code': 'testAddOrg', 'demId': '1831590704632668160', 'exceedLimitNum': 0, 'grade': '', 'limitNum': 0, 'name': '测试添加的组织', 'nowNum': 0, 'orderNo': 0, 'parentId': '0'}, 期望数据:{'message': '添加组织成功'}, 服务器返回数据:{"state":true,"message":"添加组织成功！","value":"","code":200}

Rerun | test_case/test_ls/test_bpm.py::TestBpm::test_bpm[组织管理-添加组织-正向用例-高-http://36.139.193.99:8088/api/org/v1/org/addOrg-POST-json-case2-expect2-sql2-delete|select-demId] | 0.05 |

self = <MyApiAutoTest_v3.test_case.test_ls.test_bpm.TestBpm object at 0x000001860FD16240>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186102AE5A0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x000001860F9BF110>
module = '组织管理', api = '添加组织', title = '正向用例', level = '高', url = 'http://36.139.193.99:8088/api/org/v1/org/addOrg', method = 'POST', mediatype = 'json'
case = {'code': 'testAddOrg', 'demId': '1831590704632668160', 'exceedLimitNum': 0, 'grade': '', ...}, expect = {'message': '添加组织成功'}
sql = {'delete': 'delete from uc_org where CODE_="testAddOrg";', 'select': 'select ID_ from uc_demension where CODE_="requestsAddDem"; '}, sql_type = 'delete|select'
update_key = 'demId'
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize('module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key', readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E AssertionError: assert '添加组织成功' == '添加组织成功！'
E
E - 添加组织成功！
E ? -
E + 添加组织成功
test_case\test_ls\test_bpm.py:47: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_ls.test_bpm.TestBpm object at 0x000001860FD16240>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186102AE5A0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x000001860F9BF110>
module = '组织管理', api = '添加组织', title = '正向用例', level = '高', url = 'http://36.139.193.99:8088/api/org/v1/org/addOrg', method = 'POST', mediatype = 'json'
case = {'code': 'testAddOrg', 'demId': '1831590704632668160', 'exceedLimitNum': 0, 'grade': '', ...}, expect = {'message': '添加组织成功'}
sql = {'delete': 'delete from uc_org where CODE_="testAddOrg";', 'select': 'select ID_ from uc_demension where CODE_="requestsAddDem"; '}, sql_type = 'delete|select'
update_key = 'demId'
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize('module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key', readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_ls\test_bpm.py:50: AssertionError
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/org/v1/org/addOrg POST json {'code': 'testAddOrg', 'demId': '需要更新', 'exceedLimitNum': 0, 'grade': '', 'limitNum': 0, 'name': '测试添加的组织', 'nowNum': 0, 'orderNo': 0, 'parentId': '0'} {'message': '添加组织成功'} {'select': 'select ID_ from uc_demension where CODE_="requestsAddDem"; ', 'delete': 'delete from uc_org where CODE_="testAddOrg";'} delete|select demId
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/org/v1/org/addOrg, 用例数据:{'code': 'testAddOrg', 'demId': '1831590704632668160', 'exceedLimitNum': 0, 'grade': '', 'limitNum': 0, 'name': '测试添加的组织', 'nowNum': 0, 'orderNo': 0, 'parentId': '0'}, 期望数据:{'message': '添加组织成功'}, 服务器返回数据:{"state":true,"message":"添加组织成功！","value":"","code":200}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/org/v1/org/addOrg POST json {'code': 'testAddOrg', 'demId': '1831590704632668160', 'exceedLimitNum': 0, 'grade': '', 'limitNum': 0, 'name': '测试添加的组织', 'nowNum': 0, 'orderNo': 0, 'parentId': '0'} {'message': '添加组织成功'} {'select': 'select ID_ from uc_demension where CODE_="requestsAddDem"; ', 'delete': 'delete from uc_org where CODE_="testAddOrg";'} delete|select demId
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/org/v1/org/addOrg, 用例数据:{'code': 'testAddOrg', 'demId': '1831590704632668160', 'exceedLimitNum': 0, 'grade': '', 'limitNum': 0, 'name': '测试添加的组织', 'nowNum': 0, 'orderNo': 0, 'parentId': '0'}, 期望数据:{'message': '添加组织成功'}, 服务器返回数据:{"state":true,"message":"添加组织成功！","value":"","code":200}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/org/v1/org/addOrg POST json {'code': 'testAddOrg', 'demId': '1831590704632668160', 'exceedLimitNum': 0, 'grade': '', 'limitNum': 0, 'name': '测试添加的组织', 'nowNum': 0, 'orderNo': 0, 'parentId': '0'} {'message': '添加组织成功'} {'select': 'select ID_ from uc_demension where CODE_="requestsAddDem"; ', 'delete': 'delete from uc_org where CODE_="testAddOrg";'} delete|select demId
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/org/v1/org/addOrg, 用例数据:{'code': 'testAddOrg', 'demId': '1831590704632668160', 'exceedLimitNum': 0, 'grade': '', 'limitNum': 0, 'name': '测试添加的组织', 'nowNum': 0, 'orderNo': 0, 'parentId': '0'}, 期望数据:{'message': '添加组织成功'}, 服务器返回数据:{"state":true,"message":"添加组织成功！","value":"","code":200}

Rerun | test_case/test_ls/test_bpm.py::TestBpm::test_bpm[组织管理-添加组织-正向用例-高-http://36.139.193.99:8088/api/org/v1/org/addOrg-POST-json-case2-expect2-sql2-delete|select-demId] | 0.05 |

self = <MyApiAutoTest_v3.test_case.test_ls.test_bpm.TestBpm object at 0x000001860FD16240>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186102AE5A0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x000001860F9BF110>
module = '组织管理', api = '添加组织', title = '正向用例', level = '高', url = 'http://36.139.193.99:8088/api/org/v1/org/addOrg', method = 'POST', mediatype = 'json'
case = {'code': 'testAddOrg', 'demId': '1831590704632668160', 'exceedLimitNum': 0, 'grade': '', ...}, expect = {'message': '添加组织成功'}
sql = {'delete': 'delete from uc_org where CODE_="testAddOrg";', 'select': 'select ID_ from uc_demension where CODE_="requestsAddDem"; '}, sql_type = 'delete|select'
update_key = 'demId'
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize('module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key', readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E AssertionError: assert '添加组织成功' == '添加组织成功！'
E
E - 添加组织成功！
E ? -
E + 添加组织成功
test_case\test_ls\test_bpm.py:47: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_ls.test_bpm.TestBpm object at 0x000001860FD16240>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186102AE5A0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x000001860F9BF110>
module = '组织管理', api = '添加组织', title = '正向用例', level = '高', url = 'http://36.139.193.99:8088/api/org/v1/org/addOrg', method = 'POST', mediatype = 'json'
case = {'code': 'testAddOrg', 'demId': '1831590704632668160', 'exceedLimitNum': 0, 'grade': '', ...}, expect = {'message': '添加组织成功'}
sql = {'delete': 'delete from uc_org where CODE_="testAddOrg";', 'select': 'select ID_ from uc_demension where CODE_="requestsAddDem"; '}, sql_type = 'delete|select'
update_key = 'demId'
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize('module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key', readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_ls\test_bpm.py:50: AssertionError
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/org/v1/org/addOrg POST json {'code': 'testAddOrg', 'demId': '需要更新', 'exceedLimitNum': 0, 'grade': '', 'limitNum': 0, 'name': '测试添加的组织', 'nowNum': 0, 'orderNo': 0, 'parentId': '0'} {'message': '添加组织成功'} {'select': 'select ID_ from uc_demension where CODE_="requestsAddDem"; ', 'delete': 'delete from uc_org where CODE_="testAddOrg";'} delete|select demId
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/org/v1/org/addOrg, 用例数据:{'code': 'testAddOrg', 'demId': '1831590704632668160', 'exceedLimitNum': 0, 'grade': '', 'limitNum': 0, 'name': '测试添加的组织', 'nowNum': 0, 'orderNo': 0, 'parentId': '0'}, 期望数据:{'message': '添加组织成功'}, 服务器返回数据:{"state":true,"message":"添加组织成功！","value":"","code":200}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/org/v1/org/addOrg POST json {'code': 'testAddOrg', 'demId': '1831590704632668160', 'exceedLimitNum': 0, 'grade': '', 'limitNum': 0, 'name': '测试添加的组织', 'nowNum': 0, 'orderNo': 0, 'parentId': '0'} {'message': '添加组织成功'} {'select': 'select ID_ from uc_demension where CODE_="requestsAddDem"; ', 'delete': 'delete from uc_org where CODE_="testAddOrg";'} delete|select demId
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/org/v1/org/addOrg, 用例数据:{'code': 'testAddOrg', 'demId': '1831590704632668160', 'exceedLimitNum': 0, 'grade': '', 'limitNum': 0, 'name': '测试添加的组织', 'nowNum': 0, 'orderNo': 0, 'parentId': '0'}, 期望数据:{'message': '添加组织成功'}, 服务器返回数据:{"state":true,"message":"添加组织成功！","value":"","code":200}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/org/v1/org/addOrg POST json {'code': 'testAddOrg', 'demId': '1831590704632668160', 'exceedLimitNum': 0, 'grade': '', 'limitNum': 0, 'name': '测试添加的组织', 'nowNum': 0, 'orderNo': 0, 'parentId': '0'} {'message': '添加组织成功'} {'select': 'select ID_ from uc_demension where CODE_="requestsAddDem"; ', 'delete': 'delete from uc_org where CODE_="testAddOrg";'} delete|select demId
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/org/v1/org/addOrg, 用例数据:{'code': 'testAddOrg', 'demId': '1831590704632668160', 'exceedLimitNum': 0, 'grade': '', 'limitNum': 0, 'name': '测试添加的组织', 'nowNum': 0, 'orderNo': 0, 'parentId': '0'}, 期望数据:{'message': '添加组织成功'}, 服务器返回数据:{"state":true,"message":"添加组织成功！","value":"","code":200}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/org/v1/org/addOrg POST json {'code': 'testAddOrg', 'demId': '1831590704632668160', 'exceedLimitNum': 0, 'grade': '', 'limitNum': 0, 'name': '测试添加的组织', 'nowNum': 0, 'orderNo': 0, 'parentId': '0'} {'message': '添加组织成功'} {'select': 'select ID_ from uc_demension where CODE_="requestsAddDem"; ', 'delete': 'delete from uc_org where CODE_="testAddOrg";'} delete|select demId
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/org/v1/org/addOrg, 用例数据:{'code': 'testAddOrg', 'demId': '1831590704632668160', 'exceedLimitNum': 0, 'grade': '', 'limitNum': 0, 'name': '测试添加的组织', 'nowNum': 0, 'orderNo': 0, 'parentId': '0'}, 期望数据:{'message': '添加组织成功'}, 服务器返回数据:{"state":true,"message":"添加组织成功！","value":"","code":200}

Rerun | test_case/test_ls/test_bpm.py::TestBpm::test_bpm[组织管理-添加组织-正向用例-高-http://36.139.193.99:8088/api/org/v1/org/addOrg-POST-json-case2-expect2-sql2-delete|select-demId] | 0.07 |

self = <MyApiAutoTest_v3.test_case.test_ls.test_bpm.TestBpm object at 0x000001860FD16240>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186102AE5A0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x000001860F9BF110>
module = '组织管理', api = '添加组织', title = '正向用例', level = '高', url = 'http://36.139.193.99:8088/api/org/v1/org/addOrg', method = 'POST', mediatype = 'json'
case = {'code': 'testAddOrg', 'demId': '1831590704632668160', 'exceedLimitNum': 0, 'grade': '', ...}, expect = {'message': '添加组织成功'}
sql = {'delete': 'delete from uc_org where CODE_="testAddOrg";', 'select': 'select ID_ from uc_demension where CODE_="requestsAddDem"; '}, sql_type = 'delete|select'
update_key = 'demId'
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize('module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key', readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E AssertionError: assert '添加组织成功' == '添加组织成功！'
E
E - 添加组织成功！
E ? -
E + 添加组织成功
test_case\test_ls\test_bpm.py:47: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_ls.test_bpm.TestBpm object at 0x000001860FD16240>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186102AE5A0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x000001860F9BF110>
module = '组织管理', api = '添加组织', title = '正向用例', level = '高', url = 'http://36.139.193.99:8088/api/org/v1/org/addOrg', method = 'POST', mediatype = 'json'
case = {'code': 'testAddOrg', 'demId': '1831590704632668160', 'exceedLimitNum': 0, 'grade': '', ...}, expect = {'message': '添加组织成功'}
sql = {'delete': 'delete from uc_org where CODE_="testAddOrg";', 'select': 'select ID_ from uc_demension where CODE_="requestsAddDem"; '}, sql_type = 'delete|select'
update_key = 'demId'
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize('module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key', readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_ls\test_bpm.py:50: AssertionError
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/org/v1/org/addOrg POST json {'code': 'testAddOrg', 'demId': '需要更新', 'exceedLimitNum': 0, 'grade': '', 'limitNum': 0, 'name': '测试添加的组织', 'nowNum': 0, 'orderNo': 0, 'parentId': '0'} {'message': '添加组织成功'} {'select': 'select ID_ from uc_demension where CODE_="requestsAddDem"; ', 'delete': 'delete from uc_org where CODE_="testAddOrg";'} delete|select demId
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/org/v1/org/addOrg, 用例数据:{'code': 'testAddOrg', 'demId': '1831590704632668160', 'exceedLimitNum': 0, 'grade': '', 'limitNum': 0, 'name': '测试添加的组织', 'nowNum': 0, 'orderNo': 0, 'parentId': '0'}, 期望数据:{'message': '添加组织成功'}, 服务器返回数据:{"state":true,"message":"添加组织成功！","value":"","code":200}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/org/v1/org/addOrg POST json {'code': 'testAddOrg', 'demId': '1831590704632668160', 'exceedLimitNum': 0, 'grade': '', 'limitNum': 0, 'name': '测试添加的组织', 'nowNum': 0, 'orderNo': 0, 'parentId': '0'} {'message': '添加组织成功'} {'select': 'select ID_ from uc_demension where CODE_="requestsAddDem"; ', 'delete': 'delete from uc_org where CODE_="testAddOrg";'} delete|select demId
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/org/v1/org/addOrg, 用例数据:{'code': 'testAddOrg', 'demId': '1831590704632668160', 'exceedLimitNum': 0, 'grade': '', 'limitNum': 0, 'name': '测试添加的组织', 'nowNum': 0, 'orderNo': 0, 'parentId': '0'}, 期望数据:{'message': '添加组织成功'}, 服务器返回数据:{"state":true,"message":"添加组织成功！","value":"","code":200}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/org/v1/org/addOrg POST json {'code': 'testAddOrg', 'demId': '1831590704632668160', 'exceedLimitNum': 0, 'grade': '', 'limitNum': 0, 'name': '测试添加的组织', 'nowNum': 0, 'orderNo': 0, 'parentId': '0'} {'message': '添加组织成功'} {'select': 'select ID_ from uc_demension where CODE_="requestsAddDem"; ', 'delete': 'delete from uc_org where CODE_="testAddOrg";'} delete|select demId
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/org/v1/org/addOrg, 用例数据:{'code': 'testAddOrg', 'demId': '1831590704632668160', 'exceedLimitNum': 0, 'grade': '', 'limitNum': 0, 'name': '测试添加的组织', 'nowNum': 0, 'orderNo': 0, 'parentId': '0'}, 期望数据:{'message': '添加组织成功'}, 服务器返回数据:{"state":true,"message":"添加组织成功！","value":"","code":200}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/org/v1/org/addOrg POST json {'code': 'testAddOrg', 'demId': '1831590704632668160', 'exceedLimitNum': 0, 'grade': '', 'limitNum': 0, 'name': '测试添加的组织', 'nowNum': 0, 'orderNo': 0, 'parentId': '0'} {'message': '添加组织成功'} {'select': 'select ID_ from uc_demension where CODE_="requestsAddDem"; ', 'delete': 'delete from uc_org where CODE_="testAddOrg";'} delete|select demId
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/org/v1/org/addOrg, 用例数据:{'code': 'testAddOrg', 'demId': '1831590704632668160', 'exceedLimitNum': 0, 'grade': '', 'limitNum': 0, 'name': '测试添加的组织', 'nowNum': 0, 'orderNo': 0, 'parentId': '0'}, 期望数据:{'message': '添加组织成功'}, 服务器返回数据:{"state":true,"message":"添加组织成功！","value":"","code":200}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/org/v1/org/addOrg POST json {'code': 'testAddOrg', 'demId': '1831590704632668160', 'exceedLimitNum': 0, 'grade': '', 'limitNum': 0, 'name': '测试添加的组织', 'nowNum': 0, 'orderNo': 0, 'parentId': '0'} {'message': '添加组织成功'} {'select': 'select ID_ from uc_demension where CODE_="requestsAddDem"; ', 'delete': 'delete from uc_org where CODE_="testAddOrg";'} delete|select demId
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/org/v1/org/addOrg, 用例数据:{'code': 'testAddOrg', 'demId': '1831590704632668160', 'exceedLimitNum': 0, 'grade': '', 'limitNum': 0, 'name': '测试添加的组织', 'nowNum': 0, 'orderNo': 0, 'parentId': '0'}, 期望数据:{'message': '添加组织成功'}, 服务器返回数据:{"state":true,"message":"添加组织成功！","value":"","code":200}

Rerun | test_case/test_ls/test_bpm.py::TestBpm::test_bpm[组织管理-删除组织-正向用例-中-http://36.139.193.99:8088/api/org/v1/org/deleteOrg-POST-json-testAddOrg-expect5-None-None-None] | 0.01 |

self = <MyApiAutoTest_v3.test_case.test_ls.test_bpm.TestBpm object at 0x000001860FD07560>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186102AE5A0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x000001860F9BF110>
module = '组织管理', api = '删除组织', title = '正向用例', level = '中', url = 'http://36.139.193.99:8088/api/org/v1/org/deleteOrg', method = 'POST', mediatype = 'json', case = 'testAddOrg'
expect = {'message': '删除组织成功！'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize('module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key', readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E assert '删除组织成功！' == '部分删除成功，其中编码为【"testAddOrg"】的组织不存在；'
E
E - 部分删除成功，其中编码为【"testAddOrg"】的组织不存在；
E + 删除组织成功！
test_case\test_ls\test_bpm.py:47: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_ls.test_bpm.TestBpm object at 0x000001860FD07560>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186102AE5A0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x000001860F9BF110>
module = '组织管理', api = '删除组织', title = '正向用例', level = '中', url = 'http://36.139.193.99:8088/api/org/v1/org/deleteOrg', method = 'POST', mediatype = 'json', case = 'testAddOrg'
expect = {'message': '删除组织成功！'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize('module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key', readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_ls\test_bpm.py:50: AssertionError
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/org/v1/org/deleteOrg POST json testAddOrg {'message': '删除组织成功！'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/org/v1/org/deleteOrg, 用例数据:testAddOrg, 期望数据:{'message': '删除组织成功！'}, 服务器返回数据:{"state":true,"message":"部分删除成功，其中编码为【\"testAddOrg\"】的组织不存在；","value":"","code":200}

Rerun | test_case/test_ls/test_bpm.py::TestBpm::test_bpm[组织管理-删除组织-正向用例-中-http://36.139.193.99:8088/api/org/v1/org/deleteOrg-POST-json-testAddOrg-expect5-None-None-None] | 0.01 |

self = <MyApiAutoTest_v3.test_case.test_ls.test_bpm.TestBpm object at 0x000001860FD07560>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186102AE5A0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x000001860F9BF110>
module = '组织管理', api = '删除组织', title = '正向用例', level = '中', url = 'http://36.139.193.99:8088/api/org/v1/org/deleteOrg', method = 'POST', mediatype = 'json', case = 'testAddOrg'
expect = {'message': '删除组织成功！'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize('module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key', readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E assert '删除组织成功！' == '部分删除成功，其中编码为【"testAddOrg"】的组织不存在；'
E
E - 部分删除成功，其中编码为【"testAddOrg"】的组织不存在；
E + 删除组织成功！
test_case\test_ls\test_bpm.py:47: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_ls.test_bpm.TestBpm object at 0x000001860FD07560>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186102AE5A0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x000001860F9BF110>
module = '组织管理', api = '删除组织', title = '正向用例', level = '中', url = 'http://36.139.193.99:8088/api/org/v1/org/deleteOrg', method = 'POST', mediatype = 'json', case = 'testAddOrg'
expect = {'message': '删除组织成功！'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize('module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key', readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_ls\test_bpm.py:50: AssertionError
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/org/v1/org/deleteOrg POST json testAddOrg {'message': '删除组织成功！'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/org/v1/org/deleteOrg, 用例数据:testAddOrg, 期望数据:{'message': '删除组织成功！'}, 服务器返回数据:{"state":true,"message":"部分删除成功，其中编码为【\"testAddOrg\"】的组织不存在；","value":"","code":200}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/org/v1/org/deleteOrg POST json testAddOrg {'message': '删除组织成功！'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/org/v1/org/deleteOrg, 用例数据:testAddOrg, 期望数据:{'message': '删除组织成功！'}, 服务器返回数据:{"state":true,"message":"部分删除成功，其中编码为【\"testAddOrg\"】的组织不存在；","value":"","code":200}

Rerun | test_case/test_ls/test_bpm.py::TestBpm::test_bpm[组织管理-删除组织-正向用例-中-http://36.139.193.99:8088/api/org/v1/org/deleteOrg-POST-json-testAddOrg-expect5-None-None-None] | 0.01 |

self = <MyApiAutoTest_v3.test_case.test_ls.test_bpm.TestBpm object at 0x000001860FD07560>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186102AE5A0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x000001860F9BF110>
module = '组织管理', api = '删除组织', title = '正向用例', level = '中', url = 'http://36.139.193.99:8088/api/org/v1/org/deleteOrg', method = 'POST', mediatype = 'json', case = 'testAddOrg'
expect = {'message': '删除组织成功！'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize('module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key', readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E assert '删除组织成功！' == '部分删除成功，其中编码为【"testAddOrg"】的组织不存在；'
E
E - 部分删除成功，其中编码为【"testAddOrg"】的组织不存在；
E + 删除组织成功！
test_case\test_ls\test_bpm.py:47: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_ls.test_bpm.TestBpm object at 0x000001860FD07560>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186102AE5A0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x000001860F9BF110>
module = '组织管理', api = '删除组织', title = '正向用例', level = '中', url = 'http://36.139.193.99:8088/api/org/v1/org/deleteOrg', method = 'POST', mediatype = 'json', case = 'testAddOrg'
expect = {'message': '删除组织成功！'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize('module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key', readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_ls\test_bpm.py:50: AssertionError
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/org/v1/org/deleteOrg POST json testAddOrg {'message': '删除组织成功！'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/org/v1/org/deleteOrg, 用例数据:testAddOrg, 期望数据:{'message': '删除组织成功！'}, 服务器返回数据:{"state":true,"message":"部分删除成功，其中编码为【\"testAddOrg\"】的组织不存在；","value":"","code":200}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/org/v1/org/deleteOrg POST json testAddOrg {'message': '删除组织成功！'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/org/v1/org/deleteOrg, 用例数据:testAddOrg, 期望数据:{'message': '删除组织成功！'}, 服务器返回数据:{"state":true,"message":"部分删除成功，其中编码为【\"testAddOrg\"】的组织不存在；","value":"","code":200}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/org/v1/org/deleteOrg POST json testAddOrg {'message': '删除组织成功！'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/org/v1/org/deleteOrg, 用例数据:testAddOrg, 期望数据:{'message': '删除组织成功！'}, 服务器返回数据:{"state":true,"message":"部分删除成功，其中编码为【\"testAddOrg\"】的组织不存在；","value":"","code":200}

Rerun | test_case/test_ls/test_bpm.py::TestBpm::test_bpm[组织管理-删除组织-正向用例-中-http://36.139.193.99:8088/api/org/v1/org/deleteOrg-POST-json-testAddOrg-expect5-None-None-None] | 0.01 |

self = <MyApiAutoTest_v3.test_case.test_ls.test_bpm.TestBpm object at 0x000001860FD07560>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186102AE5A0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x000001860F9BF110>
module = '组织管理', api = '删除组织', title = '正向用例', level = '中', url = 'http://36.139.193.99:8088/api/org/v1/org/deleteOrg', method = 'POST', mediatype = 'json', case = 'testAddOrg'
expect = {'message': '删除组织成功！'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize('module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key', readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E assert '删除组织成功！' == '部分删除成功，其中编码为【"testAddOrg"】的组织不存在；'
E
E - 部分删除成功，其中编码为【"testAddOrg"】的组织不存在；
E + 删除组织成功！
test_case\test_ls\test_bpm.py:47: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_ls.test_bpm.TestBpm object at 0x000001860FD07560>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186102AE5A0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x000001860F9BF110>
module = '组织管理', api = '删除组织', title = '正向用例', level = '中', url = 'http://36.139.193.99:8088/api/org/v1/org/deleteOrg', method = 'POST', mediatype = 'json', case = 'testAddOrg'
expect = {'message': '删除组织成功！'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize('module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key', readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_ls\test_bpm.py:50: AssertionError
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/org/v1/org/deleteOrg POST json testAddOrg {'message': '删除组织成功！'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/org/v1/org/deleteOrg, 用例数据:testAddOrg, 期望数据:{'message': '删除组织成功！'}, 服务器返回数据:{"state":true,"message":"部分删除成功，其中编码为【\"testAddOrg\"】的组织不存在；","value":"","code":200}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/org/v1/org/deleteOrg POST json testAddOrg {'message': '删除组织成功！'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/org/v1/org/deleteOrg, 用例数据:testAddOrg, 期望数据:{'message': '删除组织成功！'}, 服务器返回数据:{"state":true,"message":"部分删除成功，其中编码为【\"testAddOrg\"】的组织不存在；","value":"","code":200}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/org/v1/org/deleteOrg POST json testAddOrg {'message': '删除组织成功！'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/org/v1/org/deleteOrg, 用例数据:testAddOrg, 期望数据:{'message': '删除组织成功！'}, 服务器返回数据:{"state":true,"message":"部分删除成功，其中编码为【\"testAddOrg\"】的组织不存在；","value":"","code":200}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/org/v1/org/deleteOrg POST json testAddOrg {'message': '删除组织成功！'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/org/v1/org/deleteOrg, 用例数据:testAddOrg, 期望数据:{'message': '删除组织成功！'}, 服务器返回数据:{"state":true,"message":"部分删除成功，其中编码为【\"testAddOrg\"】的组织不存在；","value":"","code":200}

Rerun | test_case/test_ls/test_bpm.py::TestBpm::test_bpm[组织管理-删除组织-正向用例-中-http://36.139.193.99:8088/api/org/v1/org/deleteOrg-POST-json-testAddOrg-expect5-None-None-None] | 0.01 |

self = <MyApiAutoTest_v3.test_case.test_ls.test_bpm.TestBpm object at 0x000001860FD07560>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186102AE5A0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x000001860F9BF110>
module = '组织管理', api = '删除组织', title = '正向用例', level = '中', url = 'http://36.139.193.99:8088/api/org/v1/org/deleteOrg', method = 'POST', mediatype = 'json', case = 'testAddOrg'
expect = {'message': '删除组织成功！'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize('module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key', readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E assert '删除组织成功！' == '部分删除成功，其中编码为【"testAddOrg"】的组织不存在；'
E
E - 部分删除成功，其中编码为【"testAddOrg"】的组织不存在；
E + 删除组织成功！
test_case\test_ls\test_bpm.py:47: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_ls.test_bpm.TestBpm object at 0x000001860FD07560>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186102AE5A0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x000001860F9BF110>
module = '组织管理', api = '删除组织', title = '正向用例', level = '中', url = 'http://36.139.193.99:8088/api/org/v1/org/deleteOrg', method = 'POST', mediatype = 'json', case = 'testAddOrg'
expect = {'message': '删除组织成功！'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize('module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key', readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_ls\test_bpm.py:50: AssertionError
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/org/v1/org/deleteOrg POST json testAddOrg {'message': '删除组织成功！'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/org/v1/org/deleteOrg, 用例数据:testAddOrg, 期望数据:{'message': '删除组织成功！'}, 服务器返回数据:{"state":true,"message":"部分删除成功，其中编码为【\"testAddOrg\"】的组织不存在；","value":"","code":200}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/org/v1/org/deleteOrg POST json testAddOrg {'message': '删除组织成功！'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/org/v1/org/deleteOrg, 用例数据:testAddOrg, 期望数据:{'message': '删除组织成功！'}, 服务器返回数据:{"state":true,"message":"部分删除成功，其中编码为【\"testAddOrg\"】的组织不存在；","value":"","code":200}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/org/v1/org/deleteOrg POST json testAddOrg {'message': '删除组织成功！'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/org/v1/org/deleteOrg, 用例数据:testAddOrg, 期望数据:{'message': '删除组织成功！'}, 服务器返回数据:{"state":true,"message":"部分删除成功，其中编码为【\"testAddOrg\"】的组织不存在；","value":"","code":200}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/org/v1/org/deleteOrg POST json testAddOrg {'message': '删除组织成功！'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/org/v1/org/deleteOrg, 用例数据:testAddOrg, 期望数据:{'message': '删除组织成功！'}, 服务器返回数据:{"state":true,"message":"部分删除成功，其中编码为【\"testAddOrg\"】的组织不存在；","value":"","code":200}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/org/v1/org/deleteOrg POST json testAddOrg {'message': '删除组织成功！'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/org/v1/org/deleteOrg, 用例数据:testAddOrg, 期望数据:{'message': '删除组织成功！'}, 服务器返回数据:{"state":true,"message":"部分删除成功，其中编码为【\"testAddOrg\"】的组织不存在；","value":"","code":200}

Rerun | test_case/test_ls/test_bpm.py::TestBpm::test_bpm[维度管理-根据维度编码删除维度-正向用例-中-http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds-delete-query-case6-expect6-sql6-select-ids] | 0.01 |

self = <MyApiAutoTest_v3.test_case.test_ls.test_bpm.TestBpm object at 0x0000018610146C60>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186102AE5A0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x000001860F9BF110>
module = '维度管理', api = '根据维度编码删除维度', title = '正向用例', level = '中', url = 'http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds', method = 'delete', mediatype = 'query'
case = {'ids': '1831590704632668160'}, expect = {'message': '删除维度成功！'}, sql = {'select': 'select ID_ from uc_demension where CODE_="requestsAddDem";'}, sql_type = 'select'
update_key = 'ids'
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize('module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key', readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E AssertionError: assert '删除维度成功！' == '【requestsAddDem(requestsAddDem)】的维度下存在组织，不允许删除 '
E
E - 【requestsAddDem(requestsAddDem)】的维度下存在组织，不允许删除
E + 删除维度成功！
test_case\test_ls\test_bpm.py:47: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_ls.test_bpm.TestBpm object at 0x0000018610146C60>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186102AE5A0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x000001860F9BF110>
module = '维度管理', api = '根据维度编码删除维度', title = '正向用例', level = '中', url = 'http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds', method = 'delete', mediatype = 'query'
case = {'ids': '1831590704632668160'}, expect = {'message': '删除维度成功！'}, sql = {'select': 'select ID_ from uc_demension where CODE_="requestsAddDem";'}, sql_type = 'select'
update_key = 'ids'
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize('module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key', readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_ls\test_bpm.py:50: AssertionError
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds delete query {'ids': '需要更新'} {'message': '删除维度成功！'} {'select': 'select ID_ from uc_demension where CODE_="requestsAddDem";'} select ids
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds, 用例数据:{'ids': '1831590704632668160'}, 期望数据:{'message': '删除维度成功！'}, 服务器返回数据:{"state":false,"message":"【requestsAddDem(requestsAddDem)】的维度下存在组织，不允许删除 ","value":"","code":200}

Rerun | test_case/test_ls/test_bpm.py::TestBpm::test_bpm[维度管理-根据维度编码删除维度-正向用例-中-http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds-delete-query-case6-expect6-sql6-select-ids] | 0.02 |

self = <MyApiAutoTest_v3.test_case.test_ls.test_bpm.TestBpm object at 0x0000018610146C60>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186102AE5A0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x000001860F9BF110>
module = '维度管理', api = '根据维度编码删除维度', title = '正向用例', level = '中', url = 'http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds', method = 'delete', mediatype = 'query'
case = {'ids': '1831590704632668160'}, expect = {'message': '删除维度成功！'}, sql = {'select': 'select ID_ from uc_demension where CODE_="requestsAddDem";'}, sql_type = 'select'
update_key = 'ids'
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize('module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key', readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E AssertionError: assert '删除维度成功！' == '【requestsAddDem(requestsAddDem)】的维度下存在组织，不允许删除 '
E
E - 【requestsAddDem(requestsAddDem)】的维度下存在组织，不允许删除
E + 删除维度成功！
test_case\test_ls\test_bpm.py:47: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_ls.test_bpm.TestBpm object at 0x0000018610146C60>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186102AE5A0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x000001860F9BF110>
module = '维度管理', api = '根据维度编码删除维度', title = '正向用例', level = '中', url = 'http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds', method = 'delete', mediatype = 'query'
case = {'ids': '1831590704632668160'}, expect = {'message': '删除维度成功！'}, sql = {'select': 'select ID_ from uc_demension where CODE_="requestsAddDem";'}, sql_type = 'select'
update_key = 'ids'
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize('module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key', readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_ls\test_bpm.py:50: AssertionError
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds delete query {'ids': '需要更新'} {'message': '删除维度成功！'} {'select': 'select ID_ from uc_demension where CODE_="requestsAddDem";'} select ids
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds, 用例数据:{'ids': '1831590704632668160'}, 期望数据:{'message': '删除维度成功！'}, 服务器返回数据:{"state":false,"message":"【requestsAddDem(requestsAddDem)】的维度下存在组织，不允许删除 ","value":"","code":200}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds delete query {'ids': '1831590704632668160'} {'message': '删除维度成功！'} {'select': 'select ID_ from uc_demension where CODE_="requestsAddDem";'} select ids
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds, 用例数据:{'ids': '1831590704632668160'}, 期望数据:{'message': '删除维度成功！'}, 服务器返回数据:{"state":false,"message":"【requestsAddDem(requestsAddDem)】的维度下存在组织，不允许删除 ","value":"","code":200}

Rerun | test_case/test_ls/test_bpm.py::TestBpm::test_bpm[维度管理-根据维度编码删除维度-正向用例-中-http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds-delete-query-case6-expect6-sql6-select-ids] | 0.02 |

self = <MyApiAutoTest_v3.test_case.test_ls.test_bpm.TestBpm object at 0x0000018610146C60>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186102AE5A0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x000001860F9BF110>
module = '维度管理', api = '根据维度编码删除维度', title = '正向用例', level = '中', url = 'http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds', method = 'delete', mediatype = 'query'
case = {'ids': '1831590704632668160'}, expect = {'message': '删除维度成功！'}, sql = {'select': 'select ID_ from uc_demension where CODE_="requestsAddDem";'}, sql_type = 'select'
update_key = 'ids'
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize('module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key', readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E AssertionError: assert '删除维度成功！' == '【requestsAddDem(requestsAddDem)】的维度下存在组织，不允许删除 '
E
E - 【requestsAddDem(requestsAddDem)】的维度下存在组织，不允许删除
E + 删除维度成功！
test_case\test_ls\test_bpm.py:47: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_ls.test_bpm.TestBpm object at 0x0000018610146C60>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186102AE5A0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x000001860F9BF110>
module = '维度管理', api = '根据维度编码删除维度', title = '正向用例', level = '中', url = 'http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds', method = 'delete', mediatype = 'query'
case = {'ids': '1831590704632668160'}, expect = {'message': '删除维度成功！'}, sql = {'select': 'select ID_ from uc_demension where CODE_="requestsAddDem";'}, sql_type = 'select'
update_key = 'ids'
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize('module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key', readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_ls\test_bpm.py:50: AssertionError
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds delete query {'ids': '需要更新'} {'message': '删除维度成功！'} {'select': 'select ID_ from uc_demension where CODE_="requestsAddDem";'} select ids
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds, 用例数据:{'ids': '1831590704632668160'}, 期望数据:{'message': '删除维度成功！'}, 服务器返回数据:{"state":false,"message":"【requestsAddDem(requestsAddDem)】的维度下存在组织，不允许删除 ","value":"","code":200}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds delete query {'ids': '1831590704632668160'} {'message': '删除维度成功！'} {'select': 'select ID_ from uc_demension where CODE_="requestsAddDem";'} select ids
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds, 用例数据:{'ids': '1831590704632668160'}, 期望数据:{'message': '删除维度成功！'}, 服务器返回数据:{"state":false,"message":"【requestsAddDem(requestsAddDem)】的维度下存在组织，不允许删除 ","value":"","code":200}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds delete query {'ids': '1831590704632668160'} {'message': '删除维度成功！'} {'select': 'select ID_ from uc_demension where CODE_="requestsAddDem";'} select ids
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds, 用例数据:{'ids': '1831590704632668160'}, 期望数据:{'message': '删除维度成功！'}, 服务器返回数据:{"state":false,"message":"【requestsAddDem(requestsAddDem)】的维度下存在组织，不允许删除 ","value":"","code":200}

Rerun | test_case/test_ls/test_bpm.py::TestBpm::test_bpm[维度管理-根据维度编码删除维度-正向用例-中-http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds-delete-query-case6-expect6-sql6-select-ids] | 0.02 |

self = <MyApiAutoTest_v3.test_case.test_ls.test_bpm.TestBpm object at 0x0000018610146C60>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186102AE5A0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x000001860F9BF110>
module = '维度管理', api = '根据维度编码删除维度', title = '正向用例', level = '中', url = 'http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds', method = 'delete', mediatype = 'query'
case = {'ids': '1831590704632668160'}, expect = {'message': '删除维度成功！'}, sql = {'select': 'select ID_ from uc_demension where CODE_="requestsAddDem";'}, sql_type = 'select'
update_key = 'ids'
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize('module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key', readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E AssertionError: assert '删除维度成功！' == '【requestsAddDem(requestsAddDem)】的维度下存在组织，不允许删除 '
E
E - 【requestsAddDem(requestsAddDem)】的维度下存在组织，不允许删除
E + 删除维度成功！
test_case\test_ls\test_bpm.py:47: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_ls.test_bpm.TestBpm object at 0x0000018610146C60>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186102AE5A0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x000001860F9BF110>
module = '维度管理', api = '根据维度编码删除维度', title = '正向用例', level = '中', url = 'http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds', method = 'delete', mediatype = 'query'
case = {'ids': '1831590704632668160'}, expect = {'message': '删除维度成功！'}, sql = {'select': 'select ID_ from uc_demension where CODE_="requestsAddDem";'}, sql_type = 'select'
update_key = 'ids'
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize('module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key', readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_ls\test_bpm.py:50: AssertionError
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds delete query {'ids': '需要更新'} {'message': '删除维度成功！'} {'select': 'select ID_ from uc_demension where CODE_="requestsAddDem";'} select ids
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds, 用例数据:{'ids': '1831590704632668160'}, 期望数据:{'message': '删除维度成功！'}, 服务器返回数据:{"state":false,"message":"【requestsAddDem(requestsAddDem)】的维度下存在组织，不允许删除 ","value":"","code":200}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds delete query {'ids': '1831590704632668160'} {'message': '删除维度成功！'} {'select': 'select ID_ from uc_demension where CODE_="requestsAddDem";'} select ids
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds, 用例数据:{'ids': '1831590704632668160'}, 期望数据:{'message': '删除维度成功！'}, 服务器返回数据:{"state":false,"message":"【requestsAddDem(requestsAddDem)】的维度下存在组织，不允许删除 ","value":"","code":200}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds delete query {'ids': '1831590704632668160'} {'message': '删除维度成功！'} {'select': 'select ID_ from uc_demension where CODE_="requestsAddDem";'} select ids
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds, 用例数据:{'ids': '1831590704632668160'}, 期望数据:{'message': '删除维度成功！'}, 服务器返回数据:{"state":false,"message":"【requestsAddDem(requestsAddDem)】的维度下存在组织，不允许删除 ","value":"","code":200}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds delete query {'ids': '1831590704632668160'} {'message': '删除维度成功！'} {'select': 'select ID_ from uc_demension where CODE_="requestsAddDem";'} select ids
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds, 用例数据:{'ids': '1831590704632668160'}, 期望数据:{'message': '删除维度成功！'}, 服务器返回数据:{"state":false,"message":"【requestsAddDem(requestsAddDem)】的维度下存在组织，不允许删除 ","value":"","code":200}

Rerun | test_case/test_ls/test_bpm.py::TestBpm::test_bpm[维度管理-根据维度编码删除维度-正向用例-中-http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds-delete-query-case6-expect6-sql6-select-ids] | 0.02 |

self = <MyApiAutoTest_v3.test_case.test_ls.test_bpm.TestBpm object at 0x0000018610146C60>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186102AE5A0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x000001860F9BF110>
module = '维度管理', api = '根据维度编码删除维度', title = '正向用例', level = '中', url = 'http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds', method = 'delete', mediatype = 'query'
case = {'ids': '1831590704632668160'}, expect = {'message': '删除维度成功！'}, sql = {'select': 'select ID_ from uc_demension where CODE_="requestsAddDem";'}, sql_type = 'select'
update_key = 'ids'
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize('module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key', readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E AssertionError: assert '删除维度成功！' == '【requestsAddDem(requestsAddDem)】的维度下存在组织，不允许删除 '
E
E - 【requestsAddDem(requestsAddDem)】的维度下存在组织，不允许删除
E + 删除维度成功！
test_case\test_ls\test_bpm.py:47: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_ls.test_bpm.TestBpm object at 0x0000018610146C60>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186102AE5A0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x000001860F9BF110>
module = '维度管理', api = '根据维度编码删除维度', title = '正向用例', level = '中', url = 'http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds', method = 'delete', mediatype = 'query'
case = {'ids': '1831590704632668160'}, expect = {'message': '删除维度成功！'}, sql = {'select': 'select ID_ from uc_demension where CODE_="requestsAddDem";'}, sql_type = 'select'
update_key = 'ids'
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize('module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key', readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_ls\test_bpm.py:50: AssertionError
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds delete query {'ids': '需要更新'} {'message': '删除维度成功！'} {'select': 'select ID_ from uc_demension where CODE_="requestsAddDem";'} select ids
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds, 用例数据:{'ids': '1831590704632668160'}, 期望数据:{'message': '删除维度成功！'}, 服务器返回数据:{"state":false,"message":"【requestsAddDem(requestsAddDem)】的维度下存在组织，不允许删除 ","value":"","code":200}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds delete query {'ids': '1831590704632668160'} {'message': '删除维度成功！'} {'select': 'select ID_ from uc_demension where CODE_="requestsAddDem";'} select ids
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds, 用例数据:{'ids': '1831590704632668160'}, 期望数据:{'message': '删除维度成功！'}, 服务器返回数据:{"state":false,"message":"【requestsAddDem(requestsAddDem)】的维度下存在组织，不允许删除 ","value":"","code":200}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds delete query {'ids': '1831590704632668160'} {'message': '删除维度成功！'} {'select': 'select ID_ from uc_demension where CODE_="requestsAddDem";'} select ids
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds, 用例数据:{'ids': '1831590704632668160'}, 期望数据:{'message': '删除维度成功！'}, 服务器返回数据:{"state":false,"message":"【requestsAddDem(requestsAddDem)】的维度下存在组织，不允许删除 ","value":"","code":200}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds delete query {'ids': '1831590704632668160'} {'message': '删除维度成功！'} {'select': 'select ID_ from uc_demension where CODE_="requestsAddDem";'} select ids
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds, 用例数据:{'ids': '1831590704632668160'}, 期望数据:{'message': '删除维度成功！'}, 服务器返回数据:{"state":false,"message":"【requestsAddDem(requestsAddDem)】的维度下存在组织，不允许删除 ","value":"","code":200}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds delete query {'ids': '1831590704632668160'} {'message': '删除维度成功！'} {'select': 'select ID_ from uc_demension where CODE_="requestsAddDem";'} select ids
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:49 断言失败，接口url为:http://36.139.193.99:8088/api/demension/v1/dem/deleteDemByIds, 用例数据:{'ids': '1831590704632668160'}, 期望数据:{'message': '删除维度成功！'}, 服务器返回数据:{"state":false,"message":"【requestsAddDem(requestsAddDem)】的维度下存在组织，不允许删除 ","value":"","code":200}

Rerun | test_case/test_zs/test_bpm.py::TestBpm::test_bpm[认证接口-登录系统-反向用例-username为空-中-http://36.139.193.99:8088/auth-POST-application/json-case1-expect1-None-None-None] | 0.03 |

self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x0000018610265340>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-username为空', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'application/json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ=', 'username': ''}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E AssertionError: assert '账号或密码错误' == '账户错误或该租户未启用'
E
E - 账户错误或该租户未启用
E + 账号或密码错误
test_case\test_zs\test_bpm.py:50: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x0000018610265340>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-username为空', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'application/json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ=', 'username': ''}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_zs\test_bpm.py:53: AssertionError
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': '', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': '', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590711054147584"}

Rerun | test_case/test_zs/test_bpm.py::TestBpm::test_bpm[认证接口-登录系统-反向用例-username为空-中-http://36.139.193.99:8088/auth-POST-application/json-case1-expect1-None-None-None] | 0.02 |

self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x0000018610265340>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-username为空', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'application/json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ=', 'username': ''}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E AssertionError: assert '账号或密码错误' == '账户错误或该租户未启用'
E
E - 账户错误或该租户未启用
E + 账号或密码错误
test_case\test_zs\test_bpm.py:50: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x0000018610265340>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-username为空', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'application/json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ=', 'username': ''}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_zs\test_bpm.py:53: AssertionError
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': '', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': '', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590711054147584"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': '', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': '', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590711209336832"}

Rerun | test_case/test_zs/test_bpm.py::TestBpm::test_bpm[认证接口-登录系统-反向用例-username为空-中-http://36.139.193.99:8088/auth-POST-application/json-case1-expect1-None-None-None] | 0.02 |

self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x0000018610265340>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-username为空', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'application/json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ=', 'username': ''}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E AssertionError: assert '账号或密码错误' == '账户错误或该租户未启用'
E
E - 账户错误或该租户未启用
E + 账号或密码错误
test_case\test_zs\test_bpm.py:50: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x0000018610265340>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-username为空', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'application/json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ=', 'username': ''}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_zs\test_bpm.py:53: AssertionError
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': '', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': '', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590711054147584"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': '', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': '', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590711209336832"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': '', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': '', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590711356137472"}

Rerun | test_case/test_zs/test_bpm.py::TestBpm::test_bpm[认证接口-登录系统-反向用例-username为空-中-http://36.139.193.99:8088/auth-POST-application/json-case1-expect1-None-None-None] | 0.02 |

self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x0000018610265340>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-username为空', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'application/json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ=', 'username': ''}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E AssertionError: assert '账号或密码错误' == '账户错误或该租户未启用'
E
E - 账户错误或该租户未启用
E + 账号或密码错误
test_case\test_zs\test_bpm.py:50: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x0000018610265340>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-username为空', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'application/json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ=', 'username': ''}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_zs\test_bpm.py:53: AssertionError
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': '', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': '', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590711054147584"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': '', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': '', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590711209336832"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': '', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': '', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590711356137472"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': '', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': '', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590711498743808"}

Rerun | test_case/test_zs/test_bpm.py::TestBpm::test_bpm[认证接口-登录系统-反向用例-username为空-中-http://36.139.193.99:8088/auth-POST-application/json-case1-expect1-None-None-None] | 0.02 |

self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x0000018610265340>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-username为空', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'application/json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ=', 'username': ''}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E AssertionError: assert '账号或密码错误' == '账户错误或该租户未启用'
E
E - 账户错误或该租户未启用
E + 账号或密码错误
test_case\test_zs\test_bpm.py:50: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x0000018610265340>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-username为空', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'application/json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ=', 'username': ''}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_zs\test_bpm.py:53: AssertionError
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': '', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': '', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590711054147584"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': '', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': '', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590711209336832"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': '', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': '', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590711356137472"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': '', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': '', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590711498743808"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': '', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': '', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590711641350144"}

Rerun | test_case/test_zs/test_bpm.py::TestBpm::test_bpm[认证接口-登录系统-反向用例-username为特殊字符-中-http://36.139.193.99:8088/auth-POST-application/json-case2-expect2-None-None-None] | 0.02 |

self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x00000186102658E0>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-username为特殊字符', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'application/json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ=', 'username': '#!$!@#!@#'}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E AssertionError: assert '账号或密码错误' == '账户错误或该租户未启用'
E
E - 账户错误或该租户未启用
E + 账号或密码错误
test_case\test_zs\test_bpm.py:50: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x00000186102658E0>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-username为特殊字符', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'application/json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ=', 'username': '#!$!@#!@#'}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_zs\test_bpm.py:53: AssertionError
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': '#!$!@#!@#', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': '#!$!@#!@#', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590711934951424"}

Rerun | test_case/test_zs/test_bpm.py::TestBpm::test_bpm[认证接口-登录系统-反向用例-username为特殊字符-中-http://36.139.193.99:8088/auth-POST-application/json-case2-expect2-None-None-None] | 0.02 |

self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x00000186102658E0>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-username为特殊字符', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'application/json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ=', 'username': '#!$!@#!@#'}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E AssertionError: assert '账号或密码错误' == '账户错误或该租户未启用'
E
E - 账户错误或该租户未启用
E + 账号或密码错误
test_case\test_zs\test_bpm.py:50: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x00000186102658E0>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-username为特殊字符', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'application/json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ=', 'username': '#!$!@#!@#'}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_zs\test_bpm.py:53: AssertionError
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': '#!$!@#!@#', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': '#!$!@#!@#', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590711934951424"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': '#!$!@#!@#', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': '#!$!@#!@#', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590712094334976"}

Rerun | test_case/test_zs/test_bpm.py::TestBpm::test_bpm[认证接口-登录系统-反向用例-username为特殊字符-中-http://36.139.193.99:8088/auth-POST-application/json-case2-expect2-None-None-None] | 0.02 |

self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x00000186102658E0>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-username为特殊字符', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'application/json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ=', 'username': '#!$!@#!@#'}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E AssertionError: assert '账号或密码错误' == '账户错误或该租户未启用'
E
E - 账户错误或该租户未启用
E + 账号或密码错误
test_case\test_zs\test_bpm.py:50: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x00000186102658E0>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-username为特殊字符', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'application/json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ=', 'username': '#!$!@#!@#'}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_zs\test_bpm.py:53: AssertionError
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': '#!$!@#!@#', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': '#!$!@#!@#', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590711934951424"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': '#!$!@#!@#', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': '#!$!@#!@#', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590712094334976"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': '#!$!@#!@#', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': '#!$!@#!@#', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590712262107136"}

Rerun | test_case/test_zs/test_bpm.py::TestBpm::test_bpm[认证接口-登录系统-反向用例-username为特殊字符-中-http://36.139.193.99:8088/auth-POST-application/json-case2-expect2-None-None-None] | 0.02 |

self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x00000186102658E0>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-username为特殊字符', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'application/json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ=', 'username': '#!$!@#!@#'}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E AssertionError: assert '账号或密码错误' == '账户错误或该租户未启用'
E
E - 账户错误或该租户未启用
E + 账号或密码错误
test_case\test_zs\test_bpm.py:50: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x00000186102658E0>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-username为特殊字符', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'application/json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ=', 'username': '#!$!@#!@#'}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_zs\test_bpm.py:53: AssertionError
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': '#!$!@#!@#', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': '#!$!@#!@#', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590711934951424"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': '#!$!@#!@#', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': '#!$!@#!@#', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590712094334976"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': '#!$!@#!@#', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': '#!$!@#!@#', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590712262107136"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': '#!$!@#!@#', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': '#!$!@#!@#', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590712434073600"}

Rerun | test_case/test_zs/test_bpm.py::TestBpm::test_bpm[认证接口-登录系统-反向用例-username为特殊字符-中-http://36.139.193.99:8088/auth-POST-application/json-case2-expect2-None-None-None] | 0.02 |

self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x00000186102658E0>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-username为特殊字符', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'application/json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ=', 'username': '#!$!@#!@#'}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E AssertionError: assert '账号或密码错误' == '账户错误或该租户未启用'
E
E - 账户错误或该租户未启用
E + 账号或密码错误
test_case\test_zs\test_bpm.py:50: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x00000186102658E0>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-username为特殊字符', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'application/json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ=', 'username': '#!$!@#!@#'}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_zs\test_bpm.py:53: AssertionError
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': '#!$!@#!@#', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': '#!$!@#!@#', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590711934951424"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': '#!$!@#!@#', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': '#!$!@#!@#', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590712094334976"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': '#!$!@#!@#', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': '#!$!@#!@#', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590712262107136"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': '#!$!@#!@#', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': '#!$!@#!@#', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590712434073600"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': '#!$!@#!@#', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': '#!$!@#!@#', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590712593457152"}

Rerun | test_case/test_zs/test_bpm.py::TestBpm::test_bpm[认证接口-登录系统-反向用例-username过长-中-http://36.139.193.99:8088/auth-POST-application/json-case3-expect3-None-None-None] | 0.02 |

self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x0000018610265310>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-username过长', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'application/json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQraz...2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ=', 'username': 'adminadminadminadminadminadminadminadminadmin'}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E AssertionError: assert '账号或密码错误' == '账户错误或该租户未启用'
E
E - 账户错误或该租户未启用
E + 账号或密码错误
test_case\test_zs\test_bpm.py:50: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x0000018610265310>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-username过长', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'application/json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQraz...2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ=', 'username': 'adminadminadminadminadminadminadminadminadmin'}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_zs\test_bpm.py:53: AssertionError
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'adminadminadminadminadminadminadminadminadmin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'adminadminadminadminadminadminadminadminadmin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590712908029952"}

Rerun | test_case/test_zs/test_bpm.py::TestBpm::test_bpm[认证接口-登录系统-反向用例-username过长-中-http://36.139.193.99:8088/auth-POST-application/json-case3-expect3-None-None-None] | 0.02 |

self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x0000018610265310>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-username过长', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'application/json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQraz...2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ=', 'username': 'adminadminadminadminadminadminadminadminadmin'}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E AssertionError: assert '账号或密码错误' == '账户错误或该租户未启用'
E
E - 账户错误或该租户未启用
E + 账号或密码错误
test_case\test_zs\test_bpm.py:50: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x0000018610265310>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-username过长', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'application/json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQraz...2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ=', 'username': 'adminadminadminadminadminadminadminadminadmin'}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_zs\test_bpm.py:53: AssertionError
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'adminadminadminadminadminadminadminadminadmin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'adminadminadminadminadminadminadminadminadmin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590712908029952"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'adminadminadminadminadminadminadminadminadmin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'adminadminadminadminadminadminadminadminadmin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590713067413504"}

Rerun | test_case/test_zs/test_bpm.py::TestBpm::test_bpm[认证接口-登录系统-反向用例-username过长-中-http://36.139.193.99:8088/auth-POST-application/json-case3-expect3-None-None-None] | 0.03 |

self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x0000018610265310>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-username过长', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'application/json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQraz...2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ=', 'username': 'adminadminadminadminadminadminadminadminadmin'}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E AssertionError: assert '账号或密码错误' == '账户错误或该租户未启用'
E
E - 账户错误或该租户未启用
E + 账号或密码错误
test_case\test_zs\test_bpm.py:50: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x0000018610265310>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-username过长', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'application/json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQraz...2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ=', 'username': 'adminadminadminadminadminadminadminadminadmin'}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_zs\test_bpm.py:53: AssertionError
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'adminadminadminadminadminadminadminadminadmin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'adminadminadminadminadminadminadminadminadmin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590712908029952"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'adminadminadminadminadminadminadminadminadmin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'adminadminadminadminadminadminadminadminadmin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590713067413504"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'adminadminadminadminadminadminadminadminadmin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'adminadminadminadminadminadminadminadminadmin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590713230991360"}

Rerun | test_case/test_zs/test_bpm.py::TestBpm::test_bpm[认证接口-登录系统-反向用例-username过长-中-http://36.139.193.99:8088/auth-POST-application/json-case3-expect3-None-None-None] | 0.02 |

self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x0000018610265310>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-username过长', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'application/json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQraz...2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ=', 'username': 'adminadminadminadminadminadminadminadminadmin'}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E AssertionError: assert '账号或密码错误' == '账户错误或该租户未启用'
E
E - 账户错误或该租户未启用
E + 账号或密码错误
test_case\test_zs\test_bpm.py:50: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x0000018610265310>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-username过长', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'application/json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQraz...2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ=', 'username': 'adminadminadminadminadminadminadminadminadmin'}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_zs\test_bpm.py:53: AssertionError
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'adminadminadminadminadminadminadminadminadmin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'adminadminadminadminadminadminadminadminadmin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590712908029952"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'adminadminadminadminadminadminadminadminadmin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'adminadminadminadminadminadminadminadminadmin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590713067413504"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'adminadminadminadminadminadminadminadminadmin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'adminadminadminadminadminadminadminadminadmin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590713230991360"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'adminadminadminadminadminadminadminadminadmin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'adminadminadminadminadminadminadminadminadmin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590713411346432"}

Rerun | test_case/test_zs/test_bpm.py::TestBpm::test_bpm[认证接口-登录系统-反向用例-username过长-中-http://36.139.193.99:8088/auth-POST-application/json-case3-expect3-None-None-None] | 0.02 |

self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x0000018610265310>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-username过长', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'application/json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQraz...2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ=', 'username': 'adminadminadminadminadminadminadminadminadmin'}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E AssertionError: assert '账号或密码错误' == '账户错误或该租户未启用'
E
E - 账户错误或该租户未启用
E + 账号或密码错误
test_case\test_zs\test_bpm.py:50: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x0000018610265310>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-username过长', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'application/json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQraz...2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ=', 'username': 'adminadminadminadminadminadminadminadminadmin'}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_zs\test_bpm.py:53: AssertionError
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'adminadminadminadminadminadminadminadminadmin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'adminadminadminadminadminadminadminadminadmin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590712908029952"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'adminadminadminadminadminadminadminadminadmin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'adminadminadminadminadminadminadminadminadmin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590713067413504"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'adminadminadminadminadminadminadminadminadmin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'adminadminadminadminadminadminadminadminadmin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590713230991360"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'adminadminadminadminadminadminadminadminadmin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'adminadminadminadminadminadminadminadminadmin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590713411346432"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'adminadminadminadminadminadminadminadminadmin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'adminadminadminadminadminadminadminadminadmin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590713574924288"}

Rerun | test_case/test_zs/test_bpm.py::TestBpm::test_bpm[认证接口-登录系统-反向用例-username短-中-http://36.139.193.99:8088/auth-POST-json-case4-expect4-None-None-None] | 0.02 |

self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x00000186102655B0>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-username短', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ=', 'username': 'a'}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E AssertionError: assert '账号或密码错误' == '账户错误或该租户未启用'
E
E - 账户错误或该租户未启用
E + 账号或密码错误
test_case\test_zs\test_bpm.py:50: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x00000186102655B0>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-username短', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ=', 'username': 'a'}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_zs\test_bpm.py:53: AssertionError
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST json {'username': 'a', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'a', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590713914662912"}

Rerun | test_case/test_zs/test_bpm.py::TestBpm::test_bpm[认证接口-登录系统-反向用例-username短-中-http://36.139.193.99:8088/auth-POST-json-case4-expect4-None-None-None] | 0.02 |

self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x00000186102655B0>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-username短', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ=', 'username': 'a'}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E AssertionError: assert '账号或密码错误' == '账户错误或该租户未启用'
E
E - 账户错误或该租户未启用
E + 账号或密码错误
test_case\test_zs\test_bpm.py:50: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x00000186102655B0>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-username短', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ=', 'username': 'a'}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_zs\test_bpm.py:53: AssertionError
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST json {'username': 'a', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'a', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590713914662912"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST json {'username': 'a', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'a', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590714082435072"}

Rerun | test_case/test_zs/test_bpm.py::TestBpm::test_bpm[认证接口-登录系统-反向用例-username短-中-http://36.139.193.99:8088/auth-POST-json-case4-expect4-None-None-None] | 0.03 |

self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x00000186102655B0>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-username短', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ=', 'username': 'a'}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E AssertionError: assert '账号或密码错误' == '账户错误或该租户未启用'
E
E - 账户错误或该租户未启用
E + 账号或密码错误
test_case\test_zs\test_bpm.py:50: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x00000186102655B0>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-username短', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ=', 'username': 'a'}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_zs\test_bpm.py:53: AssertionError
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST json {'username': 'a', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'a', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590713914662912"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST json {'username': 'a', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'a', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590714082435072"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST json {'username': 'a', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'a', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590714275373056"}

Rerun | test_case/test_zs/test_bpm.py::TestBpm::test_bpm[认证接口-登录系统-反向用例-username短-中-http://36.139.193.99:8088/auth-POST-json-case4-expect4-None-None-None] | 0.02 |

self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x00000186102655B0>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-username短', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ=', 'username': 'a'}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E AssertionError: assert '账号或密码错误' == '账户错误或该租户未启用'
E
E - 账户错误或该租户未启用
E + 账号或密码错误
test_case\test_zs\test_bpm.py:50: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x00000186102655B0>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-username短', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ=', 'username': 'a'}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_zs\test_bpm.py:53: AssertionError
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST json {'username': 'a', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'a', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590713914662912"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST json {'username': 'a', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'a', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590714082435072"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST json {'username': 'a', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'a', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590714275373056"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST json {'username': 'a', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'a', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590714438950912"}

Rerun | test_case/test_zs/test_bpm.py::TestBpm::test_bpm[认证接口-登录系统-反向用例-username短-中-http://36.139.193.99:8088/auth-POST-json-case4-expect4-None-None-None] | 0.02 |

self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x00000186102655B0>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-username短', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ=', 'username': 'a'}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E AssertionError: assert '账号或密码错误' == '账户错误或该租户未启用'
E
E - 账户错误或该租户未启用
E + 账号或密码错误
test_case\test_zs\test_bpm.py:50: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x00000186102655B0>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-username短', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ=', 'username': 'a'}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_zs\test_bpm.py:53: AssertionError
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST json {'username': 'a', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'a', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590713914662912"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST json {'username': 'a', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'a', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590714082435072"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST json {'username': 'a', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'a', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590714275373056"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST json {'username': 'a', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'a', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590714438950912"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST json {'username': 'a', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'a', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590714598334464"}

Rerun | test_case/test_zs/test_bpm.py::TestBpm::test_bpm[认证接口-登录系统-反向用例-username错误-中-http://36.139.193.99:8088/auth-POST-application/json-case5-expect5-None-None-None] | 0.02 |

self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x0000018610265940>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-username错误', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'application/json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ=', 'username': 'adminxyz'}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E AssertionError: assert '账号或密码错误' == '账户错误或该租户未启用'
E
E - 账户错误或该租户未启用
E + 账号或密码错误
test_case\test_zs\test_bpm.py:50: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x0000018610265940>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-username错误', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'application/json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ=', 'username': 'adminxyz'}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_zs\test_bpm.py:53: AssertionError
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'adminxyz', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'adminxyz', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590714908712960"}

Rerun | test_case/test_zs/test_bpm.py::TestBpm::test_bpm[认证接口-登录系统-反向用例-username错误-中-http://36.139.193.99:8088/auth-POST-application/json-case5-expect5-None-None-None] | 0.02 |

self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x0000018610265940>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-username错误', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'application/json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ=', 'username': 'adminxyz'}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E AssertionError: assert '账号或密码错误' == '账户错误或该租户未启用'
E
E - 账户错误或该租户未启用
E + 账号或密码错误
test_case\test_zs\test_bpm.py:50: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x0000018610265940>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-username错误', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'application/json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ=', 'username': 'adminxyz'}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_zs\test_bpm.py:53: AssertionError
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'adminxyz', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'adminxyz', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590714908712960"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'adminxyz', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'adminxyz', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590715076485120"}

Rerun | test_case/test_zs/test_bpm.py::TestBpm::test_bpm[认证接口-登录系统-反向用例-username错误-中-http://36.139.193.99:8088/auth-POST-application/json-case5-expect5-None-None-None] | 0.02 |

self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x0000018610265940>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-username错误', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'application/json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ=', 'username': 'adminxyz'}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E AssertionError: assert '账号或密码错误' == '账户错误或该租户未启用'
E
E - 账户错误或该租户未启用
E + 账号或密码错误
test_case\test_zs\test_bpm.py:50: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x0000018610265940>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-username错误', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'application/json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ=', 'username': 'adminxyz'}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_zs\test_bpm.py:53: AssertionError
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'adminxyz', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'adminxyz', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590714908712960"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'adminxyz', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'adminxyz', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590715076485120"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'adminxyz', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'adminxyz', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590715227480064"}

Rerun | test_case/test_zs/test_bpm.py::TestBpm::test_bpm[认证接口-登录系统-反向用例-username错误-中-http://36.139.193.99:8088/auth-POST-application/json-case5-expect5-None-None-None] | 0.02 |

self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x0000018610265940>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-username错误', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'application/json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ=', 'username': 'adminxyz'}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E AssertionError: assert '账号或密码错误' == '账户错误或该租户未启用'
E
E - 账户错误或该租户未启用
E + 账号或密码错误
test_case\test_zs\test_bpm.py:50: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x0000018610265940>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-username错误', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'application/json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ=', 'username': 'adminxyz'}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_zs\test_bpm.py:53: AssertionError
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'adminxyz', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'adminxyz', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590714908712960"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'adminxyz', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'adminxyz', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590715076485120"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'adminxyz', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'adminxyz', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590715227480064"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'adminxyz', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'adminxyz', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590715391057920"}

Rerun | test_case/test_zs/test_bpm.py::TestBpm::test_bpm[认证接口-登录系统-反向用例-username错误-中-http://36.139.193.99:8088/auth-POST-application/json-case5-expect5-None-None-None] | 0.02 |

self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x0000018610265940>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-username错误', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'application/json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ=', 'username': 'adminxyz'}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E AssertionError: assert '账号或密码错误' == '账户错误或该租户未启用'
E
E - 账户错误或该租户未启用
E + 账号或密码错误
test_case\test_zs\test_bpm.py:50: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x0000018610265940>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-username错误', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'application/json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ=', 'username': 'adminxyz'}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_zs\test_bpm.py:53: AssertionError
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'adminxyz', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'adminxyz', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590714908712960"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'adminxyz', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'adminxyz', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590715076485120"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'adminxyz', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'adminxyz', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590715227480064"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'adminxyz', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'adminxyz', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590715391057920"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'adminxyz', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'adminxyz', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账户错误或该租户未启用","code":200,"logId":"1831590715546247168"}

Rerun | test_case/test_zs/test_bpm.py::TestBpm::test_bpm[认证接口-登录系统-反向用例-password过长-中-http://36.139.193.99:8088/auth-post-application/json-case8-expect8-None-None-None] | 0.01 |

self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x0000018610266060>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-password过长', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'post', mediatype = 'application/json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQraz...aEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn', 'username': 'admin'}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E AssertionError: assert '账号或密码错误' == '解密密码异常，请检查RSA公钥和私钥配置'
E
E - 解密密码异常，请检查RSA公钥和私钥配置
E + 账号或密码错误
test_case\test_zs\test_bpm.py:50: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x0000018610266060>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-password过长', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'post', mediatype = 'application/json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQraz...aEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn', 'username': 'admin'}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_zs\test_bpm.py:53: AssertionError
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth post application/json {'username': 'admin', 'password': ' '} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'admin', 'password': ' '}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"解密密码异常，请检查RSA公钥和私钥配置","code":200,"logId":"1831590716083118080"}

Rerun | test_case/test_zs/test_bpm.py::TestBpm::test_bpm[认证接口-登录系统-反向用例-password过长-中-http://36.139.193.99:8088/auth-post-application/json-case8-expect8-None-None-None] | 0.01 |

self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x0000018610266060>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-password过长', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'post', mediatype = 'application/json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQraz...aEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn', 'username': 'admin'}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E AssertionError: assert '账号或密码错误' == '解密密码异常，请检查RSA公钥和私钥配置'
E
E - 解密密码异常，请检查RSA公钥和私钥配置
E + 账号或密码错误
test_case\test_zs\test_bpm.py:50: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x0000018610266060>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-password过长', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'post', mediatype = 'application/json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQraz...aEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn', 'username': 'admin'}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_zs\test_bpm.py:53: AssertionError
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth post application/json {'username': 'admin', 'password': ' '} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'admin', 'password': ' '}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"解密密码异常，请检查RSA公钥和私钥配置","code":200,"logId":"1831590716083118080"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth post application/json {'username': 'admin', 'password': ' '} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'admin', 'password': ' '}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"解密密码异常，请检查RSA公钥和私钥配置","code":200,"logId":"1831590716213141504"}

Rerun | test_case/test_zs/test_bpm.py::TestBpm::test_bpm[认证接口-登录系统-反向用例-password过长-中-http://36.139.193.99:8088/auth-post-application/json-case8-expect8-None-None-None] | 0.02 |

self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x0000018610266060>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-password过长', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'post', mediatype = 'application/json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQraz...aEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn', 'username': 'admin'}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E AssertionError: assert '账号或密码错误' == '解密密码异常，请检查RSA公钥和私钥配置'
E
E - 解密密码异常，请检查RSA公钥和私钥配置
E + 账号或密码错误
test_case\test_zs\test_bpm.py:50: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x0000018610266060>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-password过长', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'post', mediatype = 'application/json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQraz...aEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn', 'username': 'admin'}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_zs\test_bpm.py:53: AssertionError
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth post application/json {'username': 'admin', 'password': ' '} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'admin', 'password': ' '}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"解密密码异常，请检查RSA公钥和私钥配置","code":200,"logId":"1831590716083118080"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth post application/json {'username': 'admin', 'password': ' '} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'admin', 'password': ' '}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"解密密码异常，请检查RSA公钥和私钥配置","code":200,"logId":"1831590716213141504"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth post application/json {'username': 'admin', 'password': ' '} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'admin', 'password': ' '}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"解密密码异常，请检查RSA公钥和私钥配置","code":200,"logId":"1831590716347359232"}

Rerun | test_case/test_zs/test_bpm.py::TestBpm::test_bpm[认证接口-登录系统-反向用例-password过长-中-http://36.139.193.99:8088/auth-post-application/json-case8-expect8-None-None-None] | 0.02 |

self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x0000018610266060>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-password过长', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'post', mediatype = 'application/json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQraz...aEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn', 'username': 'admin'}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E AssertionError: assert '账号或密码错误' == '解密密码异常，请检查RSA公钥和私钥配置'
E
E - 解密密码异常，请检查RSA公钥和私钥配置
E + 账号或密码错误
test_case\test_zs\test_bpm.py:50: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x0000018610266060>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-password过长', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'post', mediatype = 'application/json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQraz...aEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn', 'username': 'admin'}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_zs\test_bpm.py:53: AssertionError
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth post application/json {'username': 'admin', 'password': ' '} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'admin', 'password': ' '}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"解密密码异常，请检查RSA公钥和私钥配置","code":200,"logId":"1831590716083118080"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth post application/json {'username': 'admin', 'password': ' '} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'admin', 'password': ' '}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"解密密码异常，请检查RSA公钥和私钥配置","code":200,"logId":"1831590716213141504"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth post application/json {'username': 'admin', 'password': ' '} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'admin', 'password': ' '}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"解密密码异常，请检查RSA公钥和私钥配置","code":200,"logId":"1831590716347359232"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth post application/json {'username': 'admin', 'password': ' '} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'admin', 'password': ' '}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"解密密码异常，请检查RSA公钥和私钥配置","code":200,"logId":"1831590716498354176"}

Rerun | test_case/test_zs/test_bpm.py::TestBpm::test_bpm[认证接口-登录系统-反向用例-password过长-中-http://36.139.193.99:8088/auth-post-application/json-case8-expect8-None-None-None] | 0.01 |

self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x0000018610266060>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-password过长', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'post', mediatype = 'application/json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQraz...aEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn', 'username': 'admin'}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E AssertionError: assert '账号或密码错误' == '解密密码异常，请检查RSA公钥和私钥配置'
E
E - 解密密码异常，请检查RSA公钥和私钥配置
E + 账号或密码错误
test_case\test_zs\test_bpm.py:50: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x0000018610266060>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-password过长', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'post', mediatype = 'application/json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQraz...aEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn', 'username': 'admin'}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_zs\test_bpm.py:53: AssertionError
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth post application/json {'username': 'admin', 'password': ' '} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'admin', 'password': ' '}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"解密密码异常，请检查RSA公钥和私钥配置","code":200,"logId":"1831590716083118080"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth post application/json {'username': 'admin', 'password': ' '} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'admin', 'password': ' '}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"解密密码异常，请检查RSA公钥和私钥配置","code":200,"logId":"1831590716213141504"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth post application/json {'username': 'admin', 'password': ' '} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'admin', 'password': ' '}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"解密密码异常，请检查RSA公钥和私钥配置","code":200,"logId":"1831590716347359232"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth post application/json {'username': 'admin', 'password': ' '} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'admin', 'password': ' '}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"解密密码异常，请检查RSA公钥和私钥配置","code":200,"logId":"1831590716498354176"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth post application/json {'username': 'admin', 'password': ' '} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'admin', 'password': ' '}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"解密密码异常，请检查RSA公钥和私钥配置","code":200,"logId":"1831590716619988992"}

Rerun | test_case/test_zs/test_bpm.py::TestBpm::test_bpm[认证接口-登录系统-反向用例-password过短-中-http://36.139.193.99:8088/auth-POST-application/json-case9-expect9-None-None-None] | 0.01 |

self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x0000018610265850>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-password过短', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'application/json'
case = {'password': '123456', 'username': 'admin'}, expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E AssertionError: assert '账号或密码错误' == '解密密码异常，请检查RSA公钥和私钥配置'
E
E - 解密密码异常，请检查RSA公钥和私钥配置
E + 账号或密码错误
test_case\test_zs\test_bpm.py:50: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x0000018610265850>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-password过短', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'application/json'
case = {'password': '123456', 'username': 'admin'}, expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_zs\test_bpm.py:53: AssertionError
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'admin', 'password': '123456'} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'admin', 'password': '123456'}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"解密密码异常，请检查RSA公钥和私钥配置","code":200,"logId":"1831590716875841536"}

Rerun | test_case/test_zs/test_bpm.py::TestBpm::test_bpm[认证接口-登录系统-反向用例-password过短-中-http://36.139.193.99:8088/auth-POST-application/json-case9-expect9-None-None-None] | 0.02 |

self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x0000018610265850>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-password过短', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'application/json'
case = {'password': '123456', 'username': 'admin'}, expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E AssertionError: assert '账号或密码错误' == '解密密码异常，请检查RSA公钥和私钥配置'
E
E - 解密密码异常，请检查RSA公钥和私钥配置
E + 账号或密码错误
test_case\test_zs\test_bpm.py:50: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x0000018610265850>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-password过短', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'application/json'
case = {'password': '123456', 'username': 'admin'}, expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_zs\test_bpm.py:53: AssertionError
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'admin', 'password': '123456'} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'admin', 'password': '123456'}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"解密密码异常，请检查RSA公钥和私钥配置","code":200,"logId":"1831590716875841536"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'admin', 'password': '123456'} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'admin', 'password': '123456'}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"解密密码异常，请检查RSA公钥和私钥配置","code":200,"logId":"1831590717018447872"}

Rerun | test_case/test_zs/test_bpm.py::TestBpm::test_bpm[认证接口-登录系统-反向用例-password过短-中-http://36.139.193.99:8088/auth-POST-application/json-case9-expect9-None-None-None] | 0.02 |

self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x0000018610265850>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-password过短', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'application/json'
case = {'password': '123456', 'username': 'admin'}, expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E AssertionError: assert '账号或密码错误' == '解密密码异常，请检查RSA公钥和私钥配置'
E
E - 解密密码异常，请检查RSA公钥和私钥配置
E + 账号或密码错误
test_case\test_zs\test_bpm.py:50: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x0000018610265850>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-password过短', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'application/json'
case = {'password': '123456', 'username': 'admin'}, expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_zs\test_bpm.py:53: AssertionError
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'admin', 'password': '123456'} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'admin', 'password': '123456'}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"解密密码异常，请检查RSA公钥和私钥配置","code":200,"logId":"1831590716875841536"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'admin', 'password': '123456'} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'admin', 'password': '123456'}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"解密密码异常，请检查RSA公钥和私钥配置","code":200,"logId":"1831590717018447872"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'admin', 'password': '123456'} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'admin', 'password': '123456'}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"解密密码异常，请检查RSA公钥和私钥配置","code":200,"logId":"1831590717152665600"}

Rerun | test_case/test_zs/test_bpm.py::TestBpm::test_bpm[认证接口-登录系统-反向用例-password过短-中-http://36.139.193.99:8088/auth-POST-application/json-case9-expect9-None-None-None] | 0.01 |

self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x0000018610265850>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-password过短', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'application/json'
case = {'password': '123456', 'username': 'admin'}, expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E AssertionError: assert '账号或密码错误' == '解密密码异常，请检查RSA公钥和私钥配置'
E
E - 解密密码异常，请检查RSA公钥和私钥配置
E + 账号或密码错误
test_case\test_zs\test_bpm.py:50: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x0000018610265850>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-password过短', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'application/json'
case = {'password': '123456', 'username': 'admin'}, expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_zs\test_bpm.py:53: AssertionError
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'admin', 'password': '123456'} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'admin', 'password': '123456'}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"解密密码异常，请检查RSA公钥和私钥配置","code":200,"logId":"1831590716875841536"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'admin', 'password': '123456'} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'admin', 'password': '123456'}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"解密密码异常，请检查RSA公钥和私钥配置","code":200,"logId":"1831590717018447872"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'admin', 'password': '123456'} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'admin', 'password': '123456'}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"解密密码异常，请检查RSA公钥和私钥配置","code":200,"logId":"1831590717152665600"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'admin', 'password': '123456'} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'admin', 'password': '123456'}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"解密密码异常，请检查RSA公钥和私钥配置","code":200,"logId":"1831590717278494720"}

Rerun | test_case/test_zs/test_bpm.py::TestBpm::test_bpm[认证接口-登录系统-反向用例-password过短-中-http://36.139.193.99:8088/auth-POST-application/json-case9-expect9-None-None-None] | 0.01 |

self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x0000018610265850>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-password过短', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'application/json'
case = {'password': '123456', 'username': 'admin'}, expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E AssertionError: assert '账号或密码错误' == '解密密码异常，请检查RSA公钥和私钥配置'
E
E - 解密密码异常，请检查RSA公钥和私钥配置
E + 账号或密码错误
test_case\test_zs\test_bpm.py:50: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x0000018610265850>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-password过短', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'application/json'
case = {'password': '123456', 'username': 'admin'}, expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_zs\test_bpm.py:53: AssertionError
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'admin', 'password': '123456'} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'admin', 'password': '123456'}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"解密密码异常，请检查RSA公钥和私钥配置","code":200,"logId":"1831590716875841536"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'admin', 'password': '123456'} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'admin', 'password': '123456'}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"解密密码异常，请检查RSA公钥和私钥配置","code":200,"logId":"1831590717018447872"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'admin', 'password': '123456'} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'admin', 'password': '123456'}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"解密密码异常，请检查RSA公钥和私钥配置","code":200,"logId":"1831590717152665600"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'admin', 'password': '123456'} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'admin', 'password': '123456'}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"解密密码异常，请检查RSA公钥和私钥配置","code":200,"logId":"1831590717278494720"}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'admin', 'password': '123456'} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'admin', 'password': '123456'}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"解密密码异常，请检查RSA公钥和私钥配置","code":200,"logId":"1831590717395935232"}

Rerun | test_case/test_zs/test_bpm.py::TestBpm::test_bpm[认证接口-登录系统-反向用例-password错误-中-http://36.139.193.99:8088/auth-POST-application/json-case10-expect10-None-None-None] | 0.03 |

self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x00000186102659A0>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-password错误', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'application/json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ', 'username': 'admin'}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E AssertionError: assert '账号或密码错误' == None
E + where None = <built-in method get of dict object at 0x000001861050AD40>('message')
E + where <built-in method get of dict object at 0x000001861050AD40> = {'account': 'admin', 'expiration': 86400, 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjU2MDY2MzEsImlhdCI6MTcyNTUyMDIzMX0.HcxGSgiPrOfZLIPWhDVF_2EFnkaJkpmH3VSY2x1uw7WVa1g7FIW1xdmPnASO8ZYeXkhox18_Q-SVTJp-kkLS-w', ...}.get
E + where {'account': 'admin', 'expiration': 86400, 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjU2MDY2MzEsImlhdCI6MTcyNTUyMDIzMX0.HcxGSgiPrOfZLIPWhDVF_2EFnkaJkpmH3VSY2x1uw7WVa1g7FIW1xdmPnASO8ZYeXkhox18_Q-SVTJp-kkLS-w', ...} = json()
E + where json = <Response [200]>.json
test_case\test_zs\test_bpm.py:50: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x00000186102659A0>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-password错误', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'application/json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ', 'username': 'admin'}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_zs\test_bpm.py:53: AssertionError
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'admin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ'} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'admin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ'}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjU2MDY2MzEsImlhdCI6MTcyNTUyMDIzMX0.HcxGSgiPrOfZLIPWhDVF_2EFnkaJkpmH3VSY2x1uw7WVa1g7FIW1xdmPnASO8ZYeXkhox18_Q-SVTJp-kkLS-w","username":"超级管理员","account":"admin","userId":"1","expiration":86400,"loginStatus":true,"userAttrs":{"tenantId":"-1"}}

Rerun | test_case/test_zs/test_bpm.py::TestBpm::test_bpm[认证接口-登录系统-反向用例-password错误-中-http://36.139.193.99:8088/auth-POST-application/json-case10-expect10-None-None-None] | 0.02 |

self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x00000186102659A0>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-password错误', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'application/json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ', 'username': 'admin'}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E AssertionError: assert '账号或密码错误' == None
E + where None = <built-in method get of dict object at 0x0000018610509340>('message')
E + where <built-in method get of dict object at 0x0000018610509340> = {'account': 'admin', 'expiration': 86400, 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjU2MDY2MzEsImlhdCI6MTcyNTUyMDIzMX0.HcxGSgiPrOfZLIPWhDVF_2EFnkaJkpmH3VSY2x1uw7WVa1g7FIW1xdmPnASO8ZYeXkhox18_Q-SVTJp-kkLS-w', ...}.get
E + where {'account': 'admin', 'expiration': 86400, 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjU2MDY2MzEsImlhdCI6MTcyNTUyMDIzMX0.HcxGSgiPrOfZLIPWhDVF_2EFnkaJkpmH3VSY2x1uw7WVa1g7FIW1xdmPnASO8ZYeXkhox18_Q-SVTJp-kkLS-w', ...} = json()
E + where json = <Response [200]>.json
test_case\test_zs\test_bpm.py:50: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x00000186102659A0>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-password错误', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'application/json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ', 'username': 'admin'}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_zs\test_bpm.py:53: AssertionError
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'admin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ'} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'admin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ'}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjU2MDY2MzEsImlhdCI6MTcyNTUyMDIzMX0.HcxGSgiPrOfZLIPWhDVF_2EFnkaJkpmH3VSY2x1uw7WVa1g7FIW1xdmPnASO8ZYeXkhox18_Q-SVTJp-kkLS-w","username":"超级管理员","account":"admin","userId":"1","expiration":86400,"loginStatus":true,"userAttrs":{"tenantId":"-1"}}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'admin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ'} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'admin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ'}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjU2MDY2MzEsImlhdCI6MTcyNTUyMDIzMX0.HcxGSgiPrOfZLIPWhDVF_2EFnkaJkpmH3VSY2x1uw7WVa1g7FIW1xdmPnASO8ZYeXkhox18_Q-SVTJp-kkLS-w","username":"超级管理员","account":"admin","userId":"1","expiration":86400,"loginStatus":true,"userAttrs":{"tenantId":"-1"}}

Rerun | test_case/test_zs/test_bpm.py::TestBpm::test_bpm[认证接口-登录系统-反向用例-password错误-中-http://36.139.193.99:8088/auth-POST-application/json-case10-expect10-None-None-None] | 0.02 |

self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x00000186102659A0>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-password错误', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'application/json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ', 'username': 'admin'}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E AssertionError: assert '账号或密码错误' == None
E + where None = <built-in method get of dict object at 0x000001861052E580>('message')
E + where <built-in method get of dict object at 0x000001861052E580> = {'account': 'admin', 'expiration': 86400, 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjU2MDY2MzEsImlhdCI6MTcyNTUyMDIzMX0.HcxGSgiPrOfZLIPWhDVF_2EFnkaJkpmH3VSY2x1uw7WVa1g7FIW1xdmPnASO8ZYeXkhox18_Q-SVTJp-kkLS-w', ...}.get
E + where {'account': 'admin', 'expiration': 86400, 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjU2MDY2MzEsImlhdCI6MTcyNTUyMDIzMX0.HcxGSgiPrOfZLIPWhDVF_2EFnkaJkpmH3VSY2x1uw7WVa1g7FIW1xdmPnASO8ZYeXkhox18_Q-SVTJp-kkLS-w', ...} = json()
E + where json = <Response [200]>.json
test_case\test_zs\test_bpm.py:50: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x00000186102659A0>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-password错误', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'application/json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ', 'username': 'admin'}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_zs\test_bpm.py:53: AssertionError
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'admin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ'} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'admin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ'}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjU2MDY2MzEsImlhdCI6MTcyNTUyMDIzMX0.HcxGSgiPrOfZLIPWhDVF_2EFnkaJkpmH3VSY2x1uw7WVa1g7FIW1xdmPnASO8ZYeXkhox18_Q-SVTJp-kkLS-w","username":"超级管理员","account":"admin","userId":"1","expiration":86400,"loginStatus":true,"userAttrs":{"tenantId":"-1"}}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'admin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ'} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'admin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ'}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjU2MDY2MzEsImlhdCI6MTcyNTUyMDIzMX0.HcxGSgiPrOfZLIPWhDVF_2EFnkaJkpmH3VSY2x1uw7WVa1g7FIW1xdmPnASO8ZYeXkhox18_Q-SVTJp-kkLS-w","username":"超级管理员","account":"admin","userId":"1","expiration":86400,"loginStatus":true,"userAttrs":{"tenantId":"-1"}}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'admin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ'} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'admin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ'}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjU2MDY2MzEsImlhdCI6MTcyNTUyMDIzMX0.HcxGSgiPrOfZLIPWhDVF_2EFnkaJkpmH3VSY2x1uw7WVa1g7FIW1xdmPnASO8ZYeXkhox18_Q-SVTJp-kkLS-w","username":"超级管理员","account":"admin","userId":"1","expiration":86400,"loginStatus":true,"userAttrs":{"tenantId":"-1"}}

Rerun | test_case/test_zs/test_bpm.py::TestBpm::test_bpm[认证接口-登录系统-反向用例-password错误-中-http://36.139.193.99:8088/auth-POST-application/json-case10-expect10-None-None-None] | 0.02 |

self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x00000186102659A0>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-password错误', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'application/json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ', 'username': 'admin'}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E AssertionError: assert '账号或密码错误' == None
E + where None = <built-in method get of dict object at 0x000001861054A500>('message')
E + where <built-in method get of dict object at 0x000001861054A500> = {'account': 'admin', 'expiration': 86400, 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjU2MDY2MzEsImlhdCI6MTcyNTUyMDIzMX0.HcxGSgiPrOfZLIPWhDVF_2EFnkaJkpmH3VSY2x1uw7WVa1g7FIW1xdmPnASO8ZYeXkhox18_Q-SVTJp-kkLS-w', ...}.get
E + where {'account': 'admin', 'expiration': 86400, 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjU2MDY2MzEsImlhdCI6MTcyNTUyMDIzMX0.HcxGSgiPrOfZLIPWhDVF_2EFnkaJkpmH3VSY2x1uw7WVa1g7FIW1xdmPnASO8ZYeXkhox18_Q-SVTJp-kkLS-w', ...} = json()
E + where json = <Response [200]>.json
test_case\test_zs\test_bpm.py:50: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x00000186102659A0>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-password错误', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'application/json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ', 'username': 'admin'}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_zs\test_bpm.py:53: AssertionError
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'admin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ'} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'admin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ'}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjU2MDY2MzEsImlhdCI6MTcyNTUyMDIzMX0.HcxGSgiPrOfZLIPWhDVF_2EFnkaJkpmH3VSY2x1uw7WVa1g7FIW1xdmPnASO8ZYeXkhox18_Q-SVTJp-kkLS-w","username":"超级管理员","account":"admin","userId":"1","expiration":86400,"loginStatus":true,"userAttrs":{"tenantId":"-1"}}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'admin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ'} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'admin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ'}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjU2MDY2MzEsImlhdCI6MTcyNTUyMDIzMX0.HcxGSgiPrOfZLIPWhDVF_2EFnkaJkpmH3VSY2x1uw7WVa1g7FIW1xdmPnASO8ZYeXkhox18_Q-SVTJp-kkLS-w","username":"超级管理员","account":"admin","userId":"1","expiration":86400,"loginStatus":true,"userAttrs":{"tenantId":"-1"}}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'admin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ'} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'admin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ'}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjU2MDY2MzEsImlhdCI6MTcyNTUyMDIzMX0.HcxGSgiPrOfZLIPWhDVF_2EFnkaJkpmH3VSY2x1uw7WVa1g7FIW1xdmPnASO8ZYeXkhox18_Q-SVTJp-kkLS-w","username":"超级管理员","account":"admin","userId":"1","expiration":86400,"loginStatus":true,"userAttrs":{"tenantId":"-1"}}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'admin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ'} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'admin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ'}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjU2MDY2MzEsImlhdCI6MTcyNTUyMDIzMX0.HcxGSgiPrOfZLIPWhDVF_2EFnkaJkpmH3VSY2x1uw7WVa1g7FIW1xdmPnASO8ZYeXkhox18_Q-SVTJp-kkLS-w","username":"超级管理员","account":"admin","userId":"1","expiration":86400,"loginStatus":true,"userAttrs":{"tenantId":"-1"}}

Rerun | test_case/test_zs/test_bpm.py::TestBpm::test_bpm[认证接口-登录系统-反向用例-password错误-中-http://36.139.193.99:8088/auth-POST-application/json-case10-expect10-None-None-None] | 0.02 |

self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x00000186102659A0>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-password错误', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'application/json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ', 'username': 'admin'}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E AssertionError: assert '账号或密码错误' == None
E + where None = <built-in method get of dict object at 0x00000186104ECAC0>('message')
E + where <built-in method get of dict object at 0x00000186104ECAC0> = {'account': 'admin', 'expiration': 86400, 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjU2MDY2MzEsImlhdCI6MTcyNTUyMDIzMX0.HcxGSgiPrOfZLIPWhDVF_2EFnkaJkpmH3VSY2x1uw7WVa1g7FIW1xdmPnASO8ZYeXkhox18_Q-SVTJp-kkLS-w', ...}.get
E + where {'account': 'admin', 'expiration': 86400, 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjU2MDY2MzEsImlhdCI6MTcyNTUyMDIzMX0.HcxGSgiPrOfZLIPWhDVF_2EFnkaJkpmH3VSY2x1uw7WVa1g7FIW1xdmPnASO8ZYeXkhox18_Q-SVTJp-kkLS-w', ...} = json()
E + where json = <Response [200]>.json
test_case\test_zs\test_bpm.py:50: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x00000186102659A0>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '登录系统', title = '反向用例-password错误', level = '中', url = 'http://36.139.193.99:8088/auth', method = 'POST', mediatype = 'application/json'
case = {'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ', 'username': 'admin'}
expect = {'message': '账号或密码错误'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_zs\test_bpm.py:53: AssertionError
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'admin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ'} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'admin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ'}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjU2MDY2MzEsImlhdCI6MTcyNTUyMDIzMX0.HcxGSgiPrOfZLIPWhDVF_2EFnkaJkpmH3VSY2x1uw7WVa1g7FIW1xdmPnASO8ZYeXkhox18_Q-SVTJp-kkLS-w","username":"超级管理员","account":"admin","userId":"1","expiration":86400,"loginStatus":true,"userAttrs":{"tenantId":"-1"}}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'admin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ'} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'admin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ'}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjU2MDY2MzEsImlhdCI6MTcyNTUyMDIzMX0.HcxGSgiPrOfZLIPWhDVF_2EFnkaJkpmH3VSY2x1uw7WVa1g7FIW1xdmPnASO8ZYeXkhox18_Q-SVTJp-kkLS-w","username":"超级管理员","account":"admin","userId":"1","expiration":86400,"loginStatus":true,"userAttrs":{"tenantId":"-1"}}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'admin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ'} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'admin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ'}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjU2MDY2MzEsImlhdCI6MTcyNTUyMDIzMX0.HcxGSgiPrOfZLIPWhDVF_2EFnkaJkpmH3VSY2x1uw7WVa1g7FIW1xdmPnASO8ZYeXkhox18_Q-SVTJp-kkLS-w","username":"超级管理员","account":"admin","userId":"1","expiration":86400,"loginStatus":true,"userAttrs":{"tenantId":"-1"}}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'admin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ'} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'admin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ'}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjU2MDY2MzEsImlhdCI6MTcyNTUyMDIzMX0.HcxGSgiPrOfZLIPWhDVF_2EFnkaJkpmH3VSY2x1uw7WVa1g7FIW1xdmPnASO8ZYeXkhox18_Q-SVTJp-kkLS-w","username":"超级管理员","account":"admin","userId":"1","expiration":86400,"loginStatus":true,"userAttrs":{"tenantId":"-1"}}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'admin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ'} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'admin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ'}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjU2MDY2MzEsImlhdCI6MTcyNTUyMDIzMX0.HcxGSgiPrOfZLIPWhDVF_2EFnkaJkpmH3VSY2x1uw7WVa1g7FIW1xdmPnASO8ZYeXkhox18_Q-SVTJp-kkLS-w","username":"超级管理员","account":"admin","userId":"1","expiration":86400,"loginStatus":true,"userAttrs":{"tenantId":"-1"}}

Rerun | test_case/test_zs/test_bpm.py::TestBpm::test_bpm[认证接口-刷新token-正向用例-高-http://36.139.193.99:8088/refresh-GET-None-None-expect11-None-None-None] | 0.01 |

self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x0000018610265A30>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '刷新token', title = '正向用例', level = '高', url = 'http://36.139.193.99:8088/refresh', method = 'GET', mediatype = None, case = None
expect = {'message': '刷新token成功'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E AssertionError: assert '刷新token成功' == None
E + where None = <built-in method get of dict object at 0x000001861054AE00>('message')
E + where <built-in method get of dict object at 0x000001861054AE00> = {'account': 'admin', 'expiration': 86400, 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjU2MDY2MzEsImlhdCI6MTcyNTUyMDIzMX0.HcxGSgiPrOfZLIPWhDVF_2EFnkaJkpmH3VSY2x1uw7WVa1g7FIW1xdmPnASO8ZYeXkhox18_Q-SVTJp-kkLS-w', ...}.get
E + where {'account': 'admin', 'expiration': 86400, 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjU2MDY2MzEsImlhdCI6MTcyNTUyMDIzMX0.HcxGSgiPrOfZLIPWhDVF_2EFnkaJkpmH3VSY2x1uw7WVa1g7FIW1xdmPnASO8ZYeXkhox18_Q-SVTJp-kkLS-w', ...} = json()
E + where json = <Response [200]>.json
test_case\test_zs\test_bpm.py:50: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x0000018610265A30>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '刷新token', title = '正向用例', level = '高', url = 'http://36.139.193.99:8088/refresh', method = 'GET', mediatype = None, case = None
expect = {'message': '刷新token成功'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_zs\test_bpm.py:53: AssertionError
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/refresh GET None None {'message': '刷新token成功'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/refresh, 用例数据:None, 期望数据:{'message': '刷新token成功'}, 服务器返回数据:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjU2MDY2MzEsImlhdCI6MTcyNTUyMDIzMX0.HcxGSgiPrOfZLIPWhDVF_2EFnkaJkpmH3VSY2x1uw7WVa1g7FIW1xdmPnASO8ZYeXkhox18_Q-SVTJp-kkLS-w","username":"admin","account":"admin","userId":"","expiration":86400,"loginStatus":true}

Rerun | test_case/test_zs/test_bpm.py::TestBpm::test_bpm[认证接口-刷新token-正向用例-高-http://36.139.193.99:8088/refresh-GET-None-None-expect11-None-None-None] | 0.01 |

self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x0000018610265A30>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '刷新token', title = '正向用例', level = '高', url = 'http://36.139.193.99:8088/refresh', method = 'GET', mediatype = None, case = None
expect = {'message': '刷新token成功'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E AssertionError: assert '刷新token成功' == None
E + where None = <built-in method get of dict object at 0x000001861054B9C0>('message')
E + where <built-in method get of dict object at 0x000001861054B9C0> = {'account': 'admin', 'expiration': 86400, 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjU2MDY2MzEsImlhdCI6MTcyNTUyMDIzMX0.HcxGSgiPrOfZLIPWhDVF_2EFnkaJkpmH3VSY2x1uw7WVa1g7FIW1xdmPnASO8ZYeXkhox18_Q-SVTJp-kkLS-w', ...}.get
E + where {'account': 'admin', 'expiration': 86400, 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjU2MDY2MzEsImlhdCI6MTcyNTUyMDIzMX0.HcxGSgiPrOfZLIPWhDVF_2EFnkaJkpmH3VSY2x1uw7WVa1g7FIW1xdmPnASO8ZYeXkhox18_Q-SVTJp-kkLS-w', ...} = json()
E + where json = <Response [200]>.json
test_case\test_zs\test_bpm.py:50: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x0000018610265A30>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '刷新token', title = '正向用例', level = '高', url = 'http://36.139.193.99:8088/refresh', method = 'GET', mediatype = None, case = None
expect = {'message': '刷新token成功'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_zs\test_bpm.py:53: AssertionError
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/refresh GET None None {'message': '刷新token成功'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/refresh, 用例数据:None, 期望数据:{'message': '刷新token成功'}, 服务器返回数据:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjU2MDY2MzEsImlhdCI6MTcyNTUyMDIzMX0.HcxGSgiPrOfZLIPWhDVF_2EFnkaJkpmH3VSY2x1uw7WVa1g7FIW1xdmPnASO8ZYeXkhox18_Q-SVTJp-kkLS-w","username":"admin","account":"admin","userId":"","expiration":86400,"loginStatus":true}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/refresh GET None None {'message': '刷新token成功'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/refresh, 用例数据:None, 期望数据:{'message': '刷新token成功'}, 服务器返回数据:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjU2MDY2MzEsImlhdCI6MTcyNTUyMDIzMX0.HcxGSgiPrOfZLIPWhDVF_2EFnkaJkpmH3VSY2x1uw7WVa1g7FIW1xdmPnASO8ZYeXkhox18_Q-SVTJp-kkLS-w","username":"admin","account":"admin","userId":"","expiration":86400,"loginStatus":true}

Rerun | test_case/test_zs/test_bpm.py::TestBpm::test_bpm[认证接口-刷新token-正向用例-高-http://36.139.193.99:8088/refresh-GET-None-None-expect11-None-None-None] | 0.01 |

self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x0000018610265A30>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '刷新token', title = '正向用例', level = '高', url = 'http://36.139.193.99:8088/refresh', method = 'GET', mediatype = None, case = None
expect = {'message': '刷新token成功'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E AssertionError: assert '刷新token成功' == None
E + where None = <built-in method get of dict object at 0x00000186104EDF40>('message')
E + where <built-in method get of dict object at 0x00000186104EDF40> = {'account': 'admin', 'expiration': 86400, 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjU2MDY2MzEsImlhdCI6MTcyNTUyMDIzMX0.HcxGSgiPrOfZLIPWhDVF_2EFnkaJkpmH3VSY2x1uw7WVa1g7FIW1xdmPnASO8ZYeXkhox18_Q-SVTJp-kkLS-w', ...}.get
E + where {'account': 'admin', 'expiration': 86400, 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjU2MDY2MzEsImlhdCI6MTcyNTUyMDIzMX0.HcxGSgiPrOfZLIPWhDVF_2EFnkaJkpmH3VSY2x1uw7WVa1g7FIW1xdmPnASO8ZYeXkhox18_Q-SVTJp-kkLS-w', ...} = json()
E + where json = <Response [200]>.json
test_case\test_zs\test_bpm.py:50: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x0000018610265A30>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '刷新token', title = '正向用例', level = '高', url = 'http://36.139.193.99:8088/refresh', method = 'GET', mediatype = None, case = None
expect = {'message': '刷新token成功'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_zs\test_bpm.py:53: AssertionError
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/refresh GET None None {'message': '刷新token成功'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/refresh, 用例数据:None, 期望数据:{'message': '刷新token成功'}, 服务器返回数据:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjU2MDY2MzEsImlhdCI6MTcyNTUyMDIzMX0.HcxGSgiPrOfZLIPWhDVF_2EFnkaJkpmH3VSY2x1uw7WVa1g7FIW1xdmPnASO8ZYeXkhox18_Q-SVTJp-kkLS-w","username":"admin","account":"admin","userId":"","expiration":86400,"loginStatus":true}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/refresh GET None None {'message': '刷新token成功'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/refresh, 用例数据:None, 期望数据:{'message': '刷新token成功'}, 服务器返回数据:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjU2MDY2MzEsImlhdCI6MTcyNTUyMDIzMX0.HcxGSgiPrOfZLIPWhDVF_2EFnkaJkpmH3VSY2x1uw7WVa1g7FIW1xdmPnASO8ZYeXkhox18_Q-SVTJp-kkLS-w","username":"admin","account":"admin","userId":"","expiration":86400,"loginStatus":true}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/refresh GET None None {'message': '刷新token成功'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/refresh, 用例数据:None, 期望数据:{'message': '刷新token成功'}, 服务器返回数据:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjU2MDY2MzEsImlhdCI6MTcyNTUyMDIzMX0.HcxGSgiPrOfZLIPWhDVF_2EFnkaJkpmH3VSY2x1uw7WVa1g7FIW1xdmPnASO8ZYeXkhox18_Q-SVTJp-kkLS-w","username":"admin","account":"admin","userId":"","expiration":86400,"loginStatus":true}

Rerun | test_case/test_zs/test_bpm.py::TestBpm::test_bpm[认证接口-刷新token-正向用例-高-http://36.139.193.99:8088/refresh-GET-None-None-expect11-None-None-None] | 0.01 |

self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x0000018610265A30>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '刷新token', title = '正向用例', level = '高', url = 'http://36.139.193.99:8088/refresh', method = 'GET', mediatype = None, case = None
expect = {'message': '刷新token成功'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E AssertionError: assert '刷新token成功' == None
E + where None = <built-in method get of dict object at 0x0000018610529380>('message')
E + where <built-in method get of dict object at 0x0000018610529380> = {'account': 'admin', 'expiration': 86400, 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjU2MDY2MzEsImlhdCI6MTcyNTUyMDIzMX0.HcxGSgiPrOfZLIPWhDVF_2EFnkaJkpmH3VSY2x1uw7WVa1g7FIW1xdmPnASO8ZYeXkhox18_Q-SVTJp-kkLS-w', ...}.get
E + where {'account': 'admin', 'expiration': 86400, 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjU2MDY2MzEsImlhdCI6MTcyNTUyMDIzMX0.HcxGSgiPrOfZLIPWhDVF_2EFnkaJkpmH3VSY2x1uw7WVa1g7FIW1xdmPnASO8ZYeXkhox18_Q-SVTJp-kkLS-w', ...} = json()
E + where json = <Response [200]>.json
test_case\test_zs\test_bpm.py:50: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x0000018610265A30>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '刷新token', title = '正向用例', level = '高', url = 'http://36.139.193.99:8088/refresh', method = 'GET', mediatype = None, case = None
expect = {'message': '刷新token成功'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_zs\test_bpm.py:53: AssertionError
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/refresh GET None None {'message': '刷新token成功'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/refresh, 用例数据:None, 期望数据:{'message': '刷新token成功'}, 服务器返回数据:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjU2MDY2MzEsImlhdCI6MTcyNTUyMDIzMX0.HcxGSgiPrOfZLIPWhDVF_2EFnkaJkpmH3VSY2x1uw7WVa1g7FIW1xdmPnASO8ZYeXkhox18_Q-SVTJp-kkLS-w","username":"admin","account":"admin","userId":"","expiration":86400,"loginStatus":true}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/refresh GET None None {'message': '刷新token成功'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/refresh, 用例数据:None, 期望数据:{'message': '刷新token成功'}, 服务器返回数据:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjU2MDY2MzEsImlhdCI6MTcyNTUyMDIzMX0.HcxGSgiPrOfZLIPWhDVF_2EFnkaJkpmH3VSY2x1uw7WVa1g7FIW1xdmPnASO8ZYeXkhox18_Q-SVTJp-kkLS-w","username":"admin","account":"admin","userId":"","expiration":86400,"loginStatus":true}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/refresh GET None None {'message': '刷新token成功'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/refresh, 用例数据:None, 期望数据:{'message': '刷新token成功'}, 服务器返回数据:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjU2MDY2MzEsImlhdCI6MTcyNTUyMDIzMX0.HcxGSgiPrOfZLIPWhDVF_2EFnkaJkpmH3VSY2x1uw7WVa1g7FIW1xdmPnASO8ZYeXkhox18_Q-SVTJp-kkLS-w","username":"admin","account":"admin","userId":"","expiration":86400,"loginStatus":true}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/refresh GET None None {'message': '刷新token成功'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/refresh, 用例数据:None, 期望数据:{'message': '刷新token成功'}, 服务器返回数据:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjU2MDY2MzEsImlhdCI6MTcyNTUyMDIzMX0.HcxGSgiPrOfZLIPWhDVF_2EFnkaJkpmH3VSY2x1uw7WVa1g7FIW1xdmPnASO8ZYeXkhox18_Q-SVTJp-kkLS-w","username":"admin","account":"admin","userId":"","expiration":86400,"loginStatus":true}

Rerun | test_case/test_zs/test_bpm.py::TestBpm::test_bpm[认证接口-刷新token-正向用例-高-http://36.139.193.99:8088/refresh-GET-None-None-expect11-None-None-None] | 0.01 |

self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x0000018610265A30>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '刷新token', title = '正向用例', level = '高', url = 'http://36.139.193.99:8088/refresh', method = 'GET', mediatype = None, case = None
expect = {'message': '刷新token成功'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
> assert expect[key] == res.json().get(key)
E AssertionError: assert '刷新token成功' == None
E + where None = <built-in method get of dict object at 0x000001861054E500>('message')
E + where <built-in method get of dict object at 0x000001861054E500> = {'account': 'admin', 'expiration': 86400, 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjU2MDY2MzEsImlhdCI6MTcyNTUyMDIzMX0.HcxGSgiPrOfZLIPWhDVF_2EFnkaJkpmH3VSY2x1uw7WVa1g7FIW1xdmPnASO8ZYeXkhox18_Q-SVTJp-kkLS-w', ...}.get
E + where {'account': 'admin', 'expiration': 86400, 'loginStatus': True, 'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjU2MDY2MzEsImlhdCI6MTcyNTUyMDIzMX0.HcxGSgiPrOfZLIPWhDVF_2EFnkaJkpmH3VSY2x1uw7WVa1g7FIW1xdmPnASO8ZYeXkhox18_Q-SVTJp-kkLS-w', ...} = json()
E + where json = <Response [200]>.json
test_case\test_zs\test_bpm.py:50: AssertionError
During handling of the above exception, another exception occurred:
self = <MyApiAutoTest_v3.test_case.test_zs.test_bpm.TestBpm object at 0x0000018610265A30>
fix_req = <MyApiAutoTest_v3.request_method.requests_method.RequestMethod object at 0x00000186103E52E0>, fix_db = <MyApiAutoTest_v3.common.db.DB object at 0x00000186103E6C60>
module = '认证接口', api = '刷新token', title = '正向用例', level = '高', url = 'http://36.139.193.99:8088/refresh', method = 'GET', mediatype = None, case = None
expect = {'message': '刷新token成功'}, sql = None, sql_type = None, update_key = None
@allure.epic("BPM项目-Demo")
@pytest.mark.parametrize(
'module, api, title, level, url, method, mediatype, case, expect, sql, sql_type, update_key',
readexcel.get_data())
def test_bpm(self, fix_req, fix_db, module, api, title, level, url, method, mediatype, case, expect, sql, sql_type,
update_key):
"""测试用例"""
allure.dynamic.feature(module)
allure.dynamic.story(api)
allure.dynamic.title(title)
allure.dynamic.severity(level)
print(url, method, mediatype, case, expect, sql, sql_type, update_key)
if sql_type == 'delete':
fix_db.delete(sql['delete'])
elif sql_type == 'select':
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
elif sql_type == 'select|delete' or sql_type == 'delete|select':
fix_db.delete(sql['delete'])
sec_res = fix_db.select(sql['select'])
case[update_key] = sec_res
res = fix_req.request_all(url, method, mediatype, case)
try:
for key in expect.keys():
assert expect[key] == res.json().get(key)
except AssertionError:
log.error(f"断言失败，接口url为:{url}, 用例数据:{case}, 期望数据:{expect}, 服务器返回数据:{res.text}")
> raise AssertionError("断言失败")
E AssertionError: 断言失败
test_case\test_zs\test_bpm.py:53: AssertionError
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/refresh GET None None {'message': '刷新token成功'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/refresh, 用例数据:None, 期望数据:{'message': '刷新token成功'}, 服务器返回数据:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjU2MDY2MzEsImlhdCI6MTcyNTUyMDIzMX0.HcxGSgiPrOfZLIPWhDVF_2EFnkaJkpmH3VSY2x1uw7WVa1g7FIW1xdmPnASO8ZYeXkhox18_Q-SVTJp-kkLS-w","username":"admin","account":"admin","userId":"","expiration":86400,"loginStatus":true}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/refresh GET None None {'message': '刷新token成功'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/refresh, 用例数据:None, 期望数据:{'message': '刷新token成功'}, 服务器返回数据:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjU2MDY2MzEsImlhdCI6MTcyNTUyMDIzMX0.HcxGSgiPrOfZLIPWhDVF_2EFnkaJkpmH3VSY2x1uw7WVa1g7FIW1xdmPnASO8ZYeXkhox18_Q-SVTJp-kkLS-w","username":"admin","account":"admin","userId":"","expiration":86400,"loginStatus":true}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/refresh GET None None {'message': '刷新token成功'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/refresh, 用例数据:None, 期望数据:{'message': '刷新token成功'}, 服务器返回数据:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjU2MDY2MzEsImlhdCI6MTcyNTUyMDIzMX0.HcxGSgiPrOfZLIPWhDVF_2EFnkaJkpmH3VSY2x1uw7WVa1g7FIW1xdmPnASO8ZYeXkhox18_Q-SVTJp-kkLS-w","username":"admin","account":"admin","userId":"","expiration":86400,"loginStatus":true}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/refresh GET None None {'message': '刷新token成功'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/refresh, 用例数据:None, 期望数据:{'message': '刷新token成功'}, 服务器返回数据:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjU2MDY2MzEsImlhdCI6MTcyNTUyMDIzMX0.HcxGSgiPrOfZLIPWhDVF_2EFnkaJkpmH3VSY2x1uw7WVa1g7FIW1xdmPnASO8ZYeXkhox18_Q-SVTJp-kkLS-w","username":"admin","account":"admin","userId":"","expiration":86400,"loginStatus":true}
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/refresh GET None None {'message': '刷新token成功'} None None None
-------------------------------Captured log call--------------------------------
ERROR root:test_bpm.py:52 断言失败，接口url为:http://36.139.193.99:8088/refresh, 用例数据:None, 期望数据:{'message': '刷新token成功'}, 服务器返回数据:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjU2MDY2MzEsImlhdCI6MTcyNTUyMDIzMX0.HcxGSgiPrOfZLIPWhDVF_2EFnkaJkpmH3VSY2x1uw7WVa1g7FIW1xdmPnASO8ZYeXkhox18_Q-SVTJp-kkLS-w","username":"admin","account":"admin","userId":"","expiration":86400,"loginStatus":true}

Passed | test_case/test_ls/test_bpm.py::TestBpm::test_bpm[组织管理-用户加入组织-正向用例-高-http://36.139.193.99:8088/api/org/v1/orgUsers/addUsersForOrg-POST-query-case3-expect3-None-None-None] | 0.03 |

------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/org/v1/orgUsers/addUsersForOrg POST query {'orgCode': 'testAddOrg', 'accounts': 'admin,guest'} {'message': '加入成功'} None None None
-------------------------------Captured log call--------------------------------
INFO root:test_bpm.py:52 断言成功，接口url为:http://36.139.193.99:8088/api/org/v1/orgUsers/addUsersForOrg, 用例数据:{'orgCode': 'testAddOrg', 'accounts': 'admin,guest'}, 期望数据:{'message': '加入成功'}, 服务器返回数据:{"state":true,"message":"加入成功","value":"","code":200}

Passed | test_case/test_ls/test_bpm.py::TestBpm::test_bpm[组织管理-保存组织参数-正向用例-中-http://36.139.193.99:8088/api/org/v1/orgParam/saveOrgParams-POST-query|json-case4-expect4-None-None-None] | 0.05 |

------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/api/org/v1/orgParam/saveOrgParams POST query|json {'query': {'orgCode': 'testAddOrg'}, 'body': [{'alias': 'hxxmts', 'value': '项目中没有关系户'}]} {'message': '保存组织参数成功！'} None None None
-------------------------------Captured log call--------------------------------
INFO root:test_bpm.py:52 断言成功，接口url为:http://36.139.193.99:8088/api/org/v1/orgParam/saveOrgParams, 用例数据:{'query': {'orgCode': 'testAddOrg'}, 'body': [{'alias': 'hxxmts', 'value': '项目中没有关系户'}]}, 期望数据:{'message': '保存组织参数成功！'}, 服务器返回数据:{"state":true,"message":"保存组织参数成功！","value":"","code":200}

Passed | test_case/test_zs/test_bpm.py::TestBpm::test_bpm[认证接口-登录系统-登录的正向用例-高-http://36.139.193.99:8088/auth-POST-application/json-case0-expect0-None-None-None] | 0.16 |

-----------------------------Captured stdout setup------------------------------
D:\CeShiShiXun\Project\PythonProject\PythonProject_1\MyApiAutoTest_v3\data_config D:\CeShiShiXun\Project\PythonProject\PythonProject_1\MyApiAutoTest_v2\data_config
------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'admin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='} {'username': '超级管理员', 'account': 'admin', 'userId': '1', 'expiration': 86400, 'loginStatus': True} None None None
-------------------------------Captured log call--------------------------------
INFO root:test_bpm.py:55 断言成功，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'admin', 'password': 'bF6N3L93cX8pV6x2yEqxNjwIIPaEOYw9bNI5GuIY4g9MeoFyPFPL5WteHaV0LcxQqmDJWlhuCRMXzAPvrFcxJrA8BgGjJpmB1WMrQrazIJPbWbCfmDit2s2jzn+DRerVlYIFojDM96y24drEniwWzHtaJKiWoc7LGL1csNmokvQ='}, 期望数据:{'username': '超级管理员', 'account': 'admin', 'userId': '1', 'expiration': 86400, 'loginStatus': True}, 服务器返回数据:{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE3MjU2MDY2MjksImlhdCI6MTcyNTUyMDIyOX0.ps5Q6qzXan782HAGtQAd69ugrs6QwN8Y5lCBWW_tekOAexlpMFTtt-wBIP5ZXsVSEnTSbc-yAVTYl2eGTm9wzQ","username":"超级管理员","account":"admin","userId":"1","expiration":86400,"loginStatus":true,"userAttrs":{"tenantId":"-1"}}

Passed | test_case/test_zs/test_bpm.py::TestBpm::test_bpm[认证接口-登录系统-反向用例-password为空-中-http://36.139.193.99:8088/auth-POST-application/json-case6-expect6-None-None-None] | 0.03 |

------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'admin', 'password': ''} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
INFO root:test_bpm.py:55 断言成功，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'admin', 'password': ''}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账号或密码错误","code":200,"logId":"1831590715865014272"}

Passed | test_case/test_zs/test_bpm.py::TestBpm::test_bpm[认证接口-登录系统-反向用例-password为特殊字符-中-http://36.139.193.99:8088/auth-POST-application/json-case7-expect7-None-None-None] | 0.02 |

------------------------------Captured stdout call------------------------------
http://36.139.193.99:8088/auth POST application/json {'username': 'admin', 'password': '#!$!@#!@#'} {'message': '账号或密码错误'} None None None
-------------------------------Captured log call--------------------------------
INFO root:test_bpm.py:55 断言成功，接口url为:http://36.139.193.99:8088/auth, 用例数据:{'username': 'admin', 'password': '#!$!@#!@#'}, 期望数据:{'message': '账号或密码错误'}, 服务器返回数据:{"state":false,"message":"账号或密码错误","code":200,"logId":"1831590715986649088"}