Last week, I posted about our recent success at getting DBUnit working with an in-memory HSQLDB database,  which allows us to more thoroughly test data access objects (DAOs). Further work with that solution has unearthed some rather frustrating problems unfortunately. Read more



Unit testing software tends to break down at the boundaries of a system.  It’s difficult to test the graphical user interfaces (although with some of the new technologies like Selenium, testing browser-based GUIs is easier…) and the database access. I’ll save the UI for another time, today’s topic is the database access.

[Update – Read Some unfortunate behavior in DBUnit for important gotchas in this approach]
Read more



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



With the growing popularity of agile development philosophies, UML modeling has taken a back seat in a lot of development shops. I still believe that modeling has it’s place, despite the fact that this has puts me at odds with a number of practitioners I’ve run into in the last few years.

UML modeling allows me to organize and plan out my thoughts for large systems, and share them easily. I’m thinking of those systems where extensibility and maintainability are important. It creates artifacts that allow others who come after me (or, for that matter, me in 6 months when I’ve forgotten) to understand the concepts and structures in the systems I build without having to pore over the code to do so. I also find when I’m trying to understand existing code, and there exist no good documents to describe that code, creating models helps me put the whole enchilada down in front of me at once, where I can get a sense of it.

As I mentioned, a good number of practitioners I run into today think that modeling does not need to happen, ever, and this is just wrong-headed. But let’s assume for the moment that you think perhaps you want a model for one of the reasons I mention, or for one I didn’t. Which tool should you use? The answer depends on what you’re trying to accomplish. Just as you wouldn’t drive a nail with a screwdriver, you want to pick the appropriate tool for the job you’re trying to accomplish. I’m going to talk about several popular modeling tools: IBM Rational Rose, IBM Rational Software Architect, Sparx Systems Enterprise Architect, and Borland Together Control Center.

Read more


WP Themes