3 Star 10 Fork 1

青城子 / 接口自动化框架

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
start.py 789 Bytes
一键复制 编辑 原始数据 按行查看 历史
青城子 提交于 2021-12-01 18:00 . 接口自动化框架1.0.0开发完成
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# author: 青城子
# datetime: 2021/11/27 15:17
# ide: PyCharm
import os
import shutil
import pytest
from conf.settings import BASE_DIR
from utils.AllureHandler import AllureOperate
if __name__ == '__main__':
dir_path = os.path.join(BASE_DIR, "report", "json_result")
if os.path.isdir(dir_path):
# 执行用例前,首先清除上一次测试生成的json文件
shutil.rmtree(dir_path)
pytest.main() # 执行测试用例
# 生成allure测试报告
allure_obj = AllureOperate()
allure_obj.get_allure_report()
# 压缩文件
allure_obj.check_zip()
# 执行完毕后发送邮件
# allure_obj.send_mail()
else:
os.makedirs(dir_path)
Python
1
https://gitee.com/tianxiang2018/interface-automation-framework.git
git@gitee.com:tianxiang2018/interface-automation-framework.git
tianxiang2018
interface-automation-framework
接口自动化框架
master

搜索帮助