<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>TESTING on DecipherMiddleware</title><link>https://blog.deciphermiddleware.in/tags/testing/</link><description>Recent content in TESTING on DecipherMiddleware</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><lastBuildDate>Tue, 19 Oct 2021 06:35:00 +0000</lastBuildDate><atom:link href="https://blog.deciphermiddleware.in/tags/testing/index.xml" rel="self" type="application/rss+xml"/><item><title>Visualize the export of test Results in Postman</title><link>https://blog.deciphermiddleware.in/posts/visualize-the-export-of-test-results-in/</link><pubDate>Tue, 19 Oct 2021 06:35:00 +0000</pubDate><guid>https://blog.deciphermiddleware.in/posts/visualize-the-export-of-test-results-in/</guid><description>&lt;p&gt;&lt;a href="https://postman.com/"&gt;&lt;img src="https://blog.deciphermiddleware.in/images/blogger/8c5a47dd16.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;We use &lt;strong&gt;&lt;a href="https://postman.com/"&gt;Postman&lt;/a&gt;&lt;/strong&gt; 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 &lt;strong&gt;Software Development Lifecycle&lt;/strong&gt;(SDLC). While using the Postman GUI, we can run the collections and it will give the response in the GUI layout.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://blog.deciphermiddleware.in/images/blogger/7634b6368c.png"&gt;&lt;img src="https://blog.deciphermiddleware.in/images/blogger/7634b6368c.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;After selecting a &lt;strong&gt;collection&lt;/strong&gt; to run, it will give various parameters to select. We can select as per our need. Once we click on &lt;strong&gt;Run &amp;lt;Collection Name&amp;gt;(Run Postman Echo)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://blog.deciphermiddleware.in/images/blogger/e9b5fd0064.png"&gt;&lt;img src="https://blog.deciphermiddleware.in/images/blogger/e9b5fd0064.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;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 &lt;strong&gt;Export Results&lt;/strong&gt; as highlighted in the above image.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://blog.deciphermiddleware.in/images/blogger/2b084012df.png"&gt;&lt;img src="https://blog.deciphermiddleware.in/images/blogger/2b084012df.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Once, we click on &lt;strong&gt;Export Results&lt;/strong&gt; , 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.&lt;/p&gt;
&lt;p&gt;To do so, we can make use of &lt;a href="https://www.postman.com/postman/workspace/published-postman-templates/documentation/631643-f695cab7-6878-eb55-7943-ad88e1ccfd65?ctx=documentation"&gt;Postman Echo API&lt;/a&gt; and &lt;a href="https://learning.postman.com/docs/sending-requests/visualizer/"&gt;Visualizer&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;For this, we have created a sample request in the public collection under Postman Public workspace.&lt;/p&gt;
&lt;h2 id="steps-to-use"&gt;Steps to use &lt;a href="#steps-to-use" class="anchor"&gt;🔗&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;1. Click on Run in Postman Button&lt;/p&gt;
&lt;p&gt;2. Fork or import the collection to your Postman workspace.&lt;/p&gt;
&lt;ol start="3"&gt;
&lt;li&gt;Open the request &amp;ldquo;visualize test results json&amp;rdquo;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;a href="https://blog.deciphermiddleware.in/images/blogger/82590a294a.png"&gt;&lt;img src="https://blog.deciphermiddleware.in/images/blogger/82590a294a.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;4. Paste the exported results.JSON file data in the request body.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://blog.deciphermiddleware.in/images/blogger/59748231ba.png"&gt;&lt;img src="https://blog.deciphermiddleware.in/images/blogger/59748231ba.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;5. Click on Send, to trigger the request to Postman echo API.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://blog.deciphermiddleware.in/images/blogger/a91328d310.png"&gt;&lt;img src="https://blog.deciphermiddleware.in/images/blogger/a91328d310.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;We can see JSON data formatted in the form of an HTML Document under Visualize Tab.&lt;/p&gt;
&lt;h3 id="resources"&gt;Resources: &lt;a href="#resources" class="anchor"&gt;🔗&lt;/a&gt;&lt;/h3&gt;&lt;ol&gt;
&lt;li&gt;&lt;a href="https://github.com/cipherwizard9/DecipherMiddleware/blob/main/Postman/JSON/Postman%20Echo.postman_test_run.json"&gt;Sample JSON test results export data&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.postman.com/deciphermiddleware/workspace/deciphermiddleware/overview"&gt;Postman Public Workspace&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.postman.com/postman/workspace/published-postman-templates/documentation/631643-f695cab7-6878-eb55-7943-ad88e1ccfd65?ctx=documentation"&gt;Postman Echo API&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://learning.postman.com/docs/sending-requests/visualizer/"&gt;Visualizer documentation&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;_If you have any suggestions, feel free to comment or raise a pull request on Postman Public Workspace. _&lt;em&gt;Please share your valuable feedback&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;😊😊😊&lt;/strong&gt;&lt;/p&gt;</description></item></channel></rss>