Class EpicFeatureStoryAnnotations

java.lang.Object
net.serenitybdd.annotations.EpicFeatureStoryAnnotations

public class EpicFeatureStoryAnnotations extends Object
Reads string-based Epic, Feature, and Story annotations from classes and methods, producing TestTag objects.
  • Method Details

    • tagsFromElement

      public static List<TestTag> tagsFromElement(AnnotatedElement element)
      Reads @Epic, @Feature (string-valued), and @Story (string-valued) from a single annotated element. Does not walk superclasses or declaring classes — use forClass(java.lang.Class<?>) or forMethod(java.lang.reflect.Method) for that.
    • forClass

      public static List<TestTag> forClass(Class<?> testClass)
      Reads annotations from the class, its superclass chain, and its enclosing class chain (up to but not including Object). This ensures annotations on outer classes are inherited by JUnit 5 @Nested inner classes.
    • forMethod

      public static List<TestTag> forMethod(Method method)
      Reads annotations from a method, then from its declaring class chain.