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

Notification

Icon
Error

An option to disable parallel execution by NUnit categories?
mortan
#1 Posted : Friday, March 27, 2015 12:09:41 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 3/26/2015(UTC)
Posts: 6

Thanks: 1 times
Was thanked: 1 time(s) in 1 post(s)
Hi!

I'm aware that you can disable parallel test execution via the [NCrunch.Framework.ExclusivelyUses] attribute but I want to avoid using it (multi developer project, not everyone is using NCrunch, checking in the Ncrunch.Framework.dll isn't great either).

Is there really no way to have parallel test execution as default for unit tests but run the tests marked with a specific NUnit attribute (like [Category("Integration Tests")]) in non-parallel mode?

Sorry if I didn't see the obvious setting! :o

Regards!
Ralf Koban
#2 Posted : Friday, March 27, 2015 7:46:48 PM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 5/19/2014(UTC)
Posts: 44
Location: Germany

Thanks: 4 times
Was thanked: 10 time(s) in 9 post(s)
Hi mortan,

I'm sorry for just jumping in. You don't need to reference the NCrunch.Framework.dll.

Instead you can create your own attribute(s) (having the same names) and place it in that specific NCrunch.Framework namespace. We are doing this approach as well on our side as we also cannot reference the NCrunch.Framework.dll.

BR,
Ralf
Remco
#3 Posted : Friday, March 27, 2015 10:25:08 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
Ralf is correct. The only way to selectively use parallel execution is by declaring attributes (at assembly, fixture or test level) to restrict test execution. This means you will need to use ExclusivelyUsesAttribute. Declaring it in your own code is an approach taken by many users as you then won't need a reference to NCrunch.Framework. You can find the declaration/code for this attribute here.
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.031 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download