Hi JD,
According to your description, I create a sample Unit Test project and add a .runsettings file based on the default settings in
this article. The I run my Unit Test with the steps that you described and I get the same result.
I try run my Unit Test without .runsettings file, no matter I use the DeploymentItemAttribute or not, the TestRunDirectory are all set to "..\TestResult\Deploy_name 2016-06-21 14_42_18". So this problem just occurs when I use the .runsettings file
in my Unit Test project.
After I checked my .runsettings file, I found there has a <DeploymentEnabled> setting, which is set as false. When I change it to True, the TestRunDirectDirectory is set to "..\TestResult\Deploy_name 2016-06-21 14_42_18" when I use the DeploymentItem
attribute.
<MSTest>
<MapInconclusiveToFailed>True</MapInconclusiveToFailed>
<CaptureTraceOutput>false</CaptureTraceOutput>
<DeleteDeploymentDirectoryAfterTestRunIsComplete>False</DeleteDeploymentDirectoryAfterTestRunIsComplete>
<DeploymentEnabled>True</DeploymentEnabled>
<AssemblyResolution>
<Directory Path="D:\" includeSubDirectories="false"/>
</AssemblyResolution>
</MSTest>
Best Regards,
Weiwei
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.