Disabling MSTest's temporary directory in TeamCity

I use TeamCity Professional to continuously create and test my code.

I have tests based on MSTest that work fine in VS2010 on my PC, but do not work on the build server.

I looked and found that during testing TeamCity creates a temporary directory in it TEMP_DIR(configurable) and copies only the "relationship of the first relation" to the test DLL.

For example: in my test, it is used NHibernate.dllthat is copied to the temp directory, but its dependencies (ie NHibernate.ByteCode.Castle) are not copied, and the test ends with an exception IO.FileNotFound.

Is there a way that I can just run tests from the output directory of test projects (Test / bin / debug)?

If not, how can I indicate which DLLs should be copied to the temp directory?

+5
source share
1 answer

In your solution, you can add a TestSettings file that will describe all the files for deployment.

First add the TestSettings file . Open it, and on the Deployment tab, add all the necessary file (your .dll). Then, in TeamCity during the MSTest build phase, specify the TestSettings file for use in the Advanced command options area . Example: "/testsettings:Local.Testsettings"

, , , temp.

+13

All Articles