title: TestNG with 2 Testcase with data provider
body: <p>I have question about TestNG. I have some dataset for testing, but I want to execute full cycle of test per data in the dataset. How can I do that?</p>
  
  <p>This is my Code</p>
  
  <pre><code>@DataProvider(name = "login")
  public static Object[][] usernamePassword() {
      // username, password, isSukses
      return new Object[][] { 
          { "coin", "coin123", true }, 
          { "coin", "coin", false },
          { "username", "password", false } };
  }
  
   @Test(description = "Fill the Login Details", priority = 2)
  public void FillLoginDetails(String user, String pass, boolean isSuccess) throws Exception {
  
      try {
          // Get the username element
          WebElement username = driver.findElement(By.id("uid"));
          username.sendKeys(user);
  
          // Get the password element
          WebElement password = driver.findElement(By.id("pwd"));
          password.sendKeys(pass);
  
          Thread.sleep(1000);
  
          TestNGResults.put("3", new Object[] { 2d, "Fill Login form data (Username/Password)",
                  "Login details gets filled", "Pass" });
  
      } catch (Exception e) {
          TestNGResults.put("3",
                  new Object[] { 2d, "Fill Login form data (Username/Password)", "Login form gets filled", "Fail" });
          Assert.assertTrue(false);
      }
  }
  
  @Test(description = "Perform Login", priority = 3)
  public void doLogin() throws Exception {
  
      try {
          // Click on the Login button
          WebElement login = driver.findElement(By.id("login-button"));
          login.click();
  
          Thread.sleep(1000);
          // Assert the user login by checking the Online user
          WebElement onlineuser = driver.findElement(By.cssSelector("h3.paddedleft &gt; strong.ng-binding"));
          AssertJUnit.assertEquals("Welcome, " + "coin", onlineuser.getText());
          TestNGResults.put("4",
                  new Object[] { 3d, "Click Login and verify welcome message", "Login success", "Pass" });
      } catch (Exception e) {
          TestNGResults.put("4",
                  new Object[] { 3d, "Click Login and verify welcome message", "Login success", "Fail" });
          Assert.assertTrue(false);
      }
  }
  </code></pre>
  
  <p>how can test like this,</p>
  
  <blockquote>
    <p>Test priority 2 ( data 1 ),</p>
    
    <p>Test priority 3 ( data 1 ), </p>
    
    <hr>
    
    <p>Test priority 2 ( data 2 ),</p>
    
    <p>Test priority 3 ( data 2 ),</p>
    
    <hr>
    
    <p>Test priority 2 ( data 3 ),</p>
    
    <p>Test priority 3 ( data 3 ),</p>
  </blockquote>
  
  <p>???</p>