fixture for advanced usage of pytest in Python testing framework

Sun cool College: https://shareku.ke.qq.com/             Micro signal: Please specify shaiku College for addition         QQ group: 979438600         Preconditions: 1. File path: Test_App - - test_abc.py - - pytest.ini 2. Content of pyetst.ini configuration file: [pytest] Command line parameters addopts = ...

Posted by dinosoup on Sun, 05 Dec 2021 13:22:03 -0800

Pytest framework and Application

2.9.1 PO design mode Before talking about Pytest, let's take a look at what is the PO (Page Object) design pattern. Why reference PO design patterns? PO provides a mode of separating business process from page element operation, which makes the test code clearer. PO (Page Object) Page Object model is a design pattern used to manage and maintai ...

Posted by mverrier on Sun, 28 Nov 2021 07:14:29 -0800

Python test framework pytest (25) test report Allure - introduction, installation, examples, report structure

1. Introduction 1. Allure framework is a flexible lightweight multi language test report tool. It not only shows the test content in the form of concise web report, but also allows everyone involved in the development process to extract the most useful information from the daily test execution. 2. From the perspective of dev/qa, the Allure repo ...

Posted by mikanmao on Tue, 02 Nov 2021 05:48:17 -0700

Python test framework pytest (21) plug-in - unit test coverage and random execution cases

1. Pytest cov (unit test coverage) When doing unit testing, we usually refer to code coverage to measure the quality of code. The pytest cov plug-in can be used to count the unit test coverage. 1.1 installation Run the following command from the command line to install: pip install pytest-cov Or (using the domestic Douban source, the data wil ...

Posted by Froy on Fri, 29 Oct 2021 00:51:17 -0700

Python test framework pytest (16) runs the last failed case, views and clears the cache, and customizes the mark

catalogue 1. Run last failed case 2. View and clear cache   2.1,--cache-show 2.2,--cache-clear  3. Custom tag mark   1. Run last failed case All use cases are executed, and the first partial use cases fail. At this time, after the tested system is repaired, the last failed use case can be executed. On the command line, ente ...

Posted by 87dave87 on Sun, 24 Oct 2021 22:24:26 -0700