当前位置:网站首页>pytest接口自动化测试框架 | 跳过测试类
pytest接口自动化测试框架 | 跳过测试类
2022-08-01 07:12:00 【COCOgsta】
视频来源:B站《冒死上传!pytest接口自动化测试框架(基础理论到项目实战及二次开发)教学视频【软件测试】》
一边学习一边整理老师的课程内容及试验笔记,并与大家分享,侵权即删,谢谢支持!
附上汇总贴:pytest接口自动化测试框架 | 汇总_COCOgsta的博客-CSDN博客
import pytest
# myskip = pytest.mark.skip()
myskip = pytest.mark.skipif(condition=2 > 1, reason="no reason")
def test_01():
print("----用例1执行----")
@myskip
class Test_Case():
def test_02(self):
print('----用例2执行----')
def test_03(self):
print('----用例3执行----')
if __name__ == '__main__':
pytest.main(['-s', 'test_skip_class.py'])
举报
边栏推荐
猜你喜欢
随机推荐
Detailed explanation of the crawler framework Scrapy
配置我的kitty
【MySQL】操作表DML相关语句
rhcsa 第四天
Monitor the width and height of the parent element, adapt to the size of the plug-in
GO错误处理方式
first unique character in characters
my creative day
从零开始—仿牛客网讨论社区项目(一)
Golang: go open web service
牛客刷SQL---2
搜索框字符自动补全
Golang: go static file processing
目标检测概述-上篇
Upgrade to heavyweight lock, lock reentrancy will lead to lock release?
LeetCode 0149. Maximum number of points on a line
I have three degrees, and I have five faces. I was "confessed" by the interviewer, and I got an offer of 33*15.
Xiaobai's 0 Basic Tutorial SQL: An Overview of Relational Databases 02
Offer刷题——1
POJ1251丛林之路题解