Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to specify the order of the tests in Visual Studio c#?

I have several tests in the same namespace. I did not use naming convention like Test1, Test2, ... etc for each of my unit tests. So, now when I run all tests, they don't run in the order I want them to. Is there a way to order tests?

My tests do not fail if I don't execute them in a particular order. However, I was just wanted to execute them in the order they are in my test case spreadsheet.

like image 514
Maya Avatar asked Jul 07 '11 17:07

Maya


1 Answers

Your tests should not be order-dependent; that breaks the concept of test noninterdependence. The lack of ability to order the tests in Visual Studio is a reflection of this concept.

like image 176
Paul Sonier Avatar answered Nov 14 '22 23:11

Paul Sonier