Reputation: 45
In the documentation for Karate Netty, we learn how to make API test-doubles to mock other services which our tests may have to call. This is a very useful feature.
I now would like to make an API test-double for a service which accepts only gRPC requests. I'm not sure how to go about this since the existing examples (like the cats example) seem to be based on REST. But in gRPC paths are static and, for example, there are no path params.
Is this currently possible?
Upvotes: 1
Views: 916
Reputation: 58128
Not at the moment, and it does sound like a good feature request for the future.
I think your best bet is to write a small one-time gRPC server for your specific needs. Karate uses Armeria behind the scenes, so adding gRPC support should be relatively easy. Open-source contributions in the form of pull-requests are of course welcome.
Upvotes: 2