Built-in Method.

Step 1: Select the existing collection to generate the report of that collection.

Step 2: Write Tests for Your Requests:

For each request in your collection, write tests to validate the response. This is done in the “Tests” tab of each request.

Sample test script:

pm.test("Status code is 200", function () {
pm.response.to.have.status(200);
});

Test Scripts

Step 3: Now click on the Runs tab and then click the Run collection button.

Step 4: After that we can set some options for the collection Runner, these are the following properties that we can set, Optionally, select an environment, adjust iterations, delay, and other settings as needed. in this case we will choose the defalut setting. After that click on the Run Collection in this case Run w3wiki that we named our collection.

Step 5: After that it will show the final results about the tests, we can see in the image below.

Step 6 :Now we can also export this result and save the report as a JSON file. To do that click on the export Results button and save the file on the your preferred location.

Final Output:

How To Generate Reports Using Postman Tool ?

Postman is a widely used tool for API testing. It offers a user-friendly interface for sending various HTTP requests (GET, POST, PUT, DELETE). One of the best things that we can do in Postman is Generate reports effectively. In this article, we will explore the various approaches to generating reports using the Postman Tool.

Similar Reads

Prerequisites

Understanding of APIs and HTTP Requests. Installation of Postman. Knowledge of API Development....

Approach 1: Built-in Method.

Step 1: Select the existing collection to generate the report of that collection....

Approach 2: Using Newman for Enhanced Reporting:

Step 1: Install the Newman HTML Reporter using the following command. By using the following command the newman will be installed globally...