I have a number of classes which contain unit tests for example
Test class 1(){
test method 1
test method 2
}
Test class 2(){
test method 1
test method 2
}
Test class 3(){
test method 1
test method 2
}
I want to be able to run class 1 first then class 2 then class 3 etc. However when I run all tests it's completely random so class 1 method 1 runs first then class 3 method 2. This causes my tests to fail.
I tried using ordered test class in visual studio however I get the following message- MStest V2 based tests cannot be used in an ordered test.
Is there a way for me to order classes so they run in the ordered I need instead of randomly running a test within a class?