I’m currently mentoring a team at my client’s site that’s using test driven development (TDD) to improve the design of their application. We’re also using Struts 1.x, and they want to use StrutsTestCase as a standard for testing.  Okay, so far so good.

Being a fan of the Spring Framework, it should be no surprise that I want to make dependency injection a big part of refactoring to make their application more modular.  So I set off, Google in hand, to try to figure out how to make Struts, StrutsTestCase and Spring all play nice together.  Turns out that it can be done, but it’s surprisingly difficult, and I couldn’t find anything telling me exactly how to do it. There were hints in a number of places, but it took me a couple of days to put all of those together.  I’m going to share, so hopefully you won’t have to go through what I did. Read more


WP Themes