This repository contains an automated testing framework built using Python and Selenium. The framework is designed for end-to-end UI testing of web applications, incorporating modular page objects, reusable locators, and detailed reporting capabilities.
- Page Object Model (POM): Organized code structure with separate modules for locators and page actions.
- Test Scenarios: Covers various UI interactions including form filling, button clicks, file uploads, and downloads.
- Dynamic Data Generation: Utilizes Faker to generate random test data for inputs.
- Allure Reports: Provides comprehensive test execution reports with screenshots for failed tests.
- Error Handling: Robust error handling with automated screenshot capture on test failures.
.
├── README.md # Project documentation
├── conftest.py # Pytest fixtures and configurations
├── data/ # Data classes and helpers
│ └── data.py
├── generator/ # Data generators for test inputs
│ └── generator.py
├── locators/ # Web element locators for pages
│ ├── __init__.py
│ ├── elements_page_locators.py
│ └── form_page_locators.py
├── pages/ # Page object classes
│ ├── __init__.py
│ ├── base_page.py
│ ├── elements_page.py
│ └── form_page.py
├── pytest.ini # Pytest configuration
├── requirements.txt # Python dependencies
├── screenshots/ # Screenshots captured during tests
│ ├── test_check_box.png
│ └── test_radio_button.png
└── tests/ # Test cases
├── __init__.py
├── elements_test.py
└── form_test.py
- Python 3.8 or higher
- Google Chrome browser and the latest ChromeDriver
- Recommended: Virtual environment for Python dependencies
-
Clone the repository:
git clone https://github.com/Yediyarov/automation-python.git
-
Navigate to the project directory:
cd automation-python
-
Install dependencies:
pip install -r requirements.txt
- Ensure ChromeDriver is installed and available in your PATH.
- Run the tests using Pytest:
pytest --alluredir=allure-results
- Generate Allure reports:
allure serve allure-results
- Open the generated report in your browser.
- Test Data: Modify
generator/generator.py
to customize random data generation. - Locators: Update locators in
locators/
for web elements specific to your application. - Configurations: Adjust settings in
pytest.ini
andconftest.py
to match your environment.
Contributions are welcome! Follow these steps to contribute:
- Fork the repository.
- Create a new branch:
git checkout -b feature/your-feature-name
- Commit your changes:
git commit -m 'Add new feature'
- Push to your branch:
git push origin feature/your-feature-name
- Open a pull request.
This project is licensed under the MIT License. See LICENSE
for more details.
Developed by Khayal Yediyarov. Feel free to reach out with any questions or suggestions!