title: TestNG: How to execute several test methods in order with data supplied from DataProvider
body: <p>Is there a way to execute several test methods in order using different data from the data provider?</p>
  
  <p>e.g.</p>
  
  <pre><code>@DataProvider(name = "test1")
  public Object[][] createData1() {
      return new Object[][] {
          { "Cedric", new Integer(36) },
          { "Anne", new Integer(37)}, 
      };
  }
  
  
  @Test(dataProvider = "test1")
  public void verifyData1(String n1, Integer n2) {
      System.out.println(n1 + " " + n2);
  }
  
  @Test
  public void verifyData2() {
      System.out.println("Verify2");
  }
  </code></pre>
  
  <p>And the output of running this would be<br>
  Cedric 36<br>
  Verify2<br>
  Anne 37<br>
  Verify2<br></p>