title: Nested tests in TestNG
body: <p>In TestNG I have a parameterized <em>Test A</em> which automatically creates <em>n</em> tests from a <code>dataProvider</code>, and a <em>Test B</em> which should be executed each time a test in A finishes as I want to take advantage of the result obtained in A. In other words, I would like to know is it's possible to have the following:</p>
  
  <p>Given a parameterized <code>@Test A(dataProvider = "inputList")</code> and a <code>@Test B</code>, TestNG would create the following unit tests and execute them in the following order:</p>
  
  <pre><code>Test A1
  Test B1 (Based on A1 result)
  Test A2
  Test B2 (Based on B2 result)
  ...
  
  Test An
  Test Bn (Based on An result)
  </code></pre>
  
  <p>Is it possible with any existing TestNG tag? I know I could treat <code>@Test B</code> as an <code>@After</code> but this wouldn't be understood for TestNG as a test and I need Test B to be seen as a test for later reports.</p>