Skip to content

Latest commit

 

History

History
43 lines (29 loc) · 1.17 KB

File metadata and controls

43 lines (29 loc) · 1.17 KB

Postman API Test Collection

This repository contains automated API tests using Postman and Newman, Postman's command-line tool.

File Structure

  • collections/: Contains exported Postman test collections (v2.1).
  • environments/: Postman environments for future different environments like dev, staging, etc.
  • .github/workflows/: Contains the GitHub Actions workflow to run Newman tests on every push.

▶️ Running Tests Locally with Newman

Prerequisite

Install Newman:

npm install -g newman

Install Newman report:

npm install -g newman-reporter

Running the tests from command line using newman

newman run collections/Test-project-api.postman_collection.json

Running the tests and report generation using newman CLI

  1. Go to the project root directory
  2. Open command prompt
  3. Enter the following script

Test execution and Report generation command

newman run collections/Test-project-api.postman_collection.json -r html --reporter-html-export Report.html
  1. Report.html is the html-report generated in the project root directory.