Coverage of tests entering through public methods

Coverage of tests entering through public methods

What would be good is a coverage report that reports the code coverage of tests entering through public methods. This is to check that the use of the interface of a class is properly tested instead of the coverage percentage being artificially high because of the tests on private methods or other methods of entering the class (protected methods were the test class inherits the class being tested for example).

In my opinion this is just as interesting as the total coverage. How the public methods behave with the results of the different private methods is the most important bit in testing a class. Directly testing private methods is more interesting in the process of constructing the class with the TDD methodology. When the construction is done the real value is the tests of the public methods the way I see it.


RE: Coverage of tests entering through public methods

halstein,

thanks for th suggestion! I've taken the liberty of adding this request to our support system so it doesn't fall off our radar.

Stephen Ward