Skip to end of metadata
Go to start of metadata

The responsibility of endpoint tests is to verify that the wiring and configuration of the endpoints works as intended.

It is often a good idea to use stubs instead of the actual services. We recommend Mockito for stubbing the services behind the endpoints.

JMS

  • Start ActiveMQ (in-mem) programmatically

HTTP

To verify that the HTTP endpoints work as expected it is of course necessary to start a web server. The approach taken here is to run the application (which embeds a web server), but override the implementation behind the endpoints.

REST
  1. Start Jetty application with stubbed services
  2. Run requests against the service and verify the expected response (both response code and content).
    1. REST-assured can simplify the request and assert parts of this.
SOAP
  1. Start Jetty application with stubbed services
  2. Run requests against the service and verify the expected response (both response code and content).

CXF example:

See also http://stackoverflow.com/questions/5906154/apache-cxf-credentials-not-being-sent-from-wss4joutinterceptor.

Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.