Testing a REST API is easy to start. You can fire a request with CURL, with Invoke-WebRequest, with Bruno or with whatever client is already in your toolbox (which in my case is VirtuProbe Studio) and read the JSON that comes back. A gRPC service does not hand you that - the messages are binary, the schema lives in a .proto file (you may not even have access to), the calls run over HTTP/2 as multiplexed streams and the service usually sits between other services. Before you can assert anything about a response, you first have to make it readable.
What is gRPC
gRPC is short for gRPC Remote Procedure Calls. A remote procedure call lets one program invoke a function in another program over the network - the client calls payments.InitiatePayment(request), a method of the same name runs on a server somewhere else and the reply comes back as a typed object. gRPC came out of Google in 2015 and it is now a project under the Cloud Native Computing Foundation and it has become a common way for backend services to talk to each other.
You define a contract - a .proto file, which lists the services, their methods and the messages each method takes and returns. A code generator turns that file into a client and a server in whatever languages you use, from Go to Python to Java. Both sides are built from the same definition, so a mismatch is a compile error which is assured by the .proto contract.
Three choices under that contract matter to the developer and people who need to test it.
Protocol Buffers. The messages are a compact binary encoding, not text. Every field carries a number rather than a name, which keeps the payload small and lets the schema evolve: add a field with a new number and old readers skip it, so new and old code can interoperate. Without the schema the bytes would mean nothing.
HTTP/2. The transport is HTTP/2 rather than HTTP/1.1. Many calls share one connection without blocking each other, the headers are compressed and a call can keep a stream open to send a sequence of messages. The status of a gRPC call comes back in a trailing header block after the response body.
Four call shapes. Unary is the familiar one request and one reply. Server streaming sends one request and reads a stream of replies, client streaming does the reverse, while bidirectional streaming keeps both directions open at once. In case of this demo, a fraud score is unary and our feed of payment status updates is a server stream.
A server can also be asked to describe itself. With server reflection turned on, a client points at the server and gets its whole service and message catalog back with no .proto in hand. That is convenient in development and in internal tooling, but hardened or public-facing servers usually turn it off in order to keep the private parts private.
The trade-offs
Teams reach for gRPC for speed. A binary format and HTTP/2 make it fast and cheap when the call volume is high, plus the schema gives a strict versioned contract shared across languages (looking in your direction JSON).
The payload is not human readable though, so you cannot read it on the fly or fire a quick request from a browser without extra tooling. The .proto and its generated code are a build step and a coupling, not a free-form body. And because gRPC assumes HTTP/2 from end to end, it needs a proxy or a translation layer to reach a browser.
Who runs gRPC and why you rarely see it
gRPC runs between services rather than at the edge. A public API still tends to speak REST or GraphQL, because that is what browsers and partners expect, while gRPC does its work inside the system, where one service calls another. For example, Square has used it since the project's early days to connect its polyglot microservices. The gRPC project lists Coinbase among its fintech adopters, for high-performance strongly typed calls on financial transactions.
So the example here is a payments backend, which in our case is a payment service that talks to an accounts service and a fraud service.
What makes testing gRPC different
The workbench needs the schema or reflection to decode a reply at all and a gRPC call reports its own status rather than an HTTP code, so a call can arrive over a healthy connection and still carry a PERMISSION_DENIED (not unlike REST). A test has to read that status, decode the typed message and assert on its fields.
Pointing VirtuProbe at the backend
Before we can call anything, we ask the server what it runs.
This server has reflection turned on, so we do not need the .proto to begin - we just create a gRPC probe and ask it to list services. It answers with the catalog: a payment service, an accounts service and the reflection endpoints themselves.
Describing the payment service expands it into its methods and the shape of every message they take and return, with no schema file to hand.
With the catalog in hand we send the first real call, InitiatePayment, moving a hundred euros from one account to another.
The reply comes back as a Payment with a status of SETTLED. The workbench shows that reply three ways at once. There is the decoded JSON a developer would expect, there is the raw hex and there is the protobuf field breakdown, where the status is not the word SETTLED but the number 3 in field 5, while the fraud decision is the number 1 in field 7. The server sends numbers; the words come from the .proto schema.
The HTTP/2 frames are there too. The request goes out as a header block and a body, the reply comes back the same way, then a second header block arrives after the body carrying the status. Most clients fold that trailing block away, so you never see it.
Our first call returned a payment id and since I need the id in {{payment_id}} in every single probe from here after, I wanted to save it as a variable on project level in Project Dashboard view.
Not every call is one request and one reply - calling WatchStatus takes that id and streams the payment's lifecycle. The probe is set to server streaming and reads {{payment_id}} from the variable.
It receives three messages in turn: PENDING then AUTHORIZED then SETTLED, each decoded as it arrives.
Following the payment across the stack
After the call returns, the payment still has to land in the ledger, show up for the customer and leave a trace for audit. In case of this backend demo, I have those as three different systems. A probe reaches each one directly, reading the same {{payment_id}}.
The public read model is served over plain HTTP - an HTTP probe fetches the payment by id and reads its status back as JSON.
The authoritative record is a row in PostgreSQL - the SQL probe needs a host, a database and a credential (which is project/global scoped).
With that in place the probe selects the payment, settled, with the amount intact.
When writing queries, I always appreciate to have easy access to the database schema - it draws the two tables that hold a payment, payments and ledger_entries, linked by the payment id.
A second query reads that ledger for the payment, a debit and a credit for the same amount.
The event log lives in MongoDB. A Mongo probe finds the document for that payment and shows the stored event.
Each probe checks one surface on its own and we can see that our payment is now visible over gRPC, HTTP, PostgreSQL and MongoDB.
Turning calls into a test
A probe on its own just runs and returns, the same way we are used to see in any other SQL workbench or HTTP client. To make a test, we need to chain the calls together and ideally add an assertion that checks our expectations. The first step initiates a payment over gRPC and pulls the payment id out of the reply into a variable the later steps read. Defining variable here obviously overwrites the one that I defined on project level before.
With one step the chain runs, but the quality panel already flags it: there is no assertion, so a green run proves only that nothing broke along the actual call - we might assert that here also, but let's add the HTTP read and two assertions there instead (in real test, I would go for asserting on every single possible consistent value), one on the status code and one on the payment status.
Then the rest go in the same way, the PostgreSQL read with an assertion on the row and the Mongo read with an assertion on the event. The finished chain crosses all four protocols. It initiates the payment over gRPC, keeps the payment id and carries it through the three reads, confirming SETTLED over HTTP, a settled row in PostgreSQL and the logged event in MongoDB. The quality panel reports no issues.
We run it and every step reports its extracted value and every assertion passes. One test now follows a single payment through all four systems. You keep that test and rerun it.
Setting up mock for the fraud service response
The chain that settles a payment asserts its status comes back SETTLED. I wanted to see the other case: how the payment service behaves when the fraud service would try stopping the payment. One way there is to pick an amount the fraud rules block, but that leans on the fraud service's own logic as much as on the payment service's handling of a block, so in this case I prefer consistent and controllable mock for the service response instead.
Before the backend books a payment, the payment service calls the fraud service for a score. The call runs inside the microservice system, so I just need to set up the service under test to send everything through a VirtuProbe proxy (super easy in pretty much any environment with completely native tools like socat, proxychains or any other setup via docker, jvm or ... pick yours).
For mocking we first need the fraud service's contract, so we point a describe at it and copy its .proto straight from the response.
Then we start the proxy, route the fraud call through it and add one rule. It matches the Score method and returns a ScoreResponse of our choosing.
The response is written as JSON against that .proto, a decision of BLOCK with a high risk score, so nothing is hand-encoded.
Then I re-ran the four-protocol chain with nothing else changed. The payment is the same one that normally clears, but the mocked score blocks it, so the HTTP read comes back DECLINED where the assertion expects SETTLED and the chain goes red on that step and stops. The real fraud service was never touched and the payment service ran as it would in production; I only changed the answer its dependency gave.
What you end up with
At the end you have a small working kit. There is a gRPC probe that discovers a service and calls it, a streaming probe that follows a payment, a proxy rule that stands in for a dependency we do not control and a chain that proves one payment across all four protocols, asserting the result at each surface. All of it runs on its own, so this chain behaves like any other test you build here. It can go into a suite with the rest of your tests, then that suite can run from a CI/CD pipeline so the same question gets answered every time you need to. Building that pipeline out is its own walkthrough, covered in Compose complex QA pipeline and integrate it with your CI/CD.
Test your own gRPC service. VirtuProbe Studio is free to download (with full HTTP support, chaining, etc.), with no account, no cloud and no PII collecting telemetry. The gRPC probe and the dependency mocking are available on our Engineering tier.
























