Visual Studio 2013 - Stop MS Test from Deployment to Test Results Folder

I work with Coded UI Tests and Visual Studio 2013. Now I need to check if the images from the folder inside the application are displayed correctly. This is why I created a folder containing the images and set the build action to none and deployment always.

Unfortunately, all tests run in their own test results folder, and my images are not deployed correctly. I know that I can do this using the DeploymentItem attribute or test suite file, but I don't want to do this. I want to avoid "test results" and run tests from the output folder of my test project.

I do this with unit tests, for example. They are written using XUnit.Net, which works great. I thought it would work with MS Test as well, but this seems to work only for unit tests, but not for coded user tests.

So, let’s summarize it again: how can I get rid of the Test Results folder when using Coded UI Tests with Visual Studio 2013 and run my tests just from the project output directory?

+6
source share
1 answer

You can do this using a custom entry in the .runsettings file, which I think.

DeploymentItemAttribute Class

Consider running your unit tests directly at the output of the assembly so that testing is faster. This is especially useful on the build server after you have tested your tests. To do this, add the .runsettings file to your solution, enable False and select the file from the Test, Test Settings menu. The same effect occurs in any test run in which DeploymentItemAttribute is not used at all.

However, you may prefer not to do this if you want to be able to check these files after an unsuccessful run.

You cannot avoid using the deployment folder if you use the .testsettings file, which is required for the Internet and load tests, coded user interface tests, and any test in which you deploy the application to remote computers.

As for the DeploymentItemAttribue itself, I would avoid this if the following problems were not fixed: Gotchas: attribute MSTests [DeploymentItem] . +1 for xUnit in TestDriven.NET.

+2
source

All Articles