In my previous article, I highlighted the nature of component tests. Their scope should be a single executable where all external dependencies have been replaced by configurable test doubles. Rich front-end applications are a good candidate for such tests. The backend they interact with should return predictable and easily configurable responses to cater to relevant test scenarios. The real backend is usually not cut out for that task. In this continuation, I will therefore look in some more detail at the Karate Netty project.

It must be worth the effort to set up a mock server over just using the actual backend. If it is awkward to set up and hard to learn, it may be more prudent not to use mock at all and run your tests in an end-to-end fashion. But that only works when the backend is lightweight and can run on a local machine. In the most complex microservices environments, that is hardly the case anymore.

Generated by Feedzy