Skip to content

bguerraDev/smspyQA

Repository files navigation

SMSPyQA – Automated QA Testing with Pytest

es

Python Pytest Allure Selenium Requests

📀 Overview

SMSPyQA is an automated QA testing project for the SMSPy application, built with Pytest, Selenium, and Allure Reports. It includes UI tests for the frontend and API tests for the backend, with centralized configuration and reusable fixtures.

🛠 Tech Stack

  • Python 3.13
  • Pytest – Test framework
  • Selenium WebDriver – UI automation
  • Requests – API testing
  • Allure – Test reporting
  • python-dotenv – Environment variable management

🏠 Architecture & Design Patterns

  • Page Object Model (POM) for UI tests
  • Fixtures in conftest.py for:
    • Backend and frontend URLs
    • Test credentials
    • API authentication tokens
    • Pre-logged-in drivers for UI tests
  • Single source of truth for environment variables via .env loaded in conftest.py
  • Separation of concerns: UI and API tests in separate directories
  • Constants file for selectors and UI-specific text

🗂 Project Structure

SMSPyQA/
├── .env                  # Environment variables (not committed)
├── .gitignore            # Ignored files/folders for Git
├── README.md             # English documentation
├── README.es.md          # Spanish documentation
├── requirements.txt      # Project dependencies
├── pytest.ini            # Pytest configuration
├── conftest.py           # Global fixtures & config
├── run_allure.py         # Script to serve Allure reports
├── run_tests.bat         # Windows batch to run tests
├── allure_reports/       # Generated Allure result files
├── reports/              # Extra reports storage
├── screenshots/          # UI test screenshots
├── videos/               # Recorded videos of UI tests
├── tests/
│   ├── api_tests/        # API test cases
│   │   ├── test_messages.py  # API: Send messages tests
│   │   └── test_profile.py   # API: Profile management tests
│   ├── assets/           # Test assets (images for uploads)
│   │   ├── testpy_avatar.jpg
│   │   └── testpy_image.jpg
│   └── ui_tests/         # UI test cases
│       ├── pages/        # Page Object Model classes
│       │   ├── base_page.py          # Base class for all pages
│       │   ├── login_page.py         # Login page actions
│       │   ├── message_send_page.py  # Message sending page
│       │   ├── messages_list_page.py # Message list page
│       │   └── profile_page.py       # Profile page
│       ├── tests/        # UI test scripts
│       │   ├── test_login.py         # UI: Login test
│       │   ├── test_profile.py       # UI: Profile update test
│       │   └── test_send_message.py  # UI: Send message test
│       └── utils/        # UI utility functions
│           ├── constants.py          # UI selectors & constants
│           └── driver_factory.py     # WebDriver factory
└── venv/                 # Python virtual environment

🚀 Running Tests

  1. Install dependencies
    pip install -r requirements.txt
  2. Set up .env file
    BASE_URL_BACKEND=https://smspy-backend-pre.onrender.com/api
    BASE_URL_FRONTEND=https://smspy-frontend-pre.onrender.com
    TEST_USERNAME=your_username
    TEST_PASSWORD=your_password
  3. Run API tests
    pytest tests/api_tests/ --alluredir=allure_reports
  4. Run UI tests
    pytest tests/ui_tests/tests/ --alluredir=allure_reports
  5. Serve Allure report
    allure serve allure_reports

📊 Reports

All tests generate Allure reports including screenshots, videos, and detailed step logs.

📸 Screenshots

Desktop

Desktop - Screenshot

Mobile

Mobile - Screenshot

🌐 Topics

python pytest selenium allure qa-automation page-object-model api-testing ui-testing

About

SMSPyQA is an automated QA testing project for the SMSPY full-stack application

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published