recently crossed on GitHub and has been very , even beginning to feature in as a desired skill. Not bad, given this project is just ten months old ! Karate 500 stars well-received job-postings Test Doubles One of the features in the works (and close to being released) is the ability to spin-up test-doubles to “mock” a web-service API dependency that may still be in development — or for which a test-environment may be un-available or unstable. This is a for many teams — and “ ” are legendary sources of pain for many a platform team dealing with micro-services. pain-point significant flaky integration tests Karate’s innovative has worked out extremely well in practice, and actually happens to be a great fit even when “ ” things to work on the server-side. Here’s an example that showcases how simple it is to write a test-double for a service. Things just click into place, like Karate’s native support for JSON and XML, and the power of the shines through. “mis-use” of Gherkin inverting stateful REST embedded JavaScript engine the actual source for this example: demo-mock.feature You can find a comprehensive list of capabilities in the . While the README evolves, a demo end-to-end example using has been created as an early preview for the community, and is summarized below. project-documentation Spring Boot Consumer-Provider Example We use a simplified example of a Java ‘consumer’ which makes HTTP calls to a Payment Service (provider) where , , and have been implemented. The 'provider' implements CRUD for the 'POJO', and the (or create) results in a message ( as JSON) being placed on a queue, which the consumer is listening to. GET POST PUT DELETE [Payment.java](https://github.com/intuit/karate/blob/develop/karate-demo/src/test/java/mock/contract/Payment.java) POST [Shipment.java](https://github.com/intuit/karate/blob/develop/karate-demo/src/test/java/mock/contract/Shipment.java) is being used for the sake of mixing an asynchronous flow into this example, and with the help of some , we are able to mix asynchronous messaging into a Karate test the test-double. ActiveMQ simple utilities as well as Server-Side Karate Karate on the ‘other side of the fence’ ( HTTP requests instead of them) — turns out to be remarkably effective, yet simple. handling making ‘Native’ support for expressing JSON and XML Manipulate or even transform payloads Validate payloads, using a if needed simpler alternative to JSON schema Karate is about making HTTP calls, giving you the flexibility to call ‘downstream’ services if needed all In-memory JSON and JsonPath solves for ‘state’ and filtering if needed Mix custom JavaScript (or even Java code) if needed — for complex logic Easily ‘seed’ data or switch environment / config on start If you think about it, all the above are to implement micro-service. Karate’s DSL syntax is on exactly these aspects, thus opening up interesting possibilities. sufficient any focused It may be hard to believe that you can spin-up a ‘usable’ micro-service in minutes with — but do try it and let me know what you think ! Karate