Tagged articles

fixture

5 articles · Page 1 of 1
Test Development Learning Exchange
Test Development Learning Exchange
Nov 16, 2025 · Operations

Automate Test Data Cleanup with pytest Fixtures and Yield

Effective test automation requires clean environments; this guide shows how pytest's fixture yield pattern can automatically set up and tear down resources—such as users, orders, and products—ensuring zero‑pollution, reliable CI runs, and maintainable code through scoped fixtures and best‑practice tips.

Pythonfixturepytest
0 likes · 6 min read
Automate Test Data Cleanup with pytest Fixtures and Yield
Test Development Learning Exchange
Test Development Learning Exchange
Mar 26, 2025 · Fundamentals

Understanding Pytest Fixtures and conftest.py: Usage, Scope, Parameterization, and Advanced Techniques

This article explains how Pytest fixtures and the special conftest.py file enable test data sharing, configuration management, and resource cleanup through scopes, parameterization, autouse, and advanced patterns like yield and addfinalizer, improving test code reuse and maintainability.

PythonTest Automationconftest
0 likes · 6 min read
Understanding Pytest Fixtures and conftest.py: Usage, Scope, Parameterization, and Advanced Techniques
Test Development Learning Exchange
Test Development Learning Exchange
Oct 9, 2024 · Backend Development

Understanding pytest Fixtures: Concepts, Scope, Dependencies, Parameterization, and Usage

This article explains pytest fixtures, covering their basic concept, definition, scope options (function, module, class, session), dependencies, parameterization, use of yield for cleanup, common usage scenarios such as data preparation, database connections, and mock objects, as well as custom markers and global registration.

Automationfixturepytest
0 likes · 7 min read
Understanding pytest Fixtures: Concepts, Scope, Dependencies, Parameterization, and Usage