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

Docker support and remote java client #7

Open dtuchs opened 3 years ago

dtuchs commented 3 years ago

First of all I want to thank you for this simple solution for grpc mocking, it's really useful in unit tests! But sometimes we would like the grpcmock to be called not directly from tests, but from another service (yep, I'm talking about end-2-end tests for several microservices) WireMock and mock-server already support running as stateful service in docker, and I'm sure many developers will be happy to get a similar solution for gRPC. Also, gripmock already supports standalone running in docker, but they don't have a remote client, there is only REST API. Of course, it is possible to implement “WireMock-style” simple client for gripmock, but first I wanted to ask if you have any plans to do something like that in the future? Thanks!

Fadelis commented 3 years ago

Hey @dtuchs, I glad you've found grpcmock useful! Initially for me it was only about mocking gRPC services in unit/it tests, and I've never though about creating a client for e2e. But I think that definitely should be possible. Tho it would have reduced matching possibilities (you can't jsonize a predicate), probably similar to gripmock - equals and contains. Also not sure about bidistreaming api definitions (that's a thing to improve on the DSL as well). I didn't get the part were gripmock doesn't have a remote client? I seems it does provide a Dockerfile, which could be used to run the client?

nitink007 commented 1 year ago

Hi @Fadelis

Yes Docker support is something which will be highly useful. Is there any near future plan for this to get Docker support to run remotely via a java client ?

Fadelis commented 1 year ago

Hi @Fadelis

Yes Docker support is something which will be highly useful. Is there any near future plan for this to get Docker support to run remotely via a java client ?

Hi @nitink007 I have no plans for it atm, since it would require quite a different structure to support this (loading proto files to docker container, parsing and loading json scenarios and etc). As mentioned in the other linked issue you could check out https://github.com/Adven27/grpc-wiremock project, maybe it will suit your needs.