Skip to content

Enable parallel feature in NUnit

Syed Sayem edited this page Dec 30, 2016 · 2 revisions

The simplest way to activate the parallel feature in NUnit is by doing so at an assembly level.

Open your AssemblyInfo.cs file and add the following line:

[assembly: Parallelizable(ParallelScope.Fixtures)]

The above line of code will make all fixture classes to run in parallel.

--

If don't want to run in parallel, then you could use the ParallelScope.None on the particular class or test.

Here is an example,

[TestFixture]
[Parallelizable(ParallelScope.None)]
public class TestFixture3
{
    // ...
}
Clone this wiki locally