当前位置:网站首页>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


边栏推荐
- Esp8266 Arduino programming example - know esp8266
- Leetcode / Scala - sum of two numbers, three numbers, four numbers, and N numbers
- Live broadcast preview at 19:30 on July 27: harmonyos3 and Huawei's full scene new product launch
- 基于 Flink CDC 实现海量数据的实时同步和转换
- 开放原子开源基金会OpenHarmony工作委员会主席侯培新寄语OpenAtom OpenHarmony分论坛
- 专访即构科技李凯:音视频的有趣、行业前沿一直吸引着我
- 一些实用、常用、效率越来越高的 Kubernetes 别名
- "Mongodb" mongodb high availability deployment architecture - replica set
- 10 reduce common "tricks"
- Back to the top of several options (JS)
猜你喜欢

【安徽大学】考研初试复试资料分享

Pycharm is really strong

Ga-rpn: recommended area network for guiding anchors

Understanding useref is enough

系统调用捕获和分析—修改内核方法添加系统调用

3.1 创建菜单与游戏页面——上

LeetCode / Scala - 两数,三数,四数,N数之和

Test cases should never be used casually, recording the thinking caused by the exception of a test case

Leetcode / Scala - sum of two numbers, three numbers, four numbers, and N numbers

MICCAI2022论文 | 进化多目标架构搜索框架:在COVID-19三维CT分类中的应用
随机推荐
向日葵资深产品总监技术分享:如何在AD域环境下应用
数据库组成存储引擎
浅谈Web Vitals
音视频+
哈希表
Acwing727.菱形图案
忆凤姐
【通信原理】第一章 -- 绪论
元宇宙日报|元宇宙社交 App“派对岛”产品下架;广州南沙元宇宙产业集聚区揭牌;数字经济发展部际联席会议制度推出
28. Implementation of file directory parsing code
GA-RPN:引导锚点的建议区域网络
『MongoDB』MongoDB高可用部署架构——复制集篇(Replica Set)
Live broadcast preview at 19:30 on July 27: harmonyos3 and Huawei's full scene new product launch
[ten thousand words long text] Based on LSM tree thought Net 6.0 C # realize kV database (case version)
Redis database, which can be understood by zero foundation Xiaobai, is easy to learn and use!
数据库组成 触发器
Wechat applet - Advanced chapter Lin UI component library source code analysis button component (I)
System call capture and segmentation - RING3 layer LD_ Preload mechanism for library function hijacking
征婚故事
你敢信?开发一个管理系统我只用了两天时间