Running MStest in cruise control .net build server

2020-03-20 10:40发布

问题:

I'm trying to setup cruisecontrol.net to work with our existing projects.

The projects use the visual studio 2008 testing tools (running as .net 2.0).

During the actual build process I get several error messages, most or which are:

Type 'TestClass' is not defined.

I'm assuming that this is because I don't have the testing framework installed on my build server.

I'd rather not just copy bits from my dev machine (that always feels a bit hacky) and I'd also rather not install visual studio on the build sever (that seems like overkill).

Does anyone know where I can get a standalone installer to put these files on my build server?

回答1:

MSTest requires Visual Studio. You'll need to install it on your build machine (or use a more lightweight testing framework!)



回答2:

You can get hold of the MSTest.exe and associated libraries on a redistributable disk image under the title of "Visual Studio Agents".

Instructions:

  1. Download and run setup from the disk
  2. Run the test agent installer
  3. No need to install the agent as a service or configure the test agent as you just want to run it from the command line.
  4. The MSTest tool will now be installed somewhere like "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE" which is the same path as for visual studio.