Jonathan Crossland
Posts: 630
Nickname: jonathanc
Registered: Feb, 2004
|
Jonathan Crossland is a software architect for Lucid Ocean Ltd
|
|
|
|
Heuristic code coverage percentage for .NET Framework
|
Posted: Dec 14, 2009 6:45 AM
|
|
I was recently asked about what I thought about unit tests and coverage.
Due to each language and framework having unique designs, what would the lower percentage be for testing you .NET Framework code?
I have done some tests, and checked through 49 Enterprise, in-production, Assemblies and 12 personal project assemblies of various sizes. Code coverage has been pushed to the highest, before major resistence sets in.
Based on my tests and observations, it seems around 85% coverage is where you begin to see a large amount of code coverage dependency resistence.
What is code coverage dependency resistence? (is there another terms for this, that has slipped me by?)
When you find writing certain tests, testing certain interfaces etc, are more on the side of the framework, than your code.
When a set of interfaces, should already have framework tests, or tests from your other dependencies.
Each platform is different, but for .NET you should be looking to write between 70-90% code coverage for good results, with 85% being the sweet spot.
Read: Heuristic code coverage percentage for .NET Framework
|
|