I want to custom group my tests by function so I'm using the nunit Category attribute, like this:
[Test, Category("Cat1")]
public void SomeMethod() { }
[Test, Category("Cat2")]
public void AnotherMethod() { }
But in Visual Studio the categories do not show up, all I see are the defaults to group by duration or test outcome. I'm using:
- NUnit 2.6.4
- Visual Studio 2012
- NUnit Test Adapter 2.0.0.0
What am I missing? This seems like it should be a no-brainer
You should be able to group your tests by
Traits, which includes theCategoryattribute. If you can't then you may need to update your Visual Studio to at least Update 1. A more detailed description, targeted at the MS framework is here but the TestAdapter seems to allow it to work just fine with the NUnit Category attribute.