Test With... Coverage

Last week I announced that TestDriven.NET now has code coverage integration for users of Visual Studio 2005 Team Suite, Developer or Tester. This week I'm happy to announce a solution for all other Visual Studio users! I've now added support for the popular code coverage tool NCover. Peter Waldschmidt the author of NCover has been working with me in order to get the two applications playing nicely together.

When I told to Grant Drake that I had NCover support working, he mentioned that he had written an NCover report viewer called NCoverExplorer. I quickly realized that NCoverExplorer would be an ideal viewer to use with TestDriven.NET. Compared to the default XSL summary transform that comes with NCover, the NCoverExplorer application is lightning fast. There is a tree view that lets you drill down and see your code colorized according to the coverage report. You can find out more and see what NCoverExplorer looks like here.

For the moment NCoverExplorer is bundled with TestDriven.NET. It is likely that at some point it will migrate into the NCover project.

As I mentioned before, TestDriven.NET's NCover support is compatible with all versions of Visual Studio. It does however have the following dependencies:

If you have any suggestions for NCoverExplorer, be sure to let Grant know.

20 Comments

  • Hi Jamie - this looks really neat, but how can it work with all versions of Visual Studio if it requires .net 2?



    Visual Studio will load the .net runtime for it's own packages, and I'd expect that runtime to be the version the IDE targets, and since you can't have multiple instances of the runtime loaded in one exe, how can this require .net 2?



    Just wondering, 'cos I'd love to use this in 2003, but in a work environment, where we we're not yet ready to migrate to 2005 and .net 2.0.



    Cheers!

  • Is testdriven built with a specific version of nunit (thinking mostly of the GUI now) or can I say revert to a slightly earlier version?



    (perhaps add to FAQ?)

  • Test With... Coverage seems to only use VSTS coverage if using it within VSTS. This would be fine if the VSTS coverage actually worked for us, but we're experiencing problems with it that don't occur when using NCover, so I'd like to be able to force TestDriven to use NCover instead. Is this a configuration option somewhere?

  • Sean,

    There isn't a configuration option for which coverage to use yet. As a temporary workaround, you can rename the following directory.



    \Program Files\Microsoft Visual Studio 8\Team Tools\Performance Tools\



    This will cause it to use NCover/NCoverExplorer instead. I'll add this option to my wish list.

  • Great job!

    Installed and worked great with Visual Studio 2003. Now I know the coverage I've got lots more tests to write now!

    Thanks ;-)

  • I just got around to installing the latest TD.Net/NCover/Explorer bits. Bravo. Nice job to all involved.

  • James,



    Installed TestDriven.Net on a machine with Microsoft Visual Basic 2005 Express Edition, Microsoft C# 2005 Express Edition, Nunit-Net-2.0 2.2.4. Opened both Visual Basic 2005 and C# 2005, created new class libraries projects, right clicked on solution, project and class files, but no 'Test With...' menu option available. Can you give me instructions on how to install and use TestDriven.Net properly with the Express SKUs?



    Thanks in advance,



    Luciano Evaristo Guerche

    Taboao da Serra, SP, Brazil

  • What a killer idea! I've wanted something like this forever. I installed it as soon as I could, and I love it. I use it at least once an hour, more than the debugger option.



    I just have one quibble\feature request. I noticed after a while that the tests were in the coverage measurement. This skews the total coverage for the component. Could you add a setting to include only the project your testing, and not the tests project as well?



    The default behaviour should probably to include the tests project to keep the zero friction at zero, but perhaps an advanced setting that would allow us to tweak which projects are passed to NCover?

  • I'm afraid TestDriven.NET doesn't yet work with web site applications. The way they are compiled and executed it quite different to regular .NET projects. I'm hoping to add support for this in a future version, but can't say if it will work with code coverage.

  • My devs here would *really* like me to report code coverage on *their* web service code. I can easily run ncover with nunit under nant to get coverage of my test code but that is seen as inadequate (cute but inadequate). Maybe I am missing something here? can I modify my nant script to run my tests and report coverage on their code? do I need to have nant, etc. running on the Web Service server?

  • TestDriven.NET. will migrate into the NCover project. I could not agree more sir .. and very grateful because it helps us

  • He that makes a good war makes a good peace.

    -----------------------------------

  • -----------------------------------------------------------
    I wish receiving over a broken heart could be so easy as following a few steps..
    but its not…

  • -----------------------------------------------------------
    haha … the 1 who is posting the comments

  • haha … the 1 who is submitting the feedback

    --------------------------------------------------------------------
    Biological and Biomedical Sciences

  • 436896.. Very nice :)

  • "Virtuous what I used to be in search of and very thoroughgoing as floor. Thanks for placard this, I noticed a yoke unique associated posts but yours was the optimum so considerably. I outlook it stays updated, appreciate concern."

    --------------------------------------------------------------------
    Writing and Speaking

  • 436896.. Outstanding :)

  • Incredible! This blog looks reasonable like my old a certain! It's on a unqualifiedly separate enthral but it has pretty much the regardless verso layout and design. Sterling option of colors!

  • Link exchange is nothing else except it is simply placing the other person's website link on your page at appropriate place and other person will also do same in favor of you.

Comments have been disabled for this content.