Feature Suggestions

Set Parallel Execution option at test project level

Started by markrendle on 7,887 views

Most of my tests would quite happily run in parallel, I've just got one test project where that won't work. It would be awesome if I could enable parallel execution across all the others and disable it for just that project.
Hi Mark -

The solution-level parallel execution option is basically just a shortcut for using attributes at fixture or project level.

If you have a project containing tests that can't be run in parallel with each other (i.e. an integration test project), the easiest option is to place an ExclusivelyUsesAttribute at root level in the project. For example, by adding [NCrunch.Framework.ExclusivelyUses("Database")] in your AssemblyInfo.cs file. In this way, the tests in this project will all be considered to be making use of the same resource, and they will not be run together.

If you need to stop these tests running with ANY other test in your solution, you can also use the Serial attribute.

Post a reply

Log in to reply.