pengweiqhca / Xunit.DependencyInjection

Use Microsoft.Extensions.DependencyInjection to resolve xUnit test cases.
MIT License
366 stars 49 forks source link

Limit max parallel tests in Force mode #128

Open abakumovoleg opened 1 month ago

abakumovoleg commented 1 month ago

Hi, is it possible to limit max parallel test execution with Force flag?

pengweiqhca commented 4 weeks ago

Please see xunit Running Tests in Parallel Algorithms.

So, I suggest choosing aggressive, but I didn't confirm that.

abakumovoleg commented 4 weeks ago

Maybe I don't understand something but I tried both options and it doesn't work as I expected. It only allows to constraint max parallel threads, not tests or test methods. It works only for non async tests.

pengweiqhca commented 4 weeks ago

Maybe you can get some inspiration from my Parallelization test code and MaxParallelThreads config.