opencover

OpenCover, an open source code coverage tool for .NET that I started in 2011.

    Search by
    opencover

    Happy Birthday OpenCover

    Happy Birthday Today OpenCover [https://github.com/OpenCover/opencover] is 4 (four) years old, where has the time gone? In that time it has had over 60,000 nuget downloads [http://www.nuget.org/packages/opencover], been adopted by the SharpDevelop community as the coverage tool for their IDE, and, as I found out the other day, is also being used by the corefx team [https://github.com/dotnet/corefx] to supply coverage information [http://dotnet-ci.cloudapp.net/job/dotnet_corefx_coverage_windows/C

    opencover

    Excluding code from coverage...

    This may (no guarantees) turn into a series of posts on how to refactor your code for testing using simple examples. This particular example came from a request to add an "Exclude Lines from Coverage" feature to OpenCover [https://github.com/OpenCover/opencover]. Now there are many ways this could be achieved, none of which I had any appetite for as they were either too clunky and/or could make OpenCover very slow. I am also not a big fan on excluding anything from code coverage; though OpenCov

    opencover

    A simple TDD example

    I recently posted a response to StackOverflow wrt TDD and Coverage [http://stackoverflow.com/a/26152423/189163]and I thought it would be worth re-posting the response here. The example is simple but hopefully shows how writing the right tests using TDD gives you a better suite of tests for your code than you would probably write if you wrote the tests after the code (which may have been re-factored as you developed). "As the [original] accepted answer has pointed out your actual scenario reduce