1

Beyond the interfaces that you offer out of the box, we have some other interfaces which need to be integrated within E2E tests. Those are TCP based protocols. Is there any chance that you will make karate extendable any time soon so that we can make such calls in actions like statements and not via JS/Java API?

We would need something like

... REST API Test
And send customProtocol message(attr1=1,attr2=2) 
Then expect customProtocol message(res=OK) 
... GUI Test
alknows
  • 1,972
  • 3
  • 22
  • 26

1 Answers1

0

Karate is already "extendable" via Java interop. If you use Java interop, you will need one extra line to "import" the API you need. And yes, you will not get the "natural language" look that you seem to be after, but in my honest opinion, all of that is very over rated.

So if the extra line and using an API that looks like Java in a feature file is a deal-breaker for you, you may need to look for some other framework.

Please take a look at this example, where you can get close to a custom DSL using the JS or Java-interop approach: https://twitter.com/getkarate/status/1144458169822806016

I also think that for your TCP based protocol, this answer directly answers your question: https://stackoverflow.com/a/62826394/143475

Peter Thomas
  • 54,465
  • 21
  • 84
  • 248