1、在跟目录下创建一个配置项pytest.ini [pytest] testpaths=./testcases markers= p0:高于优先级 test:测试环境 pro:生成环境 2、打标签 3、运行命名pytest -m "p0"