This project demonstrates an automated workflow for API testing using Postman, Newman, and GitHub Actions. It includes a fully automated CI/CD pipeline that runs API tests on every push to the main
branch and publishes a detailed HTML test report to GitHub Pages.
- Automated API testing with Postman collections.
- CI/CD integration with GitHub Actions.
- Test report generation using Newman and HTML Extra Reporter.
- Test report publication via GitHub Pages.
- Postman Collection: Contains API test cases to validate the functionality of the APIs.
- Newman Runner: Executes the Postman collection and generates a test report.
- GitHub Actions CI:
- Triggers on every push to the
main
branch. - Runs the tests and generates the HTML report.
- Triggers on every push to the
- GitHub Pages Deployment:
- The generated report is deployed to the
gh-pages
branch. - The report is accessible online via GitHub Pages.
- The generated report is deployed to the
- A GitHub repository with a Postman collection (
collection.json
) and environment file (environment.json
). - Node.js and npm installed locally (for testing locally).
- Newman and Newman HTML Extra Reporter installed globally.
git clone https://github.com/<your-username>/bookstore-api-test-postman.git
cd bookstore-api-test-postman
npm install
npm run test
Open the generated index.html
in a browser to view the detailed test results.
- Automated Testing: Every push to the main branch triggers the GitHub Actions workflow to run the API tests.
- Report Generation: Newman executes the Postman collection and generates a test report using the HTML Extra Reporter.
- Report Deployment: The workflow deploys the report to the gh-pages branch, making it accessible via GitHub Pages.
- Add support for multiple environments (e.g., staging, production).
- Integrate notifications (e.g., Slack, email) for test failures.
- Implement performance testing for API endpoints.
- Generate aggregated reports for multiple test runs.
This project is licensed under the MIT License.
M Mohaiminul Islam
GitHub: https://www.github.com/mohaiminul-shovon