Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/yugal619/pytest_project
- Owner: yugal619
- Created: 2024-12-01T11:38:30.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2025-01-07T10:47:46.000Z (2 days ago)
- Last Synced: 2025-01-07T11:39:49.962Z (2 days ago)
- Topics: automation, framework, pom, project, pytest, pytest-xdist, python, screenshot, selenium, testing
- Language: Python
- Homepage:
- Size: 16.1 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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+
Git1. Clone the Repository
```
git clone https://github.com/yugal619/pytest_project.gitcd
```
3. Install DependenciesInstall 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