Why my NUnit tests execute in different order than they are listed?
And upon what the execution order depends?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It depends on how the runner arranges them after reflecting on your test assembly. Each runner may do this differently.
For instance, Reshaper’s runner runs alphabetically.
But the salient issue here is that NUnit tests should not have sequential stipulations or dependencies.
If you need to have tests depend on other tests, use MbUnit. This is an example of fixture dependency using the DependsOnAttribute.