Sep 23rd, 2006, 06:51 PM
JUnit testing HTTP based services (no external container)
Is there a way of publishing a Spring service (HTTP) and accessing it within the context of a JUnit test without the need for a container (or at least a container that is not provided by the Spring Framework).
I would like to be able to CVS checkout a load of code, build it with ant and then run all the JUnit tests (including those that test services) without having to deploy to a web / application server first.
Sep 27th, 2006, 07:27 PM
Check out cargo
I don't know of a way to test a web service (term used loosely) without a container but I suggest you check out cargo (http://cargo.codehaus.org/). It essentially allows you to launch a container for your tests...
We have it hooked into our maven build system to execute SIT tests and it works very well.
p.s. I suggest checking out the free "Better Builds with Maven" (http://www.mergere.com/m2book_download.jsp) book if you are using maven as it provides a working example...
Sep 29th, 2006, 10:51 PM
Thanks for the reply. Will take a look.
(you from the U.K. too?)