76 lines
2.5 KiB
Python
76 lines
2.5 KiB
Python
#!/usr/bin/env python3
|
|
"""
|
|
RabbitMQ Test Help
|
|
Shows available test commands and usage information.
|
|
"""
|
|
|
|
import os
|
|
import sys
|
|
|
|
|
|
def show_help():
|
|
"""Display help information for RabbitMQ tests"""
|
|
print("🐰 RabbitMQ Test Suite Help")
|
|
print("=" * 50)
|
|
|
|
print("\n📋 Available Test Files:")
|
|
print("-" * 30)
|
|
|
|
test_files = [
|
|
("run_fanout_test.py", "Test Fanout Exchange (broadcast messaging)"),
|
|
("run_direct_test.py", "Test Direct Exchange (routing by key)"),
|
|
("run_topic_test.py", "Test Topic Exchange (wildcard routing)"),
|
|
("run_multi_queue_test.py", "Test Multi-Queue Load Balancing"),
|
|
("test.py", "Run all tests sequentially"),
|
|
("run_all_tests.py", "Run all individual test files with summary")
|
|
]
|
|
|
|
for filename, description in test_files:
|
|
exists = "✅" if os.path.exists(filename) else "❌"
|
|
print(f"{exists} {filename:<25} - {description}")
|
|
|
|
print("\n🚀 Usage Examples:")
|
|
print("-" * 20)
|
|
print("python run_fanout_test.py # Test fanout exchange")
|
|
print("python run_direct_test.py # Test direct exchange")
|
|
print("python run_topic_test.py # Test topic exchange")
|
|
print("python run_multi_queue_test.py # Test load balancing")
|
|
print("python test.py # Run all tests")
|
|
print("python run_all_tests.py # Run with detailed summary")
|
|
|
|
print("\n📖 Test Patterns:")
|
|
print("-" * 20)
|
|
print("• Fanout: One-to-many broadcasting")
|
|
print("• Direct: Exact routing key matching")
|
|
print("• Topic: Wildcard pattern matching (* and #)")
|
|
print("• Multi: Round-robin load balancing")
|
|
|
|
print("\n⚙️ Prerequisites:")
|
|
print("-" * 20)
|
|
print("• RabbitMQ server running on localhost:5673")
|
|
print("• Python 3.7+ with asyncio support")
|
|
print("• aio-pika package installed")
|
|
|
|
print("\n📁 File Structure:")
|
|
print("-" * 20)
|
|
print("product/ - Message producers")
|
|
print("comsumer/ - Message consumers")
|
|
print("config.py - RabbitMQ configuration")
|
|
print("run_*.py - Individual test files")
|
|
print("test.py - Combined test runner")
|
|
|
|
print("\n🔧 Configuration:")
|
|
print("-" * 20)
|
|
print("Edit config.py to change:")
|
|
print("• RabbitMQ connection URI")
|
|
print("• Exchange and queue names")
|
|
print("• Message persistence settings")
|
|
|
|
print("\n📚 Documentation:")
|
|
print("-" * 20)
|
|
print("See README_TESTS.md for detailed information")
|
|
|
|
|
|
if __name__ == "__main__":
|
|
show_help()
|