Aboutmatt.net

Blog, projects and et cetera..

Testing Inherited Code Bases...

Reading time: about 1 minute

Recently I decided to have a stab at some open source development. I’ve forked a repo of a piece of software called jCodeCollector. A java code snippet manager. There are a few issues with the code base as it stands, a major one in my view is the lack of tests.

I intend on making some fairly radical changes to the code base and it would make quite a lot of sense for me to have the safety net of tests before I go blowing away any fine tuned behaviour. So I am now looking down the barrel of writing a tonne of tests, which would be a tedious prospect since this is my spare time development.

So it came a massive relief when I landed on a Microsoft Visual Studio plugin this morning in my daily CodeProject email. This particular plugin is of no use to me, but the concept of automatically generating tests by analysing code branching behaviour is useful. A quick Google search and I landed on an Eclipse plugin called CodePro Analytic (develop by Google themselves incidentally) that can do this very task for me.

This is by no means a silver bullet, but if it can save me hours of typing and allow me to just get up and running then it is a massive step in the right direction for my project.