- Open Terminal/CMD
- Install newman
npm install -g newman
- Go to root path of project
- Enter command
newman run OData_In_6_Steps.postman_collection.json
- CLI will show below results
- Open Terminal/CMD
- Install reporters
npm install -g newman-reporter-html
- Go to root path of project
- Enter command
newman run OData_In_6_Steps.postman_collection.json -r html
- Open Terminal/CMD
- Install reporters
npm install -g newman-reporter-htmlextra
- Go to root path of project
- Enter command
newman run OData_In_6_Steps.postman_collection.json -r htmlextra --reporter-htmlextra-export .\testResults\TestResult.html
- Open Terminal/CMD
- Install reporters
npm install -g newman-reporter-csv
- Go to root path of project
- Enter command
newman run OData_In_6_Steps.postman_collection.json -r csv --reporter-csv-export .\testResults\TestResult.csv
Issue #1: When you run Postman collection using newman you may see error:
File C:\Users\admin\AppData\Roaming\npm\newman.ps1 cannot be loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.
Solution: Follow step 1 to 3 given on https://www.c-sharpcorner.com/article/how-to-fix-ps1-can-not-be-loaded-because-running-scripts-is-disabled-on-this-sys/