Esempio n. 1
0
  @BeforeTest
  public void checkTestSkip() {
    if (!TestUtil.isTestCaseRunnable(
        suiteHomePageXls,
        this.getClass()
            .getSimpleName())) // suites XlSX name is passed by the object from base class. and name
                               // of the TestCase.
    // Instead of passing TestCase name,using this "this.getClass().getSimpleName()" to get the name
    // of the class as the name of the class is the TestCase name.
    {

      // writing the Skip in the Xls file for the test case

      TestUtil.reportDataSetResult(
          suiteHomePageXls,
          "Test Cases",
          TestUtil.getRowNum(suiteHomePageXls, this.getClass().getSimpleName()),
          "Skip");

      APP_LOGS.debug("skipping test HomePage_TC4 as the runmode is NO");
      throw new SkipException(
          "Skipping this testcase as the runmode is NO for this testcase : Payment_TC2");
    }
    // Load the RunModes of the Test
    runmodes = TestUtil.getDataSetRunmodes(suiteHomePageXls, this.getClass().getSimpleName());
  }