I provide data to the test using a data provider. The test class has 3 tests. I want the three tests to run in sequence for every instance of data provided by data-provider. I tried the following , but this runs testOne for completely for all the data provided by data-provider and then testTwo and then testThree.
public class TestClass{
@Test(@dataProvider = "getData")
public void testOne(){
//Test case logic
}
@Test(@dataProvider = "getData")
public void testTwo(){
//Test case logic
}
@Test(@dataProvider = "getData")
public void testThree(){
//Test case logic
}
@DataProvider
public Object[][] getData() {
//data provider code
}
}
Could anyone tell me how to run the three tests for the data instance provided by the data-provider and then run the three tests for the next data instance and so on..
Thanks