Class AnnotationUtils

java.lang.Object
io.qameta.allure.util.AnnotationUtils

public final class AnnotationUtils extends Object
Collection of utils used by Allure integration to extract meta information from test cases via reflection.
  • Method Details

    • isFlaky

      public static boolean isFlaky(AnnotatedElement annotatedElement)
      Returns true if Flaky annotation is present.
      Parameters:
      annotatedElement - the element to search annotations on.
      Returns:
      true if Flaky annotation is present, false otherwise.
    • isMuted

      public static boolean isMuted(AnnotatedElement annotatedElement)
      Returns true if Muted annotation is present.
      Parameters:
      annotatedElement - the element to search annotations on.
      Returns:
      true if Muted annotation is present, false otherwise.
    • getLinks

      public static Set<io.qameta.allure.model.Link> getLinks(AnnotatedElement annotatedElement)
      Returns links created from Allure meta annotations specified on annotated element.
      Parameters:
      annotatedElement - the element to search annotations on.
      Returns:
      discovered links.
    • getLinks

      public static Set<io.qameta.allure.model.Link> getLinks(Annotation... annotations)
      Shortcut for getLinks(Collection).
      Parameters:
      annotations - annotations to analyse.
      Returns:
      discovered links.
    • getLinks

      public static Set<io.qameta.allure.model.Link> getLinks(Collection<Annotation> annotations)
      Returns links from given annotations.
      Parameters:
      annotations - annotations to analyse.
      Returns:
      discovered links.
    • getLabels

      public static Set<io.qameta.allure.model.Label> getLabels(AnnotatedElement annotatedElement)
      Returns labels created from Allure meta annotations specified on annotated element. Shortcut for getLinks(Annotation...)
      Parameters:
      annotatedElement - the element to search annotations on.
      Returns:
      discovered labels.
    • getLabels

      public static Set<io.qameta.allure.model.Label> getLabels(Annotation... annotations)
      Shortcut for getLabels(Collection).
      Parameters:
      annotations - annotations to analyse.
      Returns:
      discovered labels.
    • getLabels

      public static Set<io.qameta.allure.model.Label> getLabels(Collection<Annotation> annotations)
      Returns labels from given annotations.
      Parameters:
      annotations - annotations to analyse.
      Returns:
      discovered labels.