๐ฅ๐ Test Automation Project โ UI & API ๐๐ฅ
This repository contains automated test suites for UI and API testing, implemented in Python using Selenium for UI and requests for API.
โ๏ธ Manual Testing Scenarios Analysis
-
Pencil with Eraser Testing
Full functional, usability, performance, load, stress, and security testing scenarios.
View analysis document -
Hepsiburada Product Recommendations Analysis
Study of Recommendations sections across Main, Product Detail, and Cart pages.
View analysis document
๐ป๐ UI Test Automation
- Framework: Python + Pytest + Selenium
- Page Object Model fully implemented
- Cross-browser support: Chrome & Firefox
- Screenshots captured automatically on failures
- Parallel execution supported via xdist
๐ป ๐ท API Test Automation
- Framework: Python + Pytest + Requests
- CRUD operations for
Petendpoints (Swagger Petstore) - Positive and negative test scenarios
- In-memory image upload using
io.BytesIO - Parallel execution supported via xdist
๐ณ Project Structure
ui_tests/ and api_tests/ combined structure:
UI Testing
โโโ ui_tests/
โ โโโ config.py # Global configuration (BASE_URL, timeouts)
โ โโโ conftest.py # Pytest hooks and global fixtures
โ โโโ fixtures/ # Pytest fixtures
โ โ โโโ fxt_webdriver.py
โ โ โโโ fxt_cookie.py
โ โโโ pages/ # POM classes
โ โ โโโ base_page.py
โ โ โโโ home_page.py
โ โ โโโ careers_page.py
โ โ โโโ career_roles_page.py
โ โ โโโ careers_open_positions_page.py
โ โโโ tests/ # Test cases
โ โ โโโ test_home_page.py
โ โ โโโ test_careers_page.py
โ โ โโโ test_browse_open_positions.py
โ โโโ utils/ # Helpers (e.g., screenshot)
โ โโโ generate_screenshot.py
API Testing
โโโ api_tests/
โ โโโ api/
โ โ โโโ base_api.py
โ โ โโโ config.py
โ โ โโโ pet_api.py
โ โโโ fixtures/
โ โ โโโ fxt_pet_api.py
โ โ โโโ fxt_add_pet.py
โ โโโ tests/
โ โ โโโ test_create_pets.py
โ โ โโโ test_delete_pets.py
โ โ โโโ test_get_pets.py
โ โ โโโ test_update_pets.py
โ โ โโโ test_image_upload_pet.py
โ โโโ utils/
โ โโโ api_payloads.py
โ โโโ enums.py
โ โโโ generate_image_file.py
๐ Key Features
-
UI Tests
- Full POM implementation
- Cross-browser (Chrome/Firefox)
- Screenshots captured on failure
- Parameterized tests and fixtures
- Auto-handling cookie banners
- Parallel execution via
pytest-xdist
-
API Tests
- Full CRUD coverage
- Positive and negative test scenarios
- Image upload support (in-memory)
- Payload builders & enumerations
-
- Parallel execution via
pytest-xdist
- Parallel execution via
-
General
- Independent, reusable fixtures
- Easy parametrization
- Supports both UI and API test execution in parallel
๐งโ๐ป Running Tests
Install dependencies:
pip install -r requirements.txtRun all UI tests:
pytest ui_tests/ -n auto -vRun all API tests:
pytest api_tests/ -n auto -vRun specific test file:
pytest ui_tests/tests/test_careers_page.py -vRun tests by marker:
pytest -m "API and CREATE_PET" -v๐ค Notes
- Uses requests library for API calls.
- Image upload uses in-memory files via io.BytesIO.
- Screenshots are generated automatically on test failure.
- All tests are independent and use fixtures for setup/teardown.
- Enumerations (enums.py) and payload builders (api_payloads.py) help maintain consistency across tests.