Thursday, August 16, 2012

Community TFS Build Extensions: NUnit activity

For a customer I was replacing the MSTest activity inside the Build Process template by the NUnit activity from the Community TFS Build Extensions(

After configuring the activity I saw inside the build log that the NUnit tests were running fine and that the results were published to Team Foundation Server.


According to the documentation I should also see the results inside my build report:


But when I opened my report no test information was available.

What went wrong?

When the the Build report is loaded, it tries to find the related test results from the TFS database. One of the filter criteria to find the correct tests are the build platform(e.g. Any CPU,x86,…) and flavor(e.g. Debug, Release,…).  This means that if you passed the wrong information to the NUnit activity, TFS will not be able to find the test results in the TFS database.

And this was exactly what happened to me. I hardcoded the flavor inside the activity to “Release” while my build configuration was using “Debug”. After updating the flavor to the correct value, TFS was able to load the test results as expected.


No comments: