dotCover shows zero coverage in Results Browser

I recently installed dotCover version 10.0.30319 integrated with Visual Studio 10. I am running it without Resharper integration. I have set up my unit test project to launch Nunt 2.5.8, testing the appropriate dll as the startup project, then I select the "Cover Startup Project" from the dotCover menu. It runs the test, but everything is grayed out in the results browser.

The Coverage Filters includes "Everything".

Can dotCover only be used with Resharper integration? Any ideas of what I might be able to try?

6 comments

Hello Steve,
dotCover is able to work without ReSharper.
There are 3 things you can check: (as described here http://devnet.jetbrains.net/message/5277861#5277861)
- state of the 'match with current project structure' option
- presence of pdbs for assemblies being tested
- state of coverage filters (in your case they are ok)

Please let me know if there would be any difficulties.
Also it is interesting to know your dotCover version, because 10.0.30319 is a version of VS :)

0

Thanks for the response. I am sorry about the mess up with the dotCover version. I am using 1.0.97.18. I continue to not have it display any coverage results. I unselected the "Match coverage results with current project structure" and verified that the associated pdb files are present. I have included the coverage result tab.

dotCover.png

To get the above results, I set a certain test dll project as the startup project then select the dotCover menu's "Cover Startup Project" option. It brings up nunit gui, I run the test then close nunit. The image above is the results I receive. Others in our office are able to have coverage display, but they are integrated with Resharper. Any other suggestions or ideas would be appreciated.

0

Hello Steve,
On a screenshot you've sent I can't see your test assembly.
This looks like a result of applying coverage filters.
Please check that there are no 'exclude' filters on a corresponding tab and that include filters are set to 'everything'.
I've tried your usecase and it works fine for me. Could you also send us some sample solution with your build settings, this will help to investigate the issue.

0

I have found a solution. I found it searching online about a problem I had been having with debuggin my unit tests. Other people reported having problems with NUnit 2.5.8 with it hanging in certain scenarios. The suggestion solution was to add the following to the NUnit config file:

     <startup>
         <requiredRuntime version="4.0.30319" />

     </startup>

Seeing this fixed my attaching and debugging problem, I ran dotCover, and it reports the coverage succesfully. Thanks for your response. As an FYI, the original solution was found here:

     http://stackoverflow.com/questions/4303421/nunit-2-5-8-lots-of-nunit-agent-exe/4303508#4303508

Thanks.

0

Where is the NUnit.config file?  This seems like a lot of hoops to jump through just to get coverage numbers.

I have the same situation and this is what I tried to do to get around it, but I am not having any luck getting results from within Visual Studio.  In my scenario, the DLL I want coverage detail for is a referenced DLL, and it has a PDB file associated with it.

  • In Visual Studio, go to dotCover menu and select "Cover Application"
  • Choose "Standalone Application" and fill in these options:
    • Application: C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\MSTest.exe
    • Arguments: /testcontainer:My.UnitTests.dll  /resultsfile:My.UnitTests.trx
    • Working directory: C:\path\to\my\bin\Release
    • Click OK to start
  • View results.  There are no numbers for my referenced DLL.


Maybe my test truly is not exercising the DLL, or maybe dotCover is not doing something right.

Please help.

0

I am assuming you did not change the default installation path when you installed nunit.

The config file is located at:

     Drive:\Program Files\Nunit 2.5.8\bin\net-2.0\

Of course you need to replace 2.5.8 with whatever version you have installed. Each executable in the net-2.0 folder has an associated confg file. They are noted by the extension exe.config. Open the config file associated with the executable you are using and make the change.

I hope this helps.

Steve

0

Please sign in to leave a comment.