diff --git a/common/all_path.py b/common/all_path.py index 626bc18..f33984c 100644 --- a/common/all_path.py +++ b/common/all_path.py @@ -13,13 +13,12 @@ dataPath = os.path.join(base_path, 'data') configPath = os.path.join(base_path, 'config') logPath = os.path.join(base_path, 'logs') picturePath = os.path.join(base_path, 'png') -reportsPath = os.path.join(base_path, 'target','static', 'allure-report') +reportsPath = os.path.join(base_path, 'target', 'allure-report') screenPath = os.path.join(base_path, 'screencap') -targetPath=os.path.join(base_path, 'target', ) -targetPath_static=os.path.join(base_path, 'target','static', ) +targetPath=os.path.join(base_path, 'target') #Start_server_bat=os.path.join(base_path, 'config',"Start_server.bat") Start_server_bat=os.path.join(base_path, 'config',"fileServices.exe") images_Path=os.path.join(base_path, 'config',"png") #./config/png environmentPath=os.path.join(base_path, 'config',"environment.properties") -allure_results = os.path.join(targetPath_static, 'allure-results','environment.properties') +allure_results = os.path.join(targetPath, 'allure-results','environment.properties') diff --git a/config/fileServices.exe b/config/fileServices.exe index 083da3f..9efc9e5 100644 Binary files a/config/fileServices.exe and b/config/fileServices.exe differ diff --git a/config/report.html b/config/report.html index 96e34ad..b6563e8 100644 --- a/config/report.html +++ b/config/report.html @@ -19,6 +19,6 @@ 查看附件报告方法:
1.解压allure-report.zip(接口测试报告)后,进入解压目录,运行 fileServices.exe
-2.出现“Serving HTTP on :: port 5188 (http://[::]:5188/) ...”表示服务启动完成
+2.出现 “Access address: http://localhost:5188“ 表示服务启动完成
完成以上2步查看报告详情: http://127.0.0.1:5188/allure-report
diff --git a/run.py b/run.py index 33256db..62316f7 100644 --- a/run.py +++ b/run.py @@ -24,18 +24,18 @@ def run(): except: pass # --reruns = 3 失败重试 - pytest.main(['./test_caes', '-vs', "--env=dev","--reruns=3", "--alluredir", "target/static/allure-results"]) # pytest测试框架主程序运行 + pytest.main(['./test_caes', '-vs', "--env=prod","--reruns=3", "--alluredir", "target/allure-results"]) # pytest测试框架主程序运行 copy(all_path.Start_server_bat, all_path.targetPath) #拷贝 启动服务器脚本(config/Start_server.bat),由config目录拷贝到target目录下进行压缩打包发送邮件 copy(all_path.environmentPath, all_path.allure_results) # 拷贝 环境配置文件 - allure_html = 'allure generate ./target/static/allure-results -o ./target/static/allure-report --clean' # 生成allure的html报告 + allure_html = 'allure generate ./target/allure-results -o ./target/allure-report --clean' # 生成allure的html报告 subprocess.call(allure_html, shell=True) # 生成allure的html报告 - # EmailServe.send_email(setting,all_path.targetPath,ExchangeData.get_pytest_summary()) #发送邮件 + EmailServe.send_email(setting,all_path.targetPath,ExchangeData.get_pytest_summary()) #发送邮件