Class ApplicationFeature

java.lang.Object
net.thucydides.core.model.features.ApplicationFeature

public class ApplicationFeature extends Object
A feature represents a higher-level functionality that is illustrated by several user stories. This class is used to represent a feature in the test outcomes and reports. This class refers to an underlying class, the featureClass, which refers to the class used by the API user to define the feature and the nested user stories, e.g.
     
         @Feature
         public class MyFeature {
             public class MyUserStory1() {}
             public class MyUserStory2() {}
         }
     
 
These classes are then used in the test cases and easyb stories to refer to the tested user stories, e.g.
     
         @Test
         @TestsStory(MyUserStory1.class)
         public void should_do_this() {...}
     
 
  • Constructor Details

    • ApplicationFeature

      public ApplicationFeature(String id, String name)
    • ApplicationFeature

      protected ApplicationFeature(Class<?> featureClass)
  • Method Details

    • getName

      public String getName()
    • from

      public static ApplicationFeature from(Class<?> featureClass)
      Obtain an application feature instance from a given feature class. Feature instances are used for recording and reporting test results.
    • getId

      public String getId()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object