0

No source available when running dotcover with cover option and converting to htm report

Maybe I'm missing something here but when I run dotcover with cover as the option after converting the snapshot to htm I cannot see the source.  Although if I run dotcover with the analyze option I get the source is this a bug?


1) Command when using "analyze"

<Exec Command='"$(dotCoverExePath)" a /TargetExecutable="$(MsTestPath)" /TargetArguments="/testcontainer:&quot;$(CurrAssemblyFullPathx64)&quot; /testsettings:&quot;$(BuildFolder)\Main\Dev\TraceAndTestImpact.testsettings&quot;"  /Filters=+:module=$(TestAssembliesNameX64);-:function=.ctor  /TargetWorkingDir="$(TestResPath)" /ReportType:XML /Output="$(DCoverOutDir)\$(CurrAssemblyFilex64).xml" /LogFile="$(TestResPath)\$(CurrAssemblyFilex64).dotCover.Report.log" /CoreLogMask=PdbBridge,Api,PdbGt,MetaDataGt,InstrumentationGt '/>


2) I run the following sequence when creating a merge report and individual report using snapshot

a) First run dotcover with the following command to produce a snapshot

<Exec Command='"$(dotCoverExePath)" cover /TargetExecutable="$(MsTestPath)" /TargetArguments="/testcontainer:&quot;$(CurrAssemblyFullPathx64)&quot; /testsettings:&quot;$(BuildFolder)\Main\Dev\TraceAndTestImpact.testsettings&quot;"  /Filters=+:module=$(TestAssembliesNameX64);-:function=.ctor  /TargetWorkingDir="$(TestResPath)" /Output="$(DCoverOutDir)\$(CurrAssemblyFilex64).cover" /LogFile="$(TestResPath)\$(CurrAssemblyFilex64).dotCover.Report.log" /CoreLogMask=PdbBridge,Api,PdbGt,MetaDataGt,InstrumentationGt '/>

b) Next I run this command to merge the snapshot into one snapshot

<Exec Command='"$(dotCoverExePath)" merge /Source="@(DotCoverResultFiles)" /Output="$(DotCoverMergeOutDir)\DotcoverMerge.cover" /LogFile="$(DotCoverLogOutDir)\DotCoverMerge.Report.log"'/>

c) After step "b" I run the following command to produce a htm report

<Exec Command='"$(dotCoverExePath)" report /Source="$(DotCoverMergeOutDir)\DotcoverMerge.cover" /ReportType:HTML /Output="$(DotCoverReportOutDir)\All\AllMerge.htm" /LogFile="$(DotCoverLogOutDir\DotCoverAll.Report.log"'/>

d) After step "c" I run dotcover again this time to produce individual htm repor.  What this command do is msbuild runs the GenerateReport and then the "GenerateReport" will call the "GenerateOneReport" supplying one snapshot at a time to generate one htm file.

  <Target Name="GenerateReport">

    <!-- Call CheckOneAssemblyFile foreach file in DotCoverResultFiles -->
    <MSBuild Projects="$(MSBuildProjectFile)"
            Properties="CurrDotCoverFile=%(DotCoverResultFiles.FileName);CurrDotCoverFileFullPath=%(DotCoverResultFiles.FullPath);DCoverOutDir=$(DotCoverOutDir);CtOnErr=$(ContOnError)"
            Targets="GenerateOneReport">
    </MSBuild>

  </Target>

  <Target Name="GenerateOneReport">

    <Message Text="Current Assembly File: $(CurrDotCoverFile)"/>
    <Message Text="Current Assembly Full Path: $(CurrDotCoverFileFullPath)"/>
    <Message Text="Continue On Error: $(ContOnError)"/>

    <!-- This will produce an htm output -->
    <Message Text="Generate One report per assembly" Importance="high"/>

    <Exec Command='"$(dotCoverExePath)" report /Source="$(CurrDotCoverFileFullPath).cover" /ReportType:HTML /Output="$(DotCoverReportOutDir)\Individual\$(CurrDotCoverFile).htm" /LogFile="$(DotCoverLogOutDir)\$(CurrDotCoverFile).Report.log"'/>

  </Target>


So, after the reports are generated when I click the report I do not see any source while if I run dotcover with the "analyze" option I get the source.  So what am I missing here?

1 comment

Please sign in to leave a comment.