当前位置:网站首页>Pytest test framework notes
Pytest test framework notes
2022-06-25 15:41:00 【Test Xiaohang】
1. Use case identification mechanism
Automatically find in the running project directory test_ The beginning or _test Final document
The use case file is marked with test_ The first function will be treated as a test case
The use case file is marked with Test Initial class , Inside test_ Opening method , Will be used as a use case
2. Use case execution sequence
Use case file names begin with ascii Code to sort
Use cases in the use case file : Execute in the order of use case writing
3.pytest Before and after
@pytest.fixture
Parameters :scope: Specify the level before and after ( Use cases function, Test class class, modular module)
Parameters :autouse=True Automatically add pre and post to use cases
4.pytest Case marking
stay pytest.ini Register the mark in the file
Tag use cases :@pytest.mark. Tagnames
Execute through parameters -m To filter the marked use cases
5.pytest Use case parameterization
@pytest.mark.parametrize('item', cases)
边栏推荐
- 股票开户用什么app最安全?知道的给说一下吧
- Basic syntax and common commands of R language
- Talk about the creation process of JVM objects
- Download and installation tutorial of consumer
- MySQL修改字段語句
- Sword finger offer 04 Find in 2D array
- Differences and solutions of redis cache avalanche, cache penetration and cache breakdown
- Postman usage notes, interface framework notes
- Work of the first week
- Reflection - learning notes
猜你喜欢
Sword finger offer 03 Duplicate number in array
Several relationships of UML
Sword finger offer 07 Rebuild binary tree
Distributed transaction solution
Sword finger offer 09 Implementing queues with two stacks
(1) Introduction
Sword finger offer 04 Find in 2D array
Data feature analysis skills - correlation test
[paper notes] semi supervised object detection (ssod)
JVM memory region details
随机推荐
Using R language in jupyter notebook
Finally, we can figure out whether the binding event in the tag is bracketed or not
Could not connect to redis at 127.0.0.1:6379 in Windows
Generic - learning notes
Brief object memory layout
Using reentrantlock and synchronized to implement blocking queue
Client development (electron) data store
Kali SSH Remote Login
Pytest测试框架笔记
[paper notes] poly yolo: higher speed, more precise detection and instance segmentation for yolov3
MySQL modifier l'instruction de champ
How to debug grpc by postman
Distributed transaction solution
Several relationships of UML
Detailed summary of reasons why alertmanager fails to send alarm messages at specified intervals / irregularly
Why do I need message idempotence?
Afterword of Parl intensive learning 7-day punch in camp
剑指 Offer 05. 替换空格
[paper notes] street view change detection with deconvolutional networks
Core mode and immediate rendering mode of OpenGL