Jack Smit
Jack Smit

Reputation: 3113

TFS2010 build with unit test

I am trying to convert a build system setup with TeamCity and Nant scripts to use TFS2010 (We bought the license and might just as well make use of it) After some work I get the web project to build and deploy to the web-server. We have a domain, API, test and web project in our solution.

How do I configure TFS to run the unit tests that we have written so far? I did configure the build to look for ***.UnitTest.dll in(VS2010) Edit build definition>Process>Automated Tests

Now the build fails with a message that says:"Could not load file or assembly 'nunit.framework, Version=2.5.3.9345" Am I correct when I say that TFS is trying to run NUnit on the build server? I did install NUnit-2.5.3.9345 on that TFS2010 build server and still nothing?

Thank you

Jack

Upvotes: 2

Views: 498

Answers (2)

KellyTheDev
KellyTheDev

Reputation: 901

I'm late to the game, because I've had to deal with this issue recently. I found this article helpful for me in this. It didn't work right off the bat, but I found if I added it into my buildscript via the controls in a similar manner/pattern, it would work.

My only problem now has been getting it to actually error (right now it warns) even when flagging them to cause the build to error

Link: http://blog.gfader.com/2011/06/running-nunit-tests-in-tfs-2010.html

Upvotes: 0

Enrico Campidoglio
Enrico Campidoglio

Reputation: 60003

The build facility in TFS uses MSTest as test runner, with which it's tightly integrated.

If you want to run your unit tests with NUnit as part of your build, take a look at the NUnit for Team Build project on CodePlex.

The project started out for TFS 2008, however support for TFS 2010 has been added in version 2.0. Note that this feature is still in early stages of development, so your mileage may vary.

Upvotes: 2

Related Questions