I'm seriously annoyed with this .\TestResults and test deployment mess. Now I'm trying to completely turn it off, but nothing works. From here:
Consider running your unit tests directly in the build output directory, so that testing runs more rapidly. This is especially useful on the build server after you have checked in your tests. To do this, add a .runsettings file to your solution, include False, and select the file in the Test, Test Settings menu. The same effect occurs in any test run in which DeploymentItemAttribute is not used at all. However, you cannot avoid using a deployment folder if you are using a .testsettings file, which is required for web and load tests, coded UI tests, and any test in which you deploy an application to remote machines.
I tried to create an empty solution with only C# Unit Test project that contains single unit test file with single line in it:
string text = File.ReadAllText("test.txt");And guess where it looks up this file? C:\Code\TestDeployment\TestResults\iLonely_ILONELY-PC 2013-02-17 13_33_37\Out\test.txtI tried to add test.runsettings file to the solution, as described here:
<!-- MSTest adapter --> <MSTest> <MapInconclusiveToFailed>True</MapInconclusiveToFailed> <CaptureTraceOutput>false</CaptureTraceOutput> <DeleteDeploymentDirectoryAfterTestRunIsComplete>False</DeleteDeploymentDirectoryAfterTestRunIsComplete> <DeploymentEnabled>False</DeploymentEnabled> </MSTest>I selected it through Test -> Test settings -> Select test settings file, ran tests... And the result was the same.
Can anyone explain me how to run tests from Output\bin{Configuration} folder?
IMPORTANT: I don't have a .testsettings file, I don't use DeploymentItem attribute.