in excel sheet make 5 rows of data one for each city.
and then data provider should run your test 5 times.
I tried using that but what happens is
I have 5 tests in one class(java file) smthing like this
class XYZ
{
@test(priority=1)
public void login()
{
}
@test(priority=2,dataprovider="abc",dataproviderClass=xyz.class)
public void enercity()
{
}
@test(priority=3)
public void save()
{
}
@test(priority=4)
public void close()
{
}
}
I am running one class as a end to end individual flow ,now in above case , testng takes one city and immediately after that takes 2nd city and before completing all full flow it takes all cities .I am expecting testng to run full flow as per priprity defined and then next data from dataprovider but it does happen in that way
you can do it like this.
please watch the testng module before proceeding.
class XYZ
{
@beforemethod
public void login()
{
}
@test(priority=2,dataprovider="abc",dataproviderClass=xyz.class)
public void enercity()
{
}
@aftermethod
public void save()
{
}
@aftertest
public void close()
{
}
}
hi ashish..it does not work in dat way..I will mail you my code and structure