@Test public class CheckProductDisplay extends TestSuiteBase{ String runmodes[]=null; static int count=-1; static boolean Fail=false; static boolean Skip=false; static boolean Pass=false; static boolean isTestPass=true; //runmode of test case in suite @BeforeTest public void checkTestcaseSkipped() throws Exception { //Initialize(); APP_LOGS.debug("Checking runmode of Chack product display"); //if(!TestUtil.isTestcaseRunnable(suiteAxls, "TestCase_A1")){ if(!TestUtil.isTestcaseRunnable(suite_shop_xls, this.getClass().getSimpleName())){ APP_LOGS.debug(this.getClass().getSimpleName()+"skipped as runmode set to No");//logs throw new SkipException("Chack product display skipped as runmode set to No");//reports } //load runmode of test data // runmodes=TestUtil.getDatasetRunmode(suite_shop_xls, this.getClass().getSimpleName());
}
public void checkproduct(){
APP_LOGS.debug("Checking runmode of TestData--"+this.getClass().getSimpleName()); count++; // if(!runmodes[count].equalsIgnoreCase("Y")){ // Skip=true; // throw new SkipException("Runmode set to No for TestData Set "+(count+1)); // }
public class TestBase { public static Logger APP_LOGS=null; public static Properties CONFIG=null; public static Properties OR=null;
public static Xls_Reader suiteXls=null; public static Xls_Reader suite_shop_xls=null; public static Xls_Reader suite_cart_xls=null; public static Xls_Reader suite_product_display_xls=null; public static boolean isInitialized=false; public static WebDriver driver=null;
public void Initialize() throws Exception{ //logs if(!isInitialized){ APP_LOGS = Logger.getLogger("devpinoyLogger");
//config APP_LOGS.debug("Loading Properties File"); CONFIG = new Properties(); FileInputStream ip = new FileInputStream(System.getProperty("user.dir")+"//src//com//qtpselenium//config//config.properties"); CONFIG.load(ip); System.out.println(CONFIG.getProperty("browserType"));
OR = new Properties(); ip = new FileInputStream(System.getProperty("user.dir")+"//src//com//qtpselenium//config//OR.properties"); OR.load(ip); System.out.println(OR.getProperty("test")); APP_LOGS.debug("Loaded Properties File successfully");