Excluding certain tests from Resharper

Topics: ReSharper test runner
Oct 27, 2013 at 5:40 PM
Is this possible?

I tried adding a Trait and excluded both the key and value in Resharper -> Options -> Unit Test -> Skip tests from categories. No luck.

Oct 27, 2013 at 5:45 PM
What version of the ReSharper plugin are you using? And what's the trait you're trying to exclude?
Oct 28, 2013 at 12:42 PM
I've just tested this, and it's working ok with me, with the latest version on ReSharper 8. There are two caveats:
  1. Make sure you click "Save" in the ReShaprer options dialog. If you type a category, then hit enter, the dialog closes, but the change isn't registered or saved. I'll report this as a ReSharper bug.
  2. If you have a trait with a name of "category" (any case), e.g. [Trait("category", "awesome")], then you can use just the word awesome in the options dialog. The casing of "awesome" is important, and must match. If you have a trait with any other name, e.g. [Trait("owner", "matt")], then you need to format it like this: owner[matt]. Note that the name and value are both case sensitive here, too.
And for a bonus tip, use "Save To" in the ReSharper options dialog to save to the shared solutions settings file. This will be saved alongside the VS solution file and can be checked into source control. Just hitting "Save" will save the categories to the "This Computer" setting file that is global to all solutions and lives on your machine.
Marked as answer by brianlow on 10/29/2013 at 10:21 PM
Oct 30, 2013 at 5:21 AM
Awesome! Thanks. And thanks for the Resharper extension. Great work!