https://github.com/codewithmmak/postman-newman-automation-thecatapi
API Automation using Postman and running tests using Newman
https://github.com/codewithmmak/postman-newman-automation-thecatapi
api-automation api-testing-framework newman postman postman-collection restful-api
Last synced: 4 months ago
JSON representation
API Automation using Postman and running tests using Newman
- Host: GitHub
- URL: https://github.com/codewithmmak/postman-newman-automation-thecatapi
- Owner: codewithmmak
- License: mit
- Created: 2021-10-17T09:15:26.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-12-24T18:04:30.000Z (over 3 years ago)
- Last Synced: 2025-07-10T16:40:41.001Z (11 months ago)
- Topics: api-automation, api-testing-framework, newman, postman, postman-collection, restful-api
- Homepage:
- Size: 393 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# API Automation using POSTMAN and running tests using Newman
## How to run Postman Collection using Postman tool?
1. Open Runner
2. Drag and Drop your collection
3. Select the tests
4. Hit Run button

## How to run Postman Collection using Newman CLI tool?
1. Open Terminal/CMD
2. Install newman `npm install -g newman`
3. Go to root path of the project
4. Enter command
`newman run TheCatAPI.postman_collection.json --environment TheCatAPI_Env.postman_environment.json`
5. CLI will show below results


## How to generate HTML report using npm newman-reporter-htmlextra with Newman?
1. Open Terminal/CMD
2. Install reporters `npm install -g newman-reporter-htmlextra`
3. Go to root path of the project
4. Enter command
`newman run TheCatAPI.postman_collection.json --environment TheCatAPI_Env.postman_environment.json -r htmlextra --reporter-htmlextra-export .\TestResults\TestResult.html`



## How to generate CSV report using npm newman-reporter-csv with Newman?
1. Open Terminal/CMD
2. Install reporters `npm install -g newman-reporter-csv`
3. Go to root path of project
4. Enter command
`newman run TheCatAPI.postman_collection.json -r csv --reporter-csv-export .\testResults\TestResult.csv`
## Troubleshooting
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/`