This project is a Python-based API automation framework for testing the reqres.in
RESTful web service. It uses the pytest testing framework and GitHub Actions for continuous integration.
- Automated testing of various API endpoints on
reqres.in
. - Positive, negative, and edge test cases.
- Continuous integration with GitHub Actions.
- Dynamic working directory setup in the GitHub Actions workflow.
- Test report generation and saving as an artifact.
Before you get started, ensure you have the following prerequisites:
- Python 3.x
pip
for package management
git clone https://github.com/yourusername/reqres-api-automation.git
cd reqres-api-automation
pip install -r requirements.txt
pytest tests/test_users.py
The tests generate an HTML test report, which can be found in the project directory as report.html.
This project includes a GitHub Actions workflow that automates the testing process on each push, pull request, and a daily schedule. The workflow is configured in the .github/workflows directory.
Push: The workflow is triggered automatically when changes are pushed to the main branch.
Pull Request: It's also triggered when pull requests are created or updated.
Scheduled Run: The workflow runs daily at midnight UTC to ensure regular testing.
Manual Run: You can manually trigger the workflow using the "Run workflow" button in the GitHub Actions tab.