TFS自动化构建和发布的要求
我是 TFS 新手,我们正在尝试自动化构建的测试/构建/部署过程。
我遇到的问题是,当我尝试使用 MSBuild 参数启动自动部署(针对网页)构建时,它抱怨它没有必要的 DLL,到目前为止我已经发现它们已安装使用 Visual Studio Premium 或 Ultimate,但其他人抱怨像 Visual Studio 这样的东西不应该安装在服务器上 =)
TFS 目前也是构建服务器,我想知道是否有任何已知的要求这些东西起作用:
- 自动化UI 测试
- 自动部署
- 自动发布
- 代码分析
我正在使用 TFS 2010 和 Visual Studio 2010 (Premium)。欢迎任何帮助、评论或不同的方法=)
I'm new to TFS and we're trying to automate the test / build / deploy process for our builds.
The problem I'm experiencing is that when I try to start a build with automatic deployment (for a webpage) using the MSBuild Arguments it complains that it doesn't have the necessary DLLs and I've figured out so far that they get installed with Visual Studio Premium or Ultimate, but then other people complained that something like Visual Studio shouldn't get installed on a Server =)
The TFS is also the build server for now and I'd like the know if there are any known requirements for these things to work:
- Automated UI Testing
- Automated deployment
- Automated publish
- Code Analysis
I'm working with TFS 2010 and Visual Studio 2010 (Premium). Any help, comments or different approaches are welcome =)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我们团队处理这个问题的方法是实际检查将产品构建到源代码控制中所需的所有参考。 .NET 框架本身之外的任何内容,以及安装构建控制器/构建代理所获得的任何内容,都会被签入。
积极的方面:
缺点:
除此之外,就使测试位在构建代理中工作而言......可能最简单的方法是安装测试代理。 VS2010 中的 UI 自动化工具是“CodedUI Test”框架。它扩展了正常的 VS 单元测试框架,但需要一些额外的注册才能工作。
更复杂但从长远来看超级有用的是建立完整的“Visual Studio 实验室管理”平台。缺点是,要充分利用它,您需要连接一台 System Center Virtual Machine Manager 服务器和至少一台 Hyper-V 主机,并构建一个具有“干净”VM 快照的虚拟机(除之外的所有内容) /em> 您正在测试的产品已安装)。一旦一切就绪,您将获得真正流畅的端到端构建-部署-测试体验。您通过构建系统触发产品构建,一旦完成,您的环境就会恢复到绝对的状态。干净的状态(不用担心上一个版本的剩余位会破坏您的测试等),产品将发布到此测试环境,然后执行您的测试。
不确定您是否使用 TFS 进行工作项跟踪、测试用例管理、项目规划等等。如果没有,实验室管理的内容可能会太繁重而无法处理。如果您有兴趣修改该部分,请在此处了解更多信息。 :)
The way we handle that on my team is to actually check all the references needed to build the product in to source control. Anything beyond the .NET framework itself, and whatever you get for installing a build controller/build agent, gets checked in..
Positive bits:
Negative bits:
Beyond that, as far as making the test bits work from your build agent.. Probably the easiest way would be to install the test agent. The UI automation stuff in VS2010 is the "CodedUI Test" framework.. It extends the normal VS Unit Test framework, but requires some additional registrations to work.
More complicated, but super useful longer term is to set up the full "Visual Studio Lab Management" platform. Downside is, to fully leverage it you'll need to hook up a System Center Virtual Machine Manager server and at least one Hyper-V host, and build out a virtual machine with a "Clean" VM snapshot (everything except the product you're testing installed). Once all that's in place you get a really slick end-to-end build-deploy-test experience.. You trigger the product build via the build system, once that completes your environment is restored to that absolutely clean state (no worries about leftover bits from last version corrupting your testing, etc), the product gets published to this test environment, and then it executes your tests.
Not sure if you're using TFS for workitem tracking, testcase management, project planning, and whatnot.. If not, the lab management stuff may be too heavy-weight to mess with. More info here if you're interested in messing with that part. :)
您的生成服务器需要适当版本的 Visual Studio。例如,如果你想做数据库单元测试,那么构建服务器需要安装VS Ultimate。
如果在服务器上安装“客户端”软件存在问题,请使用单独的构建服务器。对于构建服务器来说,安装执行构建所需的工具是非常有意义的。
Your build server needs the appropriate versions of Visual Studio. For instance, if you want to do database unit tests, then the build server needs VS Ultimate to be installed.
If there's an issue with having "client" software installed on a server, then use a separate build server. It makes perfect sense for a build server to have the necessary tools installed to perform builds.