-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parallel execution does not work between classes #17
Comments
Per the NUnit docs:
The dependency injection components do not do anything specific to change parallelization. It's possible the NUnit internals look for an exact match on an attribute (which is what is subclassed by the dependency injection support) but I'm not certain. Can you describe the approach you're using to run the tests in parallel? |
Hello,
Thanks for your response.
I’m a bit surprised as well. Before adding your libraries the tests were executing in parallel (inside of the class) as well as between classes.
After adding the injection only tests from inside same class run in parallel. All other classes are triggered one by one.
I’m using your [DependencyInjectingFixture] attribute along with NUnit’s [Parallelizable(ParallelScope.All)]. If I remove dependency container the nunit attribute starts up all of the tests at once (limited by the thread amount etc).
If I include it then ParallelScope.All behaves as ParallelScope.Children should.
It’s quite puzzling for me. I assumed you maybe limited this somehow to avoid cross thread problems ?
These are the attibutes I use:
[DependencyInjectingTestFixture]
[Parallelizable(ParallelScope.All)]
…On 29 March 2022 at 22:25:25, Kaleb Pederson ***@***.******@***.***)) wrote:
Per the NUnit docs(https://docs.nunit.org/articles/nunit/writing-tests/attributes/parallelizable.html):
>
> The ParallelizableAttribute is used to indicate that a test and/or its descendants may be run in parallel with other tests. By default, no parallel execution takes place.
>
The dependency injection components do not do anything specific to change parallelization. It's possible the NUnit internals look for an exact match on an attribute (which is what is subclassed by the dependency injection support) but I'm not certain.
Can you describe the approach you're using to run the tests in parallel?
—
Reply to this email directly, view it on GitHub(#17 (comment)), or unsubscribe(https://github.com/notifications/unsubscribe-auth/AEFKODEDMTKQGIUP3NZ3QUDVCNRLLANCNFSM5R5HEDWA).
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
My version di is work with parallels |
Hi,
I have noticed after adding dependency injection constructor I can only run in parallel tests that are contained in a single class. Separate classes "await" till currently ran class is over and kick in. Is this something done on purpose?
The text was updated successfully, but these errors were encountered: