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.
- Python 3.13
- Pytest – Test framework
- Selenium WebDriver – UI automation
- Requests – API testing
- Allure – Test reporting
- python-dotenv – Environment variable management
- 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 inconftest.py
- Separation of concerns: UI and API tests in separate directories
- Constants file for selectors and UI-specific text
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
- Install dependencies
pip install -r requirements.txt
- Set up
.env
fileBASE_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
- Run API tests
pytest tests/api_tests/ --alluredir=allure_reports
- Run UI tests
pytest tests/ui_tests/tests/ --alluredir=allure_reports
- Serve Allure report
allure serve allure_reports
All tests generate Allure reports including screenshots, videos, and detailed step logs.
python
pytest
selenium
allure
qa-automation
page-object-model
api-testing
ui-testing