Run parallel test configurations with log discovery and summary.
Project description
๐งช Reggie - Regression Testing Framework
A comprehensive, scalable regression testing framework with CLI and web interfaces, powered by Celery for distributed execution.
โจ Features
- ๐ฅ๏ธ CLI Interface: Easy command-line testing with
reggiecommand - ๐ Web Dashboard: Real-time monitoring with FastAPI + HTMX
- โก Distributed Execution: Scalable testing with Celery workers
- ๐ณ Docker Ready: Complete containerization with Docker Compose
- ๐ Monitoring: Built-in status monitoring and job tracking
- ๐ง Flexible: Supports both local and distributed execution modes
๐ Quick Start
Installation
# Basic installation
pip install -e .
# With web interface
pip install -e .[web]
# Complete setup
pip install -e .[web,monitoring,dev]
Usage
# Start Redis (for Celery mode)
docker run -d -p 6379:6379 redis
# Run tests (multiprocessing mode)
reggie run config.yaml
# Run tests (Celery distributed mode)
reggie run config.yaml --celery
# Start workers (separate terminal)
reggie worker
# Start web interface (optional)
reggie web
# Monitor status
reggie status
Docker Deployment
# CLI-only deployment
docker-compose up -d
# Full web interface deployment
docker-compose -f docker-compose.web.yml up -d
๐๏ธ Architecture
Execution Modes
-
Multiprocessing Mode (Default)
- Direct process execution
- No external dependencies
- Good for single-machine setups
-
Celery Mode (Scalable)
- Distributed task execution
- Redis message broker
- Multiple worker support
- Web interface integration
Components
- CLI Interface:
reggiecommand for all operations - Celery Workers: Distributed test execution
- Web Dashboard: Real-time monitoring and control
- SQLite Database: Test metadata and history
- Redis Broker: Message queue for Celery
๐ง Configuration
Create a YAML configuration file:
name: "My Test Suite"
description: "Example regression tests"
output_dir: "./test_runs"
max_workers: 4
timeout: 300
tests:
- name: "example_test"
command: "echo 'Hello, World!'"
expected_exit_code: 0
timeout: 30
description: "Simple example test"
- name: "python_test"
command: "python -c 'print(\"Success\")'"
expected_exit_code: 0
timeout: 60
๐ Web Interface
Access the web dashboard at http://localhost:8000:
- Dashboard: Overview of system status and recent jobs
- Job Management: Start new test runs, monitor progress
- Worker Status: View active Celery workers and their health
- Configuration: Manage and validate config files
๐ณ Docker
Services
- reggie-app: Main application container
- reggie-worker: Celery worker containers (scalable)
- redis: Message broker
- flower: Celery monitoring (web mode only)
Scaling
# Scale workers
docker-compose up -d --scale reggie-worker=3
# Monitor with Flower
open http://localhost:5555
๐ Project Structure
src/regression_testing_framework/
โโโ cli.py # Main CLI interface
โโโ celery_app.py # Celery application setup
โโโ test_runner.py # Core test execution logic
โโโ config_parser.py # YAML configuration parsing
โโโ database.py # SQLite database operations
โโโ tasks/
โ โโโ test_execution.py # Individual test Celery tasks
โ โโโ orchestration.py # Test suite orchestration
โโโ web/
โโโ main.py # FastAPI web application
โโโ api/ # REST API endpoints
โโโ templates/ # HTML templates (HTMX)
โโโ static/ # CSS stylesheets
๐ Troubleshooting
Common Issues
- Dependencies: Run
pip install -e .[web]for full functionality - Redis: Ensure Redis is running on port 6379
- Workers: Start workers with
reggie workerbefore using Celery mode - Validation: Run
python3 validate.pyto check setup
Monitoring
- CLI:
reggie statusfor worker and job information - Web: Dashboard at
http://localhost:8000 - Flower: Celery monitoring at
http://localhost:5555(web mode)
๐ Development
Setup
# Clone and install
git clone <repository>
cd regression_testing_framework
pip install -e .[dev]
# Run tests
pytest
# Format code
black .
ruff check .
Contributing
- Fork the repository
- Create a feature branch
- Add tests for new functionality
- Ensure all tests pass
- Submit a pull request
๐ Documentation
- Deployment Guide: Comprehensive deployment instructions
- Configuration Reference: Detailed config options
- API Documentation: FastAPI interactive docs
๐ฏ Use Cases
- CI/CD Integration: Automated testing in pipelines
- Performance Regression: Track performance over time
- Cross-platform Testing: Distributed testing across environments
- Load Testing: Scalable test execution with multiple workers
- Compliance Testing: Automated regulatory compliance checks
๐ License
MIT License - see LICENSE file for details.
Reggie - Making regression testing simple, scalable, and reliable! ๐ params: - "-c" - "import os; print('Hello from Python')" environment: - DEBUG=true
Test with timeout for long-running processes
long_running_test: base_command: python3 params: - "-c" - "import time; print('Starting long task...'); time.sleep(10); print('Task completed')" timeout: 15 # Timeout in seconds
2. **Run Tests**
Execute your tests:
```bash
reggie run -i config.yaml -o test_report.txt
For a dry run (to see what commands will be executed without running them):
reggie run -i config.yaml --dry-run
Control the number of parallel test executions:
reggie run -i config.yaml -p 8 # Run 8 tests in parallel
How It Works
- The framework parses your YAML configuration file
- Each test is executed in parallel using Python's ThreadPoolExecutor
- Commands are executed directly without shell wrapping for improved reliability
- Long-running tests can be configured with timeouts to prevent hanging
- Results are collected and a summary report is generated
Configuration Options
Test Configuration
Each test in your YAML file can have the following properties:
base_command: The executable to run (e.g.,python3,/bin/bash)params: List of parameters to pass to the commandenvironment: List of environment variables to set for the testtimeout: Maximum time in seconds before the test is terminated (optional)
Example Configuration
my_test:
base_command: python3
params:
- script.py
- --arg1=value1
- --arg2=value2
environment:
- ENV_VAR1=value1
- ENV_VAR2=value2
timeout: 300 # 5 minutes timeout
License
This project is licensed under the terms of the LICENSE file included in the repository.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file regression_testing_framework-0.2.0.tar.gz.
File metadata
- Download URL: regression_testing_framework-0.2.0.tar.gz
- Upload date:
- Size: 1.8 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.26
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
565b62aab7ce39b31d26ba2b677b52f13a44d3674773b169e70b83806c765e17
|
|
| MD5 |
b55131cc4753d861aadd91a1cd244390
|
|
| BLAKE2b-256 |
82430255bd6790149a25e10b7412f33524da6e7833b3ac4dec10a51d98d7cd2e
|
File details
Details for the file regression_testing_framework-0.2.0-py3-none-any.whl.
File metadata
- Download URL: regression_testing_framework-0.2.0-py3-none-any.whl
- Upload date:
- Size: 46.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.26
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
53712f83610186a563f7ac575cf1cf31b8135b6056cc2958b7a3fd69dd80c38c
|
|
| MD5 |
2e2bd74243a55d4082ac7a929ef466d2
|
|
| BLAKE2b-256 |
72ab65bc33dede0cb7bff75b19fd4088a9f2232a385b9a8e6f6377ae0579901c
|