Package testUtils

Class RetryAnalyzer

java.lang.Object
testUtils.RetryAnalyzer
All Implemented Interfaces:
org.testng.IRetryAnalyzer

public class RetryAnalyzer extends Object implements org.testng.IRetryAnalyzer
TestNG retry analyzer that retries a test if the HTTP status code is 429 (Too Many Requests). Retries up to a maximum number of times to handle rate limiting scenarios in API testing.
  • Constructor Details

    • RetryAnalyzer

      public RetryAnalyzer()
  • Method Details

    • retry

      public boolean retry(org.testng.ITestResult result)
      Determines whether the test should be retried based on the status code. Retries if the status code is 429 and the maximum retry count has not been reached.
      Specified by:
      retry in interface org.testng.IRetryAnalyzer
      Parameters:
      result - the test result
      Returns:
      true if the test should be retried, false otherwise