ShellyBelly
ShellyBelly

Reputation: 3

Why does TFS build is not running tests as if it don't exist?

I have recently added a TFS build to our project, and configured it to run the automated tests that are in the project, and for some reason the build is ignoring the tests as if they don't exist!

In order to figure this out I created another solution with only a basic project from the origin code and the test project as well. I've added these to the TFS and configured an almost equal build to this solution, and guess what? it executed the tests! it's the same tests as the original. just a copy of it.

The main difference between these 2 solutions is that the original code is a big solution with many projects, most of the projects are in some kind of a solution directory (and so does the tests project - it's inside a solution directory as well).

The difference between the TFS build definition is only that the output location of the build is set to single directory (I also tried PerProject and it worked) and in the original code it's defined to "AsConfigured" because we have some build tasks for copying dlls and such.

Has anyone encountered this problem? Any ideas?

Thanks

Upvotes: 0

Views: 875

Answers (1)

Matt Brooks
Matt Brooks

Reputation: 1604

TFS will look for the test DLLs in the BINARIES output folder location. You need to configure your 'build tasks for copying DLLs' to ensure your test DLLs are copied to this location.

Test assembly file specification Specify the binary files that contain the tests that you want to run. Leave the default value (**\**test*.dll) if you want the build agent to search recursively for any .dll files that match *test*.dll in the binaries subdirectory of the build agent's working directory.

TFS2013 — http://msdn.microsoft.com/en-us/library/ms253138.aspx

TFS2012 — http://msdn.microsoft.com/en-us/library/ms253138(v=vs.110).aspx

Upvotes: 3

Related Questions