Create Coverage snapshot with cmdline-dotcover - open in VisualStudio-dotcover?

Answered

Hi,

I'm using the command line dotcover.exe to create a coverage snapshot.
Afterwards I want to open it in the VisualStudio-integrated version of dotcover.
But unfortunately in Visual Studio the snapshot is empty! Although I successfully created a html report of the respecting coverage snapshot.

Am I doing something wrong? This is the command line i use for snapshot creation:

C:\Program Files (x86)\JetBrains\dotCover\v2.5\Bin\dotCover.exe cover
/targetexecutable=c:\6040.2\Trunk\Buildoutput\Debug\NUnit\nunit-console.exe
/targetarguments="/labels /nologo /noshadow /nothread /xml:c:\6040.2\Trunk\Buildoutput\Debug\..\TestResults\CoverageWebinarLibrary1.Tests.TestResult.xml /exclude:Explicit c:\Users\csponsel\Documents\CoverageWebinar_2014\CoverageWebinar\CoverageWebinarLibrary1.Tests\bin\Debug\CoverageWebinarLibrary1.Tests.dll"
/TargetWorkingDir=c:\6040.2\Trunk\Buildoutput\Debug /Filters="+:module=CoverageWebinarLibrary1;"-:module=*.Tests
/Output=c:\6040.2\Trunk\Buildoutput\Debug\..\TestResults\CoverageWebinarLibrary1.Tests.DotCoverResult.dcvr

I'm using dotcover 2.5.
I also attached the respecting coverage snapshot.

Kind regards,
Carsten



Attachment(s):
CoverageWebinarLibrary1.Tests.DotCoverResult.dcvr.zip
0
10 comments

Hi Carsten,
By default dotCover matches coverage snapshot with current solution structure and hides results for assemblies which do not have matching projects.
You can disable this behaviour with a corresponding button on the coverage results toolbar.

0

Hi Ruslan,

yes that's it :-)

You guys at JetBrains support do a great job :-)

Regards,
Carsten

0

Hi Rusian,

 

I am facing same issue while running following command from command line. Please help how can i disable this option from command line

"dotcover cover coverage.xml"

 

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

coverage.xml

<?xml version="1.0" encoding="utf-8"?>
<AnalyzeParams>
<TargetExecutable>C:\Program Files (x86)\JetBrains\dotCover\v2.2\Demo\NUnit\nunit-console.exe</TargetExecutable>
<TargetArguments>D:\perforce\1675\ISCP-Abhay.kumar-2\Modules\ASN1Converter\Source\ASN1Converter\bin\Release\ASN1Converter.dll</TargetArguments>
<TargetWorkingDir>D:\perforce\1675\ISCP-Abhay.kumar-2\Modules\ASN1Converter</TargetWorkingDir>
<TempDir>D:\perforce\1675\ISCP-Abhay.kumar-2\Modules\ASN1Converter</TempDir>
<Output>ASN1ConverterCoverageReport.htm</Output>
<ReportType>HTML</ReportType>
<InheritConsole>True</InheritConsole>
<AnalyzeTargetArguments>True</AnalyzeTargetArguments>

<!-- Allows including not loaded assemblies in the specified scope into coverage results. Ant-style patterns are supported here. -->
<Scope>
<ScopeEntry>ProjectFolder/**/*.dll</ScopeEntry>
<ScopeEntry>ProjectFolder/**/*.exe</ScopeEntry>
</Scope>
</AnalyzeParams>

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

 

 

 

 

 





 

 

0

Hi Abhay,

Which exactly problem are you facing? 
"Match coverage results with current project structure" option is available only in VS and can be enabled/disabled only in VS.

0

Hello Fedor,

I am using command line to execute coverage of my project.

Following command is used - "dotcover cover coverage.xml"

But i am getting garbage values in my coverage report as shown in above comment and screen shot

0

Hello Abhay,

Your XML file has a configuration for "analyze" command, not for "cover" command which you used.

Here's a help topic about dotCover console runner commands: https://www.jetbrains.com/help/dotcover/2017.1/dotCover__Console_Runner_Commands.html
Please try the following command line:

dotcover.exe analyze coverage.xml

 

 

0

Hello Fedor,

Thanks for your input.

 

I have tried above command. However i am not able to see treeview structure of coverage report. Please find below screen shot of report file and command execution.

Please check and help. Thanks

0

Hello Abhay,

It looks like dotCover couldn't find project's PDB files.

In your XML file, the test assembly is specified in the Release folder. Are your assemblies built with PDBs?

0

Hello Fedor,

I have tried with Debug Folder also. Still i am not able to see treeview structure of coverage report. PDB files are present in debug folder.

 

Thanks.

0

Hello Abhay,

I'm going to create a support ticket because we need some private debug info from you.

0

Please sign in to leave a comment.