public void onFinish(ITestContext iTestContext) {
   try {
     TestNGExtensionExecutor.executeExtensible(
         ExtensionConstants.TEST_LISTENER, ExtensionConstants.TEST_LISTENER_ON_FINISH, true);
   } catch (Exception e) {
     handleException("Error while running tests", e);
   }
 }
 public void onStart(ITestContext iTestContext) {
   try {
     TestNGExtensionExecutor.executeExtensible(
         ExtensionConstants.TEST_LISTENER, ExtensionConstants.TEST_LISTENER_ON_START, false);
   } catch (Exception e) {
     handleException("Error while running tests", e);
   }
 }
 public void onTestSkipped(ITestResult iTestResult) {
   log.info("On test skipped...");
   try {
     TestNGExtensionExecutor.executeExtensible(
         ExtensionConstants.TEST_LISTENER, ExtensionConstants.TEST_LISTENER_ON_SKIPPED, false);
   } catch (Exception e) {
     handleException("Error while running tests", e);
   }
 }
 public void onTestFailure(ITestResult iTestResult) {
   log.info("On test failure...");
   try {
     TestNGExtensionExecutor.executeExtensible(
         ExtensionConstants.TEST_LISTENER, ExtensionConstants.TEST_LISTENER_ON_FAILURE, false);
   } catch (Exception e) {
     handleException("Error while running tests", e);
   }
 }
 public void onTestFailedButWithinSuccessPercentage(ITestResult iTestResult) {
   log.info("On test failed but within success percentage...");
   try {
     TestNGExtensionExecutor.executeExtensible(
         ExtensionConstants.TEST_LISTENER,
         ExtensionConstants.TEST_LISTENER_ON_FAILED_BUT_PASSED,
         false);
   } catch (Exception e) {
     handleException("Error while running tests", e);
   }
 }
 public void onTestStart(ITestResult iTestResult) {
   log.info(
       "Running the test method --- "
           + iTestResult.getTestClass().getName()
           + "."
           + iTestResult.getMethod().getMethodName()
           + " ----");
   try {
     TestNGExtensionExecutor.executeExtensible(
         ExtensionConstants.TEST_LISTENER, ExtensionConstants.TEST_LISTENER_ON_TEST_START, false);
   } catch (Exception e) {
     handleException("Error while running tests", e);
   }
 }