Annotation Type DisabledUntil


  • @Retention(RUNTIME)
    @Target({METHOD,TYPE})
    @Inherited
    @ExtendWith(DisabledUntilExtension.class)
    public @interface DisabledUntil
    @DisabledUntil is a JUnit Jupiter extension to mark tests that shouldn't be executed until a given date, essentially disabling a test temporarily. The date is given as an ISO 8601 string.

    It may optionally be declared with a reason to document why the annotated test class or test method is disabled.

    @DisabledUntil can be used on the method and class level. It can only be used once per method or class, but is inherited from higher-level containers.

    WARNING: Applying @DisabledUntil can make the test suite non-reproducible. If a failing test is disabled during a build that then passes, rerunning that build after the "until" date would fail. A report entry is issued for every test that is disabled until a certain date.

    Since:
    1.6.0
    See Also:
    Disabled
    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      java.lang.String date
      The date until which this annotated test class or test method should be disabled as an ISO 8601 string in the format yyyy-MM-dd, e.g.
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      java.lang.String reason
      The reason this annotated test class or test method is disabled.
    • Element Detail

      • date

        java.lang.String date
        The date until which this annotated test class or test method should be disabled as an ISO 8601 string in the format yyyy-MM-dd, e.g. 2023-05-28. The test will be disabled if that date is in the future, as in not today nor any day in the past.
      • reason

        java.lang.String reason
        The reason this annotated test class or test method is disabled.
        Default:
        ""