how do you set Parallelizable Attribute in dotnet core for Nunit tests?

Viewed 2991

A convenient way of running tests in parallel in nunit when in a dotnet framework project was to set this in the AssemblyInfo.cs file.

[assembly: Parallelizable(ParallelScope.Fixtures)]

however in .net core or .net standard, there is no longer an AssemblyInfo.cs file. So how can one set the scope to parallel in net core or net standard in just one place, without having to add that decorator on every single test class file?

1 Answers

Create WhateverNameYouWant.cs file. Just put your code - NUnit will recognize it.

  using NUnit.Framework;
  [assembly: Parallelizable(ParallelScope.Fixtures)]
Related