One of the strange things about this project is that it's taught me just how important and awesome JUnit testing is, while misusing JUnit horribly.
Still I'm up to 400+ tests and I'm very impressed with how they help the process. I'm also horrified both that I've written so many tests and at how few I have!
Theoretically my tests are mostly wrong too: unit tests are supposed to test tiny deterministic functions and certainly shouldn't depend on anything external like a database.
Still they are extraordinarily useful: protecting existing functionality; defining new functionality; ensuring major changes in behaviour are properly considered; and repetitive code blocks hint at useful functions.
I particularly like how they give you excellent practice at using your own API. Having to repeatedly type out that long expression really focusses your mind on improving the usability.
The bit that needs work though is testing against multiple databases. At the moment I test it routinely against H2 with a little eye-ometer occasionally. There is also a fairly impressive project building up at work which helps keep Informix support going. That project also drives lots of the bug fixes and improvements.
However that still leaves Oracle, SQL Server, MySQL, PostgresSQL, etc out in the cold. There is a little work on SQL Server happening. But MySQL and PostgresSQL haven't been tested properly for a long time. And, frankly, Oracle was far too slow to bother finishing :(
All of these databases are important, and I worked on Oracle for years, so I don't want them miss out on proper testing. If anyone has some good advice on setting up a testing profile that I can run on my home Mac to test all those DBs, I would be very grateful.
Maybe we'll get to 2000 tests in no time at all ...
Anonymous
With a little assistance from Toaomalkster, the testing situation is much improved. Still work to do but there are now 3 databases being tested routinely :)