title: Make a TestNG test dependable on successfully finished test
body: <p>I am having some selenium TestNG tests written in Java, which are dependable on a first initial test, that registers a user into the tested platform and passes a tutorial, all other tests are using the login credentials from that initial test.</p>
  
  <p>So far so good, I am also using a retry logic (IRetryAnalyzer): <a href="https://www.swtestacademy.com/retry-failed-tests-testng-iretryanalyzer/" rel="nofollow noreferrer">https://www.swtestacademy.com/retry-failed-tests-testng-iretryanalyzer/</a>
  to retry my failed tests up to 4-5 times, because the host server sometimes yields errors at random points, which can not be fixed atm.</p>
  
  <p>If the initial (register) test fails the first 2 times, and passes on it's third execution, all further tests, which are dependable on it will fail with an exception: </p>
  
  <pre><code> "java.lang.Throwable: depends on not successfully finished methods in group..."
  </code></pre>
  
  <p>So the test results will look like this:</p>
  
  <p>Test A (Register) - failed.
  Test A (Register) - failed.
  Test A (Register) - passed.
  Test B (Dependable on A)- failed.
  Test C (Dependable on A) - failed.</p>
  
  <p>Tests B and C are failing, because Test A initially failed the first time, so it's somehow recorded as a fail.
  The question is - can the dependable tests be made in a way, that they only depend on the passed instance of Test A, or at least try to execute them despite of the fact, that Test A failed a couple of times.</p>
  
  <p>Note that using a priority parameter is not an option to consider in this scenario.
  Thanks.</p>