Saturday, January 28, 2006

NCoverExplorer... The Debut

A little something I knocked together one weekend around a month ago, inspired by the NCoverBrowser tool by Jeff Key. The source code for Jeff's tool was unavailable mainly due to it's usage of a commercial control, so I rewrote it from scratch using the ICSharpCode TextEditor control instead.

What does it do? Once you have used NCover to produce an xml result of your coverage, you can open it in this tool to browse the source code with the coverage information highlighted. I tend to do this as part of a NAnt/NUnit task combination that automatically opens the results for me on a second screen. I find it much more useful having the coverage output side-by-side with the IDE while I add/modify the tests to increase coverage.



Why bother? I wanted to make some tweaks, such as:
  • Performance (2 secs versus 4 mins for a 12MB file!);
  • Remembering form state (size and position);
  • Recent file menu;
  • Improved highlighting for partial test coverage runs;
  • Optional nesting of the get_ and set_ properties;
  • Optional hiding of the visit count pane;
  • Support any future NCover schema changes;
  • Create an open source project;
I happened to mention it to Jamie Cansdale, author of the essential TestDriven.Net tool and it is now being integrated into his tool as part of the "Test with... Coverage" functionality he has added recently. In addition Jamie has added a few tweaks of his own such as the VSTS block highlighting style you can see in the screenshot above.

Where do I get it? Good question - our next step is to figure out the hosting and distribution. A few ideas have been thrown in the pot and hopefully we can announce that shortly.

[Update] Download the latest NCoverExplorer versions from here..

Any suggestions for other features you would like to see are welcomed...

14 Comments:

At January 30, 2006 4:10 pm, Anonymous Anonymous said...

Feature Suggestion:
- Exporting a simple report (e.g. html) to be able to send it in an email
- Getting a view on what changed since a certain date - be able to export this too.

The idea rocks ;-)

 
At January 31, 2006 7:05 am, Anonymous Anonymous said...

Hey KiwiDude, that's quite a first blog post you have there. I've just mucked around with Ncover for the first time, and it definitely needs a tool like this. Where can I get it? :-) If Scott blogs about it you're going to have hundreds of users overnight, so be ready. ;-)

p.s. I have passed on your blog address to Nic Wise to add to the Kiwi .Net bloggers list.

 
At January 31, 2006 9:01 am, Blogger kiwidude said...

Scott - thanks for the kind words!

anonymous - great ideas, keep 'em coming. I will have a think about them this weekend. What exactly would you want to see in the "changed since a certain date" view?

Tim - thanks mate, thought it was time to poke my head up ;-) As for where to get it, right now bundled with the latest TD.Net build is the only option but more very shortly...

 
At January 31, 2006 6:21 pm, Anonymous Anonymous said...

This might be a dumb question, so forgive me, but what does the light blue highlighting mean compared to the light red?

 
At January 31, 2006 7:23 pm, Blogger kiwidude said...

The light blue highlighting is visited code as reported by NCover. If you hover over it a tooltip tells you how many times. The red highlighting is the code not visited at all. This colour scheme matches that of VSTS - you can tweak it on/off in the options dialog...

 
At February 10, 2006 1:14 pm, Anonymous Anonymous said...

This is really a great tool!

Feature suggestion:
Instead of setting a satisfactory coverage threshold in percent, it would be useful to say how many lines of code are allowed to go untested. This would be useful to allow for two or three error exits, which make a varying percentage depending on the size of the method.

 
At February 10, 2006 1:58 pm, Blogger kiwidude said...

Thanks for the input, sounds a good idea. I will add it to the todo list as an alternative option.

For anyone who hasn't read the later posts on my site, note that you can also give input at either:
http://groups.google.com/group/TestDrivenUsers/
or via FogBugz for the next 35 days or so at this url:
http://try4.fogbugz.com/default.asp?id=58973YPDPJE&pg=pgPublicEdit

 
At March 09, 2006 10:54 pm, Anonymous Anonymous said...

Kiwidude, this just simply rocks. The visual version of the NCover stats helps me quickly fill in the gaps with my unit testing.
With NCoverExplorer I can see when (and where) my tests are not making 100% mark.
Thanks!

 
At March 09, 2006 11:03 pm, Blogger kiwidude said...

Thanks PK - once you get hooked you do wonder how we did without all these tools before now... Tons more big features in my 1.3.2 release due out in the next few days so be sure to check back for updates... ;-)

 
At March 16, 2006 10:46 am, Blogger Lord Blagger said...

Any chances of exporting a html report?

ideally this should be a separate command line app, so its easy to integrate into nant and vs.

Here is an example of what you can do.

http://www.cenqua.com/clover.net/eg/nunit/report/index.html

 
At March 16, 2006 1:07 pm, Blogger kiwidude said...

NCoverExplorer v1.3.2 is now available:

http://www.kiwidude.com/blog/2006/03/ncoverexplorer-v132_14.html

 
At March 16, 2006 8:12 pm, Blogger kiwidude said...

nickle: I've just pushed up a blog post in response to this here:
http://www.kiwidude.com/blog/2006/03/html-coverage-reporting.html

 
At April 18, 2006 4:12 am, Anonymous Anonymous said...

great software! Keep up the good work. Is the source code available for this fantastic tool?

 
At April 18, 2006 8:21 pm, Blogger kiwidude said...

Re the source code availability - the answer is "kind of". I havent as yet put it on a public source repository, and as I am taking a break from it at the moment thats not likely to happen for a little while. So if you want the code drop me an e-mail and I will give you a zip location to download from - although obviously if you make any changes they will have to be manually merged by me to be released to others. If using the latest version of NCoverExplorer (1.3.3) you can find my e-mail address by choosing "Help->Send Feedback".

 

<< Home