Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/yugal619/pytest_project

Demo on use of pytest for UI Automation using POM
https://github.com/yugal619/pytest_project

automation framework pom project pytest pytest-xdist python screenshot selenium testing

Last synced: about 12 hours ago
JSON representation

Demo on use of pytest for UI Automation using POM

Awesome Lists containing this project

README

        

# ๐Ÿš€ Python Selenium Automation Framework (Pytest + POM Model)

## Project Overview
This is a robust UI Test Automation Framework built using Python, Pytest, and Selenium. The project follows the Page Object Model (POM) design pattern to ensure code reusability, readability, and maintainability.

## Test cases are automated for the sample website:
๐Ÿ”— [Website link](https://testpages.eviltester.com/styled/index.html)

## Key Features :
๐Ÿ› ๏ธ Python + Pytest Framework: Leveraging the power of Pytest for structuring and executing test cases.

๐Ÿ“„ Page Object Model (POM): Ensures clean and maintainable code by separating page interactions from test scripts.

๐Ÿงช Parameterized Fixtures: Used to pass test data dynamically, enabling better test coverage.

๐Ÿท๏ธ Pytest Markers: Implemented custom markers (e.g., smoke, regression, etc.) for selective test execution.

๐Ÿ“ธ Screenshot Mechanism: Automatically captures screenshots for failed test cases for debugging purposes.

๐Ÿ“‹ Logging Mechanism: Integrated loggers to capture detailed logs of test execution.

๐Ÿ“Š HTML Test Report: Pytest-HTML/Allure used to generate professional test execution reports.

## Tech Stack

- Programming Language: Python

- Test Framework: Pytest

- Browser Automation: Selenium

- Design Pattern: Page Object Model (POM)

- Reporting: Allure Reports / Pytest-HTML

- Logging: Python's Logging Module

## Installation and Setup
Follow these steps to set up and execute the project on your local machine:

## Prerequisites
Python 3.8+
Git

1. Clone the Repository
```
git clone https://github.com/yugal619/pytest_project.git

cd
```
3. Install Dependencies

Install all required packages listed in requirements.txt:

```pip install -r requirements.txt```

3. Run Test Cases
Execute test cases using Pytest:
```
pytest tests/ --html=reports/report.html --self-contained-html
```
Run Specific Tests:

```
pytest -m "smoke" # Run tests marked as smoke
pytest -k "home_page" # Run tests containing 'home_page' in name
```

## Contributing
Contributions are welcome! If you have suggestions or ideas to enhance the framework, feel free to create a Pull Request.

## Contact

- ๐Ÿ“ง Email: [email protected]
- LinkedIn: https://www.linkedin.com/in/yugal-sinha-629941124/

### SEO Optimized Keywords
To ensure visibility on search engines like Google:

Python Selenium Automation Framework

Pytest Framework with POM

Selenium Test Automation

Screenshot Mechanism in Pytest

Test Reporting with Pytest-HTML and Allure

Automated UI Testing using Python