1、找到测试集合路径 Casepath= os.path.join(path,"Testcase") # 测试集合路径 2、 pytest.main([Casepath,"-s"])#运行 test_case下所有测试用例