Search code examples
springfunctional-testingbatch-processingembedded-jetty

Writing functional tests with server-side java application that isn't a Java EE app


My company has a java-based batch application that's not implemented in Java EE which embeds jetty to handle some web service calls.

Untill now, none of these endpoints had any functional tests(using something like htmlunit), which is clearly a bad thing.

I've been tasked to do this. My definition of success is to have it behave as much as possible like grails and it's functional test plugin or a traditional Java EE would be using maven's failsafe plugin.

The app has a main() method. Internally, everything(like datasources, how jobs fit together, etc) is configured in Spring.

Does anyone have any suggestions on a strategy? Feel free to prompt me for more information.


Solution

  • I ended up using Jersey Test(see this SO entry).