Out-of-the-box when you have deployment enabled inside your .testsettings file, all files are put directly under the TestResults/Out folder. But what if you want to put your test files in a subfolder? This is something that isn’t possible through the testsettings editor, however it can be accomplished by changing the .testsettings file directly.

Right click on the .testsettings file in your solution explorer.
Remark: MSTest didn’t pick up this change immediately. I had to restart Visual Studio before it worked.
Right click on the .testsettings file in your solution explorer.
- Select Open With and select XML editor.
- Add a deployment item, specifying the relative path as the file name and an outputdirectory value of the directory name.
<Deployment> <DeploymentItem filename="BuildCustomizations\TestFiles\" outputDirectory="TestFiles\" /> </Deployment>
Remark: MSTest didn’t pick up this change immediately. I had to restart Visual Studio before it worked.