Skip to content

Automating api testing with postman and newman CLI consisting of positive and negative test case scenarios for an api. Contains assertions for each requests and validations as well.

Notifications You must be signed in to change notification settings

NikeshMan16/PlatziAPI-Postman

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Automating api testing with postman and newman CLI consisting of positive and negative test case scenarios for an api. Contains assertions for each requests and validations as well.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages