当前位置:网站首页>pytest接口自动化测试框架 | pytest配置文件
pytest接口自动化测试框架 | pytest配置文件
2022-07-26 11:40:00 【COCOgsta】
视频来源:B站《冒死上传!pytest接口自动化测试框架(基础理论到项目实战及二次开发)教学视频【软件测试】》
一边学习一边整理老师的课程内容及试验笔记,并与大家分享,侵权即删,谢谢支持!
附上汇总贴:pytest接口自动化测试框架 | 汇总_COCOgsta的博客-CSDN博客
pytest.ini
[pytest]
# 01 可添加多个命令行参数,用空格分隔
addopts = -s -v
# 02 搜搜文件夹,执行指定文件夹里的用例,前面:pytest规则 小节有详细讲解
testpaths = ./scripts
# 03 配置测试搜索的文件名称,默认是搜索test开头的文件,改成以auto开头,以.py结尾的所有文件
python_files = auto*.py
# 04 配置测试搜索的测试类名,默认是Test开头的类,改成以Auto_开头的类
python_classes = Auto_*
# 05 配置测试搜索的测试函数名,默认是test开头的方法/函数,改成以auto_*开头
python_functions = auto_*
# 06 通过标记来执行,前面的“通过标记表达式执行用例”有详细讲解,这里不再多说
markers =
slow: 注释语句
smoke: 注释语句
serial如ini文件中添加注释后,运行时出现“UnicodeDecodeError: 'gbk' codec can't decode byte 0xaf in position 16: illegal multibyte sequence”错误,调整ini文件格式,如下,设置为GBK


边栏推荐
- PostgreSQL in Linux and windows installation and introductory basic tutorial
- Colt DCS is serious about building a green data center!
- 程序员培训学习后好找工作吗?
- Is it easy to find a job after programmer training?
- 向日葵资深产品总监技术分享:如何在AD域环境下应用
- Hal library IIC simulation in punctual atom STM32 `define SDA_ IN() {GPIOB->MODER&=~(3<<(9*2));GPIOB->MODER|=0<<9*2;}` // PB9 input mode
- Pytorch——基于mmseg/mmdet训练报错:RuntimeError: Expected to have finished reduction in the prior iteration
- PostgreSQL in Linux and windows installation and introductory basic tutorial
- Programmer growth chapter 28: how can managers not do it by themselves?
- Fineos announced the open registration of grouptech connect activities in 2022
猜你喜欢

28.文件目录解析代码实现

3.2 创建菜单与游戏页面(下)

Exploration on cache design optimization of community like business

X 2 earn must rely on Ponzi startup? Where is the way out for gamefi? (top)

Practice of microservice in solving Library Download business problems

3.2 create menu and game pages (Part 2)

Data center construction (II): brief introduction to data center

忆凤姐

Substance painter 2021 software installation package download and installation tutorial

Esp8266 Arduino programming example - development environment construction (based on Arduino IDE)
随机推荐
元宇宙日报|元宇宙社交 App“派对岛”产品下架;广州南沙元宇宙产业集聚区揭牌;数字经济发展部际联席会议制度推出
Sword finger offer 25. merge two sorted linked lists
Understanding useref is enough
建模杂谈系列151 SCLC工程化实验4-SCLC对象
How to use data pipeline to realize test modernization
7月27日19:30直播预告:HarmonyOS3及华为全场景新品发布会
Marriage seeking story
系统调用捕获和分析—Ring0层kprobe劫持系统调用
MongoDN数据库以URL形式连接
10 个 Reduce 常用“奇技淫巧”
Integrity constraints of SQL Server database
Hashtable
Data type of SQL Server database
Which is faster to open a file with an absolute path than to query a database?
Data center construction (II): brief introduction to data center
开放原子开源基金会OpenHarmony工作委员会主席侯培新寄语OpenAtom OpenHarmony分论坛
Pyechart offline deployment
音视频技术开发周刊 | 255
System call capture and analysis - ring layer kprobe hijacks system calls
程序员培训学习后好找工作吗?