Tag

pytest

1 views collected around this technical thread.

Code Mala Tang
Code Mala Tang
May 13, 2025 · Backend Development

Master FastAPI Testing: Unit & Integration Tests with Pytest & HTTPX

This guide walks you through setting up a FastAPI testing environment, creating a project structure, writing both unit and integration tests using pytest, httpx, and FastAPI's TestClient, and running the tests to ensure reliable, maintainable applications.

BackendFastAPIhttpx
0 likes · 6 min read
Master FastAPI Testing: Unit & Integration Tests with Pytest & HTTPX
php中文网 Courses
php中文网 Courses
May 12, 2025 · Fundamentals

Python Unit Testing and Debugging Techniques: From unittest to pytest and CI Integration

This article explains why unit testing and debugging are essential in Python development, introduces the unittest and pytest frameworks, shows how to measure test coverage, demonstrates debugging methods like print statements, pdb, and IDE tools, and provides examples of integrating tests into CI pipelines.

CI/CDPythondebugging
0 likes · 10 min read
Python Unit Testing and Debugging Techniques: From unittest to pytest and CI Integration
Python Programming Learning Circle
Python Programming Learning Circle
Apr 26, 2025 · Frontend Development

Building a Selenium + Pytest Automation Framework in Python

This tutorial walks through creating a modular Selenium automation framework with Pytest, covering project structure, utility modules, configuration handling, logging, Page Object Model implementation, test case writing, HTML reporting, and email distribution, all illustrated with complete Python code examples.

AutomationPageObjectPython
0 likes · 32 min read
Building a Selenium + Pytest Automation Framework in Python
Python Programming Learning Circle
Python Programming Learning Circle
Apr 14, 2025 · Fundamentals

Top 10 Essential Python Packages Every Developer Should Know

This article introduces the ten most essential and widely used Python packages—including NumPy, Pendulum, Pillow, MoviePy, Requests, Tkinter, PyQt, Pandas, Pywin32, and Pytest—explaining their core features, typical use cases, and providing code snippets to help developers quickly adopt them in various projects.

NumPyPythonTkinter
0 likes · 12 min read
Top 10 Essential Python Packages Every Developer Should Know
Test Development Learning Exchange
Test Development Learning Exchange
Apr 12, 2025 · Backend Development

Efficient Data Flow Processing in an API Automation Testing Framework

This article explains how to implement efficient data flow handling in an API automation testing framework, covering data generation, parameterization, data transfer, storage, and validation with practical Python examples using built‑in libraries, Faker, pytest fixtures, JSON files, and MySQL.

API testingAutomationData Generation
0 likes · 8 min read
Efficient Data Flow Processing in an API Automation Testing Framework
Test Development Learning Exchange
Test Development Learning Exchange
Apr 11, 2025 · Backend Development

Using Pytest Markers to Categorize and Run Test Cases

This article explains how to define, register, and use Pytest markers to classify test cases such as smoke, regression, and integration tests, demonstrates command‑line options for selective execution, and shows dynamic marker assignment with practical code examples.

Automation Testingpytesttest markers
0 likes · 5 min read
Using Pytest Markers to Categorize and Run Test Cases
Test Development Learning Exchange
Test Development Learning Exchange
Apr 10, 2025 · Backend Development

How to Build a Flexible Core Executor for API Automation Testing with pytest and Allure

This article explains how to design and implement a high‑performance, configurable core executor for API automation testing, covering dependency installation, executor class creation, logging integration, parallel execution, report generation with Allure, and practical code examples for Python developers.

API testingAllureAutomation
0 likes · 7 min read
How to Build a Flexible Core Executor for API Automation Testing with pytest and Allure
Test Development Learning Exchange
Test Development Learning Exchange
Apr 9, 2025 · Backend Development

Encapsulating Data Type Handling in API Automation Testing with Python

This article explains how to encapsulate data type processing in an API automation framework by creating a Python utility class that provides conversion, validation, and assertion methods, defines JSON Schemas, and demonstrates writing and executing Pytest test cases to ensure correct data types and values.

API testingData ValidationJSON Schema
0 likes · 6 min read
Encapsulating Data Type Handling in API Automation Testing with Python
Test Development Learning Exchange
Test Development Learning Exchange
Apr 5, 2025 · Backend Development

Encapsulating Assertion Logic in Pytest for API Automation Testing

This article explains how to encapsulate common assertion logic—such as status‑code, JSON data, and database assertions—within the Pytest framework, providing reusable functions and a generic assertion class to improve readability, maintainability, and efficiency of backend API tests.

API testingAutomationBackend
0 likes · 5 min read
Encapsulating Assertion Logic in Pytest for API Automation Testing
Test Development Learning Exchange
Test Development Learning Exchange
Apr 3, 2025 · Backend Development

Encapsulating JSON Data Format Validation Test Cases with Pytest

This article explains how to encapsulate JSON data format validation in Pytest by creating a reusable JSONValidator utility, defining JSON Schemas, writing test cases that check structure, field types, and values, and executing them to ensure efficient and maintainable API testing.

API testingJSONPython
0 likes · 6 min read
Encapsulating JSON Data Format Validation Test Cases with Pytest
Test Development Learning Exchange
Test Development Learning Exchange
Apr 2, 2025 · Backend Development

API Association Wrapping with Pytest: A Complete Step‑by‑Step Guide

This article explains how to implement API association wrapping in Pytest, covering environment setup, test file creation, dependency imports, detailed test case definitions with sample code for login, user creation, retrieval and update, execution of the suite, result verification, and advanced project structuring for complex scenarios.

API testingAutomationBackend Development
0 likes · 8 min read
API Association Wrapping with Pytest: A Complete Step‑by‑Step Guide
Test Development Learning Exchange
Test Development Learning Exchange
Mar 31, 2025 · Operations

Using Pytest for Enterprise API Test Case Management

This article explains how to use Pytest in enterprise projects for API test case management, covering naming conventions, documentation, parameterization, organization by modules, fixture usage, execution strategies including CI/CD integration, parallel runs, and generating detailed Allure reports.

API testingAllureCI/CD
0 likes · 6 min read
Using Pytest for Enterprise API Test Case Management
Test Development Learning Exchange
Test Development Learning Exchange
Mar 30, 2025 · Fundamentals

How to Customize Enterprise Test Reports Using Pytest and Allure

This article explains why customized test report templates are needed in enterprise API automation, and provides step‑by‑step instructions for customizing Allure reports—including logo replacement, color schemes, layout tweaks, custom tags, dynamic titles, Chinese localization, and automated generation and email distribution using Pytest.

AllurePythonReport Customization
0 likes · 7 min read
How to Customize Enterprise Test Reports Using Pytest and Allure
Test Development Learning Exchange
Test Development Learning Exchange
Mar 26, 2025 · Backend Development

Using pytest.ini for Global Pytest Configuration

This guide explains how to create, locate, and populate a pytest.ini file with common configuration options, provides a complete example, and outlines best practices for using the file to streamline and standardize test execution in Python projects.

ConfigurationPythonini
0 likes · 4 min read
Using pytest.ini for Global Pytest Configuration
Test Development Learning Exchange
Test Development Learning Exchange
Mar 22, 2025 · Backend Development

Assertion Handling in Interface Automation Testing

This article explains how to use Python's requests library and pytest framework for interface automation testing, including HTTP status code verification and custom assertion functions.

Automation TestingHTTP status codesPython
0 likes · 5 min read
Assertion Handling in Interface Automation Testing
Test Development Learning Exchange
Test Development Learning Exchange
Mar 11, 2025 · Backend Development

Comprehensive API Testing Process and Implementation Guide

This article outlines a step‑by‑step API testing workflow—from defining objectives and analyzing requirements to designing test cases, setting up environments, executing tests with tools like Postman and pytest, analyzing results, integrating into CI/CD pipelines, and applying best practices for continuous improvement.

AutomationCI/CDPostman
0 likes · 5 min read
Comprehensive API Testing Process and Implementation Guide
Test Development Learning Exchange
Test Development Learning Exchange
Feb 18, 2025 · Frontend Development

Integrating Playwright with unittest or pytest for Efficient Automated Testing

This article explains how to combine Playwright with Python's unittest or pytest frameworks to build robust test suites, design data‑driven tests, run tests in parallel or distributed environments, and integrate the workflow into CI/CD pipelines such as GitHub Actions and Jenkins.

AutomationCI/CDPlaywright
0 likes · 6 min read
Integrating Playwright with unittest or pytest for Efficient Automated Testing
Test Development Learning Exchange
Test Development Learning Exchange
Feb 6, 2025 · Backend Development

Comprehensive Python API Testing Examples with Requests and Pytest

This article provides a collection of practical Python snippets demonstrating how to send GET and POST requests, validate status codes, response bodies, JSON schemas, handle headers, query parameters, file uploads, redirects, timeouts, sessions, authentication, rate limiting, and parameterized testing using the requests library and pytest framework.

API testingHTTPPython
0 likes · 14 min read
Comprehensive Python API Testing Examples with Requests and Pytest
Test Development Learning Exchange
Test Development Learning Exchange
Jan 3, 2025 · Backend Development

How to Mock External Services in pytest Using unittest.mock

This guide explains how to install pytest, create a module with a function that calls an external API, and use unittest.mock fixtures and helper functions to mock requests.get for both successful and failing responses, then run the tests with pytest.

BackendMockingPython
0 likes · 9 min read
How to Mock External Services in pytest Using unittest.mock