Feature Suggestions

Exclude tests by Category (NUnit)

Started by jrnail23 on 9,917 views

Not sure if this is already supported, but I tag my NUnit integration tests with a Category attribute ("slow_tests").
I'd like to be able to tell NCrunch to not run those tests automatically.
Hi, thanks for posting!

You can currently do this by creating a custom engine mode and adding an exclusion by Category.


Cheers,

Remco
Tried to set up a custom engine mode with a rule like this: does not have category -> slow

I've switched to the custom engine mode and tagged a (nunit) test with [Category("slow")]. Ncrunch is still running the test though. I've tried to tag the test fixture as well, but no luck.

Any ideas to what could be wrong?

sincerely,

Kjetil Klaussen
Hi,

The first thing to check would be whether NCrunch has correctly detected the category of your test.

Try bringing up the tests window so that it shows your test. Right click the column headers and bring up the 'Field Chooser'. Drag the 'Categories' field onto the grid. Do you see a category against the test in question? Does its parent fixture also have the category?

Post a reply

Log in to reply.