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

Notification

Icon
Error

Exclude tests by Category (NUnit)
jrnail23
#1 Posted : Thursday, February 14, 2013 4:21:43 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 2/14/2013(UTC)
Posts: 1
Location: United States of America

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.
Remco
#2 Posted : Thursday, February 14, 2013 5:04:05 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,144

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Hi, thanks for posting!

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


Cheers,

Remco
kjetilk
#3 Posted : Wednesday, June 12, 2013 6:25:45 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 11/2/2012(UTC)
Posts: 6
Location: Norway

Was thanked: 1 time(s) in 1 post(s)
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
Remco
#4 Posted : Wednesday, June 12, 2013 8:13:49 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,144

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
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?
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.044 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download