Allow specific tests to not run in parallel with each other but to run in parallel with other tests #4657
-
Hello, Thanks in advance for any assistance! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I am sorry, but there is no direct support for this in NUnit. You may achieve this though by placing them in different assemblies but having Feature 1 and Feature 2 in the same assembly, marking them as not The setting for running in parallel in dotnet test is the MaxCpuCount property. The default is 1, which means no parallel, but set it to any other number and it will do parallel. Setting it to 0 will do as many as you have cores. See details here: You include a runsettings file like: |
Beta Was this translation helpful? Give feedback.
-
Thank you for the reply! |
Beta Was this translation helpful? Give feedback.
I am sorry, but there is no direct support for this in NUnit.
You may achieve this though by placing them in different assemblies but having Feature 1 and Feature 2 in the same assembly, marking them as not
NonParallelizable
, and then having 3 and 4 in another one, marking them either way. Usingdotnet test
and its way to run assemblies in parallel, it would run the the assembly with F.1 and F.2 in parallel with the one containing F.3 and F.4. You can then set theParallelizable
attribute for that second assembly, thus making F.3 and F.4 tests to run in parallel with each other if you like.The setting for running in parallel in dotnet test is the MaxCpuCount property. The default is 1, w…