实现通过用例数据动态配置pytest.mark, 包括自定义标记,pytest.mark.skip以及pytest,mark.usefixtues功能

This commit is contained in:
floraachy
2023-07-03 11:27:08 +08:00
parent 18089f35bd
commit 165deebedc
13 changed files with 148 additions and 55 deletions
@@ -34,8 +34,7 @@ for k, v in yaml_data.items():
class TestLoginDemo:
@allure.story(case_common["allure_story"])
@pytest.mark.test_login_demo
@pytest.mark.auto
@pytest.mark.test_demo
@pytest.mark.parametrize("case", cases, ids=["{}".format(case["title"]) for case in cases])
def test_login_demo_auto(self, case, extra):
logger.info("\n-----------------------------START-开始执行用例-----------------------------\n")