pytest自动重试失败的测试用例
摘要:先安装插件pip install pytest-rerunfailures test_01.py import pytest from webTest.Common.logger import logger my_skip = pytest.mark.skipif(1 == 1, reason='自
阅读全文
使用pytest的装饰器,跳过执行某些测试用例
摘要:使用pytest.mark.skip()或者pytest.mark.skipif()来装饰测试用例方法或者测试用例类 pytest.mark.skip():无条件跳过,括号中可以写reason参数,表示跳过原因,也可以不写。 pytest.mark.skipif():满足某些条件时跳过,括号中写跳过
阅读全文