Posts

Showing posts from March, 2009

Code Coverage

Today I have been mostly OBSESSED by upping my unit test code coverage. When I inherited this current codebase all the way back in August 2008, the code coverage was 0%, nothing, nada. No unit tests and the code was in a right 2 and 8, and no mistake. It's taken a LONG time and a lot of effort (and a lot of referring to my Design Patterns books, GOF and HeadFirst, both highly recommended, even if the examples in both are in Java rather than a proper language) - but I'm there, today I hit 93.7% with the remainder of the code being reasonably un-unit-testable (mainly in the datalayer, where no amount of fiddling will let me properly mock out OleDb connections...) I have started work on a "Refactor to Abstract Factory" method - which I intend to demonstrate at the next "Show and Tell", just to bore the life out of the Product Owners when they ask "so what have you delivered this month?". The upshot of this is that the codebase is now fit for

Subversion is rubbish

Subversion Is Rubbish... On the version we are using here, 1.4.2 or somesuch, I had huge trouble committing some .xml files (which were dataset stub data for testing, so I called them names such as "dsInvestor.xml") The server threw a fit, asked me for my security credentials, and refused to commit them to the repository. I thought it WAS permissions, so created a new blank text file called "text.txt" (imaginative, I know) and commited that...and it worked fine. hmmm, maybe it's something in the XML causing some problems...does subversion parse the xml in order to get a diff? So I copied the XML content into the .txt file, and THAT worked too. OK, maybe it's the extension, so I changed the extension to .xml. and THAT WORKED TOO. ...I checked the encoding, both files were UTF-8 (as you'd expect) so it wasn't that. ...the final thing was to delete the old file, rename the exisiting file, and try again. ...and that did NOT work. Removing the "ds&qu