-
Download and install postman
-
Import collections from this repo
-
Download and install node.js
-
Install newman from cmd:
npm install -g newman
Decided to use environment variables because:
- global variables have lower precedence and can be overridden by environment variables
- seems more natural to use
--environment
option when running collection using newman
- Install newman-reporter-htmlextra from cmd:
npm install -g newman-reporter-htmlextra
Run collection with tests for BookCart API using Postman UI:
newman run <collection_name.json> -e <environment_file.json>
newman run <collection_name.json> -e <environment_file.json> -r htmlextra
Run collection with tests for Library API using newman