TFS 2013 automated build: Is there a way to run the tests from the src folder

tfs, visual-studio, visual-studio-2013

Solution

What I ended up doing is using a PowerShell script as a post-build event to copy my test assemblies to the bin folder of the build.

There are PowerShell scripts made available for TFS 2013 on CodePlex, and I modified this one slightly to accomodate my needs.

By doing this, I was able to use the default settings for running the tests, and it worked like a charm.

Problem

I'm currently using the default build process template in TFS 2013 for my automated builds. I've configured the `OutputLocation` parameter to be `AsConfigured` to get the same folder structure as my Visual Studio solution (there are multiple projects in the solution and I don't want them all to be dropped in the same folder). The problem is that when the build process tries to run the tests, it looks for any assembly under the `bin` folder, while my build configuration makes it so that there is only a `src` folder. Is there a way to specify looking into the `src` folder instead? Shouldn't it be the default anyway when using the `AsConfigured` setting? Edit: Just to make it clear, there are usually 3 folders generated when running a TFS automated build (src, bin, tst). When using AsConfigured for the output location, there is no bin folder. I tried a suggestion which required changing the `Test sources spec` setting of the build process, and I get the same problem as before: ``` There were no matches for the search pattern C:\Builds\8\MyProject\MyBuildDefinition\bin\***test*.dll ```

Original source

Related problems