Skip to main content

Who knows SigTest, please raise your hand.

Posted by fabriziogiudici on April 8, 2009 at 4:49 AM PDT

I've almost completed the inception of BetterBeansBinding: sources are in the new repo (but I have yet to replace the copyright notices), the project has been mavenized (!*), we have the issue repository and the communication plan, yesterday also a new instance of Hudson went up (it's mine, I've been able to deploy it to a different server that doesn't have load problems as the one for blueMarine) and we have the first reports (Cobertura and Findbugs).

One of the last pieces I'm working on is SigTest. Do you know it? SigTest is a pretty neat tool for testing the compability of an API with its specification and/or previous releases, used by the developers of the JDK and (with a slightly patched version) by NetBeans developers. The idea is that you publish a release of an API and declare it is a reference point (in my case it's the very first version of BBB, that hasn't been touched so it's just the BeansBinding code in a new repo); then run SigTest to create a "golden file" that contains a precise description of the public classes and methods exposed by your API. Later, you'll run again the test on the most recent build and it will compare the results with the golden file. If it's the same, no problem; if it finds you've only added new methods and classes, no problem but be aware of what you're doing; if you have changed things and broke the backward compatibility, you'll see an error. And, as Jarda Tulach described in some chapters of his book, retrocompability can be broken in very subtle ways: one thing is source compability (you are allowed to recompile everything), another is binary compatibility (you just replace jars - and BBB needs it), etc..

SigTest will help BBB in keeping the compability with the original API.

(*!) I don't have changed my mind about Maven. It's just that BBB is not "my own" project, but it has some relevance for the whole Swing community, others will participate and Maven is popular, so this choice should make collaboration easier.