Exploring this area of db4o is a tricky undertaking and gives me the opportunity to show off a tactic taught to me by good friend: exploration tests. (Thanks to Stu Halloway, who first coined the phrase, as far as I know.) An exploration test, in a nutshell, is a series of unit tests written not only to test the library in question, but also to explore the API and ensure that the library behaves the way it is expected to. As a useful side-effect of this approach, future library versions can then be dropped into the exploration test code, compiled, and tested. If the code doesn't compile or the exploration tests don't all pass, then the library is clearly not backward-compatible, and you will find out before ever trying to use it in a production system.
|