How to integrate NUnit tests into a TFS 2010 build

白昼怎懂夜的黑 提交于 2019-12-03 02:30:57
Rhapsody

You can run nunit tests from command line and therefore you can automate these tests via your (Workflow) build template.

Since there aren't a lot of custom build activities available for TFS 2010 yet, you could write your own to make sure that it integrates better with the TFS Build Report. Here you can find some information about writing a custom build activity.

Another approach would be to create unit tests via Visual Studio. These tests will be automatically run when performing a build.

As of now (Oct 2011), the easiest way is probably via the NUnit activity that can be found in the Community TFS Build Extensions.

Bomberlt

Ian Battersby wrote a great tutorial how to set up NUnit tests for Visual Studio 2010.

Basically, you need to:

  • download his build workflow template and set to your build definition
  • install NUnit and NUnitTFS in your tfs machine
  • add paths to installed directories in build process parameters
  • set Configurations to Build setting in build process parameters
  • change your NUnitTfs.exe.config with your collection name
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!