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?
The Test attribute is one way of marking a method inside a TestFixture class as a test. It is normally used for simple (non-parameterized) tests but may also be applied to parameterized tests without causing any extra test cases to be generated.
Parallel execution is supported by the NUnit framework on desktop . NET runtimes and . NET Standard 2.0.
Create WhateverNameYouWant.cs file. Just put your code - NUnit will recognize it.
using NUnit.Framework;
[assembly: Parallelizable(ParallelScope.Fixtures)]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With