π Latest Allure Report | π Swag Labs Demo
A robust, production-ready Selenium automation framework built with Python and pytest, implementing the Page Object Model (POM) design pattern. Features comprehensive CI/CD integration, Selenium Grid support, and detailed Allure reporting with historical trends.
- ποΈ Page Object Model (POM) - Clean, maintainable test architecture
- π Cross-Browser Support - Chrome, Firefox, Edge, Safari
- β‘ Parallel Execution - Multi-threaded test execution with configurable workers
- π Cross-Browser Parallel - Run tests simultaneously across multiple browsers
- π― Flexible Parallelization - Browser-level and test-level parallel execution
- π₯οΈ Cross-Platform - Windows, macOS, Linux compatibility
- πΈ Visual Documentation - Automatic screenshot capture at every step
- π Allure Reporting - Rich reports with history trends and analytics
- π CI/CD Integration - GitHub Actions with automated deployments
- π Performance Metrics - Execution statistics and trend analysis
- π§ Email Notifications - Automated test result summaries
- π― Flexible Execution - Multiple test execution strategies
- π§Ή Auto-Cleanup - Browser process management
Before running the tests, ensure you have the following installed:
Software | Version | Purpose | Installation Guide |
---|---|---|---|
Python | 3.10+ | Core runtime | python.org |
Docker Desktop | Latest | Selenium Grid & containers | docker.com |
Java | 8+ | Allure reporting | oracle.com/java |
selenium-pom-ui-tests-python/
βββ π .github/
β βββ workflows/
β βββ selenium-grid-ci.yml # GitHub Actions CI/CD workflow
βββ π Pages/ # Page Object Model classes
β βββ login_page.py # Login page objects
β βββ inventory_page.py # Product listing page
β βββ checkout_page.py # Checkout flow pages
βββ π Tests/ # Test scripts
β βββ conftest.py # Pytest fixtures & configuration
β βββ test_swag_login.py # Login functionality tests
β βββ assets/ # Test-specific assets
βββ π Utility/ # Helper functions
β βββ utility.py # Common utilities
βββ π allure-results/ # Test results directory
β βββ environment.properties # Environment configuration
β βββ categories.json # Test categorization rules
βββ π allure-report/ # Generated HTML reports
βββ π reports/ # Archived test reports
βββ π .pytest_cache/ # Pytest cache directory
βββ π pytest.ini # Pytest configuration
βββ π Dockerfile # Container configuration
βββ π docker-compose.yml # Selenium Grid orchestration
βββ π requirements.txt # Python dependencies
βββ π setup_check.py # Environment verification
βββ π cleanup.py # Browser process cleanup
βββ π README.md # Project documentation
- Chrome (default)
- Firefox
- Edge
- Safari (local only)
-
Clone Repository
git clone https://github.com/SaiVamsiKolla-QA/selenium-pom-ui-tests-python.git cd selenium-pom-ui-tests-python
-
Set Up Environment
python -m venv .venv source .venv/bin/activate # Linux/macOS .venv\Scripts\activate # Windows pip install -r requirements.txt
-
Run Tests
# Run all tests pytest # Run specific test category pytest -m smoke pytest -m "smoke and not login" # Run with specific browser pytest --browser chrome pytest --browser firefox
-
Run with Selenium Grid
# Start Selenium Grid docker-compose up -d # Run tests against Grid pytest --remote-url http://localhost:4444/wd/hub
-
Parallel Cross-Browser Testing
# Run the parallel cross-browser test script ./run_parallel_cross_browser.sh # Available options: # -w, --workers N Number of parallel workers (default: 4) # -b, --browsers LIST Comma-separated list of browsers (default: chrome,firefox) # -u, --url URL Remote Selenium Grid URL (default: http://localhost:4444/wd/hub) # -t, --tests PATH Test path (default: Tests/) # Examples: # Run with 6 workers on all browsers ./run_parallel_cross_browser.sh -w 6 -b chrome,firefox,edge # Run specific tests with 4 workers ./run_parallel_cross_browser.sh -t Tests/test_swag_login.py # Run on custom Selenium Grid ./run_parallel_cross_browser.sh -u http://custom-grid:4444/wd/hub # Combined options ./run_parallel_cross_browser.sh -w 6 -b chrome,firefox -t Tests/test_swag_login.py -u http://localhost:4444/wd/hub
# Generate Allure report
allure generate allure-results -o allure-report --clean
# Open report
allure open allure-report
- Automated report generation
- GitHub Pages deployment
- Email notifications with test results
- Historical trend analysis
- Chrome (default)
- Firefox
- Edge
- Safari (local only)
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.