You need to add [Parallelizable(ParallelScope.None)]
for your feature.cs file. You can do it manually but when you build your solution this change will be overwritten.
In MsTestV2 we can exclude the scenarios from parallel execution by adding a tag "@mstest:donotparallelize". Not sure about nUnit
- Feature=Class
- Scenario=Method
Below is the settings file
<?xml version="1.0" encoding="utf-8"?>
<RunSettings>
<!-- Path to Test Adapters Use for mstest v2-->
<TestAdaptersPaths>.\</TestAdaptersPaths>
<MSTest>
<Parallelize>
<Workers>4</Workers>
<Scope>Class</Scope>
</Parallelize>
</MSTest>
</RunSettings>
Now add the tag to feature file which you don't want to execute in parallel.
@mstest:donotparallelize
Feature: Calculator
In order to avoid silly mistakes
As a math idiot
I want to be told the sum of two numbers
This will add [Microsoft.VisualStudio.TestTools.UnitTesting.DoNotParallelize()]
attribute in feature.cs file