Monkey see, monkey do; occasionally monkey learn.

random posts from a semi-sentient simian

    Search by
    open cover

    Unusual coverage in VB.NET

    Recently a user posted on StackOverflow [http://stackoverflow.com/questions/8926063/code-coverage-why-is-end-marker-red-end-if-end-try] on why he was seeing unusual coverage results in VB.NET with MSTEST and Visual Studio. The the question already had answers that helped the questioner but I decided to delve a little deeper and find out why the solution proposed worked. The issue was that in his code sample the End Trywas not being shown as covered even though he had exercised the Try and the C

    open cover

    Adding OpenCover to TeamCity

    Adding OpenCover to the latest version of TeamCity [http://www.jetbrains.com/teamcity/](6.5) couldn't be easier however if you need help follow these simple steps. 1. Download [https://github.com/sawilde/opencover/downloads]and install OpenCover 2. Download [http://reportgenerator.codeplex.com/]and install ReportGenerator (actually unzip) 3. Register the OpenCover profiler DLLs using the regsvr32 utility regsvr32 /s x86\OpenCover.Profiler.dll regsvr32

    open cover

    The problem with sequence coverage. (part 2)

    Previously I mentioned why just relying on sequence coverage is not a good idea as it is possible to have 100% sequence coverage but not 100% code coverage. However I only described a scenario that used a branch that had 2 paths i.e. the most common form of the conditional branches, but there is one other member of the conditional branch family that exists in IL and that is the switch instruction; this instruction can have many paths. This time I am using the code from the Newtonsoft.Json [http: