Skip to content

Allow specific tests to not run in parallel with each other but to run in parallel with other tests #4657

Closed Answered by OsirisTerje
benmenachem asked this question in Q&A
Discussion options

You must be logged in to vote

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. Using dotnet 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 the Parallelizable 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…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by OsirisTerje
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants
Converted from issue

This discussion was converted from issue #4655 on March 11, 2024 13:23.