"Bottom" line: How do you set up NCrunch to exclude all tests in a certain category, e.g. "LongRunning"?
Stack Overflow search provided zero results, and the relevant NCrunch wiki page merely informs me that "NUnit's Category attribute is just as powerful as NCrunch", which is nice but doesn't tell me how to use those categories.
To further clarify, I was expecting a checkbox-list somewhere to turn categories on/off, similar to the /exclude
option in the NUnit Test Runner to exclude all tests in certain categories.
PS. I've tagged the question only with NCrunch, it didn't seem relevant that I'm using NUnit as my testing framework. Should the answers indicate otherwise I'm happy to add the tag.
After some more searching on the wiki I found this page describing it: you need to create a new Engine Mode. Who would've thought?
Here's the two relevant steps/screenshots that got this working for me. First, go to the NCrunch menu, choose "Set Engine Mode" and then "Customise Engine Modes...":
And then step 2, choose "Run all tests automatically + CATEGORY FILTER", click "Add Engine Mode". Then give it a name, and add a condition "does not have category" and choose your category to ignore, e.g. "LongRunning". Then hit "OK":
Finally choose the new engine and your tests are filtered!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With