Back Arrow
From the blog

gRPC for Testers: Quick Start After REST

This article will help you understand gRPC basics, how it differs from REST, the structure of .proto files, and most importantly- how to test gRPC services using Postman.

Vasil Khamidullin

QA engineer

REST API has long been the standard, but it has its limitations. When load increases, streaming scenarios appear, or business requires faster communication between services, REST stops being the ultimate solution. gRPC solves what REST cannot: it provides high data transfer speeds, supports streaming, and enforces a strict interaction structure. It is convenient to use in microservices, mobile, and IoT applications.

For a tester, this means one thing: knowing how to work with gRPC is shifting from a "nice-to-have" to an essential skill. If you haven't worked with this protocol yet, this article will help you understand its basics, how it differs from REST, the structure of .proto files, and most importantly - how to test gRPC services using Postman.

What is gRPC and Why is it Needed?

gRPC is a high-performance framework from Google. As a QA specialist, you don't necessarily need to dive into implementation details, but understanding how this protocol works and how to test it will definitely be useful.

To simplify, REST can be compared to paper letters sent in envelopes, while gRPC is like a phone call. Both are formats for communication between an application and a server, but with REST API, data is transferred in JSON or XML formats, which in our analogy can be equated to envelopes. This is okay and works, but not always fast or convenient.

gRPC proposes wrapping data in a binary protocol, which transmits data faster, has a smaller size, and is strictly structured. It uses Protocol Buffers (protobuf). Thanks to this, both sides participating in the information exchange know in advance what questions will be asked and what answers to expect. For a tester, this means less ambiguity and more predictability in verifications.

When we first implemented gRPC in a project, it unexpectedly turned out that Postman, by default, couldn't work with this protocol. We had to find workarounds - we tried BloomRPC, then grpcurl. In the end, we found a solution: uploading .proto files into a new beta version of Postman. It was a useful lesson - tools aren't always ready "out of the box," and it's important for a tester to have several alternatives on hand.

Key Advantages of gRPC

Why is gRPC usage increasingly common in product development? Here are the main reasons:

  • High performance thanks to the binary protobuf format.
  • Support for streaming: data can be transmitted not only in a "request-response" format but also as streams.
  • Cross-platform: gRPC can be used for projects in different programming languages.
  • Code autogeneration: client and server code is automatically generated from .proto files.

All of this leads to fewer misunderstandings with developers, clear rules for validation, and new testing scenarios - for example, for streaming.

Key Differences Between gRPC and REST

Moving from testing REST to gRPC implies conceptual changes in the process. Instead of endpoints and HTTP methods - methods and messages described in a contract. For convenience, let's compare them in a table.

Next, let's look in more detail at one of gRPC's advantages over REST - the presence of streaming.

Types of gRPC Calls

Unlike REST, which has the familiar GET/POST/PUT/DELETE, gRPC works with methods defined in a .proto file.

Four types of calls are supported:

  1. Unary - one request, one response.
  2. Server streaming - one request, stream of responses.
  3. Client streaming - stream of requests, one response.
  4. Bidirectional streaming - stream of requests, stream of responses.
When designing tests, it's important to consider that "one test - one request" isn't always suitable. For streaming, you need scenarios with multiple sequential messages.

But to understand which methods are available and what data can be transmitted in these calls, you need to understand how a .proto file is structured.

How a .proto File is Structured

This is a simple text file with a .proto extension. In it, we essentially agree on what data can be sent and received, and what methods the service has.

You can think of it as an instruction or contract between the service developer and those who use it (for example, QA specialists).

Usually, the .proto file is created by the backend service developer, because they know which methods the service must support, as well as what data is accepted and returned.

A tester can also open a .proto file to understand how to correctly form a request, suggest improvements (for example, add a field or change a data type), and, if desired, write their own .proto for learning or experiments.

Before moving on to the structure of a .proto file, let's make an important clarification.

gRPC indeed transmits data in the binary Protocol Buffers format, not JSON - this is why it is more efficient than REST in terms of speed and traffic volume. However, when testing via tools like Postman, BloomRPC, or grpcurl, you will see requests and responses in a human-readable format resembling JSON. This is a visualization of the binary data for humans. The tools automatically convert the binary stream into such "pseudo-JSON" to make it easier for you to work with the fields.

In our examples, we will also use this readable format - not because gRPC uses JSON, but so you can quickly understand the message structure.

Let's look at a simple example of a .proto file:

syntax = "proto3";

service HelloService {

 rpc SayHello (HelloRequest) returns (HelloResponse);

}

message HelloRequest {

 string name = 1;

}

message HelloResponse {

 string message = 1;

}

What's Inside:

Syntax Specification

syntax = "proto3";

Syntax indicates which version of the Protocol Buffers language we are using.
At the time of writing, the current version is the third - proto3.

Service Definition

service HelloService {
rpc SayHello (HelloRequest) returns (HelloResponse);
}

service HelloService - declaration of a service named HelloService.
You can think of a service as a class containing methods.
rpc SayHello (...) returns (...) - this describes a remote procedure call, where:

  • SayHello - the method name.
  • (HelloRequest) - what the method accepts (request type).
  • returns (HelloResponse) - what the method returns (response type).

In our example, the service has only one method, SayHello, which accepts a HelloRequest message and returns a HelloResponse.

Request Message Description

message HelloRequest {
string name = 1;
}

Message HelloRequest defines the data type for the request. Inside it:

  • string name = 1;
    • string - data type (string).
    • name - field name.
    • = 1 - sequence number (needed for serialisation).

This means: the client must pass a string field name.

Example:

Response Message Description

message HelloResponse {
string message = 1;
}

Message HelloResponse defines the data type for the response. Inside:

  • string message = 1;
    • a string that will contain the result.

In our case, the server will return a greeting string.

Example:

All of this works as follows: the client calls the SayHello method, in the HelloRequest it sends the name field, the server receives this field, forms a response, and in the HelloResponse it returns a string with a greeting.

If you know how to read and understand .proto files, you can easily grasp the data structure and suggest improvements to the API even at the design stage.

And now, it's logical to move on to the next question: what else does the service return besides useful data? Here we'll talk about gRPC status codes.

gRPC Status Codes: What a Tester Needs to Know

In gRPC, every response (even a successful one) is accompanied by a status code. These are not HTTP 200/404/500, but their own set of codes defined in the gRPC library. In total, gRPC has 17 predefined status codes, from 0 to 16, but we will consider only the most basic and commonly used ones.

Main gRPC Status Codes

It's important not only to verify the correctness of the data in the response but also to ensure the service correctly returns status codes in various scenarios.

gRPC in Postman: Practical Testing

Previously, Postman could only work with REST, but now - also with gRPC.

How it works:

  1. Upload the .proto file into Postman.
  2. Select the service and method.
  3. Form the request (data is taken from the request structure in the .proto).
  4. Look at the response and status code.

For example, for a simple service:

A request in Postman will contain the name field, and in response a greeting message will arrive.

Let's look at an example.

  • Create a new request → select the request type gRPC Request (not HTTP!).
  • Specify the URL, open the Service Definition tab, import the .proto file.
  • After importing the .proto file, all available methods the service can work with will become available for selection.
  • Select the method we need, and a JSON-like form with fields that need to be filled in will appear in the request body (all required fields are defined in our .proto file).
  • Click Invoke and you will see the response and status code.

Conclusion

  • gRPC is faster than REST, supports streaming, and enforces strict contracts.
  • For a tester, the key skills are: being able to read .proto files, check different call types, and work with tools (Postman, grpcurl, BloomRPC).
  • Don't forget about status codes: they help understand how a service behaves in error scenarios.
  • In practice, you may encounter pitfalls: not every tool supports gRPC as conveniently as REST.

By mastering gRPC, you will expand your arsenal: you'll be able to test not only REST services but also more modern microservice systems. And that means - you'll become a more in-demand specialist.

It's easy to start working with us. Just fill the brief or call us.

Find out more
White Arrow
From the blog
Related articles

Understanding CORS: A Practical Guide

Bair Ochirov

In this article, I will briefly answer questions about why the CORS policy was created, how it works, why a simple action like "setting a header on the backend" might not be enough, and what secure patterns to choose for the frontend.

cors
sop

How I Started Writing Unit Tests for Vue Components - Part 2

Dmitry Simonov

So, it's been a year since the last article, and a lot has changed. In this one, we're going to talk about integrating with Mock Service Worker (MSW).

vuejs
Vue

Performance Issues in Web Services: A Practical Guide to Identification and Resolution

Dmitry Bastron

Performance is not a feature to add later, but a core requirement as vital as security. This guide provides a structured approach to building performance into your web services from the start, ensuring they are fast and scalable by design.

Development
WebDev

Setting SMART Goals for Digital Product Success

Andrey Stepanov

This quick guide helps you define clear objectives and track progress effectively—ensuring every milestone counts.

Development

Building Teams for Digital Products: Essential Roles, Methods, and Real-World Advice

Andrey Stepanov

A digital product isn’t just about features or design—it’s about teamwork. In this article, we break down the essential roles in digital product development.

Development

Goals in Digital Development: How to Launch a Digital Product Without Failure

Andrey Stepanov

Essential tips for creating a development team that works toward product goals, not just tasks.

Development

How to Become a Kentico MVP

Dmitry Bastron

Hi, my name is Dmitry Bastron, and I am the Head of Development at ByteMinds. Today, I’d like to share how I achieved Kentico MVP status, why I chose this CMS, and what it takes to follow the same path and earn the coveted MVP badge.

Kentico

How can a team lead figure out a new project when nothing is clear?

Maria Serebrovskaya

Hello! My name is Maria, and I am a team lead and backend developer at ByteMinds. In this article, I will share my experience: I’ll explain how to understand a complex project, establish processes, and make it feel like "your own".

Development

How I Started Writing Unit Tests for Vue Components

Dmitry Simonov

In this article, we’ll take a look at how you can start testing Vue components.

Vue
vuejs

Inspecting raw database data in Xperience by Kentico

Dmitry Bastron

This article is a cheat sheet to inspect what's going on with the imported data by Xperience by Kentico Migration Toolkit, resolve some CI/CD issues, and on many other occasions!

Kentico

Learnings from using Sitecore ADM

Anna Bastron

Let's try to understand how the ADM module works, its limitations, and tactics for optimising its performance.

Sitecore

Your last migration to Xperience by Kentico

Dmitry Bastron

The more mature Xperience by Kentico products become, the more often I hear "How can we migrate there?”

Kentico

5 Key Software Architecture Principles for Starting Your Next Project

Andrey Stepanov

In this article, we will touch on where to start designing the architecture and how to make sure that you don’t have to redo it during the process.

Architecture
Software development

Assessing Algorithm Complexity in C#: Memory and Time Examples

Anton Vorotyncev

Today, we will talk about assessing algorithm complexity and clearly demonstrate how this complexity affects the performance of the code.

.NET

Top 8 B2B Client Service Trends to Watch in 2024

Tatiana Golovacheva

The development market today feels like a race - each lap is quicker, and one wrong move can cost you. In this race, excellent client service can either add extra points or lead to a loss due to high competition.

Customer Service
Client Service

8 Non-Obvious Vulnerabilities in E-Commerce Projects Built with NextJS

Dmitry Bastron

Ensuring security during development is crucial, especially as online and e-commerce services become more complex. To mitigate risks, we train developers in web security basics and regularly perform third-party penetration testing before launch.

Next.js
Development

How personalisation works in Sitecore XM Cloud

Anna Bastron

In my previous article, I shared a comprehensive troubleshooting guide for Sitecore XM Cloud tracking and personalisation. This article visualises what happens behind the scenes when you enable personalisation and tracking in your Sitecore XM Cloud applications.

Sitecore

Server and client components in Next.js: when, how, and why?

Sergei Pestov

All the text and examples in this article refer to Next.js 13.4 and newer versions, in which React Server Components have gained stable status and become the recommended approach for developing applications using Next.js.

Next.js

How to properly measure code speed in .NET

Anton Vorotyncev

Imagine you have a solution to a problem or a task, and now you need to evaluate the optimality of this solution from a performance perspective.

.NET

Formalizing API Workflow in .NET Microservices

Artyom Chernenko

Let's talk about how to organize the interaction of microservices in a large, long-lived product, both synchronously and asynchronously.

.NET

Hidden Aspects of TypeScript and How to Resolve Them

Dmitry Berdnikov

We suggest using a special editor to immediately check each example while reading the article. This editor is convenient because you can switch the TypeScript version in it.

TypeScript

Troubleshooting tracking and personalisation in Sitecore XM Cloud

Anna Gevel

One of the first things I tested in Sitecore XM Cloud was embedded tracking and personalisation capabilities. It has been really interesting to see what is available out-of-the-box, how much flexibility XM Cloud offers to marketing teams, and what is required from developers to set it up.

Sitecore

Mastering advanced tracking with Kentico Xperience

Dmitry Bastron

We will take you on a journey through a real-life scenario of implementing advanced tracking and analytics using Kentico Xperience 13 DXP.

Kentico
Devtools

Why is Kentico of such significance to us?

Anastasia Medvedeva

Kentico stands as one of our principal development tools. We believe it would be fitting to address why we opt to work with Kentico and why we allocate substantial time to cultivating our experts in this DXP.

Kentico

Where to start learning Sitecore - An interview with Sitecore MVP Anna Gevel

Anna Gevel

As a software development company, we at Byteminds truly believe that learning and sharing knowledge is one of the best ways of growing technical expertise.

Sitecore

Sitecore replatforming and upgrades

Anastasia Medvedeva

Our expertise spans full-scale builds and support to upgrades and replatforming.

Sitecore

How we improved page load speed for a Next.js e-commerce website by 50%

Sergei Pestov

How to stop the decline of the performance indicators of your e-commerce website and perform optimise page load performance.

Next.js

Sitecore integration with Azure Active Directory B2C

Dmitry Bastron

We would like to share our experience of integrating Sitecore 9.3 with Azure AD B2C (Azure Active Directory Business to Consumer) user management system.

Sitecore
Azure

Dynamic URL routing with Kontent.ai

We'll consider the top-to-bottom approach for modeling content relationships, as it is more user-friendly for content editors working in the Kontent.ai admin interface.

Kontent Ai

Headless CMS. Identifying Ideal Use Cases and Speeding Up Time-to-Market

Andrey Stepanov

All you need to know about Headless CMS. We also share knowledge about the benefits of Headless CMS, its pros and cons.

Headless CMS

Enterprise projects: what does a developer need to know?

Fedor Kiselev

Let's talk about what enterprise development is, what nuances enterprise projects may have, and which skills you need to acquire to successfully work within the .NET stack.

Development

Fixed Price, Time & Materials, and Retainer: How to Choose the Right Agreement for Your Project with Us

Andrey Stepanov

We will explain how these agreements differ from one another and what projects they are suitable for.

Customer success

Sitecore Personalize: tips & tricks for decision models and programmable nodes

Anna Gevel

We've collected various findings around decision models and programmable nodes working with Sitecore Personalize.

Sitecore

Umbraco replatforming and upgrades

Anastasia Medvedeva

Our team boasts several developers experienced in working with Umbraco, specialising in development, upgrading, and replatforming from other CMSs to Umbraco.

Umbraco

Kentico replatforming and upgrades

Anastasia Medvedeva

Since 2015, we've been harnessing Kentico's capabilities well beyond its core CMS functions.

Kentico

Interesting features of devtools for QA

Egor Yaroslavcev

Chrome DevTools serves as a developer console, offering an array of in-browser tools for constructing and debugging websites and applications.

Devtools
QA

Activity logging with Xperience by Kentico

Dmitry Bastron

We'll dive into practical implementation in your Xperience by Kentico project. We'll guide you through setting up a custom activity type and show you how to log visitor activities effectively.

Kentico
This website uses cookies. View Privacy Policy.