Class TestAnnotations

java.lang.Object
net.serenitybdd.annotations.TestAnnotations

public class TestAnnotations extends Object
Utility class used to help process annotations on tests and test steps.
  • Method Details

    • forClass

      public static TestAnnotations forClass(Class<?> testClass)
    • getAnnotatedTitleForMethod

      public Optional<String> getAnnotatedTitleForMethod(String methodName)
    • isPending

      public boolean isPending(String methodName)
    • isPending

      public static boolean isPending(Method method)
    • isIgnored

      public static boolean isIgnored(Method method)
    • shouldSkipNested

      public static boolean shouldSkipNested(Method method)
    • isAnExampleStep

      public static boolean isAnExampleStep(Method method)
    • isIgnored

      public boolean isIgnored(String methodName)
    • getAnnotatedIssuesForMethodTitle

      public List<String> getAnnotatedIssuesForMethodTitle(String methodName)
      Return a list of the issues mentioned in the title annotation of this method.
    • getAnnotatedIssueForMethod

      public Optional<String> getAnnotatedIssueForMethod(String methodName)
      Return a list of the issues mentioned in the Issue annotation of this method.
      Parameters:
      methodName - the name of the test method in the Java test class, if applicable. returns
    • getAnnotatedVersionForMethod

      public Optional<String> getAnnotatedVersionForMethod(String methodName)
    • getAnnotatedIssuesForMethod

      public String[] getAnnotatedIssuesForMethod(String methodName)
    • getAnnotatedIssueForTestCase

      public String getAnnotatedIssueForTestCase(Class<?> testCase)
    • getAnnotatedVersionForTestCase

      public String getAnnotatedVersionForTestCase(Class<?> testCase)
    • getAnnotatedIssuesForTestCase

      public String[] getAnnotatedIssuesForTestCase(Class<?> testCase)
    • getIssuesForMethod

      public List<String> getIssuesForMethod(String methodName)
    • getTagsForMethod

      public List<TestTag> getTagsForMethod(String methodName)
    • getTagsForMethod

      public static List<TestTag> getTagsForMethod(Method method)
    • getClassTags

      public List<TestTag> getClassTags()
    • getAllTags

      public List<TestTag> getAllTags()
    • addTag

      public static void addTag(List<TestTag> tags, WithTag tagAnnotation)
    • addTags

      public static void addTags(List<TestTag> tags, WithTags tagSet)
    • addTagValues

      public static void addTagValues(List<TestTag> tags, WithTagValuesOf tagSet)
    • convertToTestTag

      public static TestTag convertToTestTag(WithTag withTag)
    • getTestMethodNames

      public List<String> getTestMethodNames()