Fadelis / grpcmock

A gRPC Java testing tool to easily mock endpoints of gRPC services for IT or Unit testing
http://grpcmock.org
Apache License 2.0
144 stars 13 forks source link

How to mock service by this if provided a proto file #2

Closed Rank2019 closed 4 years ago

Rank2019 commented 4 years ago

now I got one proto file , if i want mock grpc sevrice by this proto ,how can i integrate this project with my request , i check your example , it's hard for me to understand , btw ,i am new in grpc cycle . tks

Fadelis commented 4 years ago

@Rank2019 first you'll have to generate Java stubs for your given file. gRPC stubs are generated using protoc binary, or using a maven/gradle plugin, which take cares of finding the right protoc binary for you. Here are some useful starting links - Link #1 Link #2

If you're new to gRPC I'd suggest to follow some small guide, where you'd implement a gRPC client and a server, then you could move to testing them.

As this is not related to the library itself, I'm closing this.