Class RetryRunner

java.lang.Object
org.junit.runner.Runner
org.junit.runners.ParentRunner
org.junit.runners.BlockJUnit4ClassRunner
com.itextpdf.test.runners.RetryRunner
All Implemented Interfaces:
org.junit.runner.Describable, org.junit.runner.manipulation.Filterable, org.junit.runner.manipulation.Orderable, org.junit.runner.manipulation.Sortable

public class RetryRunner extends org.junit.runners.BlockJUnit4ClassRunner
This class is used for flaky test retry after failure. In current implementation we use specified retryCount = 3
  • Constructor Summary

    Constructors
    Constructor
    Description
    RetryRunner(Class klass)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    run(org.junit.runner.notification.RunNotifier notifier)
     
    protected void
    runChild(org.junit.runners.model.FrameworkMethod method, org.junit.runner.notification.RunNotifier notifier)
     
    protected final void
    runTestUnit(org.junit.runners.model.Statement statement, org.junit.runner.Description description, org.junit.runner.notification.RunNotifier notifier)
    Runs an atomic test

    Methods inherited from class org.junit.runners.BlockJUnit4ClassRunner

    collectInitializationErrors, computeTestMethods, createTest, createTest, describeChild, getChildren, getTestRules, isIgnored, methodBlock, methodInvoker, possiblyExpectingExceptions, rules, testName, validateConstructor, validateFields, validateInstanceMethods, validateNoNonStaticInnerClass, validateOnlyOneConstructor, validateTestMethods, validateZeroArgConstructor, withAfters, withBefores, withPotentialTimeout

    Methods inherited from class org.junit.runners.ParentRunner

    childrenInvoker, classBlock, classRules, createTestClass, filter, getDescription, getName, getRunnerAnnotations, getTestClass, order, runLeaf, setScheduler, sort, validatePublicVoidNoArgMethods, withAfterClasses, withBeforeClasses, withInterruptIsolation

    Methods inherited from class org.junit.runner.Runner

    testCount

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • RetryRunner

      public RetryRunner (Class klass) throws org.junit.runners.model.InitializationError
      Throws:
      org.junit.runners.model.InitializationError
  • Method Details

    • run

      public void run (org.junit.runner.notification.RunNotifier notifier)
      Overrides:
      run in class org.junit.runners.ParentRunner
      Parameters:
      notifier - RunNotifier
    • runChild

      protected void runChild (org.junit.runners.model.FrameworkMethod method, org.junit.runner.notification.RunNotifier notifier)
      Overrides:
      runChild in class org.junit.runners.BlockJUnit4ClassRunner
      Parameters:
      method - FrameworkMethod
      notifier - RunNotifier
    • runTestUnit

      protected final void runTestUnit (org.junit.runners.model.Statement statement, org.junit.runner.Description description, org.junit.runner.notification.RunNotifier notifier)
      Runs an atomic test
      Parameters:
      statement - Statement
      description - Description
      notifier - RunNotifier