# -*- coding: utf-8 -*- """ @Time : 2025/8/4 17:53 @Auth : 九月的海 @File : test_run.py @IDE : PyCharm @Motto : Catch as catch can.... """ import time from api_auto_framework.utils.handle_path import case_path, report_path, result_path import pytest import os import threading def open_report(): os.system(f"allure open {report_path}") threading.Thread(target=open_report, daemon=True).start() def test_run(): target = f"{case_path}/test_Baidu_Common_baiduRequest.py" cases = case_path os.system(f"pytest {target} --alluredir={result_path} --clean-alluredir") os.system(f"allure generate {result_path} -o {report_path} --clean") if __name__ == "__main__": test_run() open_report()