EVERYTHING XIAOMI
Get listed

grpcmock

grpcmock, also known as gRPC Mock, is a free, open-source Java tool for simulating gRPC service endpoints in unit and integration tests.

Place
#24 of 24
Score
5.2
grpcmock's website

What grpcmock is

grpcmock, also known as gRPC Mock, is a free, open-source Java tool for simulating gRPC service endpoints in unit and integration tests. Developers define method stubs with a fluent Java API and match requests by headers or bodies. Responses can include configurable delays, and later calls can return different responses. The tool supports unary, server-streaming, client-streaming, and bidirectional-streaming methods. Tests can verify invocation counts, status, headers, and request messages. The grpcmock-spring-boot module integrates it with Spring Boot tests, while grpcmock-junit5 supplies JUnit 5 extensions and an in-process server option. JUnit extensions clear mappings after each test and stop the server after the test class. It is self-hosted and licensed Apache-2.0. In multithreaded setups, static configuration uses ThreadLocal and may cause UNIMPLEMENTED errors.

Good

  • Fluent Java API configures gRPC stubs
  • Matches request headers and bodies
  • Supports all major gRPC streaming modes
  • Verifies calls and invocation details
  • Spring Boot and JUnit 5 modules

Watch out

  • Self-hosted deployment required
  • ThreadLocal configuration can fail across threads
  • Multithreaded tests may produce UNIMPLEMENTED errors

Who it suits

It is intended for Java developers writing integration or unit tests for gRPC services. Teams using Spring Boot or JUnit 5 get dedicated integration modules.

Verdict

grpcmock provides broad gRPC method simulation and detailed invocation checks without a listed paid plan. Multithreaded test setups need the instance-based configuration approach described in its documentation.

The facts

Each one read from grpcmock's own pages, with the date it was checked.

What it does

Concurrency limitation
In multithreaded test setups, static configuration methods can produce UNIMPLEMENTED errors because gRPC Mock uses a ThreadLocal instance.checked 4 Oct 2026
Configuration
It configures stubs through a fluent Java API and can match request headers and bodies.checked 8 Oct 2026
gRPC methods
It supports unary, server streaming, client streaming, and bidirectional streaming methods.checked 8 Oct 2026
In-process option
Spring Boot and JUnit 5 examples show how to run an in-process server for tests.checked 8 Oct 2026
Intended users
The project describes itself as a tool for Java developers writing integration or unit tests for gRPC services.checked 8 Oct 2026
Invocation verification
Tests can verify method invocations, including status, headers, requests, and invocation counts.checked 8 Oct 2026
JUnit 5 integration
The grpcmock-junit5 module provides JUnit 5 extensions, including an in-process server option.checked 8 Oct 2026
JUnit integration
The grpcmock-junit5 module provides JUnit 5 extensions, including an in-process server option.checked 4 Oct 2026
License
The project’s GitHub page identifies its license as Apache-2.0.checked 8 Oct 2026
Matching
Stubs can match request headers and request bodies.checked 4 Oct 2026
Multithreaded tests
The documentation says static configuration methods use a ThreadLocal instance and recommends accessing a GrpcMock instance when setup and test methods run on different threads.checked 8 Oct 2026
Project status
The site describes gRPC Mock as open source.checked 4 Oct 2026
Purpose
gRPC Mock is a Java testing tool for mocking gRPC service endpoints in integration or unit tests.checked 8 Oct 2026
Response behavior
Individual responses can have configurable delays, and stubs can return different responses on subsequent invocations.checked 8 Oct 2026
Spring Boot integration
The grpcmock-spring-boot module integrates gRPC Mock with Spring Boot tests.checked 8 Oct 2026
Stubbing
It configures gRPC method stubs through a fluent Java API.checked 4 Oct 2026
Supported methods
It supports unary, server streaming, client streaming, and bidirectional streaming methods.checked 4 Oct 2026
Test lifecycle
With the documented JUnit 5 extensions, stubs are cleared after each test and the server shuts down after the test class finishes.checked 8 Oct 2026
Verification
Tests can verify method invocations, including invocation counts, status, headers, and request messages.checked 4 Oct 2026

Alternatives to grpcmock

All alternatives
  1. 1

    Kreya

    Free planLinuxmacOSWindows
    7.1Free plan
  2. 2Bandura logo

    Bandura

    Free planLinuxmacOSSelf-hostedWindows
    6.7$59 one-time
  3. 3

    grpcmd

    Free planLinuxmacOSWindows
    6.7From $9 a year
  4. 4FintX logo

    FintX

    Free planLinuxmacOSWindows
    6.6Free plan
  5. 5

    grpcui

    Free planWebLinuxmacOSSelf-hosted
    6.6Free plan
  6. 6

    protoc-gen-doc

    Free planLinuxmacOSSelf-hostedWindows
    6.5Free plan