Skip to content

Conversation

kevineumutoni
Copy link
Collaborator

Description

This PR sets up automated API testing using Postman CLI, triggered via GitHub Actions on pushes and pull requests to the main and develop branches. The workflow runs the specified Postman Collection and Environment by UID, generates a JUnit test report, and uploads the report as a build artifact.

What is this?
Adds a CI workflow for running API tests with Postman CLI and collecting detailed test reports.

Why this?
Automating API tests in CI ensures that all endpoints are continuously validated on every push or PR, improving code quality and reducing manual work.

How are you doing this?

  • Added .github/workflows/postman_tests.yml to configure GitHub Actions.
  • The workflow:
    • Installs Postman CLI.
    • Authenticates using a GitHub secret (POSTMAN_API_KEY).
    • Runs the collection with the environment.
    • Exports test results as a JUnit XML report.
    • Uploads the report as an artifact for review.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change
  • This change requires a documentation update
  • Optimization
  • Improvement

How Has This Been Tested?

  • Manually triggered the workflow on pushes to develop and main.
  • Verified that API tests run and a JUnit artifact is uploaded.
  • Confirmed that the artifact contains a detailed test report matching Postman CLI output.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation (README/workflow usage)
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works (automated via workflow)
  • New and existing unit tests pass locally with my changes

@kevineumutoni kevineumutoni changed the title Update README.md Update README.md and added automated tests Sep 10, 2025
@Ndichu-shee Ndichu-shee merged commit 186086d into main Sep 10, 2025
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants