Production-ready REST API automation framework built using Python, Pytest, and Requests.
- Multi-environment execution (DEV / QA)
- Retry mechanism with exponential backoff
- SLA validation (response time checks)
- Parallel test execution
- GitHub Actions CI integration
- Structured logging
- Modular and reusable framework architecture
- Python 3
- Pytest
- Requests
- Pytest-xdist
- GitHub Actions
scalable_api_automation_framework/
├── clients/
├── config/
│ ├── dev.yaml
│ └── qa.yaml
├── core/
│ ├── base_client.py
│ ├── retry_handler.py
│ ├── auth_manager.py
│ └── logger.py
├── schemas/
├── tests/
├── utils/
├── .github/workflows/api-tests.yml
├── conftest.py
├── pytest.ini
└── requirements.txtpytest -s --env devpytest -s --env qapytest -n autoUses pytest-xdist for parallel execution.
- Configurable through YAML
- Supports exponential backoff
- Handles transient API failures
- Environment-specific retry configuration
Example:
retry:
max_attempts: 3
backoff_factor: 2Supports response-time validation directly in test cases.
Example:
response = api_client.get("/posts", sla_ms=1000)Ensures APIs respond within defined SLA thresholds.
GitHub Actions workflow includes:
- Automatic execution on push
- Dependency installation
- Test execution
- CI status reporting
- Modular framework design
- Environment-based configuration
- Session management
- Retry handling
- Parallel execution
- CI/CD workflow integration
- Structured logging
- Allure Reporting
- Docker Integration
- API Mocking
- Test Data Management Layer
Pavan Chinta
QA Automation Engineer | Python | API Testing | CI/CD