pengweiqhca / Xunit.DependencyInjection

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

Limit max parallel tests in Force mode #128

Open abakumovoleg opened 3 months ago

abakumovoleg commented 3 months ago

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

pengweiqhca commented 3 months ago

Please see xunit Running Tests in Parallel Algorithms.

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

abakumovoleg commented 3 months 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 3 months ago

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