What is required to perform unit tests on the build server?

I do unit tests (no additional frameworks other than what goes out of the box with VS 2013).

Everything works locally. What do I need to do to get it working on the build server? The build server is TFS 2013. There is no other version in Visual Studio than the 2010 version. I have already moved all the 4.5.net and .targets files from my visual studio to the build server in order to be able to compile 4.5 dll and azure projects.

At first I had a problem with a build template using AgileRunner or something related to VS2013. I changed it to MSTest. Is this the right change? Are there installers for MSTest only without a visual studio that I can install on the build server?

My boss prefers if I can avoid installing Vs2013 on the build server.

+6
source share
2 answers

Just install Visual Studio on the build server; This is a very common practice. The requirement is indicated in the installation manual . You can have visual Studio 2010 and 2013 installed side by side, if necessary. A lot of .NET parts depend on this.

Install Visual Studio and other software to enable compilation and other features.

You must install the version of Visual Studio that your team uses on their machines on the build agent. See Installing Visual Studio. You must also install any other software and components that are installed on your dev machines that are necessary to build your application.

http://msdn.microsoft.com/en-us/library/bb399135.aspx#software

You are even allowed to use the existing license for the assembly server, so there is no additional cost if you have a subscription to MSDN:

Using Visual Studio on a build server

If you have one or more licensed users of Visual Studio Ultimate with MSDN, Visual Studio Premium with MSDN, or Visual Studio Professional with MSDN, then you can also install Visual Studio software as part of Team Foundation Server 2013 Build Services. Thus, you do not need to purchase a Visual Studio License to cover the work of Visual Studio to build a server for each person whose actions initiate the assembly.

http://www.microsoft.com/en-us/download/details.aspx?id=13350

Is there any specific reason for the boss not wanting to install Visual Studio?

As for the Agile Test Runner, this is the improved tester that comes with Visual Studio 2012, it is a replacement for the old MsTest runner and will replace the old MsTest runner with the last few functions for which the old runner is still needed. Although the MsTest runner will still work, some features will not be as easy to use and have problems (for example, collecting coverage code). The Agile tester is also needed for other extensibility extensibility features, including XUnit.NET, NUnit, and Javascript Unit Test support (using Chutzpah).

Other features that require Visual Studio installation include:

  • Code analysis
  • Code coverage
  • Msdeploy / webdeploy
  • SQL Server Data Tools
  • and others.

As an alternative to getting only test runners, you can try installing the TFS Test Controller and Agent on the server (you don’t need to configure them), the test agent will install a number of testing-related functions without actually installing the Visual Studio shell.

+10
source

By not installing Visual Studio on the build server, you are violating the license agreement with Microsoft. Although Microsoft itself can create builds internally without installing Visual Studio on its servers, this script is definitely not officially supported.

Building without installation Visual Studio requests undefined behavior and compromises the integrity of your collections. I would suggest staying away from these attempts until Microsoft officially supports this scenario.

Microsoft strongly recommended that you do not create Visual Studio without installing it when we asked how the Gold Partner 2 years ago, because it was not officially supported officially, and there is no license model covering this scenario.

-4
source

All Articles