You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Firstly kudos for Karate library to develop a fantastic Over the wire test double mocking which is unparalleled in terms of capabilities. Its simple and straightforward and I was able to mock the http service downstream in a matter of hours!
Similarly we have downstream services which are of different protocols like JMS. I would want the ability for karate to listen to JMS server and intercept the call and forward/mock the api call and return response. Currently I dont think it is supported. But It should be possible with some changes to MockServer and other enhancements.(Would love to raise a PR for this).
I can think of the following changes to support this enhancement(I might be wrong, please suggest other ideas/improvements):
Modify MockServer extends HttpServer and add a Strategy pattern based support
to add multiple protocols implementation like JMS, GRPC, GraphQL or any custom protocol(User can pass the java interop during runtime to establish how he wants the connection or protocol to be handled)
Modify MockServer builder to add methods for protocol like JMS, GRPC, GraphQL or Custom Protocol(Karate acts like a SocketServer, rest of the protocol details provided by user via Java Interop)
Dont spin up a HttpServer if http builder method is not called. Instead use a port method for Karate to listen to connection requests. And let the user decide the connection protocol should be.
Ensure http connections works as is currently if http builder method is called.
Enhance karate.proceed proxying for other protocols. We can enhance proceed function to take custom java interop function to let user decide how proxying should happen.
Add more generic convenience functions like pathMatches for other protocols so that karate can intercept the server requests for proxying or mocking the response.
The text was updated successfully, but these errors were encountered:
the other point is that we have commercial extensions for async protocols now, and mocks may eventually be part of that - but we don't see a critical mass of teams needing it
Firstly kudos for Karate library to develop a fantastic Over the wire test double mocking which is unparalleled in terms of capabilities. Its simple and straightforward and I was able to mock the http service downstream in a matter of hours!
Similarly we have downstream services which are of different protocols like JMS. I would want the ability for karate to listen to JMS server and intercept the call and forward/mock the api call and return response. Currently I dont think it is supported. But It should be possible with some changes to MockServer and other enhancements.(Would love to raise a PR for this).
I can think of the following changes to support this enhancement(I might be wrong, please suggest other ideas/improvements):
to add multiple protocols implementation like JMS, GRPC, GraphQL or any custom protocol(User can pass the java interop during runtime to establish how he wants the connection or protocol to be handled)
The text was updated successfully, but these errors were encountered: