views:

32

answers:

1

I'm considering running unit tests for my Visual Studio 2010 projects on our build server at build time. The problem is that when I'm working locally, I want to test against DEV, when building for QA, I want the tests to run against QA, when building/promoting for UAT/PROD... you get the picture.

I think VS 2010 might have support for per-environment configs. If so, does this apply for test projects also? If not, what are some alternatives?

thanks, Mark

A: 

I don't really have much experience with VS 2010, but there was no such functionality in VS 2008.

I usually have a msbuild script to build and run the tests of the solution. In your case I would have a step in the this script to set the correct configuration after the code was built and before the tests are run. I used XmlUpdate task from http://msbuildtasks.tigris.org/ last time.

Grzenio