Skip to content

uelkerd/PulseQ

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PulseQ Test Automation Framework

Enterprise CI/CD CI CodeQL Analysis Performance Monitoring

Python Version License Code Coverage

Overview

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.

Key Features

  • 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

Project Structure

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

Getting Started

Prerequisites

  • Python 3.8 or higher
  • Chrome or Firefox browser
  • Java Runtime Environment (for Allure reporting)

Installation

  1. Clone the repository:

    git clone https://github.com/uelkerd/PulseQ.git
    cd PulseQ
  2. Create and activate a virtual environment:

    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
  3. Install dependencies:

    pip install -e .

Running Tests

Simple Test Execution

pytest

With Specific Test Path

pytest tests/test_login.py

With Allure Reporting

pytest --alluredir=allure-results
allure serve allure-results

Using the Framework CLI

python -m pulseq.core --tests tests/test_e2e_checkout.py --parallel 2

Usage Examples

API Testing

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)

Visual Testing

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})"

Performance Testing

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

Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

About

A modular test automation framework for web applications

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •