Postman v10 and gRPC: what you can do

Avatar

Postman’s gRPC support started out with a single feature request in GitHub that received hundreds of upvotes, thumbs-ups, and positive reactions. When we began the journey of implementing gRPC support in Postman, we chose a few key features as our entry point. From there, we received amazing feedback from internal and external alpha users. Aside from feature requests, we also knew that we were onto something. The feedback was overwhelmingly positive and most asked for richer features.

Over the course of the next few quarters, we diligently added new features and continued to work with the community to smooth out the rough edges. During that time, we rolled gRPC into beta to expose it to a wider audience. Today, we are excited to officially include gRPC support as part of the launch of Postman v10! Now let’s walk through the features.

Core features

There are a few core features of gRPC support that make Postman the ideal place to work and build with gRPC. These include all the unary and streaming methods, server reflection, support for multi-file Protobuf, collaboration, testing, and mock servers.

Methods

Methods are at the heart of the core features, so we wanted to make sure that they were truly represented. Unary, client-streaming, server-streaming, and bidirectional-streaming are all gRPC-supported methods. In a previous blog post, Postman Technical Lead Josh Wise states:

Some methods in gRPC allow you to stream multiple payloads to the server, or allow the server to send multiple payloads in response. When using a method like this, Postman will automatically show a unified timeline of all events occurring on the connection. This gives you a complete view of what’s happening, which makes debugging a breeze.

Messages

We’ve added features for automatically generating example messages with a single click, autocomplete while composing messages, the ability to send metadata, and view incoming metadata.

gif of message generation with gRPC
Generation of example message

Server Reflection

One of the features we’re most excited about is automatic server reflection. Simply drop your gRPC URL into the URL bar and Postman does the rest! The services magically appear in the method dropdown.

Gif showing automatic server reflection
Server reflection

Multi-file Protobuf

A key feature request was the ability to support multi-file Protobuf definitions. Postman scans the imported Protobuf definition and fetches all the remaining .proto files without the need to import them individually.

Collaboration

What would gRPC support be in Postman without the collaboration being a core feature? Postman Collections are at the center of Postman’s collaborative tools. As I stated in our previous blog post:

Aside from simply sharing a workspace or collection with the team, the ability to fork collections, as well as duplicate and move requests now ensures that the full cycle of collaboration is met. Also, if you need to communicate changes, doubts or issues around a request, you can comment on gRPC requests.

Here are some of the key collaboration features:

  • Synchronize the .proto files in your API with your repository
  • Ability to save and document gRPC requests within collections
  • Save, explore, and share gRPC request history
  • Automatically generated request documentation
  • Collaboration features like share, fork, comments, manage roles, and more

Testing

Ensuring an API is tested builds confidence in our work as engineers. It’s not surprising then, that we included testing gRPC methods as one of our core requirements. We added before-invoke and after-response scripts to automate and test methods and all unary and streaming methods are tested using Chai assertions to help you create robust tests around your gRPC methods.

To help get started with gRPC testing, we added a list of reusable snippets that can be chosen. In his recent blog post, Postman Technical Lead Appurva Murawat says:

Both before invoke and after response scripts come with pre-curated lists of commonly used code snippets that get added to your scripts when selected, helping you start quickly.

gif showing Using Snippets in gRPC Scripts
Using snippets in gRPC scripts

Mock servers

The creation of automatic mock servers was a huge win for gRPC users. We took out the tedious parts and simply created the mock server for you! Josh, who was our lead engineer on the gRPC project, says in his blog post:

As soon as the new endpoints have been designed and added to your Protobuf API, you already have a mock server implementing those endpoints. That’s right, you didn’t need to create a mock server—it’s just there. We mock both unary and streaming RPCs.

gif showing automatic mock server creation
Automatic mock server creation

On the horizon

As we look on the horizon, gRPC support will only get better with new features. If you have feature requests or feedback for us, please let us know on GitHub. And keep coming back for more updates as we continue to push Postman gRPC support into the future!

Interested in learning more about gRPC Support in Postman? Sign up here for early access and schedule a time with the gRPC team to learn more.

What do you think about this feature? Tell us in a comment below. You can also give product feedback through our Community forum and GitHub repository.

Comment

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.

2 thoughts on “Postman v10 and gRPC: what you can do

  • Avatar

    Hi and thank you for support
    actually, i wanna config my test with gitlab to run my grpc collection test in pipelin, but i can’t find how get an export from my collection.
    could you please send help?
    best
    Peggy