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

Notification

Icon
Error

Add/Move "Allow parallel test execution" to the Project Level
Rodney
#1 Posted : Friday, December 7, 2012 5:23:44 PM(UTC)
Rank: Member

Groups: Registered
Joined: 12/7/2012(UTC)
Posts: 17
Location: United States of America

Thanks: 1 times
Was thanked: 2 time(s) in 2 post(s)
The allow parallel test execution setting on a solution is great. However it would be nice if at a project level we could turn it off, but leave other project on.

What this would me that the test within the project can run in parallel with other tests from other projects, just not with tests within its own project.

With this functionality when we have test within a project that for whatever (good or bad) reasons share resources across tests that they will not be competing for them if that is an issue. My example would testing a DAL and and using the new Microsoft LocalDB to help abstract a SQL Server Away to a local file. However when all the DB test run in parallel they are competing for access to the LocalDB file which only so many "connections" can be made at once. I can try to find a balance by increasing connections allowed, etc. However sometimes just having the test run synchronously would be an easier if we can just set it at the project level to only impact that project within its own tests.
yanglee
#2 Posted : Friday, December 7, 2012 7:46:51 PM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 6/25/2012(UTC)
Posts: 89
Location: China

Thanks: 23 times
Was thanked: 19 time(s) in 18 post(s)
Just in case you missed this: Documentation - Integration Testing

You can use ExclusivelyUsesAttribute, InclusivelyUsesAttribute, and SerialAttribute to deal with concurrency Issues
Remco
#3 Posted : Friday, December 7, 2012 10:47:28 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 932 times
Was thanked: 1259 time(s) in 1172 post(s)
Hi Rodney -

Thanks for the suggestion. Yang is correct that the best way to solve this problem is by adorning your integration tests with the above attributes to control their concurrency.

There is an item in the backlog to extend the support of these attributes so that they can also be applied at assembly level (and thus automatically apply to all tests within the assembly). It's looking at the moment like this functionality will be an NCrunch V2 thing.

For the time being, I recommend performing a find and replace for the [Test] attribute within your integration tests project, to replace it with something like: [Test, NCrunch.Framework.ExclusivelyUses("Database")].
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.090 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download