You can enable/disable the XUnit tests run in parallell during a test execution easily.

Please follow the below steps to enable / disable the parallel run for the test inside a particular assembly.

Prerequisites :

  • .Net Core SDK: To create XUnit tests we will need .Net Core SDK. If it is not installed already, please install using the link

Lets get started : 

Step 1 : Create a xunit.runner.json file to the root folder of the test project.

Step 2 : Copy paste the below data in to the file.

{
“parallelizeTestCollections”:false
}

false : this will disable the parallelize run of XUnit tests.

true: this will enable the parallelize run of Xunit tests.

Please read more in the link 

Advertisement