- Home
- gRPC Tools
- grpcmock
On the recordRead 8 Oct 202619 facts
grpcmock
On the record
- Concurrency limitation
- In multithreaded test setups, static configuration methods can produce UNIMPLEMENTED errors because gRPC Mock uses a ThreadLocal instance.grpcmock.org · read 4 Oct 2026
- Configuration
- It configures stubs through a fluent Java API and can match request headers and bodies.grpcmock.org · read 8 Oct 2026
- gRPC methods
- It supports unary, server streaming, client streaming, and bidirectional streaming methods.grpcmock.org · read 8 Oct 2026
- In-process option
- Spring Boot and JUnit 5 examples show how to run an in-process server for tests.grpcmock.org · read 8 Oct 2026
- Intended users
- The project describes itself as a tool for Java developers writing integration or unit tests for gRPC services.grpcmock.org · read 8 Oct 2026
- Invocation verification
- Tests can verify method invocations, including status, headers, requests, and invocation counts.grpcmock.org · read 8 Oct 2026
- JUnit 5 integration
- The grpcmock-junit5 module provides JUnit 5 extensions, including an in-process server option.grpcmock.org · read 8 Oct 2026
- JUnit integration
- The grpcmock-junit5 module provides JUnit 5 extensions, including an in-process server option.grpcmock.org · read 4 Oct 2026
- License
- The project’s GitHub page identifies its license as Apache-2.0.github.com · read 8 Oct 2026
- Matching
- Stubs can match request headers and request bodies.grpcmock.org · read 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.grpcmock.org · read 8 Oct 2026
- Project status
- The site describes gRPC Mock as open source.grpcmock.org · read 4 Oct 2026
- Purpose
- gRPC Mock is a Java testing tool for mocking gRPC service endpoints in integration or unit tests.grpcmock.org · read 8 Oct 2026
- Response behavior
- Individual responses can have configurable delays, and stubs can return different responses on subsequent invocations.grpcmock.org · read 8 Oct 2026
- Spring Boot integration
- The grpcmock-spring-boot module integrates gRPC Mock with Spring Boot tests.grpcmock.org · read 8 Oct 2026
- Stubbing
- It configures gRPC method stubs through a fluent Java API.grpcmock.org · read 4 Oct 2026
- Supported methods
- It supports unary, server streaming, client streaming, and bidirectional streaming methods.grpcmock.org · read 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.grpcmock.org · read 8 Oct 2026