Visualize the export of test Results in Postman

 We use Postman to test various APIs. To ease our lives, we create collections and save those collections along with various test cases which further can be integrated with DevOps or automation testing frameworks. Let us assume, we did some changes in API and that API should be backward compatible. In such cases, these collections can be used to test the old functionality is not broken. The results output from testing plays an important role in Software Development Lifecycle(SDLC). While using the Postman GUI, we can run the collections and it will give the response in the GUI layout.

After selecting a collection to run, it will give various parameters to select. We can select as per our need. Once we click on Run <Collection Name>(Run Postman Echo)

Once we run the Postman Collection, it will give us the output in a beautiful GUI layout. Now to save results, we have only one option i.e. to Export Results as highlighted in the above image.


Once, we click on Export Results, it gives us output in the form of JSON. This JSON output sometimes feels a bit tricky to visualize. What if we need to see in GUI after some time and we have only this JSON export.

To do so, we can make use of Postman Echo API and Visualizer.

Postman Echo API can be used to echo our JSON test results export and pm.visualizer.set() function under the test tab of the Postman request can be used to populate the echoed data in HTML tags and visualize it.

For this, we have created a sample request in the public collection under Postman Public workspace.

Steps to use

1. Click on Run in Postman Button

2. Fork or import the collection to your Postman workspace.

3.  Open the request "visualize test results json"

4. Paste the exported results.JSON file data in the request body.

5. Click on Send, to trigger the request to Postman echo API.


We can see JSON data formatted in the form of an HTML Document under Visualize Tab.

Resources:

  1. Sample JSON test results export data
  2. Postman Public Workspace
  3. Postman Echo API
  4. Visualizer documentation
If you have any suggestions, feel free to comment or raise a pull request on Postman Public Workspace. Please share your valuable feedback 
😊😊😊



Comments

Popular posts from this blog

DateTime formatting using xp20:format-dateTime ()

Handling XML response with or without namespace in Postman

Create Delimited String from XML Nodes and Vice Versa in SOA 12c