Newman - to run API tests
If you want to run API tests without using Postman, you can use Newman.
Using newman is useful when you are in CI/CD pipeline as it is impossible to open Postman from there. So we can just pass the newman script to devOps to execute the tests.
Before installing Newman, need to install Node.js
To confirm that Node js and newman was successfully installed
To install Newman extension (for report generation)
Using Newman to execute test where highlighted portion is the collection name and underlined portion is the environment name (can just type initial letter and then press "tab" button)
Sample outcome:To execute test and generating report (where underlined is script for report generation):
The report will be available in the folder where this command was run.
Sample HTML report:
To give title to the report:
Comments
Post a Comment