TestNG Execute Test Methods In Alphabetical Order

package techLearn.in;

import org.testng.annotations.Test;
import org.testng.annotations.BeforeTest;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.testng.annotations.AfterTest;

public class TestMethodsAlphabeticalOrder {
WebDriver driver;

@Test
public void prakampanam() {
driver.get(“http://prakampanam.com/”);
}

@Test
public void techlearn() {
driver.get(“http://www.techlearn.in”);
}

@Test
public void enrichinterior() {
driver.get(“http://www.enrichinterior.com/”);
}

@Test
public void gangaaram() {
driver.get(“http://www.gangaaram-tech.com”);
}

@Test
public void baalabharathi() {
driver.get(“http://baalabharathi.com/”);
}

@Test
public void asttrust() {
driver.get(“http://asttrust.org”);
}

@Test
public void tstelugnews() {
driver.get(“http://tstelugunews.com/”);
}

@Test
public void hyderabadreport() {
driver.get(“http://hyderabadreport.com/”);
}

@BeforeTest
public void beforeTest() {
System.setProperty(“webdriver.chrome.driver”, “E:\\Selenium\\chromedriver.exe”);
driver = new ChromeDriver();
driver.manage().window().maximize();
}

@AfterTest
public void afterTest() {
}

}

Leave a Reply