I have a special project for SystemTests which aren't suitable for automated running. How do I tell NCrunch to ignore it?
(Similar: How do I tell NCrunch to ignore a particular test class)
Daily Usage Issues
How do I tell NCrunch to ignore a project?
Started by srobertjames on 9,088 views
Remco NCrunch Developer
#3472
26 Dec 2012 22:23 UTC
There's a few ways you can do this. The way that I generally recommend is to mark each of the tests with a distinctive category, then set up a custom engine mode that will avoid automatically running tests that are marked with this category. Using this approach, it's still possible to run the tests manually using NCrunch, assuming that they still execute correctly within the NCrunch test environment. It's also possible to create more complex engine modes that have different selection criteria (i.e. regex expressions on test names, or comparisons on project names, etc).
A simpler but more limited approach is to right click on the project inside the Tests Window and click the 'Ignore tests' option. This will tell NCrunch to ignore the tests via a regex expression that is stored in the project's NCrunch configuration file. You won't be able to run the tests with NCrunch (even manually) until they have been 'unignored'. The 'Ignore tests' feature can be applied at project level, fixture (class) level, and test level.
A simpler but more limited approach is to right click on the project inside the Tests Window and click the 'Ignore tests' option. This will tell NCrunch to ignore the tests via a regex expression that is stored in the project's NCrunch configuration file. You won't be able to run the tests with NCrunch (even manually) until they have been 'unignored'. The 'Ignore tests' feature can be applied at project level, fixture (class) level, and test level.
Edited 26 Dec 2012 22:24 UTC
Hi,
I've tried to set up a custom engine mode and use "does not have categroy" = "Foo" - but it does not ignore tests (MSTest) marked with TestCategory("Foo"). Is this a bug, or am I doing it wrong?
--alrsw
I've tried to set up a custom engine mode and use "does not have categroy" = "Foo" - but it does not ignore tests (MSTest) marked with TestCategory("Foo"). Is this a bug, or am I doing it wrong?
--alrsw
Remco NCrunch Developer
#3542
15 Jan 2013 21:22 UTC
I'm wondering if you'd be able to check for me whether NCrunch has correctly detected the category you've assigned.
You can do this by right clicking the column headers in the Tests Window, selecting 'Field Chooser' and then dragging the 'Categories' field onto the window. If you look for the test in question in the Tests Window, you should see the category assigned. Is this the case?
You can do this by right clicking the column headers in the Tests Window, selecting 'Field Chooser' and then dragging the 'Categories' field onto the window. If you look for the test in question in the Tests Window, you should see the category assigned. Is this the case?
Post a reply
Log in to reply.