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

Notification

Icon
Error

Making NCrunch run unit test with [ignore] attribute
CThule
#1 Posted : Friday, August 2, 2013 1:16:47 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 8/2/2013(UTC)
Posts: 3
Location: Denmark

Thanks: 2 times
Hi.

I have a unit test that is marked with the [ignore] attribute, and therefore NCrunch does not run it.
However, it would like to be able to run it manually.

With Resharper it is possible to manually run the test eventhough the [ignore] attribute is added,
by selecting the individual test and manually running it.

Is this possible with NCrunch?
Remco
#2 Posted : Friday, August 2, 2013 1:29:10 PM(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!

At the moment, this isn't possible with the Ignore attribute. Tests marked with this attribute are completely invisible to NCrunch. There is a task in the backlog to make tests with ExplicitAttribute manual only, although I can't promise at this stage when this will be implemented.

The best I can suggest for the time being is to create your own ignore attribute by using a custom category, i.e. [Category("Ignore")]. You can then configure the NCrunch engine modes to avoid executing the test automatically.

Cheers,

Remco
2 users thanked Remco for this useful post.
CThule on 8/9/2013(UTC), plillevold on 9/9/2013(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.024 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download