title: How to run parallel Test case in Selenium + TestNG
body: <p>I have a test script as follows, what I need to know is how I can make it to run in different browser at same time but with different test data,</p>
  
  <p>Exactly what I want is I want parallel instance of Test Case one in Firefox and other in Internet Explorer, but again I want to use different data for it</p>
  
  <p>Eg:
  -Firefox with 'username1'  and 'password1'</p>
  
  <p>-Internet Explorer 'username2'  and 'password2'</p>
  
  <p>it is like logging into GMAIL with different usernames and password parallel in different browser but not in sequence.</p>
  
  <p><em><strong>Test Case :</em></strong></p>
  
  <pre><code>public class Gmail 
  {
      private WebDriver driver;
  
      @BeforeClass
      public void setup()
      {
          driver = new FirefoxDriver();
          driver.get("http://www.gmail.com");
      }
  
      @Test
      public void search()
      {
          WebElement element = driver.findElement(By.name("username"));
          element.sendKeys("username");
          WebElement element2 = driver.findElement(By.name("pass"));
          element2.sendKeys("password");
          element2.submit();
      }
  
      @Test
      public void compose()
      {
          driver.findElement(By.name("compose")).click();
      }
  
      @AfterClass
      public void exit()
      {
          driver.quit();
      }
  }
  </code></pre>
  
  <p>Please give your suggestion would help in my project.</p>