« - »

It’s a brand new project!

23 April 2009

After rebuilding a few of the old project web sites, I started looking a little more closer at some the reports that are generated by Maven and realized that I don’t have any unit tests that cover any of the servlets in the portfolio. The main reason for that, it turns out, is that I have no idea how to go about doing that, so I started nosing around the web looking for guidance.

After googling around here and there for different things, I came across a number of interesting and useful items such as this one, which got me thinking about different ways to help expedite the process using some generic base tester classes that could be extended as needed. We already have something like that here, which later had to be duplicated here and then again here.

I really don’t like having things in more than one place, and when it looked as if I would have to do the same kind of thing again for any servlet testing tools, I decided that it was time for a new .jar file dedicated exclusively to those items whose sole purpose was to support testing. It may only end up with a few things in it, but these are things that I don’t want to put in the core .jar, as they are only used during the testing phase, and I don’t want to have to duplicate all over, either.

This new project will be a new Maven project called core-test, and will produce the core-test.jar file, which will become a test-scope dependency for those projects that can benefit from any of its contents. Now, if the test coverage report on this project starts to bother me, I’ll have to come up with unit tests to test the unit testing tools, but for now, I think I’ll just try not to look too closely at that report! We’ll just focus on the code, starting with the BaseDaoTestCase, which we can now yank out of all of the places where it is currently found and reference from here instead.


Leave a reply

You must be logged in to post a comment.