![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
自动化测试框架
文章平均质量分 73
BuLingLings
这个作者很懒,什么都没留下…
展开
-
pytest系列(四) --yaml详解及接口项目实战
声明:参考B站视频,自学成长记录https://www.bilibili.com/video/BV1u5411A7Um?p=14yaml文件什么是yamlyaml是一种数据格式,常用于全局配置文件 或 接口测试用例中语法规则1、区分大小写2、使用缩进表示层级。不能使用tab键缩进,只能用空格3、缩进没有空格数量限制,只要前面对齐即可4、# 表示注释数据组成列表、字典、列表嵌套字典# ['张三','李四']# 列表 --> yaml- 张三- 李四# {.原创 2021-08-14 22:13:23 · 6482 阅读 · 1 评论 -
pytest系列(三) -- allure报告
声明:参考B站视频,自学成长记录https://www.bilibili.com/video/BV1u5411A7Um?p=12什么是allurepytest-html 生成html格式得测试报告allure-pytest 生成 更美观 得测试报告下载、配置allure下载allure下载地址:https://github.com/allure-framework/allure2/releases解压allure配置path将allure的路径配置到path环境变量中.原创 2021-08-14 11:20:45 · 967 阅读 · 0 评论 -
pytest系列(二) -- fixture详解
setup/teardown方法前/后置每个方法运行之前会去运行 前置方法每个方法运行结束之后 会运行后置方法import pytestclass Test_API: def setup(self): print('\n方法前置:打开浏览器、数据库等') def test_01(self): print('test_01执行') def test_02(self): print('test_01执行'原创 2021-08-13 22:49:25 · 1179 阅读 · 0 评论 -
pytest系列(一) -- 基础入门
Pytestpytest:python的单元测试框架单个插件安装方式pip install pytest==6.1.2批量插件安装方式在项目根目录创建requirements.txt参考以下格式编写allure-pytest2.8.22allure-python-commons2.8.22pyparsing2.4.7pytest6.1.2在pycharm终端下执行:pip install -r requirements.txt通过pip freeze > re原创 2021-08-08 12:54:58 · 452 阅读 · 0 评论 -
Python3.6.5单例模式封装logging
#coding=utf-8import loggingimport osimport timeimport threadinglog_dir = os.path.dirname(os.path.dirname(__file__)) + '\logs\\'class Log(object): _instance_lock = threading.Lock() def __new__(cls, *args, **kwargs): if not hasattr(原创 2020-10-26 17:55:21 · 347 阅读 · 0 评论 -
基于python3.6.5实现邮件发送功能(包含发送附件功能)
直接pip install 安装相关包,补全发送邮件 / 接收邮件即可实现邮件发送功能# coding=utf-8import smtplibfrom email.mime.text import MIMETextfrom email.header import Headerfrom email.mime.multipart import MIMEMultipart def send_mail(self, html_path): """ 发送邮件 :param html_path:.原创 2020-10-26 17:40:06 · 535 阅读 · 0 评论 -
docker_jenkins_python_pytest_allure_git
dockerStep1:卸载docker[root@localhost ~]# yum remove docker \docker-client \docker-client-latest \docker-common \docker-latest \docker-latest-logrotate \docker-logrotate \docker-engineStep2:需要的安装包[root@localhost ~]# yum install -y yum-utils…Step原创 2020-09-07 13:59:37 · 768 阅读 · 1 评论