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

Notification

Icon
Error

Ignore categories of tests
Balfa
#1 Posted : Thursday, June 12, 2014 4:50:04 PM(UTC)
Rank: Member

Groups: Registered
Joined: 12/7/2011(UTC)
Posts: 14
Location: Dallas

Thanks: 2 times
Was thanked: 2 time(s) in 2 post(s)
With NamedTestSelector and RegexTestSelector, I can ignore a single test or a collection of tests, but I can't see a way to ignore a Category (using the NUnit categories as described at http://www.ncrunch.net/d...oncepts_test-categories ). I have a category of integration tests called "Database", which I don't want to run all the time, and certainly not when I'm out of the office and without network connection.

I understand that I can create an engine mode so that this category of tests is not run automatically, but I'm really interested in completely ignoring these tests altogether. If they've been run at all, manually, perhaps by accident, while I'm offline, they'll leave the Red Ring of Shame at the bottom of my IDE :(

That more complicated part of this equation might be having ignore presets that I can switch between depending on whether I'm in the office or not. That would be great.

I'm thinking the analogous work flow from the pre-NCrunch days would be that when I'm in the office, I manually run "nunit-console.exe myassembly.dll" frequently, and when I'm out of the office, I manually run "nunit-console.exe myassembly.dll /exclude:Database" frequently.
Remco
#2 Posted : Thursday, June 12, 2014 10:20:00 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 929 times
Was thanked: 1256 time(s) in 1169 post(s)
Hi, thanks for sharing this.

Right now NCrunch doesn't have any ability to set ignore specifiers at category level. This was an intended feature of the V2 release, but it was axed when the complexity went through the roof.

The ignore options DO work at category level inside the Tests Window, although they work by adding fixture-level ignore specifiers inside the config file. The specifiers in the config file are essentially internal to NCrunch, they aren't really intended to be edited manually.

You're welcome to vote for a feature to fill this gap if you like.
Balfa
#3 Posted : Tuesday, June 17, 2014 1:09:01 PM(UTC)
Rank: Member

Groups: Registered
Joined: 12/7/2011(UTC)
Posts: 14
Location: Dallas

Thanks: 2 times
Was thanked: 2 time(s) in 2 post(s)
I don't fully understand what you mean about the ignore options working at category level. I can't see anything category-related inside the Tests window. How do I add one of these ignores that does work at category level?
Remco
#4 Posted : Tuesday, June 17, 2014 10:43:10 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 929 times
Was thanked: 1256 time(s) in 1169 post(s)
Sorry, what I mean is that you can still select the 'Ignore' and 'Unignore' options in the Tests Window when a Category row is selected.

The Tests Window will then apply fixture-level ignores to ALL tests within the category you've selected.

So it isn't possible to apply Category-level ignores. It's just possible to apply Fixture-level ignores in bulk by 'ignoring' a category that contains these tests. This approach is quite limited because any newly categorised tests won't be ignored until you specifically tell NCrunch to ignore them (i.e. they won't automatically inherit the ignore from their category when they come into life).
Balfa
#5 Posted : Wednesday, June 18, 2014 4:59:25 AM(UTC)
Rank: Member

Groups: Registered
Joined: 12/7/2011(UTC)
Posts: 14
Location: Dallas

Thanks: 2 times
Was thanked: 2 time(s) in 2 post(s)
Ah, I just realised it's probably because I'm still on version 1 that don't see any Category rows (or anything Category-related) in the Tests Window.
Remco
#6 Posted : Wednesday, June 18, 2014 7:34:45 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 929 times
Was thanked: 1256 time(s) in 1169 post(s)
Ahh - that would make sense. In that case, I highly recommend the upgrade :)
Balfa
#7 Posted : Wednesday, June 18, 2014 1:49:53 PM(UTC)
Rank: Member

Groups: Registered
Joined: 12/7/2011(UTC)
Posts: 14
Location: Dallas

Thanks: 2 times
Was thanked: 2 time(s) in 2 post(s)
Maybe this will be the killer feature I need to justify upgrading ;)

https://ncrunch.uservoic...ore-categories-of-tests

Thanks for your answers.
1 user thanked Balfa for this useful post.
Remco on 6/18/2014(UTC)
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.043 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download