Tag

fixtures

1 views collected around this technical thread.

Test Development Learning Exchange
Test Development Learning Exchange
Oct 1, 2024 · Fundamentals

Using Pytest Fixtures to Manage API Tokens in Test Automation

This article explains how to define token retrieval methods as pytest fixtures to reuse authentication tokens across multiple test cases, ensuring fresh tokens for each test and demonstrating fixture scope, cleanup, and global usage patterns.

API testingToken Managementauthentication
0 likes · 6 min read
Using Pytest Fixtures to Manage API Tokens in Test Automation
Test Development Learning Exchange
Test Development Learning Exchange
Aug 21, 2024 · Backend Development

pytest-httpserver Tutorial: Installation and 10 Practical Testing Examples

This article introduces the pytest-httpserver plugin for launching a simple HTTP server during tests, provides installation instructions, and walks through ten practical examples covering GET, POST, headers, query parameters, request counting, error codes, redirects, file uploads, timeouts, and client certificate verification.

HTTP testingMock ServerPython
0 likes · 8 min read
pytest-httpserver Tutorial: Installation and 10 Practical Testing Examples
Test Development Learning Exchange
Test Development Learning Exchange
Aug 11, 2024 · Fundamentals

Advanced pytest Techniques: Parameterization, Fixtures, Plugins, and More

This article presents a comprehensive guide to pytest, covering parameterized tests, reusable fixtures, dynamic test generation, plugin extensions for coverage and HTML reports, logging capture, nested tests, test ordering, module‑level fixtures, exception handling, parallel execution, mocking, dynamic registration, custom command‑line options, and test insertion for debugging.

Pluginsfixturespytest
0 likes · 7 min read
Advanced pytest Techniques: Parameterization, Fixtures, Plugins, and More
Python Programming Learning Circle
Python Programming Learning Circle
Jul 13, 2024 · Fundamentals

Comprehensive Guide to Pytest: Installation, Execution, Fixtures, Marks, and Parameterization

This article provides a detailed tutorial on Python's Pytest framework, covering installation, test discovery rules, execution methods, setup/teardown, fixture usage, assertions, skip mechanisms, custom marks, and parameterization with extensive code examples for practical automation testing.

Unit Testingfixturesparameterization
0 likes · 11 min read
Comprehensive Guide to Pytest: Installation, Execution, Fixtures, Marks, and Parameterization
Test Development Learning Exchange
Test Development Learning Exchange
Jun 1, 2024 · Fundamentals

Using pytest fixtures for API automation testing in Python

This article demonstrates how to leverage pytest fixtures to manage resources such as authentication tokens, database connections, temporary directories, API clients, environment variables, services, configuration files, caches, user roles, and HTTP headers, providing reusable and maintainable test code examples.

AutomationPythonapi-testing
0 likes · 6 min read
Using pytest fixtures for API automation testing in Python
Test Development Learning Exchange
Test Development Learning Exchange
May 25, 2024 · Fundamentals

Advanced pytest Fixtures and Decorators for Test Setup, Skipping, Retries, Parametrization, and More

This article demonstrates how to use pytest fixtures and a collection of custom decorators to handle setup/teardown, conditional skipping, retry logic, parameterized tests, timing, error handling, logging, transaction management, API authentication, response validation, concurrency, data cleanup, performance monitoring, state checks, and test marking in Python testing.

AutomationDecoratorsPython
0 likes · 11 min read
Advanced pytest Fixtures and Decorators for Test Setup, Skipping, Retries, Parametrization, and More
Python Programming Learning Circle
Python Programming Learning Circle
Mar 25, 2022 · Fundamentals

Introduction to Pytest: Basics, Advanced Techniques, and Extensions

This article provides a comprehensive guide to Pytest, covering basic test case creation, exception handling, test classes, automatic test discovery, advanced features like parametrize, marks, fixtures, and plugin/hook development, complete with practical code examples and configuration tips.

AutomationPluginsPython
0 likes · 8 min read
Introduction to Pytest: Basics, Advanced Techniques, and Extensions
360 Quality & Efficiency
360 Quality & Efficiency
Feb 25, 2020 · Fundamentals

Introduction to pytest: Installation, Usage, and Advanced Features

This article provides a comprehensive guide to pytest, covering its advantages over unittest, installation steps, basic and class‑based test writing, execution commands, assertion handling, custom markers, fixture scopes, and useful plugins for enhancing Python testing workflows.

MarkersPluginsUnit Testing
0 likes · 5 min read
Introduction to pytest: Installation, Usage, and Advanced Features
360 Quality & Efficiency
360 Quality & Efficiency
Dec 17, 2019 · Backend Development

Comprehensive Guide to Pytest: Features, Commands, Marks, and Fixtures

This article provides an in‑depth overview of the Pytest testing framework, covering its advantages, execution principles, essential command‑line options, frequently used functions, mark annotations, and fixture usage with scope and return‑value details for effective Python testing.

AutomationPythonfixtures
0 likes · 8 min read
Comprehensive Guide to Pytest: Features, Commands, Marks, and Fixtures