title: TestNG xml + Linux OS + Jenkins --> Nothing happening
body: <p>Folder structure: 
  <a href="https://i.stack.imgur.com/IInSQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/IInSQ.png" alt="enter image description here"></a></p>
  
  <p>Now my Jenkins are hosted on a Linux machine. So in my base file where the drivers will be picked up based on OS. 
  Below is the code: </p>
  
  <pre><code>//Function to instantiate the WebDriver instance based on the Browser selected for Linux
  public WebDriver driverInsLinux(){
      setbaseURL();
  
      try {
          switch(getBrowser()){
  
          case "Chrome":
              System.out.println("Inside Linux chrome driver function");
              System.setProperty("webdriver.chrome.driver", "./Linux/Drivers/chromedriver");
              System.out.println("driver launch successful");
              driver=new ChromeDriver();
              driver.get(baseurl);
              break;
  
              case "Internet Explorer":
                  System.setProperty("webdriver.internetexplorer.driver", "./Linux/Drivers/internetexplorerdriver.exe");
                  driver=new InternetExplorerDriver();
                  break;
              case "Firefox":
                  driver=new FirefoxDriver();
                  break;
                  default:
                      //new PascalBaseClass();
          }
      } catch (IOException e) {
  
          e.printStackTrace();
      }
      driver.get(baseurl);
      driver.manage().timeouts().pageLoadTimeout(100, TimeUnit.SECONDS);
      driver.manage().window().setSize(new Dimension(1366, 768));
      driver.manage().window().maximize();
      return driver;
  }
  
      //Function to instantiate the WebDriver based on the OS
  public WebDriver driverIns(){
  
      //driver =driverInsWindows();
  
      switch (getOSName()) {
  
      case "Windows": driver =driverInsWindows();
          break;
      case "Linux" : driver =driverInsLinux();
          break;
      case "MAC" : driver =driverInsMac();
          break;
  
      }
      return driver;
  
  }
          //Function to get the OS Name
  public String getOSName(){
  
          oSName = System.getProperty("os.name");
      if(oSName.contains("Windows"))
          oSName= "Windows";
      System.out.println(oSName);
      return oSName;
  
  }
  </code></pre>
  
  <p>Now the LoginPage.java </p>
  
  <pre><code>public class LoginPage extends Base{
  
  /*Members of the current Test Class. The number varies from script
  to script depending on the variables and verifications required*/
  public WebDriver driver;
  private String currentSitePath;
  private String testCaseName=getClass().getName().substring(10); 
  ExtentTest parentTest;
  
  
  //Function to Navigate to a particular URL inside CC
  public void navigateToURL(WebDriver driver){
      siteURL="";
      this.driver.navigate().to(baseurl+siteURL);
      }
  
  
  @Test // Main Test Flow for the Script
  public void executeScript() throws IOException{
  
      System.out.println("*******************");
      System.out.println("launching chrome browser");
  
      parentTest= ReportGenerator.initializeParentTest(getClass().getName().substring(10),"Testing Login Page");
  
      //Test Case Author assignment in Reports 
      ReportGenerator.assignAuthor(parentTest,"Garima");
  
      //Setting up Browser Instance
      this.driver=driverIns();
  
      //Navigating to the required page in CC
      navigateToURL(this.driver);
  </code></pre>
  
  <p>Jenkins console output: </p>
  
  <pre><code>+ java -version
  openjdk version "1.8.0_171"
  OpenJDK Runtime Environment (build 1.8.0_171-b10)
  OpenJDK 64-Bit Server VM (build 25.171-b10, mixed mode)
  + uname -a
  Linux jenkins2.spikes.eng 2.6.32-754.el6.x86_64 #1 SMP Tue Jun 19 21:26:04 
  UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
  + id
  uid=498(jenkins) gid=498(jenkins) groups=498(jenkins) 
  context=system_u:system_r:unconfined_java_t:s0
  + cd CC_Regression
  + chmod -R 777 /var/lib/jenkins/workspace/testing/CC_Regression
  + pwd
  /var/lib/jenkins/workspace/testing/CC_Regression
    + export 
   'CLASSPATH=/var/lib/jenkins/workspace/testing/CC_Regression/bin: 
   /var/lib/jenkins/workspace/testing/CC_Regression/lib/*'
   + 
   CLASSPATH='/var/lib/jenkins/workspace/testing/CC_Regression/bin: 
   /var/lib/jenkins/workspace/testing/CC_Regression/lib/*'
   + java org.testng.TestNG testng.xml
   [TestNG] Running:
    /var/lib/jenkins/workspace/testing/CC_Regression/testng.xml
  
   *******************
   launching chrome browser
  
   ===============================================
   Suite
   Total tests run: 3, Failures: 3, Skips: 0
   Configuration Failures: 1, Skips: 0
   ===============================================
  
   Build step 'Execute shell' marked build as failure
   Finished: FAILURE
  </code></pre>
  
  <p>Note: 
  1) for Linux drivers: I have download the file:chromedriver_linux64 from <a href="https://chromedriver.storage.googleapis.com/index.html?path=2.40/" rel="nofollow noreferrer">https://chromedriver.storage.googleapis.com/index.html?path=2.40/</a> </p>
  
  <p>Once download is done, extracted the file and placed it in Linx/Drivers folder</p>
  
  <p>2) Tried multpile syso at different steps in above functions.. But seems like post System.out.println("launching chrome browser");  it is breaking. </p>