title: How to call java methods in testng class
body: <p>I am getting error in testng report:</p>
  
  <p>I followed the below steps</p>
  
  <ol>
  <li>I wrote all my testcases in java methods and used java verifications like if else to pass my testcases</li>
  </ol>
  
  <p>2.I created one testng class, in the testng class i called my all java methods</p>
  
  <ol>
  <li><p>I executed the testng class this class contain around 30 java methods, each and every method is one testcase.</p></li>
  <li><p>If i execute that class reports generated for testng based annotations, it does not consider the java methods into testcases, how can i call my all java methods? i need to generate reports for my java methods</p></li>
  </ol>
  
  <p>Here is my code :</p>
  
  <pre><code>import java.io.FileNotFoundException;
  import java.io.IOException;
  
  import jxl.read.biff.BiffException;
  import jxl.write.WriteException;
  import jxl.write.biff.RowsExceededException;
  
  import org.testng.annotations.BeforeClass;
  import org.testng.annotations.Test;
  
  public class DocumentSearchTest {
      WebElements webEleObj;
      /*
       * AllLetter Lettobj ; AllSearch allseObj; AllTranscript TraObj;
       */
      FrameSearchExported fseObj;
      TextBoxSearch textObj;
      DateSinceSearch dateSinceObj;
  
      /*
       * public void loginTest() throws FileNotFoundException, BiffException,
       * IOException, InterruptedException {
       * webEleObj.textbox(webEleObj.properties
       * ("Username"),webEleObj.excelRead(1,2,1));
       * webEleObj.textbox(webEleObj.properties
       * ("Password"),webEleObj.excelRead(2,2,1)); webEleObj.sleep(5000);
       * webEleObj.button(webEleObj.properties("Login")); webEleObj.sleep(20000);
       * 
       * }
       */
  
      @BeforeClass
      public void start() throws FileNotFoundException, BiffException,
      IOException, InterruptedException, RowsExceededException,
      WriteException {
          // Assert.assertEquals(true, true, "Loggend into application");
          webEleObj = new WebElements();
          /*
           * allseObj = new AllSearch(webEleObj); Lettobj = new
           * AllLetter(webEleObj); TraObj =new AllTranscript(webEleObj);
           */
          fseObj = new FrameSearchExported(webEleObj);
          textObj = new TextBoxSearch(webEleObj);
          dateSinceObj = new DateSinceSearch(webEleObj);
          webEleObj.browserLaunch();
          webEleObj.loginTest();
          webEleObj.sleep(20000);
          webEleObj.setUpApp();
          // webEleObj.excelwrite(4);
          System.out.println("hi logged in");
      }
  
      @Test
      public void ts_1() throws FileNotFoundException, IOException,
      InterruptedException, RowsExceededException, BiffException,
      WriteException {
          webEleObj.sleep(10000);
          System.out.println("First TestCase----&gt;");
          fseObj.allexportedSearch();
          fseObj.letterexportedSearch();
          fseObj.transcriptexportedSearch();
          fseObj.allnotexpSearch();
          fseObj.letternotexpSearch();
          fseObj.transcriptnotexpSearch();
          fseObj.allsignsearch();
          fseObj.lettersignSearch();
          fseObj.transcriptsignSearch();
          fseObj.allnotsignSearch();
          fseObj.letternotsignSearch();
          fseObj.transcriptnotsignSearch();
          System.out.println("Document Search Test Case Completed");
  
      }
  
      /*
       * @Test(enabled=false) public void ts_2() throws FileNotFoundException,
       * BiffException, IOException, InterruptedException, RowsExceededException,
       * WriteException { System.out.println("Second TestCase----&gt;");
       * textObj.accountNo_All(); textObj.accountNo_Letter();
       * textObj.accountNo_Transcript(); textObj.firstName_All();
       * textObj.firstName_Letter(); textObj.firstName_Transcript();
       * textObj.lastName_All(); textObj.lastName_Letter();
       * textObj.lastName_Transcript();
       * 
       * }
       */
      @Test
      public void ts_3() throws FileNotFoundException, IOException,
      InterruptedException, RowsExceededException, BiffException,
      WriteException {
          // webEleObj.sleep(10000);
          System.out.println("Third TestCase----&gt;");
          dateSinceObj.datesinceAll_Today();
          dateSinceObj.datesinceAll_Yesterday();
          dateSinceObj.datesinceAll_ThisMonth();
          dateSinceObj.datesinceAll_LastMonth();
          dateSinceObj.datesinceAll_ThisYear();
          dateSinceObj.datesinceAll_LastYear();
          dateSinceObj.datesinceLetter_Today();
          dateSinceObj.datesinceLetter_Yesterday();
          dateSinceObj.datesinceLetter_ThisMonth();
          dateSinceObj.datesinceLetter_LastMonth();
          dateSinceObj.datesinceLetter_ThisYear();
          dateSinceObj.datesinceLetter_LastYear();
          dateSinceObj.datesinceTranscript_Today();
          dateSinceObj.datesinceTranscript_Yesterday();
          dateSinceObj.datesinceTranscript_ThisMonth();
          dateSinceObj.datesinceTranscript_LastMonth();
          dateSinceObj.datesinceTranscript_ThisYear();
          dateSinceObj.datesinceTranscript_LastYear();
  
          // logOut();
  
      }
  }
  </code></pre>