Run one test class sequential and then all the rest parallell? XUnit


This Content is from Stack Overflow. Question asked by Marlene

I have one test class that is unit-testing a class that is used as injection a lot of places in my project.

When I run everything parallell, I see that sometimes the initialized object in my one test class “fleets” over to the other tests and mess them up.

Is there a simple way for me to run this one test class alone, and then all the rest parallell afterwards? I have seen this solution (Execute unit tests serially (rather than in parallel)) but it does not solve my problem as my issue is about one test-class that can not run parallell towards anything, and then the rest can run optimally afterwards / before.

I don’t want to run everything sequential. They are all in the same test assembly.


This question is not yet answered, be the first one who answer using the comment. Later the confirmed answer will be published as the solution.

This Question and Answer are collected from stackoverflow and tested by JTuto community, is licensed under the terms of CC BY-SA 2.5. - CC BY-SA 3.0. - CC BY-SA 4.0.

people found this article helpful. What about you?