I need to ensure that NUnit runs tests sequentially even when running multiple test assemblies so I am using a command line like:
nunit3-console.exe -workers:1 testAssembly1.dll testAssembly2.dll testAssembly3.dll
But tests are still running in parallel. If I run it only on 1 DLL at a time I get only 1 worker.
So now I am thinking that -workers:1
limits how many workers can run in parallel within the same DLL, but does not limit how many DLLs can run in parallel. But I can't find anything in the documentation explicitly saying so.
Is that correct?
--workers
limits the number of worker threads available - which controls how many of your tests within each assembly run in parallel. (Relevant to your use of Parallelizable attribute - i.e. if you haven't used Parallelizable, you can leave --workers
to the default!)
To restrict different assemblies running in parallel, you need the --agents
option.