title: Some tests are not getting executed but executed fine if run individually
body: <p>I am trying to run 2 classes through <code>testng.xml</code> file. There are total of 5 to 6 methods that need to be run. But when I execute with <code>testng.xml</code>, only total of 3 tests are getting run. But when I run the individual class it runs perfectly fine.</p>
  
  <p>Class: SmartRetrievePageTest.java</p>
  
  <pre><code>package tests;
  
  import org.testng.annotations.AfterMethod;
  import org.testng.annotations.BeforeMethod;
  import org.testng.annotations.Test;
  
  import base.BrowserFactory;
  import helper.DriverOperations;
  import pages.HomePage;
  import pages.LoginPage;
  import pages.SmartRetrievePage;
  import testbase.TestBase;
  
  public class SmartRetrievePageTest extends TestBase {
  
  
      LoginPage loginPage;
      HomePage homePage;
      SmartRetrievePage smartretrievePage;
  
      public SmartRetrievePageTest()
      {
          super();
      }
  
      @BeforeMethod(groups = { "SmartRetrieve" })
      public void setUp() throws Exception {
          BrowserFactory.launchApplication(prop.getProperty("Browser"), prop.getProperty("URL"));
          loginPage = new LoginPage();
          smartretrievePage = new SmartRetrievePage();
          homePage =  loginPage.login(prop.getProperty("UserName"),prop.getProperty("Password")); 
          Thread.sleep(2000);
          //smartDepositPage = homePage.clickDepositLink();
          DriverOperations.expandTopNavigationMenuAndPerformNavitation("Select application", "SmartRetrieve");
          Thread.sleep(3000);
  
      }
  
      @Test(priority = 1, groups = { "SmartRetrieve" })
      public void QuickSearch() throws Throwable {
          smartretrievePage.QuickSearching(prop.getProperty("QuickSearchKeyword"));
          //smartretrievePae.QuickSearching("adm");
          Thread.sleep(3000);
  
      }
      @Test(priority = 2, groups = { "SmartRetrieve" }, alwaysRun=true)
      public void AdvSearch() throws Throwable {
          smartretrievePage.AdvanceSearching(prop.getProperty("AdvanceSearchkeyword"));
          Thread.sleep(3000);
  
  
      }
      @Test(priority = 3, groups = { "SmartRetrieve" }, alwaysRun=true)
      public void SimpleSaveSearch() throws Throwable {
          smartretrievePage.sipmleSaveSearch(prop.getProperty("AdvanceSearchkeyword"),prop.getProperty("SearchName"));
          Thread.sleep(3000);
  
      }
  
  
      @AfterMethod(groups = { "SmartRetrieve" })
      public void tearDown() throws Exception{
          DriverOperations.logOut();
      }
  
  }
  </code></pre>
  
  <p>Class: SmartRetrievePage.java </p>
  
  <pre><code>package pages;
  
  import org.openqa.selenium.WebElement;
  import org.openqa.selenium.support.FindBy;
  import org.openqa.selenium.support.PageFactory;
  
  import base.BrowserFactory;
  import helper.DriverOperations;
  
  public class SmartRetrievePage extends BrowserFactory{
  
  
      //here are findElemtnts 
  
  
      public SmartRetrievePage()
      {
          PageFactory.initElements(driver, this);
      }
  
  
  
      public void QuickSearching(String keyword) throws InterruptedException
      {
          DriverOperations.clearFieldAndEnterStringData(quickSearch, keyword);
          DriverOperations.clickWhenElementIsClickable(ShowResultQuickSearch);
          Thread.sleep(3000);
          //return new SmartRetrievePage();
      }
  
      public void AdvanceSearching(String SearchValue) throws InterruptedException
      {
          DriverOperations.selectDropdownOptionByVisibleText(RetrieveDocumentType, "inv_header");
          DriverOperations.clearFieldAndEnterStringData(Searchvalue, SearchValue);
          DriverOperations.clickWhenElementIsClickable(ShowResult);
          Thread.sleep(3000);
  
  
      }
  
      public void sipmleSaveSearch(String SearchValue, String searchName) throws InterruptedException
      {
          DriverOperations.selectDropdownOptionByVisibleText(RetrieveDocumentType, "inv_header");
          DriverOperations.clearFieldAndEnterStringData(Searchvalue, SearchValue);
          DriverOperations.clickWhenElementIsClickable(SaveSearchButton);
          DriverOperations.clearFieldAndEnterStringData(SearchName, searchName);
          DriverOperations.clickWhenElementIsClickable(SaveSearch);
          Thread.sleep(3000);
      }
  
  }
  </code></pre>
  
  <p>In a same way there are <code>SmartRetentionPageTest.java</code> and <code>SmartRetentionPage.java</code> classes. Below is the <code>testng.xml</code> file.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" &gt;
  
  &lt;suite name="Smoke testSuite" &gt;
      &lt;test name="Smoke test" &gt; 
  
          &lt;groups&gt;
  
              &lt;run&gt;
  
                  &lt;include name="SmartRetrieve" /&gt;
                  &lt;include name="SmartRetention" /&gt; 
              &lt;/run&gt;
          &lt;/groups&gt;
  
          &lt;classes&gt;
  
              &lt;class name="tests.SmartRetrievePageTest" /&gt;
              &lt;class name="tests.SmartRetentionPageTest" /&gt; 
          &lt;/classes&gt;
  
      &lt;/test&gt;
  &lt;/suite&gt;
  </code></pre>