Karate test framework: besides SOAP and REST also JMS calls?

Viewed 359

We are using ReadyAPI for API testing, Mocking and JMeter for performance testing and looking into the possibility to migrate everything to Karate framework. Would be handy to have all in one open source framework. But the main question is: can Karate framework handle JMS calls? Because 80% of our service testing is via JMS (with Hermes in ReadyAPI). I know SOAP and REST are supported but can't find anything about JMS.

1 Answers

Yes, you have to write a Java adapter (one-time work).

Please look at these 2 references:

  1. https://twitter.com/getkarate/status/1128170638223364097

A great example that shows off Karate's Java / JS interop - and built-in async support

  • first we call custom code to listen to an ApacheActiveMQ queue
  • an HTTP POST is made
  • we wait for the JMS message
  • and assert that the message is as expected

https://github.com/intuit/karate/tree/master/karate-netty#consumer-provider-example

  1. https://twitter.com/getkarate/status/1417023536082812935

How Java interop and mocks can come together for advanced async / messaging flows such as JMS or apachekafka

link to full example: https://github.com/intuit/karate/tree/develop/karate-demo/src/test/java/mock/async

Related