Friday, February 13, 2009

100% Coverage

To my mind 100% coverage should mean all the code we as a team have chosen to test is tested.

If you decide 'generated code doesn't need tests.. as long as the generator is tested and an example is tested' .. then I say you are still 100%

If you decide 'getters and setters don't need testing' that's fine... exclude them from your coverage.

If you explicitly exclude something from your coverage statistics, then tell your tool. In NCover.. you can put attributes on the things you want to exclude.

Do that and you can get to 100%.

I'll leave the decision as to what things should be tested to the reader... for now.
Post a Comment

GitHub Projects