会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
老猎人-note
博客园
首页
新随笔
联系
管理
2021年9月27日
python环境依赖移植
摘要: python环境快速移植 环境导出 pip freeze > requirments.txt pip3 download -r requirements.txt -d ./packages(也可直接下载安装包到自定义文件夹packages) 2.环境安装 pip install -r require
阅读全文
posted @ 2021-09-27 17:10 老猎人-note
阅读(154)
评论(0)
推荐(0)
2021年9月26日
log日志封装
摘要: logging import logging import logging.handlers import os import time class Msg: def __init__(self, case_name=None, logger_name='MMK'): self.case_name
阅读全文
posted @ 2021-09-26 15:39 老猎人-note
阅读(107)
评论(0)
推荐(0)
2021年9月14日
pytest_addoption : 命令行参数
摘要: 场景 1.一般公司测试环境都有多套,测试的时候我们需要在不同的环境下进行 2.在自动化执行时,在不同的环境下我们要指定不同的系统配置,每次修改框架代码配置这个很不自动化 3.pytest_addoption注册参数 这个就很好的解决了这个问题,它能在执行命令的时候传递参数 基本用法 #conftes
阅读全文
posted @ 2021-09-14 12:07 老猎人-note
阅读(341)
评论(0)
推荐(0)
2021年9月7日
Pytest--fixture详解
摘要: fixture fixture介绍 1.命名方式灵活,不局限于setup和teardown这几个命名 2.conftest.py配置里可以实现数据共享 fixture源码详解 @pytest.fixture(scope="function", params=None, autouse=False,
阅读全文
posted @ 2021-09-07 11:27 老猎人-note
阅读(333)
评论(0)
推荐(0)
jenkins构建一个简单的自动化job
摘要: Jenkins+Git+Allure构建job 前置条件 相关插件安装 Allure Jenkins Plugin / Git linux服务器上安装Git yum install git git --version检查git是否安全完成 whereis git查看Git安装目录(默认/usr/bi
阅读全文
posted @ 2021-09-07 11:13 老猎人-note
阅读(146)
评论(0)
推荐(0)
2021年8月8日
Pytest相关组件pytest.ini和conftest.py介绍(二)
摘要: pytest.ini配置文件(作用:用来修改配置pytest默认的运行规则) pytest.ini放在项目根目录,文件名字固定 常用配置介绍(⚠️不能出现中文注释) #coding=utf-8 [pytest] filterwarnings = error ignore::UserWarning i
阅读全文
posted @ 2021-08-08 14:50 老猎人-note
阅读(414)
评论(0)
推荐(0)
pytest简介(一)
摘要: Pytest规则介绍 测试文件以test_开头,或_test结尾 测试类以Test开头,且不能有__init__方法 测试函数以test_开头 Pytest简单demo class TestCase001: def sum(self, x): return x + 3 def test_001(se
阅读全文
posted @ 2021-08-08 13:27 老猎人-note
阅读(117)
评论(0)
推荐(0)
公告