Software testing/test development丨Pytest combined with data-driven

Install yaml

  • pip install pyyaml

pytest combines data-driven yaml

image

image

image

Project directory structure

image

data preparation

image

image

image

Read excel file

image

Installation of openpyxl library

image

image

Operation of openpyxl library

image

image

image

image

image

pytest combined with csv to achieve data drive

csv file introduction

image

image

image

image

image

pytest combines json to achieve data drive

image

image

image

image

image

image

Finally, I would like to thank everyone who reads my article carefully. Reciprocity is always necessary. Although it is not a very valuable thing, if you can use it, you can take it directly:

This information should be the most comprehensive and complete preparation warehouse for [software testing] friends. This warehouse has also accompanied tens of thousands of test engineers through the most difficult journey. I hope it can also help you! 

Guess you like

Origin blog.csdn.net/2301_78276982/article/details/135342348