<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Cyril George</title>
    <description>The latest articles on DEV Community by Cyril George (@cyrilgeorge153).</description>
    <link>https://dev.to/cyrilgeorge153</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F756310%2Ffb3e9b29-b55b-41e6-9a0b-10d506085a15.jpeg</url>
      <title>DEV Community: Cyril George</title>
      <link>https://dev.to/cyrilgeorge153</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/cyrilgeorge153"/>
    <language>en</language>
    <item>
      <title>Api Testing with Hoppscotch</title>
      <dc:creator>Cyril George</dc:creator>
      <pubDate>Tue, 25 Jan 2022 04:31:43 +0000</pubDate>
      <link>https://dev.to/cyrilgeorge153/api-testing-with-hoppscotch-26pk</link>
      <guid>https://dev.to/cyrilgeorge153/api-testing-with-hoppscotch-26pk</guid>
      <description>&lt;p&gt;Hoppscotch is light-weight, web based API development suite. It was built from ground up with ease of use and accessibility in mind providing all the functionality needed for API developers with minimalist, unobtrusive UI. It is free-to-use and as an added perk completely Open Source!&lt;br&gt;
&lt;strong&gt;Creating collections&lt;/strong&gt;&lt;br&gt;
It is always a good practice to create a collection and add requests under the collection. To create a collection first click on Collections button and click on New button.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--CZICfy6G--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yhqepby7ajjoj2smlwi9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--CZICfy6G--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yhqepby7ajjoj2smlwi9.png" alt="Creating collection" width="880" height="449"&gt;&lt;/a&gt;&lt;br&gt;
Give a suitable name for the collection and click Save.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--uE8vVzt9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z584xctj92yhv4r1boq3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--uE8vVzt9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z584xctj92yhv4r1boq3.png" alt="Collection name" width="594" height="215"&gt;&lt;/a&gt;&lt;br&gt;
The new collection created will be displayed under My Collections tab.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--GkqU_b4h--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/llb2pcusmkfjhk22txz3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--GkqU_b4h--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/llb2pcusmkfjhk22txz3.png" alt="Collection created" width="706" height="358"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Adding first request under the Collection&lt;/strong&gt;&lt;br&gt;
In this blog I will be using REST apis provided by &lt;a href="https://reqres.in/"&gt;https://reqres.in/&lt;/a&gt;. I have used SINGLE USER api that supports http get method.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--HHnuy6_m--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jv53ferer95swiafamsg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--HHnuy6_m--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jv53ferer95swiafamsg.png" alt="Reqres" width="699" height="366"&gt;&lt;/a&gt;&lt;br&gt;
Copy the api end point and paste in hoppscotch. Before hitting the api save the api in the earlier created collection. For that click on the arrow button and click on Save as button.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--v0H1GXyz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rxadg9encpcy1b0hyn0o.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--v0H1GXyz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rxadg9encpcy1b0hyn0o.png" alt="Adding request in hoppscotch" width="699" height="374"&gt;&lt;/a&gt;&lt;br&gt;
Give a Request name, choose the desired collection in which you want to save the request and click Save button.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--keRybat---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yakw64wo7x2wo6tedwfr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--keRybat---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yakw64wo7x2wo6tedwfr.png" alt="Request name" width="530" height="561"&gt;&lt;/a&gt;&lt;br&gt;
The new request will be displayed under the newly created collection.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--S4kRxATy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fhd60lki4c1ikgrfjqfa.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--S4kRxATy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fhd60lki4c1ikgrfjqfa.png" alt="Request created" width="701" height="357"&gt;&lt;/a&gt;&lt;br&gt;
Now click on the Send button and view the response from the api.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--v8wpL5vl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bnk5dprhfgcf711wzgtf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--v8wpL5vl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bnk5dprhfgcf711wzgtf.png" alt="Response of api" width="700" height="351"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Creating environment and adding variables under it&lt;/strong&gt;&lt;br&gt;
Click on Environments button and click New button.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--sPiT9cA1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zigpzo1jwi4fq5pize2m.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--sPiT9cA1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zigpzo1jwi4fq5pize2m.png" alt="Adding environment" width="702" height="360"&gt;&lt;/a&gt;&lt;br&gt;
Add environment name and click Save&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--RDwPNXzV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2xnw52gajjwyhv4es6nr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--RDwPNXzV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2xnw52gajjwyhv4es6nr.png" alt="Add environment name" width="510" height="196"&gt;&lt;/a&gt;&lt;br&gt;
In order to add a variable click on the newly created environment and click on Add new button.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---Et1urmd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s1k9x68x3o321pkwodib.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---Et1urmd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s1k9x68x3o321pkwodib.png" alt="Add variable" width="544" height="468"&gt;&lt;/a&gt;&lt;br&gt;
Add variable name and variable value. After that click on Save button.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---LenJeU7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sgl5q898yid141pmxem6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---LenJeU7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sgl5q898yid141pmxem6.png" alt="Add variable for environment" width="526" height="284"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Accessing environment variable&lt;/strong&gt;&lt;br&gt;
To access the environment variable use &amp;lt;&amp;lt; variable_name &amp;gt;&amp;gt; object in request section and also make sure that the correct environment is selected from the top right corner for the request.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--mAX18-Um--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o2dsd7vfhy8baoi2gd3b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--mAX18-Um--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o2dsd7vfhy8baoi2gd3b.png" alt="Accessing env variable" width="703" height="378"&gt;&lt;/a&gt;&lt;br&gt;
Now click Send and same result will be displayed as earlier.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--bKoVzrXj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gh5gkpxbogvcac3v2cqu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--bKoVzrXj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gh5gkpxbogvcac3v2cqu.png" alt="Sending request" width="702" height="358"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Adding Tests(assertions) for the request&lt;/strong&gt;&lt;br&gt;
These are some of the tests performed on the response. More tests can be found from this link &lt;a href="https://docs.hoppscotch.io/features/tests"&gt;https://docs.hoppscotch.io/features/tests&lt;/a&gt;&lt;br&gt;
 &lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--pXPrOBeD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7q9w1zd05ujrb2ja2ylm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--pXPrOBeD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7q9w1zd05ujrb2ja2ylm.png" alt="Adding tests" width="700" height="313"&gt;&lt;/a&gt;&lt;br&gt;
Results of the tests will be displayed in the Test Results tab&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--blqXl6Wv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4vf2au9xzozwhi4p5kj9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--blqXl6Wv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4vf2au9xzozwhi4p5kj9.png" alt="Tests results" width="703" height="358"&gt;&lt;/a&gt;&lt;br&gt;
If you need any clarifications regarding this post, please comment below the comment section.&lt;/p&gt;

</description>
      <category>hoppscotch</category>
      <category>restapitesting</category>
      <category>opensource</category>
      <category>pwa</category>
    </item>
  </channel>
</rss>
