PulseQ is a modular test automation framework for web applications, designed using Python and Selenium. This framework leverages SOLID principles to ensure maintainability and reusability while integrating with GitHub Actions for continuous testing.
- Cross-Browser Testing: Support for Chrome and Firefox browsers
- API Testing: Comprehensive API testing capabilities with request chaining and schema validation
- Visual Testing: Screenshot comparison for visual regression testing
- Performance Testing: Metrics collection for execution time, memory usage, and CPU usage
- Modular Architecture: Easy to extend and maintain
- Continuous Integration: GitHub Actions integration for automated testing
PulseQ/
├── .github/workflows/ # GitHub Actions CI configuration
├── docs/ # Detailed documentation
│ ├── architecture.md # Architecture details and diagrams
│ ├── troubleshooting.md # Troubleshooting guide
│ └── usage.md # Usage instructions
├── pulseq/ # Core framework components
│ ├── utilities/ # Utility modules
│ │ ├── api_client.py # API testing utilities
│ │ ├── driver_manager.py # WebDriver management
│ │ ├── visual_utils.py # Visual testing utilities
│ │ ├── logger.py # Centralized logging
│ │ ├── assertions.py # Custom assertions
│ │ ├── wait_utils.py # Wait utilities
│ │ ├── elements_utils.py # Element interaction utilities
│ │ ├── data_handler.py # Test data management
│ │ ├── retry.py # Retry mechanism
│ │ ├── performance_metrics.py # Performance tracking
│ │ └── misc_utils.py # Additional utilities
│ ├── page_objects/ # Page object classes
│ ├── config.py # Configuration management
│ ├── core.py # Core framework functionality
│ └── reporting.py # Test reporting
├── tests/ # Test cases
│ ├── api/ # API tests
│ ├── visual/ # Visual tests
│ └── performance/ # Performance tests
├── metrics/ # Performance metrics storage
├── Dockerfile # Container definition
├── docker-compose.yml # Container orchestration
├── requirements.txt # Python dependencies
├── setup.py # Package configuration
└── README.md # Project overview
- Python 3.8 or higher
- Chrome or Firefox browser
- Java Runtime Environment (for Allure reporting)
-
Clone the repository:
git clone https://github.com/uelkerd/PulseQ.git cd PulseQ
-
Create and activate a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies:
pip install -e .
pytest
pytest tests/test_login.py
pytest --alluredir=allure-results
allure serve allure-results
python -m pulseq.core --tests tests/test_e2e_checkout.py --parallel 2
from pulseq.utilities.api_client import APIClient
# Initialize API client
client = APIClient("https://api.example.com")
# Make requests
response = client.get("/users")
assert response.status_code == 200
# Chain requests
user = client.post("/users", json={"name": "John"}).json()
client.get(f"/users/{user['id']}").validate_status_code(200)
from pulseq.utilities.visual_utils import VisualTester
# Initialize visual tester
tester = VisualTester()
# Take and compare screenshots
screenshot = tester.take_screenshot(driver, "homepage")
matches, similarity = tester.compare_screenshots(screenshot, "baseline.png")
assert matches, f"Screenshots differ (similarity: {similarity})"
from pulseq.utilities.performance_metrics import measure_performance
@measure_performance
def test_page_load(driver, metrics):
driver.get("https://example.com")
assert metrics.get_average("execution_time") < 5.0
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Selenium for web automation
- Pytest for testing framework
- GitHub Actions for CI/CD