--- id: pytest-rabbitmq version: "4.0.0" license: GNU LESSER GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this… (full text in the JSON record) license_treatment: copyleft maintenance: active --- # pytest-rabbitmq — RabbitMQ process and client fixtures for pytest License: copyleft · Maintenance: active · Downloads: 108.8K/mo ## What it is and what it does pytest-rabbitmq is a pytest plugin that automates the setup and teardown of a local RabbitMQ broker for test suites. It provides two main fixtures: rabbitmq_proc, which starts a RabbitMQ instance at the beginning of a test session and stops it at the end, and rabbitmq, a client fixture that connects to the broker and automatically cleans up queues and exchanges after each test to maintain isolation. The plugin handles the complexity of spawning and managing a RabbitMQ process, discovering available ports, and configuring broker paths—all configurable via fixture arguments, command-line options, or pytest.ini settings. It depends on pytest, pika (the RabbitMQ client library), mirakuru (for process management), and port-for (for port discovery). Requires Python 3.10 or later and an installed RabbitMQ server on the test machine. Use it for: - Write integration tests for message queue consumers and producers without mocking the broker. - Test RabbitMQ-dependent microservices in isolation with a fresh broker state per test. - Validate queue and exchange configurations in your application before deployment. - Run CI/CD pipelines that need a temporary RabbitMQ instance without external service dependencies. - Develop and test AMQP protocol implementations with a real broker available during test execution. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. A pytest plugin that provides fixtures to start and manage a local RabbitMQ broker instance for tests, plus a client fixture for interacting with it. Yes. The plugin is actively maintained, has low install friction, carries no known vulnerabilities, and solves a real testing need for RabbitMQ-dependent code. The LGPLv3+ license is permissive for most use cases. The main blocker is the requirement to have RabbitMQ binaries available on the test machine; if your CI environment already provides RabbitMQ or you can install it easily, this is a straightforward win for test reliability. ## Install pip install pytest-rabbitmq uv add pytest-rabbitmq poetry add pytest-rabbitmq ## Installing pytest-rabbitmq Before you install: Low install friction with four runtime dependencies (pytest, port-for, mirakuru, pika). Actively maintained; last commit 2026-08-10 with 51 repository stars. Supports current Python versions (3.10–3.14). License in practice: Licensed under LGPLv3+, a copyleft license. You may use and modify the package freely, but any derivative works must also be licensed under compatible terms. Suitable for most open-source and commercial projects, though closed-source modifications require careful compliance review. Quickstart: pip install pytest-rabbitmq # In your test file: def test_with_rabbitmq(rabbitmq): assert rabbitmq is not None RabbitMQ must be installed on the test machine; the plugin expects rabbitmq-server and rabbitmqctl binaries at /usr/lib/rabbitmq/bin/ (Linux default) or configured paths. Verify before relying: - Whether the plugin automatically discovers RabbitMQ on non-Linux systems or requires explicit path configuration. - Performance characteristics when running multiple test sessions with different RabbitMQ instances. - Compatibility with containerized RabbitMQ or remote broker instances beyond localhost. ## Package facts - License: GNU LESSER GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this… (full text in the JSON record) (copyleft) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 108.8K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags pytest rabbitmq fixtures, rabbitmq test broker, message queue testing, pytest message broker, rabbitmq integration tests, test rabbitmq locally, pytest amqp fixtures, pytest-plugin, message-queue-testing, integration-testing [View on SkillFed](https://skillfed.io/packages/pytest-rabbitmq) · [View on PyPI](https://pypi.org/project/pytest-rabbitmq/)