Commit 375df3b4 by ALuo

更改用例测试

parent 9ac8d080
......@@ -16,6 +16,8 @@ from interfaceAutoTest.common.read_excel import ReadExcel
class TestBPM:
read_excel = ReadExcel("aluo", "BPM-aluo")
@allure.epic("BPM-ALuo")
@pytest.mark.parametrize("case_module, case_api, case_title, case_level, case_url, "
"case_method, case_mime, case_data, expect_data, sql_type, sql_data, update_key, row", ReadExcel().get_datas())
......@@ -43,12 +45,11 @@ class TestBPM:
for key in expect_data:
assert expect_data[key] == res.json()[key]
except:
ReadExcel().write_excel(result="断言失败", row=row)
TestBPM.read_excel.write_excel(result="断言失败", row=row)
alog.error(case_title + " 断言失败,因为 " + res.text + " 用例数据:" + case_data + " 期望数据:" + expect_data)
raise AssertionError("断言失败")
else:
print("断言成功")
ReadExcel().write_excel(result="断言成功", row=row)
TestBPM.read_excel.write_excel(result="断言成功", row=row)
if __name__ == '__main__':
pytest.main()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment