I am trying to: 1. Instantiate jetty from code (easy) 2. pre-instantiate proper controller class (with mock data and without spring) (easy) 3. Setup a minimal hard-coded struts action that will invoke the controller instance and render the jsp. I am trying to do it inside jetty but all I need is sufficient context to have struts2 and jsp rendering.
I want to invoke: localhost:8080/test.action from some kind of test framework (selenium, httpunit or similar) and check the response according to parameters set in controller. Possibly I would want to re-run with different settings in the controller. The controller/jsp combination is an AJAX handler, so there is a very compelling case for unit-testing the actual response. Furthermore I have multiple such actions so I would really enjoy It if I could do it all in code ( no xml). If so I could probably make it a part of the unit test hierarchy. Anyone have suggestions or code for this? Kristian