Annotation Interface RepeatUntilFailure


@Target({TYPE,METHOD}) @Retention(RUNTIME) public @interface RepeatUntilFailure
Annotation to specify that a test or a test class will be ran until it fails or the max number of tries is reached.

You should not use this except when you try to debug a test that sometimes fails... This allows you to run it multiple times to trigger the error.

Also, this may be obvious, but notice that the code annotated with this will be ran more than once! Make sure this code does support it and doesn't have unwanted side effects.

  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    int
    The maximum number of loops.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    int
    Sleep time in milliseconds between two loops.
  • Element Details

    • value

      int value
      The maximum number of loops.
    • sleep

      int sleep
      Sleep time in milliseconds between two loops.

      Defaults: no sleep.

      Default:
      0