I am using JUnit and Selenium Webdriver. I want to run my test methods in order as how I write them in my code, as below:
@Test
public void registerUserTest(){
// code
}
@Test
public void welcomeNewUserTest(){
// code
}
@Test
public void questionaireNewUserTest(){
// code
}
But it doesn't work, it always executes my test methods in this order:
welcomeNewUserTest()
registerUserTest()
questionaireNewUserTest()
I read an answer somewhere if I name my method with suffix Test, then JUnit would execute them in order as how I order them in code. Apparently, this doesn't work.
Any help? Thanks