Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to integrate NUnit tests into a TFS 2010 build

Tags:

What is the best way to integrate nunit tests into TFS 2010? Is it via generic tests or is there a better approach to running them?

Ideally I'd like to have the granularity of one generic test per test assembly and have a way to surface the results in the TFS build report.

like image 745
Kevin McMahon Avatar asked Mar 19 '10 15:03

Kevin McMahon


2 Answers

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

like image 199
LordHits Avatar answered Oct 03 '22 00:10

LordHits


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.

like image 26
Rhapsody Avatar answered Oct 03 '22 00:10

Rhapsody