Skip to content

brandon-morris/qa-automation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

QA-Automation Educational Repository.

Contains bare-bones test scripts to get you started quickly.

Running postman collections in your cli or pipeline

the basic command requires that you have nodejs and the newman package installed

newman run /path/to/your/collection/myCollection.postman_collection.json

the expanded command with more detail

newman run ./myCollection.postman_collection.json -e ./envFile.postman_environment.json -d ./data/myCsvOrJsonDataFileForMultipleIterations.json -g ./globals/postmanGlobalVariablesFile.json -i 2 -r cli,html,htmlextra
-e   to pass in the path to your environment file. 
    Example use case: a {{host}} variable in the event that you have the app deployed in multiple datacenters and the URL changes depending on the DC.

-d   to pass in the path to your data file.
-i   integer of how many iterations to run. 
-g   to pass in the path to a globals file is you use them. _I tend not to use this_ 

-r   reporters. in this case the 'cli' arg enables outputting to the console. The 'html' option makes newman generate an html report. 
The 'htmlextra' option is another package that you can install that makes for a more developed static webpage report. 



HTML Extra on NPM

Example with the welcome-service
 newman run qa-automation/welcome-service/welcome-service.postman_collection.json -e qa-automation/welcome-service/welcome-service-local.postman_environment.json 

Reference Materials

Postman Test Examples Postman Sandbox API Scripting Reference

Brandon Morris DevOps Engineer

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages