Python+requests+pytest+excel+allure interface automated testing practice

definition: Unittest is the unit testing framework that comes with the Python standard library. Unittest is sometimes also called PyUnit. Just like JUnit is the standard unit testing framework for the Java language, Unittest is the standard unit testing framework for the Python language. Pytest is another third-party unit testing library for Python. It is […]

pytest and testNg automation framework

一.pytest 1. Install pytest: pip install pytest 2. Write use cases – collect use cases – execute use cases – generate reports 3.How pytest automatically identifies use cases The identification rules are as follows: 1. Search the root directory: By default, test cases are collected from the current directory, that is, in which directory the […]

Probably the most popular third-party open source testing framework in Python, pytest!

1. Introduction This article is the third in “Let’s talk about Python’s unit testing framework”. The first two articles introduced the standard library unittest and the third-party unit testing framework nose respectively. As the last article in this series, the finale is the most popular third-party unit testing framework in the Python world: pytest. It […]

Interface automation framework (Pytest+request+Allure)

Foreword: Interface automation refers to the automation at the interface level of the simulation program. Because the interface is not easy to change and the maintenance cost is lower, it is deeply loved by major companies. Interface automation includes two parts, functional interface automation testing and concurrent interface automation testing. This article focuses on the […]

python+requests+pytest+allure automation framework

1. Core library requests request request openpyxl excel file operation loggin log smtplib sends email configparser unittest.mock mock service 2. Directory structure base utils testDatas conf testCases testReport logs other 2.1base base_path.py stores the absolute path to prevent errors when executing dos commands or Jenkins. base_requests.py encapsulates requests, selects different methods to execute scripts according […]

Implement automated interface testing based on Pytest+Requests+Allure!

1. Overall structure Framework composition: pytest + requests + allure Design Patterns: keyword driven Project structure: Tool layer: api_keyword/ Parameter layer: params/ Use case layer: case/ Data driver: data_driver/ Data layer: data/ Logic layer: logic/ 2. Specific steps and code 1. Tool layer Secondary encapsulation of common behaviors such as get and post. The code […]

Python+Requests+PyTest+Excel+Allure interface automated testing practice

Table of Contents This article mainly introduces the actual practice of Python + Requess + PyTest + Excel + Allure interface automated testing. The article introduces it in great detail through sample code. It has certain reference learning value for everyone’s study or work. Friends who need it will follow the editor below. Let’s study […]

Automated testing – Pytest testing framework

01 | Introduction Pytest is a very mature, full-featured Python testing framework with the following main features: Simple and flexible, easy to use, rich documentation Supports parameterization and allows fine-grained control of test cases Supports simple unit testing and complex functional testing, and can also be used for automated testing of UI and interfaces such […]

pytest core components: pluggy plug-in system (2)

This article is part of the series “Pytest Source Code Analysis” Currently being serialized, welcome to follow 3. Example analysis of plug-in mechanism A complete software + plug-in example named “eggsample” is provided in the pluggy documentation. Next, I will use this example for analysis to have a more in-depth experience of the use of […]