hydrologics/Oasis.Base — Issue #59: We need a month of just test writing. #seriously
Author: johnmetta
Created: 2011-12-29 19:04:12+00:00
State: open

Pull Request #58 turns on simple code coverage reports for Visual studio. It's a #seriously grim scene. We're looking at 35% coverage of DataModel/Foundation/Repository. I know that Hydrologics isn't really a "test happy" organization, but we need to work on this. Documentation is a big one too, but testing is more important right now.

What this coverage report tells me is that at a MAXIMUM we can assume we know what one third of our code will do if we change something. And that's at a maximum because we're making an assumption about the quality of these tests– i.e. that they are actually testing what we think they are. This should be a minumum of 80-90% coverage.

I suspect that the situation is probably worse with Presentation. is ANYTHING in Presentation tested? [I don't think so](https://github.com/hydrologics/Oasis.Presentation.Tests/commits/master).

I want to suggest that we take a month and freeze the feature set and just write tests everyday until we get this percentage and quality improved to 80+% And no, that's not expensive or too time consuming when Dan and I have basically spent a total of 6 months debugging problems that never would have happened if we had a testing suite that covered the code.

It's not pushing off our release and not delaying us, because the problems we find and bugs we chase everyday are pushing the release and delaying us. This code is costing us probably 50% more than it needs to be.

Currently, our methodology (and I do it too) is "Write a hacked together feature as fast as possible, see if it roughly works, then move on." What this means is that we might spend 2 days implementing a feature, but later on spend a month chasing a bug and fixing it (this has happened… more than once). That doesn't make sense. What we should be doing is spending 3 days implementing that feature with good tests, and then the next month can be spent without the worry of bugs… implementing other features… that don't have bugs.

Jan 15th through Feb 15th, after @slebherz's checkin about presentation, should be spent doing nothing but writing tests. Especially in Presentation, which is completely untested (and much of it seems somewhat untestable the way it's designed). This will help us do two things 1) get the code tested, obviously, and 2) get the code cleaned up so that it's testable– not byzantine, perhaps even documented.

After this month, we will be much more productive and be able to code much faster than the glacial pace we've been working at as we constantly chase bugs around the crap we've written.