Every test cases skipping | Selenium Forum
M
Posted on 02/11/2015
package com.qtpselenium.suiteA;

import javax.management.RuntimeOperationsException;

import org.testng.SkipException;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;

import com.qtpselenium.util.Testutil;

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.


http://www.vogella.com/tutorials/EclipseDebugging/article.html