How to execute the Test methods sequentially | Selenium C# Forum
S
Simanchal Sahu Posted on 12/02/2019

HI,

I am facing a problem with executing the test cases sequentially for example Test1...TestN one by one.

It is not happening. The behaviour is it will run the test methods alphabetically. I tried with A_Test1, B_Test1  it does not worked. It started B first then executed A.

Similary I used [Test Priority (1)],, like also didn't helped me.

 

Class A{

[Testmethod]

Test1(){}

[TestMethod]

Test2(){}

[TestMethod]

Test3(){}

}

 

The solution I want is The Test should execute every time when Run the test cases should start from Test1() not from Test3(). Currenty the execution jumbling. Please suggest how to solve this issue.

 

Thanks and Regards,

Simanchal.


G
gunjan Replied on 13/02/2019

Are you using NUnit as the Testing framework?