NCrunch Forum
»
General Support
»
Build/Test Issues
»
An option to disable parallel execution by NUnit categories?
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!
|
|
|
|
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
|
|
|
|
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)
|
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.
|
|
|
|
NCrunch Forum
»
General Support
»
Build/Test Issues
»
An option to disable parallel execution by NUnit categories?
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.NETThis page was generated in 0.036 seconds.