public class Testcase1 extends Testbasesuite { String runmodes[]= null; static int count=-1;
@BeforeTest public void checktestskip(){ if(!Testutil.istestcaserunable(asuitexls, this.getClass().getSimpleName())){ throw new SkipException("testcase is not runnable"); } runmodes=Testutil.getDataSetRunmodes(asuitexls, this.getClass().getSimpleName()); }
@Test(dataProvider="gettestdata") public void testcaseone(String col1, String col2, String col3, String col4){ lg.debug("executing testcase a as no of times as data"); lg.debug(col1 +"---"+col2 +"---"+col3 +"col4"); count++; if(!runmodes[count].equals("Y")){ throw new SkipException("runmode for dataset id no");
}
}
@DataProvider public Object[][] gettestdata(){ return Testutil.getdata(asuitexls, this.getClass().getSimpleName()); } }
Runmode for test suite A is Y and runmode for testcases is in suite A is Y , then also i am getting all the test case skipped in suite A after running in testng. Plz help me in this regard.
M
Replied on 05/11/2015
above code seems fine to me so, there must be some problem with TestBase.java completely debug the project use eclipse.