Monkey see, monkey do; occasionally monkey learn.
TwitterRSS Feed

Monkey see, monkey do; occasionally monkey learn.

random posts from a semi-sentient simian (heroku)

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
Shaun Wilde
Shaun Wilde
5 min read
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
Shaun Wilde
Shaun Wilde
1 min read
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:
Shaun Wilde
Shaun Wilde
2 min read
open cover

The problem with sequence coverage.

Sequence coverage is probably the simplest coverage metric, the information is packaged in PDB files and can be read using tools likeMono.Cecil [http://www.mono-project.com/Cecil], but just because a method has 100% sequence coverage does not mean you have 100% code coverage. I'll use an example from OpenCover's own dogfood tests to demonstrate what I mean. Here is a method which shows that it has 100% coverage (sequence point that is). However I see an issue and that is that on line 101 the
Shaun Wilde
Shaun Wilde
1 min read
open cover

OpenCover Performance Impact (part 2)

I think I now have a handle on why I was getting the results I earlier reported i.e. OpenCover [https://github.com/sawilde/opencover] and PartCover [https://github.com/sawilde/partcover.net4] were not some magical performance boosters that added Go Faster stripes to your code. After a heads up by leppie and his investigations of using OpenCover on his IronScheme project I realised that I needed to spend some time on optimizing how I get data from the profiler and aggregate it into the report. I
Shaun Wilde
Shaun Wilde
3 min read
open cover

OpenCover Performance Impact

So how does OpenCover's profiling impact your testing. The best way is to get some figures so that you can judge for yourself. I decided to use OpenCover's own tests and use the timing value produced by Nunit itself; just like I'd expect any user who is trying to determine impact I suppose. I've also added the results from PartCover for comparison. Before I took any numbers I (warmed) the code by running the code several times beforehand. Nunit32Nunit32 (OpenCover)Nunit32 (PartCover)Nunit64Nun
Shaun Wilde
Shaun Wilde
1 min read
open source, community

Questions about open source and liability in the workplace

Last weekend I attended DDDSydney and one of the most interesting sessions was a panel session about Microsoft and Opensource (Open Source & Microsoft Ecosystem); though as these things go, it went quickly off(ish) topic as expected by the panelists whom I'll refer to as the crazy drupal girl and the 3 stooges (honestly no offence folks, it was highly entertaining). However it got me thinking about the number of projects where I come have across an unusual bit of open source software that has s
Shaun Wilde
Shaun Wilde
2 min read
open cover, open source, community

How do we get Users out of [open source] Welfare?

How do we get Users out of [open source] Welfare? Okay an odd title but something I've been thinking about for some time and I suppose is the source of much frustration I have been having whilst maintaining PartCover [https://github.com/sawilde/partcover.net4]; I am hoping to reverse the situation with OpenCover [https://github.com/sawilde/opencover]. Categorizing open source users First I'd like to explain that I like to roughly categorize people involved in open source like thus: Contribut
Shaun Wilde
Shaun Wilde
3 min read
open cover, open source, github

OpenCover First Beta Release

OpenCover First Beta Release Okay, the first post on a blog I created many, many months ago and still not got round to starting. Why the delay? Well, just been busy and not a lot to say; actually some would say I have too much to say it's just not publishable. But now I am happy to announce that the first release of OpenCover is now available on GitHub [https://github.com/sawilde/opencover/downloads]. "So what?" I hear you say, "we have NCover, dotCover and PartCover [and probably many others
Shaun Wilde
Shaun Wilde
4 min read