running dotcover from VS2013 IDE vs command line produce different results

When I try to run dotcover using VS2013 IDE the report generated is different compared to when being ran from a command line.  Why is this happening?


This is part of my msbuild script

<LocalDrive Condition="'$(LocalDrive)'==''">E:\</LocalDrive>
<BuildFolder Condition="'$(BuildFolder)'==''">$(LocalDrive)BCS</BuildFolder>
<VSPath Condition="'$(VSPath)'==''">C:\Program Files (x86)\Microsoft Visual Studio 12.0</VSPath>

<DotCoverResultsPath Condition="'$(DotCoverResultsPath)'==''">$(MSBuildProjectDirectory)\dotCover</DotCoverResultsPath>
<DotCoverOutDir Condition="'$(DotCoverOutDir)'==''">$(MSBuildProjectDirectory)\CodeQuality\dotCover</DotCoverOutDir>
<DotCoverSnapshotDir Condition="'$(DotCoverSnapshotDir)'==''">$(LocalDrive)Apps\DotCover\snapshot</DotCoverSnapshotDir>
<DotCoverPath Condition="'$(DotCoverPath)'==''">$(JenkinsWSPath)\ZipResult\DotCoverLogZip</DotCoverPath>
<dotCoverExePath Condition="'$(dotCoverExePath)'==''">$(LocalDrive)Program Files (x86)\JetBrains\dotCover\v2.7\Bin\dotCover.exe</dotCoverExePath>

<VSTestResultsPath Condition="'$(VSTestResultsPath)'==''">$(MSBuildProjectDirectory)\TestResults</VSTestResultsPath>
<MsTestPath Condition="'$(MsTestPath)'==''">$(VSPath)\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe</MsTestPath>
<MsTestResultPath Condition="'$(MsTestResultPath)'==''">$(VSPath)\Common7\IDE\TestResults</MsTestResultPath>

<Target Name="integration" >
    <ItemGroup>
        <TestAssemblies Include="$(BuildFolder)\Main\Dev\bin\*.Tests.Integration.dll"/>
    </ItemGroup>
    
    <!--<Target Name="integration">-->
    <!-- Call CheckOneAssemblyFile foreach file in TestAssemblies -->
    <MSBuild Projects="$(MSBuildProjectFile)"
        Properties="CurrAssemblyFile=%(TestAssemblies.FileName);CurrAssemblyFullPath=%(TestAssemblies.FullPath);TestResPath=$(DotCoverResultsPath);DCoverOutDir=$(DotCoverOutDir);CtOnErr=$(ContOnError);
        DCoverSSDir=$(DotCoverSnapshotDir)"  Targets="CheckOneAssemblyFile">
    </MSBuild>
</Target>

<Target Name="CheckOneAssemblyFile">
    <PropertyGroup>
        <TestAssembliesName>"$(CurrAssemblyFile.Replace(".Tests.Integration",""))"</TestAssembliesName>
    </PropertyGroup>

    <!-- This will produce an htm output -->
    <Message Text="Perform coverage analysis" Importance="high"/>

    <Exec Command='"$(MsTestPath)" "$(CurrAssemblyFullPath)" /Settings:&quot;$(BuildFolder)\Main\Dev\local.testsettings&quot; /Logger:TRX /framework:Framework45 /platform:x64 /inIsolation' ContinueOnError='$(CtOnErr)'/>

</Target>

5 comments
Avatar
Maria Serebryansky
Comment actions Permalink

Hello,

Could you please clarify what the difference between the two reports is?

Kind regards,
Maria

0
Comment actions Permalink

I sent the screenshot of what I'm seeing to your inbox.


0
Avatar
Maria Serebryansky
Comment actions Permalink

I didn’t get your screenshots. Could you please upload them to our ftp server: ftp://ftp.intellij.net/.uploads/ ?

Kind regards,
Maria

0
Comment actions Permalink

Has this ever been resolved or clarified?

0
Comment actions Permalink

Hi Marina,
The issue was resolved during further discussion in email.
The problem was with different set of filters in VS and in command line.

There are few more possible reasons for such symptoms:
- different versions of source code are being analyzed
- assemblies are built with different build settings (e.g. with or without compiler optimizations)
- issue with getting per-test information for child processes from the VS (http://youtrack.jetbrains.com/issue/DCVR-6819)
(fixed and will be included into dotCover 3.0, there are workarounds for previous versions)

Please let us know the details of your case.

0

Please sign in to leave a comment.