I know you generally should not depend on order for your unit tests, but in xunit is it possible to make your tests run in a certain order?
Ordering classes and casesTests are executed in ascending order. If no Order attribute is specified default 0 is assigned. Multiple Order attributes can have same value.
Running unit tests in parallel is a new feature in xUnit.net version 2. There are two essential motivations that drove us to not only enable parallelization, but also for it to be a feature that's enabled by default: As unit testing has become more prevalent, so too have the number of unit tests.
There is a sample in our Samples project named PrioritizedFixtureSample which allows you to control the ordering of tests.
See the samples in our latest release: https://xunit.net/#releases
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With