0

I have a testsettings file with deployment items defined in it that deploys my files as I expect when I use it with MSTest. However, when I use the same testsettings file with vstest.console.exe the items do not get deployed to the TestResults folder. Do I need to do something differently to deploy specific files with vstest?

Here's the deployment section in the testsettings file:

<Deployment> 
    <DeploymentItem filename="C:\MyTests\testfile.txt" />
</Deployment>

Here's how I'm using it with MSTest that works:

MSTest.exe /testcontainer:"C:\Tests\MyTests.dll" /testsettings:"C:\Tests\ts.testsettings"

And here's how I'm using it with VSTest that is not working:

vstest.console.exe C:\Tests\MyTests.dll /Settings:"C:\Tests\ts.testsettings"
Beeo
  • 71
  • 3

1 Answers1

0

Please make sure DeploymentEnabled flag is true in runsettings file. By default this is true. Changing it to false doesn't copy Deployment Items to the out directory of the TestResults folder.
Example:

  <MSTest>  
    <MapInconclusiveToFailed>True</MapInconclusiveToFailed>  
    <CaptureTraceOutput>false</CaptureTraceOutput>   
    <DeploymentEnabled>True</DeploymentEnabled>  
  </MSTest>

Reference https://msdn.microsoft.com/en-us/library/jj635153.aspx