Hello, I'd like to add JUnit test cases to the Maven version of my "DoubleIt" web service provider[1]. The types of things I'd like to test are (1) that an integer fed is actually doubled in the response, (2) not well-formed SOAP requests are rejected, and (3) non-schema valid SOAP requests are rejected.
I can think of two main ways of doing this: 1.) Write test cases the standard Maven way, i.e., create a test folder that it is sibling of the service/src/main folder and write the test cases there. That would require having an embedded Tomcat or Jetty instance that reads the either the WAR file in target (or, equivalently, the exploded war also in target), and makes a servlet out of that so the test cases can work. I'm not sure if embedded Tomcat/Jetty can handle this though--most/all of our CXF test cases don't work with WAR-file hosted web service providers. or 2.) Create a separate "systests" project that doesn't test anything until the WAR is (manually) deployed on a non-embedded servlet container--*then* run the tests. CXF also has this type of test--but I'm unsure how appropriate it would be for the types of tests I'm thinking of here. Any suggestions which is best? What have others done for web service provider testing? Thanks, Glen [1] http://www.jroller.com/gmazza/date/20080417
