Skip to content

TAMILKUMAR0027/Pytest_Automation_Project

Repository files navigation

Python Pytest Selenium Allure Pytest HTML GitHub Actions Jenkins

Pytest Selenium Automation Framework

A scalable and maintainable UI automation framework built using Python, Selenium WebDriver, and Pytest for the LambdaTest Ecommerce Playground. This project was developed for learning and implementing modern test automation practices using industry-standard design patterns and tools.


Features

  • Cross-browser support (Chrome & Firefox)
  • Headless and Normal execution modes
  • Page Object Model (POM) design pattern
  • Centralized configuration management using config.ini
  • Automatic driver management with webdriver-manager
  • Explicit and configurable wait strategies
  • Structured logging and debugging support
  • Pytest markers for selective test execution
  • Allure Reporting integration
  • Pytest HTML Reporting
  • Parallel execution support using pytest-xdist
  • CI/CD ready for GitHub Actions and Jenkins

Application Under Test

LambdaTest Ecommerce Playground

https://ecommerce-playground.lambdatest.io/


Tech Stack

Technology Purpose
Python 3.x Programming Language
Selenium WebDriver Browser Automation
Pytest Test Framework
WebDriver Manager Driver Management
Allure Reports Advanced Reporting
Pytest HTML HTML Reporting
Logging Test Execution Logs

Project Structure

Pytest_Automation_Project
│
├── configuration/          # Configuration files
├── pages/                  # Page Object Classes
├── tests/                  # Test Cases
├── utils/                  # Utility Classes
├── actions/                # Reusable Actions
├── data_provider/          # Test Data
├── logs/                   # Log Files
├── reports/                # Generated Reports
├── conftest.py             # Fixtures & Driver Setup
├── pytest.ini              # Pytest Configuration
├── requirements.txt
├── .gitignore
└── README.md

Installation

Clone the repository:

git clone <repository-url>
cd Pytest_Automation_Project

Install dependencies:

pip install -r requirements.txt

Configuration

Update the configuration/config.ini file:

[browser]
browser = firefox
mode = normal

[application]
url = https://ecommerce-playground.lambdatest.io/index.php?route=common/home
title = Your Store

[timeouts]
implicit_wait = 10
explicit_wait = 15
page_load_timeout = 30

Running Tests

Run All Tests

pytest

Verbose Execution

pytest -v

Run Specific Test File

pytest tests/test_launch.py -v

Run Using Markers

pytest -m smoke
pytest -m regression
pytest -m sanity
pytest -m "sanity and regression"

Parallel Execution

Run tests using multiple workers:

pytest -n 4

Generate Reports

Pytest HTML Report

pytest --html=reports/report.html --self-contained-html

Allure Report

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

Sample Test Structure

@pytest.mark.smoke
@pytest.mark.regression
def test_homepage_verification(driver):
    drv, wait = driver

    # Test Logic Here

Contributing

Contributions are welcome.

  1. Fork the repository
  2. Create a feature branch
  3. Follow the existing POM structure
  4. Add proper logging and assertions
  5. Test changes in Chrome and Firefox
  6. Submit a Pull Request

Future Enhancements

  • API Testing Integration
  • Docker Execution Support
  • Cloud Execution (LambdaTest / BrowserStack)
  • Data-Driven Testing with Excel and JSON
  • Advanced Reporting Dashboard
  • Test Analytics Integration

Contributors

  • Tamil Kumar
  • Prasanna Venkatesh K
  • Rishwanth
  • Samiha
  • Jothika

License

This project is intended for learning and educational purposes.


Built with Python, Selenium, and Pytest for modern UI test automation.

Happy Testing! 🚀

About

Pytest + Selenium POM automation framework with Allure & Pytest HTML reporting for LambdaTest Ecommerce Playground. Built for learning modern QA automation and framework development.

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages