This commit is contained in:
parent
299dd378ae
commit
ade83be71f
24
conftest.py
24
conftest.py
|
@ -104,15 +104,15 @@ def pytest_terminal_summary(terminalreporter, exitstatus, config):
|
|||
# send_weixin(content=content)
|
||||
|
||||
|
||||
@pytest.fixture(scope='session', autouse=True)
|
||||
def teardown_class():
|
||||
"""
|
||||
后置处理器,session:全局。比如:测试之后的数据清理,就不会对系统造成影响,也不会产生脏数据。
|
||||
@return:
|
||||
"""
|
||||
connect = MysqlUtil()
|
||||
yield
|
||||
sql = "select * from member where mobile_phone='18326074762'"
|
||||
res = connect.get_fetchone(sql)
|
||||
info_log(f"接口自动化测试垃圾数据处理结果为:{res}")
|
||||
allure.attach('处理测试数据', 'fixture后置处理', allure.attachment_type.TEXT)
|
||||
# @pytest.fixture(scope='session', autouse=True)
|
||||
# def teardown_class():
|
||||
# """
|
||||
# 后置处理器,session:全局。比如:测试之后的数据清理,就不会对系统造成影响,也不会产生脏数据。
|
||||
# @return:
|
||||
# """
|
||||
# connect = MysqlUtil()
|
||||
# yield
|
||||
# sql = "select * from member where mobile_phone='18326074762'"
|
||||
# res = connect.get_fetchone(sql)
|
||||
# info_log(f"接口自动化测试垃圾数据处理结果为:{res}")
|
||||
# allure.attach('处理测试数据', 'fixture后置处理', allure.attachment_type.TEXT)
|
||||
|
|
|
@ -10,7 +10,8 @@ rsa
|
|||
Flask
|
||||
PyMySQL
|
||||
yagmail
|
||||
urllib3
|
||||
urllib3==1.26.18
|
||||
charset_normalizer==3.2.0
|
||||
Faker
|
||||
gevent
|
||||
pytest-tmreport
|
||||
|
|
Loading…
Reference in New Issue