actually data provider have date and brand name so my first @test can only select date and brand name then in second @test it will fetch data against the same date and brand name and on second iteration first @test take second date and second brand name from @dataprovider and then second @test will do their own work and so on please help me thanks in advance. example is given below :
`@DataProvider
public static Object[][] dp() {
return new Object[][] {
new Object[] { "23", "Online" },
new Object[] { "24", "Online" },
};
}
@Test(dataProvider = "dp")
public void DateAndBrand(String date,String game) throws InterruptedException{
System.out.println(date" "+game)
}
@Test
public void CheckDifference(){
System.out.println("in second Test");
}
I want output something like :
23 Online
in second Test
24 Online
in second Test
My testng.xml file is given below :
<suite name="Automation" parallel="false">
<test name="Data Difference">
<classes>
<class name="monitoring.DataCompareAuto">
<methods>
<include name="DateAndBrand"/>
<include name="CheckDifference" />
</methods>
</class>
</classes>
</test> <!-- Test -->
</suite> <!-- Suite -->