Why is MSTest executed when it's not a build step?

With just 2 build steps configured, MSBuild and Duplicates. I cannot figure out why there is an extra set of logs that implies to me it's running MSTest. Currently the build runs unit test using vstest.console as an exec target in our MSBuild script. Seen below:
[11:42:01][Exec] "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow/vstest.console.exe"

But from the build logs there is a MSTest run that was never configured running taking up time in what should be a fast build:  "[11:43:03]    [Step 1/3] MSTest"


This is a larget snippet of the build logs.

[11:39:31]Updating sources: agent side checkout (36s)
[11:40:07]Step 1/3: Compile and Unit test runner (MSBuild) (3m:32s)
[11:40:07]    [Step 1/3] Starting: C:\BuildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.MsBuildBootstrap.exe /workdir:C:\BuildAgent\work\efca1767179bcf42 "/msbuildPath:C:\Program Files (x86)\MSBuild\12.0\bin\MSBuild.exe"
[11:40:07]    [Step 1/3] in directory: C:\BuildAgent\work\efca1767179bcf42
[11:40:20]    [Step 1/3] src\BuildInstallers.proj: Build targets: unittest;CodeAnalysis (3m:16s)
[11:40:20]        [src\BuildInstallers.proj] Compile (1m:40s)
[11:42:00]        [src\BuildInstallers.proj] UnitTest (1m:02s)
[11:43:03]        [src\BuildInstallers.proj] CodeAnalysis (34s)
[11:43:03]    [Step 1/3] MSTest
[11:43:37]    [Step 1/3] Importing data from 'C:\BuildAgent\work\efca1767179bcf42\src\FxCopResults.xml' (360.32 KB) with 'FxCop' processor
[11:43:38]    [Step 1/3] Process exited with code 0


[11:43:39]Step 2/3: Check Duplicates (Duplicates finder (.NET)) (49s)
[11:44:29]Step 3/3: Inspections (.NET)
[11:44:29]Waiting for 2 service processes to complete
[11:44:29]MSTest report watcher
[11:44:29]Publishing internal artifacts
[11:44:29]Publishing artifacts (2s)


How can I stop the MSTest step from running?
6 comments
Comment actions Permalink

It looks like as if it is configured in the build file.

src\BuildInstallers.proj: Build targets: unittest;CodeAnalysis (3m:16s)
0
Comment actions Permalink

MSTest is not the test runner for the UnitTest target. It's vstest.console.exe.

[11:42:01][Exec] "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow/vstest.console.exe"
0
Comment actions Permalink

Please check (or post) the contents of the file BuildInstallers.proj

0
Comment actions Permalink

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="12.0">
<Import Project="BuildTools\MSBuild\MSBuild.Community.Tasks.Targets"/>

     <PropertyGroup>          <DefaultTarget>Build</DefaultTarget>      </PropertyGroup>


          <Target Name="Check">           <ItemGroup>                <Solutions Include="MySolution.sln" />           </ItemGroup>           <Error                Text="Incorrect version of MSBuild used: please use the 32-bit version because the Silverlight 4 SDK won't compile in 64-bit mode."                Condition=" '$(PROCESSOR_ARCHITECTURE)' != 'x86' "           />        </Target>

          <Target Name="Compile" DependsOnTargets="Check">           <Exec                Command='%(Solutions.RootDir)%(Solutions.Directory).nuget/NuGet.exe restore'                WorkingDirectory='%(Solutions.RootDir)%(Solutions.Directory)'           />           <MSBuild                BuildInParallel="true"                Projects="@(Solutions)"                Targets="$(DefaultTarget)"                Properties="Configuration=$(Configuration);Platform=Mixed Platforms"                ToolsVersion="12.0"           >                <Output TaskParameter="TargetOutputs" ItemName="CompiledFiles" />           </MSBuild>           <Message Importance="Low" Text="CompiledFiles: @(CompiledFiles->'&#xA;  %(Identity)', '')" />           <RemoveDuplicates Inputs="@(CompiledFiles)">                <Output TaskParameter="Filtered" ItemName="UniqueCompiledFiles" />           </RemoveDuplicates>           <ItemGroup>                <UniqueAssemblies                     Include="%(UniqueCompiledFiles.Identity)"                     Condition=" '@(UniqueCompiledFiles->EndsWith('.dll'))' == 'true' OR '@(UniqueCompiledFiles->EndsWith('.exe'))' == 'true' " />           </ItemGroup>           <Message Importance="Low" Text="UniqueCompiledFiles: @(UniqueCompiledFiles->'&#xA;  %(Identity)', '')" />      </Target>

        <Target Name="UnitTest" DependsOnTargets="Compile">           <PropertyGroup>                <VsTestFolder>$([System.IO.Path]::Combine("$(VisualStudioCommon7Ide)", "CommonExtensions", "Microsoft", "TestWindow"))</VsTestFolder>           </PropertyGroup>           <ItemGroup>                <!-- TODO: Enforce test projects compile to assemblies ending with '.Test.dll' -->                <TestAssemblies Include="%(UniqueCompiledFiles.Identity)" Condition=" '@(UniqueCompiledFiles->EndsWith('Test.dll'))' == 'true' " />                <AssembliesUnderTest Include="@(UniqueCompiledFiles)" Exclude="@(TestAssemblies)" />                <AssembliesUnderTestWithoutFolder Include="$([System.IO.Path]::GetFileName(%(AssembliesUnderTest.Identity)))" />                <!-- The assembly filenames must be escaped because the .runsettings expects regular expressions -->                <AssembliesUnderTestWithoutFolderEscaped Include="@(AssembliesUnderTestWithoutFolder->'%(Identity)'->Replace('.', '\.'))" />           </ItemGroup>           <Message Importance="Low" Text="TestAssemblies: @(TestAssemblies->'&#xA;  %(Identity)', '')" />           <Message Importance="Low" Text="AssembliesUnderTest: @(AssembliesUnderTest->'&#xA;  %(Identity)', '')" />           <Message Importance="Low" Text="AssembliesUnderTestWithoutFolder: @(AssembliesUnderTestWithoutFolder->'&#xA;  %(Identity)', '')" />           <Message Importance="Low" Text="AssembliesUnderTestWithoutFolderEscaped: @(AssembliesUnderTestWithoutFolderEscaped->'&#xA;  %(Identity)', '')" />           <PropertyGroup>                <SpaceSeparatedTestAssemblies>@(TestAssemblies->'"%(Identity)"', ' ')</SpaceSeparatedTestAssemblies>                <ResultsDirectory>TestResults.Unit</ResultsDirectory>                <AssembliesUnderTestElements>@(AssembliesUnderTestWithoutFolderEscaped->'&#xA;  &lt;assembly&gt;%(Identity)&lt;/assembly&gt;', '')</AssembliesUnderTestElements>                <XmlContent>&lt;xml ResultsDirectory="$(ResultsDirectory)"&gt;$(AssembliesUnderTestElements)&lt;/xml&gt;</XmlContent>           </PropertyGroup>           <Message Importance="Low" Text="AssembliesUnderTestElements: $(AssembliesUnderTestElements)" />           <XslTransformation                XmlContent="$(XmlContent)"                XslInputPath="Template.runsettings.xsl"                OutputPaths="VsTest.Unit.runsettings"           />           <RemoveDir Directories="$(ResultsDirectory)" />           <Exec                Command='"$(VsTestFolder)/vstest.console.exe" $(SpaceSeparatedTestAssemblies) /InIsolation  /Logger:trx /Settings:VsTest.Unit.runsettings /TestCaseFilter:"TestCategory!=Integration" /Platform:x86'           />      </Target>

0
Comment actions Permalink

Where is the target "Build" defined?
Is the option "targets" defined in the Build Runner? (see https://confluence.jetbrains.com/display/TCD9/MSBuild)

0
Comment actions Permalink

The targets parameter of the msbuild step is set to:  unittest CodeAnalysis

Build is defined in the msbuild toolset version -> Mircosoft.Common.targets

  <!--     ============================================================                                         Build     The main build entry point.     ============================================================     -->   <PropertyGroup>     <BuildDependsOn>       BeforeBuild;       CoreBuild;       AfterBuild     </BuildDependsOn>   </PropertyGroup>   <Target       Name="Build"       Condition=" '$(_InvalidConfigurationWarning)' != 'true' "       DependsOnTargets="$(BuildDependsOn)"       Returns="$(TargetPath)" />

0

Please sign in to leave a comment.