title: TFS Build and Test Impact
body: <p>I'm playing around with the Test Impact feature of TFS build.
  It seems like you cannot use this feature if you are using a .vsdmi file, but only if you use a .testsettings file (although the VSDMI file includes a reference to the test settings file).</p>
  
  <p>I have allowed Test Impact in the test settings file, and so on the TFS build configuration.
  The reason I need to use the VSDMi file is that I created a test  list that i want to be executed in CI. The problem is that all builds show "No Impacted Test" though I know there are some.</p>
  
  <p>Am I missing something here? Please find attached the vsdmi file, the testsettings file and a snapshot of the TFS build configuration.</p>
  
  <p><img src="https://i.stack.imgur.com/wejl7.png" alt="Config"></p>
  
  <p>Here is the content of the .testsettings file:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;TestSettings name="Master" id="68af9170-92f5-49d8-83dd-827359a79042" xmlns="http://microsoft.com/schemas/VisualStudio/TeamTest/2010"&gt;
    &lt;Description&gt;These are default test settings for a local test run.&lt;/Description&gt;
    &lt;Deployment&gt;
      &lt;DeploymentItem filename="..\Common\Terra.Environment.Common.Data.Test\TpEnvFileParser\InputFiles\" /&gt;
      &lt;DeploymentItem filename="..\Common\Terra.Environment.Fake\FakeData\HSW\Resources" /&gt;
      &lt;DeploymentItem filename="..\Tpie.Engines.Build\Tpie.Engines.Build.Test\ExpectedFiles\" /&gt;
      &lt;DeploymentItem filename="..\Tpie.Engines.Build\Tpie.Engines.Build.Test\Resources\" /&gt;
      &lt;DeploymentItem filename="..\Common\Terra.Environment.Common.Model\bin\Debug\TerraEntitiesModel.ssdl" /&gt;
      &lt;DeploymentItem filename="..\Common\Terra.Environment.Common.Model\bin\Debug\TerraEntitiesModel.csdl" /&gt;
      &lt;DeploymentItem filename="..\Common\Terra.Environment.Common.Data.Test\PListFileParser\InputFiles\" /&gt;
      &lt;DeploymentItem filename="..\Common\Terra.Environment.Common.Model\bin\Debug\TerraEntitiesModel.msl" /&gt;
      &lt;DeploymentItem filename="..\Tpie.Client\Tpie.Client.Common.Test\ExcelParsers\InputFiles\" /&gt;
      &lt;DeploymentItem filename="..\Tpie.Engines.Build\Tpie.Engines.Build.TestProgram\Templates\" /&gt;
    &lt;/Deployment&gt;
    &lt;Execution&gt;
      &lt;ExecutionThread apartmentState="MTA" /&gt;
      &lt;Timeouts runTimeout="1800000" testTimeout="300000" /&gt;
      &lt;TestTypeSpecific&gt;
        &lt;UnitTestRunConfig testTypeId="13cdc9d9-ddb5-4fa4-a97d-d965ccfc6d4b"&gt;
          &lt;AssemblyResolution&gt;
            &lt;TestDirectory useLoadContext="true" /&gt;
          &lt;/AssemblyResolution&gt;
        &lt;/UnitTestRunConfig&gt;
        &lt;WebTestRunConfiguration testTypeId="4e7599fa-5ecb-43e9-a887-cd63cf72d207"&gt;
          &lt;Browser name="Internet Explorer 7.0"&gt;
            &lt;Headers&gt;
              &lt;Header name="User-Agent" value="Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)" /&gt;
              &lt;Header name="Accept" value="*/*" /&gt;
              &lt;Header name="Accept-Language" value="{{$IEAcceptLanguage}}" /&gt;
              &lt;Header name="Accept-Encoding" value="GZIP" /&gt;
            &lt;/Headers&gt;
          &lt;/Browser&gt;
        &lt;/WebTestRunConfiguration&gt;
      &lt;/TestTypeSpecific&gt;
      &lt;AgentRule name="LocalMachineDefaultRole"&gt;
        &lt;DataCollectors&gt;
          &lt;DataCollector uri="datacollector://Microsoft/TestImpact/1.0" assemblyQualifiedName="Microsoft.VisualStudio.TraceCollector.TestImpactDataCollector, Microsoft.VisualStudio.TraceCollector, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"&gt;
          &lt;/DataCollector&gt;
        &lt;/DataCollectors&gt;
      &lt;/AgentRule&gt;
    &lt;/Execution&gt;
  &lt;/TestSettings&gt;
  </code></pre>
  
  <p>And here is the .vsmdi file:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;TestLists xmlns="http://microsoft.com/schemas/VisualStudio/TeamTest/2010"&gt;
    &lt;TestList name="TPIE Auto Build" id="2cbc1525-8079-4959-a126-4d4fb8fdb803" parentListId="8c43106b-9dc1-4907-a29f-aa66a61bf5b6"&gt;
      &lt;TestLinks&gt;
        &lt;TestLink id="ee8dae77-c23e-df6b-c6b5-4be930087750" name="LevelTestConditionGroupCheckCalculationDataTypeVoltageTest" storage="..\tpie.client\tpie.client.common.test\bin\debug\tpie.client.common.test.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /&gt;
        &lt;TestLink id="74441000-f8e5-ac1b-fbd6-bb94da0bf3ce" name="LevelPowerSequenceBlockCheckSequenceElementTest" storage="..\tpie.client\tpie.client.common.test\bin\debug\tpie.client.common.test.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /&gt;
        &lt;TestLink id="afb21bed-4eff-9f9f-7e58-c72e7d133b32" name="TestGetMiscEnvironmentVariables" storage="..\server\terra.binmatrix.server.test\bin\debug\terra.server.bl.test.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /&gt;
      &lt;/TestLinks&gt;
    &lt;/TestList&gt;
    &lt;TestList name="Lists of Tests" id="8c43106b-9dc1-4907-a29f-aa66a61bf5b6"&gt;
      &lt;RunConfiguration id="68af9170-92f5-49d8-83dd-827359a79042" name="Master" storage="master.testsettings" type="Microsoft.VisualStudio.TestTools.Common.TestRunConfiguration, Microsoft.VisualStudio.QualityTools.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /&gt;
    &lt;/TestList&gt;
  &lt;/TestLists&gt;
  </code></pre>
  
  <p>Thanks,
  Busi</p>