Sign Up

Sign In

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

You must login to ask question.

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

API’s automation via Newman and Generate HTML reports

Newman API automation and generate HTML reports (Step-by-Step):

Step 1:

Make sure you have the collection’s url, for example:

https://api.postman.com/collections/12510727-6552109ca-2e60-4481-9a6d-37d6ad8feka6?access_key=PMAT-ABCDEFGHIJKLMNOPQRSTUVWXYZ

Step 2:

Download Nodejs and install it on your system.

Step 3:

Open your windows terminal and install the Newman.

npm install -g newman

Step 4:

Set the Environment Path in the User Variables.

Adding in the Path variable under Environment Variable solve the problem even if we don’t add in NODE_PATH

C:\Users\ yourusername \AppData\Roaming\npm

After doing this reopen command prompt

enter image description here

enter image description here

enter image description here

Step 5:

Open your windows terminal and install the Newman.

npm i -g newman-reporter-html

Step 6:

Now run this command in your terminal,

newman run "https://api.postman.com/collections/12510727-6552109ca-2e60-4481-9a6d-37d6ad8feka6?access_key=PMAT-ABCDEFGHIJKLMNOPQRSTUVWXYZ" --disable-unicode -r html

Step 7:

Your HTML file will be generated in the following directory:

C:\Users\yourusername\newman

 

Related Posts

Leave a comment

You must login to add a new comment.