How to execute the Test methods sequentially | Selenium Webdriver Tutorial with c# |Selenium C# training
10% May Month Discount Avail now

Selenium C# Training Forum

How to execute the Test methods sequentially

S
Simanchal Sahu Post 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

Instructor

gunjan Reply on 13/02/2019

Are you using NUnit as the Testing framework?