I have successfully built no-deployment-needed integration test frameworks for Spring MVC REST services using Mock MVC. I am struggling to do the same with JAX-RS services.
REST Assured looks promising, but it seems to require deployment. The test suite can start up a CXF server, but can it wire it up with a servlet container?
It seems that the unique value provided by Mock MVC is in its mock servlet container. Does any other technology provide this.
The JAX-RS testing page of the CXF documentation provides a pattern for injecting a mock HttpServletRequest into a CXF invoker. Which got me thinking ...
Spring MVC's mock servlet elements (MockHttpServletRequest, etc.) come from the spring-test module, is independent of Mock MVC. Would we be able to inject these objects into a CXF invoker? Or will this be a rabbit hole?
Has anyone come up with a solution to this problem?
.