Package org.junit

Annotation Type RepeatedTest


  • @Target({ANNOTATION_TYPE,METHOD})
    @Retention(RUNTIME)
    public @interface RepeatedTest
    @RepeatedTest is used to signal that the annotated method is a test template method that should be repeated a specified number of times.

    Each invocation of the repeated test behaves like the execution of a regular @Test method with full support for the same lifecycle callbacks and extensions.

    @RepeatedTest methods must not be private or static and must return void.

    @RepeatedTest may also be used as a meta-annotation in order to create a custom composed annotation that inherits the semantics of @RepeatedTest.

    Since:
    5.0
    See Also:
    Test
    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      int value
      The number of repetitions.
    • Element Detail

      • value

        int value
        The number of repetitions.
        Returns:
        the number of repetitions; must be greater than zero