pytest

1.执行以test开头或者以test结尾的方法/类

2.assert False 将终止运行

@pytest.mark.xfail 预期失败

@pytest.mark.skip 跳过

@pytest.mark.unfinished 未完成的

@pytest.mark.parametrize 多组参数

@pytest.fixture(scope='function', name='okkk') 自定义固件写在conftest.py中,pytest自己调用 

pytest test_se.py::TestClassTwo::test_one 执行xx.py文件xx类的xx方法 运行指定的自动化测试用例

pytest集成allure生成优美的报告页面

 

posted @ 2021-05-23 14:41  菜鸟哟  阅读(22)  评论(0)    收藏  举报