Skip to content

This project implements automated UI tests using Selenium with Python and Allure for generating detailed and visual test reports. The project follows the Page Object Model (POM) design pattern, ensuring tests are organized, maintainable, and reusable.

Notifications You must be signed in to change notification settings

agusdinax/qa-selenium-python-allure

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python Badge Pytest Badge Selenium Badge Allure Badge

🐍 Selenium Automation Project with Pytest & Allure

🌐 English Version

📖 Project Overview

This is a Test Automation Project developed using Python, Selenium, Pytest, and Allure Reports. The project focuses on automating several test cases for a sample web application, following the Page Object Model (POM) design pattern to ensure better scalability and maintainability.


🛠️ Tools & Technologies

  • Python 3.x
  • Selenium WebDriver
  • Pytest
  • Allure Report

📂 Project Structure

project-root/
│-- pages/                # Page Objects (locators and actions)
│-- tests/                 # Test cases (pytest)
│-- utils/                  # Utilities (configuration, helpers, etc.)
│-- conftest.py            # Pytest fixtures/hooks
│-- pytest.ini              # Pytest configuration
│-- requirements.txt       # Project dependencies
│-- README.md               # This file

🚀 Installation & Setup

  1. Clone the repository:

    git clone <repository-url>
    cd project-root
  2. Create and activate a virtual environment:

    python -m venv venv
    source venv/bin/activate   # Linux/Mac
    .\venv\Scripts\activate    # Windows
  3. Install required dependencies:

    pip install -r requirements.txt

✅ Running Tests

Run all test cases:

pytest

Run tests marked as 'form':

pytest -m form

Run a specific test file:

pytest tests/test_001_login.py

📊 Allure Reports

Run tests and generate Allure results:

pytest --alluredir=allure-results

Open Allure report:

allure serve allure-results

🔗 Useful Additional Commands

  • Run tests with detailed output:
pytest -v
  • Run only failed tests from previous execution:
pytest --lf
  • Customize pytest execution with markers (example form marker):
pytest -m form -v


🐍 Proyecto de Automatización con Selenium, Pytest y Allure

🌐 Versión en Español

📖 Descripción del Proyecto

Este es un Proyecto de Automatización de Pruebas desarrollado con Python, Selenium, Pytest y Allure Reports. El objetivo es automatizar varios casos de prueba para una aplicación web de ejemplo, siguiendo el patrón de diseño Page Object Model (POM) para facilitar el mantenimiento y la escalabilidad.


🛠️ Herramientas y Tecnologías

  • Python 3.x
  • Selenium WebDriver
  • Pytest
  • Allure Report

📂 Estructura del Proyecto

project-root/
│-- pages/                # Objetos de página (localizadores y acciones)
│-- tests/                 # Casos de prueba (pytest)
│-- utils/                  # Utilidades (configuración, helpers, etc.)
│-- conftest.py            # Fixtures/Hooks de pytest
│-- pytest.ini              # Configuración de pytest
│-- requirements.txt       # Dependencias del proyecto
│-- README.md               # Este archivo

🚀 Instalación y Configuración

  1. Clonar el repositorio:

    git clone <repository-url>
    cd project-root
  2. Crear y activar un entorno virtual:

    python -m venv venv
    source venv/bin/activate   # Linux/Mac
    .\venv\Scripts\activate    # Windows
  3. Instalar dependencias:

    pip install -r requirements.txt

✅ Ejecución de Pruebas

Ejecutar todos los casos de prueba:

pytest

Ejecutar solo pruebas marcadas como 'form':

pytest -m form

Ejecutar un archivo específico:

pytest tests/test_001_login.py

📊 Reportes con Allure

Ejecutar pruebas y generar resultados para Allure:

pytest --alluredir=allure-results

Abrir el reporte de Allure:

allure serve allure-results

🔗 Comandos Adicionales Útiles

  • Ejecutar pruebas con salida detallada:
pytest -v
  • Ejecutar solo pruebas fallidas de la ejecución previa:
pytest --lf
  • Personalizar la ejecución usando marcadores (ejemplo 'form'):
pytest -m form -v

About

This project implements automated UI tests using Selenium with Python and Allure for generating detailed and visual test reports. The project follows the Page Object Model (POM) design pattern, ensuring tests are organized, maintainable, and reusable.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages