REST API Testing with Hoppscotch

cyril georgecyril george
2 min read

Table of contents

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!

Creating collections

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.

Give a suitable name for the collection and click Save.

The new collection created will be displayed under My Collections tab.

Adding first request under the Collection

In this blog I will be using REST apis provided by https://reqres.in/. I have used SINGLE USER api that supports http get method.

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.

Give a Request name, choose the desired collection in which you want to save the request and click Save button.

The new request will be displayed under the newly created collection.

Now click on the Send button and view the response from the api.

Creating environment and adding variables under it

Click on Environments button and click New button.

Add environment name and click Save

In order to add a variable click on the newly created environment and click on Add new button.

Add variable name and variable value. After that click on Save button.

Accessing environment variable

To access the environment variable use <<variable_name>> object in request section and also make sure that the correct environment is selected from the top right corner for the request.

Now click Send and same result will be displayed as earlier.

Adding Tests(assertions) for the request

These are some of the tests performed on the response. More tests can be found from this link https://docs.hoppscotch.io/features/tests

Results of the tests will be displayed in the Test Results tab

If you need any clarifications regarding this post, please comment below the comment section.

If you are looking for any quality assurance service. Click below link.

Quality Assurance

0
Subscribe to my newsletter

Read articles from cyril george directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

cyril george
cyril george

I am a software test engineer with more than 7 years of work experience in product and service based companies. I have experience in ui automation, backend API and mobile testing. I am a conscientious person who works hard and pays attention to detail. I'm flexible, quick to pick up new skills and eager to learn from others. I also have lots of ideas and enthusiasm. AUTOMATION FRAMEWORK & DEVOPS SKILLS: Data Driven, Key Word(Robot Framework), Hybrid, Page Object Model, Selenium WebDriver with Java & Python , BDD (Cucumber-JVM), TestNG, Junit, Pytest, Extent Report, Allure Report, Apache Log4j, SVN, GIT, GitHub, Bit Bucket, Gitlab, MAVEN, Jenkins, Docker, Zalenium, TestProject, Karate Ui Testing, Playwright with Java & Python, Selenide, SeleniumBase with Python. API (BACKEND) WEBSERVICES AUTOMATION: SOAP, REST, Rest Assured, Postman, Newman, Swagger, Karate, Insomnia, Python Requests, Robot framework, Hoppscotch. DATABASE: Knowledge in My SQL , SQL Server. Knowledge in writing and executing SQL statements. Database testing using JDBC. JAVASCRIPT TOOLS: Protractor, Taiko, Webdriver IO. PERFORMANCE TESTING: Knowledge in Jmeter, Karate with Gatling, Locust. PROJECT/TEST MANAGEMENT TOOLS: TestLink, SquashTM, Redmine, Qmetry, Youtrack, Assembla, Jira, Confluence, Waterfall, Agile(Scrum). MOBILE TEST AUTOMATION: Knowledge in Appium and TestProject. PROGRAMMING LANGUAGES: Java, PHP, JavaScript, Python. IDE: Eclipse, Visual Studio Code, PyCharm, Intellij IDEA