在构建服务器上进行单元测试需要什么? [英] What is required for doing Unit Tests on a Build Server?

查看:207
本文介绍了在构建服务器上进行单元测试需要什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在进行单元测试(除了VS 2013附带的框架之外,没有其他框架).

I am doing unit tests (no additional frameworks other then what comes out of the box with VS 2013).

所有操作均在本地进行.我需要做什么才能使其在构建服务器上正常工作?构建服务器是TFS2013.除2010版本外,没有安装Visual Studio.我已经将所有4.5 .net内容和.target文件从我的Visual Studio中移到了生成服务器,以便能够编译4.5 dll和Azure项目.

It all works locally. What do I need to do to get it working on the build server? The build server is a TFS 2013. There are no visual studio installed other then an 2010 version. I have already moved all the 4.5 .net stuff and .targets files from my visual studio to the build server to be able to compile 4.5 dlls and azure projects.

首先,我对构建模板有问题是使用AgileRunner或VS2013附带的东西.我将其更改为MSTest.这是正确的更改吗?我可以在构建服务器上安装没有Visual Studio的MSTest安装程序吗?

First I had problem with the build template was using AgileRunner or something thats coming with VS2013. I changed that to MSTest. Is this the correct change? Is there any installers for MSTest only without visual studio that I can install on the build server?

如果可以避免在构建服务器上安装Vs2013,我的老板更愿意这样做.

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

推荐答案

只需将Visual Studio安装在构建服务器上即可;这是很常见的做法.要求是在安装指南中提到的.如果需要,可以并排安装Visual Studio 2010和2013. .NET有很多依赖它的部分.

Just install Visual Studio on the build server; It is a very common practice. The requirement is mentioned in the installation guidelines. You can have visual Studio 2010 and 2013 installed side-by-side if that is desired. There are so many parts of .NET that depend on it.

安装Visual Studio和其他软件以启用编译和其他功能

您必须在构建代理上安装团队在其开发计算机上使用的Visual Studio版本.请参阅安装Visual Studio.您还必须安装开发计算机上安装的所有其他软件和组件,以及构建应用程序所需的其他软件和组件.

Install Visual Studio and other software to enable compilation and other capabilities

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

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

甚至允许您将现有许可证用于构建服务器,因此,如果您拥有MSDN订阅,则不会涉及任何额外费用:

You're even allowed to use an existing license for the build server, so there are no additional costs involved if you own an MSDN subscription:

在构建服务器上使用Visual Studio

如果您有一个或多个 Visual Studio Ultimate和MSDN,Visual Studio的许可用户 如果您是MSDN的高级版,或者是MSDN的Visual Studio专业版, 也可以将Visual Studio软件安装为Team Foundation的一部分 Server 2013生成服务.这样,您无需购买 Visual Studio许可涵盖了Visual Studio在 为每个操作开始构建的人构建服务器.

Using Visual Studio on the 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 may also install the Visual Studio software as part of Team Foundation Server 2013 Build Services. This way, you do not need to purchase a Visual Studio license to cover the running of Visual Studio on the build server for each person whose actions initiate a build.

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

您的老板是否有特定的原因不希望安装Visual Studio?

Is there a specific reason for you boss to not want Visual Studio to be installed?

关于敏捷测试运行器,它是Visual Studio 2012附带的改进的测试运行器,它是旧的MsTest运行器的替代品,并将替换旧的MsTest运行器以替代旧运行器的最后几个功能仍然需要.尽管MsTest运行程序仍然可以使用,但是某些功能将不那么易于使用和配置(例如代码覆盖率收集).其他测试框架扩展性选项也需要敏捷测试运行程序,包括XUnit .NET,NUnit和Javascript单元测试支持(使用Chutzpah).

With regards to the Agile Test Runner, it is the improved test runner that shipped with Visual Studio 2012, it's the replacement of the old MsTest runner, and will replace the old MsTest runner for the last few features for which the old runner is still needed. Though the MsTest runner will still work, certain features will not be as easy to use and confugure (like Code Coverage gathering). The Agile test runner is also required for other test framwork extensibility options, including XUnit .NET, NUnit, but also Javascript Unit Test support (using Chutzpah).

需要安装Visual Studio的其他功能包括:

Other features that will require Visual Studio to be installed include:

  • 代码分析
  • 代码覆盖率
  • MsDeploy/WebDeploy
  • SQL Server数据工具
  • 和其他人.

作为仅获得测试运行程序的替代方法,您可以尝试安装 TFS测试控制器和代理到服务器(您无需对其进行配置),测试代理将安装许多与测试相关的功能,而无需实际安装Visual Studio Shell.

As an alternative to get just the test runners, you could attempt to install the TFS Test Controller and Agent to the server (you don't need to configure them), the Test Agent will install a number of testing related features without actually installing the Visual Studio Shell.

这篇关于在构建服务器上进行单元测试需要什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆