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

Notification

Icon
Error

Run tests serially for SpecFlow-tests assembly only
smoove
#1 Posted : Thursday, June 27, 2013 8:58:14 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 6/27/2013(UTC)
Posts: 5
Location: United Kingdom

Thanks: 1 times
Was thanked: 1 time(s) in 1 post(s)
Hi Remcrunch, hope you're well.

Is there a way to instruct NCrunch to run all tests from one assembly serially, but for all other assemblies to run in parallel?

I tried to apply the Serial / ExclusivelyUses attribute at assembly level, but nc didn't pick it up (interestingly, if you apply an NUnit category at assembly level, that category does get listed in the Categories column of the tests window for all tests in that assembly).

Another option would be to attribute each test, but with Specflow the tests are auto-generated, so you would need to jump through hoops with writing and registering a custom SpecFlow test-provider plugin.

So I would imagine that the easiest way to get this behaviour would be to detect the Serial / ExclusivelyUses attribute at assembly level.

Thanks,

Smoove
Remco
#2 Posted : Friday, June 28, 2013 2:14:13 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
Hi Smoove,

Great to hear from you! Support for NCrunch attributes at assembly level is much requested and I hope to have this implemented soon, ideally in the maintenance release due out in a few weeks time.

Unfortunately my SpecFlow knowledge is very limited, so I'm afraid I can't suggest an easy workaround with much confidence, but I understand that the generated SpecFlow files themselves are partial classes. Would it perhaps be possible to introduce partial siblings side-by-side which either declare the ExclusivelyUsesAttribute or inherit from a base class that does?


Cheers,

Remco
1 user thanked Remco for this useful post.
smoove on 6/28/2013(UTC)
smoove
#3 Posted : Friday, June 28, 2013 5:04:12 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 6/27/2013(UTC)
Posts: 5
Location: United Kingdom

Thanks: 1 times
Was thanked: 1 time(s) in 1 post(s)
Yeah, that worked (good thinking). But there would be a bunch of work to define all those partial classes, and make sure they'd stay in sync with the generated classes. So I will await the maintenance release.

Cheers, and keep up the good work.
smoove
#4 Posted : Thursday, July 18, 2013 9:56:37 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 6/27/2013(UTC)
Posts: 5
Location: United Kingdom

Thanks: 1 times
Was thanked: 1 time(s) in 1 post(s)
Nice one Remco - the new release works as advertised and solves this issue.
1 user thanked smoove for this useful post.
Remco on 7/18/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.029 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download