Repository navigation
Replies: 2 comments 5 replies
|
@schmitch I believe if you run dotnet test against a solution, each test project only runs sequentially. I don't think they run in parallel? |
|
There is an SDK-level knob. Which one depends on how .NET 10 SDK with the Microsoft.Testing.Platform runner ( dotnet test MySolution.sln --max-parallel-test-modules 4(docs). It's command-line only: the SDK reads no config file or environment variable for it (source), so put it in your script or CI step. VSTest-based dotnet build MySolution.sln
dotnet test MySolution.sln --no-build -p:BuildInParallel=falseThat's the recommendation from the SDK team for exactly this question. If you want it in a file, MSBuild picks up arguments from a Your ~80 workers per project are TUnit's in-process parallelism, which is separate. Cap that with And you're right that neither runner has before-all/after-all hooks across projects. |

Uh oh!
There was an error while loading. Please reload this page.
currently we have a big solution that basically runs a shit ton of test suites, we basically have like 24 indepedent csproj's that all contain tests.
while we can probably reduce some of them, preferably we want them grouped. some of them even flip some
appcontextthat are than frozen for the rest of the assembly run.is there any knob, preferably by adding a config file to limit how many csproj's can run in parallel?
I think the only possible solution would be to mark the csprojs that they should not run tests and create less grouped projects that are used for test discovery.
is that the only real solution or am I wrong? I tried with other test projects doing something, but I think that is even harder in nunit.
its also an extrem hussle that
dotnet testhas no hook whatsover that runs BEFORE ALL assemblies and AFTER ALL assemblies (i know that tunit (or others can't do anything against that))Maybe I'm missing something and do not see the obvious solution for the problem tough.
All reactions