Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

How do I tell NCrunch to ignore a project?
srobertjames
#1 Posted : Wednesday, December 26, 2012 9:29:02 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 12/25/2012(UTC)
Posts: 5

Was thanked: 2 time(s) in 2 post(s)
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)
Remco
#2 Posted : Wednesday, December 26, 2012 10:23:33 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,986

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
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.
larsw
#3 Posted : Tuesday, January 15, 2013 11:47:59 AM(UTC)
Rank: Member

Groups: Registered
Joined: 11/22/2011(UTC)
Posts: 15
Location: Oslo, Norway

Was thanked: 3 time(s) in 3 post(s)
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
--larsw
Remco
#4 Posted : Tuesday, January 15, 2013 9:22:42 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,986

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
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?
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.034 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download