3
votes

I wonder if it is possible to run categorized NUnit tests on TFSBuild (Visual Studio Online). I've installed the NUnit Test Adapter WithFramework NuGet Package v1.2. Tests are executing fine on the build server but when I add a "test case filter" (TestCategory=Unit) in the build definition, no tests are running. I'm pretty sure that my tests are setup with this Category attribute ([Test, Category("Unit")]).

My understanding was that the NUnit Test Adapter would map TestCategory to Category as explained in this MSDN blog post. In the release notes of the NUnit Visual Studio Test adapter it also states:

Bug Fixes: #13 Category attribute not working with TFS test case filter

Anyone else has experience with this?

test case filter

1

1 Answers

1
votes

When you have configured a "Version control path to custom assemblies" on your build controller and have an old NUnit.VisualStudio.TestAdapter.dll at that location, this dll will take precedence over the NUnit.VisualStudio.TestAdapter.dll in your project.

I have removed this old dll to work with the NuGet package and the TestCategory filter is working just fine now!