Skip to content

wiremock/wiremock-grpc-demos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

WireMock gRPC Demos

Java

This example requires at least Java 11 to be installed.

To generate all the necessary code and descriptors then run the tests, run the following command:

cd java
./gradlew check

Standalone

This example requires protoc and at least Java 11 to be installed. Optionally, grpcurl can be used for testing.

To generate the descriptor file from the .proto file and start the standalone server with gRPC enabled:

cd standalone
./run.sh

If you have grpcurl installed you can test the mock as follows:

grpcurl -d '{"name": "Tom" }' -plaintext \
  -proto ExampleServices.proto \
  localhost:8000 com.example.grpc.GreetingService/greeting

Docker

This example requires protoc and at least Java 11 to be installed. Optionally, grpcurl can be used for testing.

To generate the descriptor file from the .proto file and start WireMock in Docker with gRPC enabled:

cd docker
./run.sh

If you have grpcurl installed you can test the mock as follows:

grpcurl -d '{"name": "Tom" }' -plaintext \
  -proto ExampleServices.proto \
  localhost:8080 com.example.grpc.GreetingService/greeting