title: Include TestNG to hybrid selenium framework
body: <p>I have the below code in driverscript. I need to embed TestNG to it. How can I do this? ActionKeywords.java is defining all the action keywords.
  Where should I give the TestNG annotation?
      import java.io.FileInputStream;
      import java.lang.reflect.Method;
      import java.util.Properties;</p>
  
  <pre><code>import org.apache.log4j.xml.DOMConfigurator;
  
  import config.ActionKeywords;
  import config.Constants;
  import utility.ExcelUtils;
  import utility.Log;
  
  public class DriverScript {
  
      public static Properties OR;
      public static ActionKeywords actionKeywords;
      public static String sActionKeyword;
      public static String sPageObject;
      public static Method method[];
  
  
      public static int iTestStep;
      public static int iTestLastStep;
      public static String sTestCaseID;
      public static String sRunMode;
      public static String sData;
      public static boolean bResult;
  
      public DriverScript() throws NoSuchMethodException, SecurityException{
          actionKeywords = new ActionKeywords();
          method = actionKeywords.getClass().getMethods();    
      }
  
      public static void main(String[] args) throws Exception {
          ExcelUtils.setExcelFile(Constants.Path_TestData);
          DOMConfigurator.configure("log4j.xml");
          String Path_OR = Constants.Path_OR;
          FileInputStream fs = new FileInputStream(Path_OR);
          OR= new Properties(System.getProperties());
          OR.load(fs);        
          DriverScript startEngine = new DriverScript();
          startEngine.execute_TestCase();
  
      }
  
      private void execute_TestCase() throws Exception {
              int iTotalTestCases = ExcelUtils.getRowCount(Constants.Sheet_TestCases);
              System.out.println("Total TC count" + iTotalTestCases);  
              for(int iTestcase=1;iTestcase&lt;iTotalTestCases;iTestcase++){
                  bResult = true;
                  sTestCaseID = ExcelUtils.getCellData(iTestcase, Constants.Col_TestCaseID, Constants.Sheet_TestCases); 
                  sRunMode = ExcelUtils.getCellData(iTestcase, Constants.Col_RunMode,Constants.Sheet_TestCases);
                  if (sRunMode.equals("Yes")){
                      Log.startTestCase(sTestCaseID);
                      iTestStep = ExcelUtils.getRowContains(sTestCaseID, Constants.Col_TestCaseID, Constants.Sheet_TestSteps);
                      iTestLastStep = ExcelUtils.getTestStepsCount(Constants.Sheet_TestSteps, sTestCaseID, iTestStep);
                      bResult=true;
                      for (;iTestStep&lt;iTestLastStep;iTestStep++){
                          sActionKeyword = ExcelUtils.getCellData(iTestStep, Constants.Col_ActionKeyword,Constants.Sheet_TestSteps);
                          sPageObject = ExcelUtils.getCellData(iTestStep, Constants.Col_PageObject, Constants.Sheet_TestSteps);
                          sData = ExcelUtils.getCellData(iTestStep, Constants.Col_DataSet, Constants.Sheet_TestSteps);
                          execute_Actions();
                          if(bResult==false){
                              ExcelUtils.setCellData(Constants.KEYWORD_FAIL,iTestcase,Constants.Col_Result,Constants.Sheet_TestCases);
                              Log.endTestCase(sTestCaseID);
                              break;
                              }                       
                          }
                      if(bResult==true){
                      ExcelUtils.setCellData(Constants.KEYWORD_PASS,iTestcase,Constants.Col_Result,Constants.Sheet_TestCases);
                      Log.endTestCase(sTestCaseID);   
                          }                   
                      }
                  }
              }   
  
       private static void execute_Actions() throws Exception {
  
          for(int i=0;i&lt;method.length;i++){
              if(method[i].getName().equals(sActionKeyword)){
                  method[i].invoke(actionKeywords,sPageObject, sData);
                  if(bResult==true){              
                      ExcelUtils.setCellData(Constants.KEYWORD_PASS, iTestStep, Constants.Col_TestStepResult, Constants.Sheet_TestSteps);
                      break;
                  }else{
                      ExcelUtils.setCellData(Constants.KEYWORD_FAIL, iTestStep, Constants.Col_TestStepResult, Constants.Sheet_TestSteps);
                      ActionKeywords.closeBrowser("","");
                      break;
                      }
                  }
              }
       }
  
  }
  </code></pre>