DEV Community

Ryan Gough
Ryan Gough

Posted on • Originally published at jysk.tech on

Hoppscotch Open API Development — Postman Alternative

Hoppscotch Open API Development — Postman Alternative

· Hoppscotch: Is it Time to Switch from Postman?

· Quick Review

Open Source

Features

Enterprise Support (Just incase)

Hoppscotch CLI

· The Setup

Installation (Docker)

Installation (Kubernetes)

Setup

· Features to note

Testing

Live Data

Workspaces

Shortcuts / Spotlight

· Round up

· Links

Hoppscotch: Is it Time to Switch from Postman?

If you work with APIs, you’ve probably used Postman. It’s super popular but there’s a new player in town called Hoppscotch. With the recent changes in PostMan, I personally have started to look elsewhere into other available tools.

My needs are quite basic: I do a bit of API testing for my microservices, but I don’t deal lot with load testing (else i’ll do this in other applications). Essentially, I’m looking for a tool where I can save my API requests, support OpenAPI for importing Swagger files, offer a sleek interface, and allow for easy modifications of headers. While it’s possible to manage these tasks with cURL commands and a neat file system, it’s just more convenient to have an app where I can have all my API requests easily on hand.

I’ve grown less fond of Postman lately, primarily because it leans heavily on cloud-based features, meaning everything, including sensitive API keys, ends up on the cloud. Plus, there’s no truly free version of Postman anymore, which adds another layer of complication for those of us looking for a straightforward, no-cost solution.

Enter Hoppscotch!

Hoppscotch is a lightweight, web-based API development suite. It was built from the ground up with ease of use and accessibility in mind providing all the functionality needed for API developers with minimalist, unobtrusive UI.

Open-source and lightweight

Cross-platform support

Self-Host-able and free to use

Exactly what I was looking for! Too good to be true right?

Quick Review

One big plus for Hoppscotch is that it’s really easy to use. Unlike Postman, which can get a bit complicated, Hoppscotch has a clean design that’s quick to load and simple to navigate.

Hoppscotch may not have all of Postman’s tricks, but it’s got the basics down. It’s great for the usual stuff like checking out REST and GraphQL APIs and even WebSockets. It’s got what you need without making things too complex.

Open Source

We’re big fans of open source at JYSK Tech, and Hoppscotch’s open source spirit is perhaps its standout feature. This approach offers an openness and a chance for community participation that closed-source options like Postman just can’t. For our team of DevOps engineers and developers, the freedom to inspect, tweak, and enhance the code is incredibly useful. Whenever we spot an opportunity for improvement or have a brainwave, we’re equipped and ready to jump in and contribute, because that’s the open source way.

Features

Hoppscotch isn’t just a Postman clone; it’s a sleek, fast, and user-friendly alternative that’s definitely worth trying. While it may not yet dethrone Postman, especially for power users who depend on advanced features, it offers a compelling choice for developers who prefer open source solutions and those who require a fast and lean tool.

If you haven’t yet given Hoppscotch a whirl, it’s time to hop (haha) over and see for yourself. It’s an exciting time in API tooling, and Hoppscotch is one to watch — or even to start using over its heavyweight counterpart.

While Hoppscotch covers the basics well, its feature set is not as comprehensive as Postman’s. Advanced features like detailed API monitoring, mock servers, and certain automation capabilities might be missing or underdeveloped.

Enterprise Support (Just incase)

Enterprise support should always be a key factor, especially when working within a large organization. Any tool we consider has the potential to serve a broader team and could eventually become an integral part of our developers’ and operations engineers’ toolkit. In such instances, features like SAML-based single sign-on, on-premises deployment options, and comprehensive audit logs are crucial. Hoppscotch does offer an Enterprise Cloud Edition with these features and priority support.

However, at the moment, our focus is on rapidly rolling out an open source community edition. We value full data ownership and want to maintain control over our API development and testing processes. With Hoppscotch, we have the ability to self-host on our own infrastructure, which aligns with our current needs.

Hoppscotch CLI

Hoppscotch offers several methods to work with and set up your APIs. You can use its command-line interface (CLI) to operate the Hoppscotch platform from a terminal or within an automated setup. This feature allows for executing API tests, handling automated API checks, among other tasks.

The Setup

Initially, one can try Hoppscotch by just visiting hoppscotch.io — you are presented with an online playground.

I usually spin up a local instance for testing, most of the installation/configuration can be found in their git repo: https://github.com/hoppscotch/hoppscotch

Installation (Docker)

The easiest way to get running on your local machine for a quick test-run is by using docker compose. I have included a deployment with the All-in-one image (AIO) that includes all services. The alternative would be to run each service seperatley. Currently there are three services plus a DB that is required.

docker-compose.yaml

version: "3.7"

services:
  # The service that spins up all 3 services at once in one container
  hoppscotch-aio:
    container_name: hoppscotch-aio
    image: hoppscotch/hoppscotch
    env_file:
      - ./.env
    environment:
      - DATABASE_URL=postgresql://postgres:testpass@hoppscotch-db:5432/hoppscotch?connect_timeout=300
    depends_on:
      hoppscotch-db:
        condition: service_healthy
    ports:
      - "3000:3000"
      - "3100:3100"
      - "3170:3170"

  # The preset DB service, you can delete/comment the below lines if
  # you are using an external postgres instance
  # This will be exposed at port 5432
  hoppscotch-db:
    image: postgres:15
    ports:
      - "5432:5432"
    user: postgres
    environment:
      # The default user defined by the docker image
      POSTGRES_USER: postgres
      # NOTE: Please UPDATE THIS PASSWORD!
      POSTGRES_PASSWORD: testpass
      POSTGRES_DB: hoppscotch
    healthcheck:
      test:
        [
          "CMD-SHELL",
          "sh -c 'pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}'"
        ]
      interval: 5s
      timeout: 5s
      retries: 10
    volumes:
      - hoppscotch-db:/var/lib/postgresql/data

volumes:
  hoppscotch-db

git clone https://github.com/hoppscotch/hoppscotch
cd hoppscotch
mkdir jysktech
cp .env.example jysktech/.env
Enter fullscreen mode Exit fullscreen mode

Place the above docker-compose file into the jysktech folder, and run:

cd jysktech
docker compose up -d
Enter fullscreen mode Exit fullscreen mode

One we’re up and running we need to run some migrations to initilise the DB. This is super easy:

docker exec -it hoppscotch-aio /bin/sh
> pnpx prisma migrate deploy
Enter fullscreen mode Exit fullscreen mode


DB Migrations

Once it’s up and running we should be presented with a web url at http://localhost:3000 now i can see fire off my API requests to see where the ISS is :)


Hoppscotch UI

The admin dashboard is located at http://localhost:3100


Admin Dashboard

A more detailed comprehensive guide to setup (and db setup) please refer to their documentation

Installation (Kubernetes)

Hoppscotch does not yet provide an official helmchart for us to use, yet. So i have made one you can find on our JYSK OSS repo.

Setup

Setup is straightforward — which i will leave for the documentation to explain. Some things to note:

  • The first user on the admin dashboard is the admin
  • The application only works with all the invite features with a valid SMTP server
  • OIDC Support is in the making, there is an open PR for this here

Features to note

There are some really solid features in Hoppscotch, that will actually get you a long way. If you are coming from a Postman background, features like environments, variables, import from openapi specification etc are all there. If you are new — these features are very handy when creating microservices and progressing through environments. Open API specification import is super, as this enables entire API specifications, help documentation and such to be imported locally.


Imported Pet Store API

Testing

Its REST API Testing function is a no-fuss way to send requests and analyze responses, making it a breeze for anyone from beginners to seasoned pros. GraphQL API Testing is equally streamlined, with introspection that helps users quickly navigate through schemas and test out their queries.

Live Data

For those dealing with live data, the Realtime API Testing feature is a game-changer, supporting protocols like WebSocket, EventSource, and MQTT for testing that keeps pace with live updates. The Environments feature is a handy way to keep variables organized and consistent, which is super helpful when you’re juggling different stages of development.

Workspaces

Workspaces in Hoppscotch are all about teamwork, making it easy to share and manage API tests and environments with colleagues. The Interceptor is another nifty feature that lets you peek into browser traffic, offering a clear view of what’s happening with your API calls for better debugging.

Shortcuts / Spotlight

Keyboard fans will appreciate the Shortcuts, which make quick work of common tasks in Hoppscotch with just a keystroke. For those who like to get hands-on, the Scripts feature lets you write your own JavaScript to automate tests, making complex scenarios much less of a headache.

The Spotlight search acts like a quick-find for the app’s many corners, saving tons of time. And lastly, Inspections give you a deep dive into API responses, which is essential for making sure everything’s running as it should.

Organising stuff

When it comes to keeping things neat, Collections let you group your API requests, which is a big help when you’re dealing with a bunch of them. The History feature is like a breadcrumb trail of your past requests, saving you from redoing setups over and over.

Security

On the security front, Authorization options are robust, supporting a range of standards to ensure your secure API testing goes off without a hitch. Customization means you can tweak Hoppscotch to your liking, from the look and feel to the way requests are made.

Round up

Hoppscotch is pretty much a Swiss Army knife for anyone tinkering with APIs — super user-friendly, versatile, and packed with features. Whether you’re into REST, GraphQL, or keeping things lively with Realtime APIs, it’s got you covered.

Having integrated Hoppscotch into my workflow, I’ve noticed that I’m relying less on Postman. I’ve even transitioned all my Postman collections into Hoppscotch.

The next step for me is to set up a managed version for my teammates and the wider organization to benefit from, in a more stable and productive setting. This will also help us overcome common hurdles such as dealing with local CA certificates, proxies, and other such impediments that often slow down our progress.

Links


Top comments (0)