通过bat文件启动pytest执行测试用例 遇到问题 通过 bat 文件启动 pytest 执行测试用例提示 No moudle named 'allure' 产生原因 bat 文件运行环境与命令行环境不一致导致。 解决办法 在 bat 文件中激活虚拟环境。 原文链接