Class Story

java.lang.Object
net.thucydides.core.model.Story

public class Story extends Object
Represents a given user story or feature. Used to record test results and so on.
  • Constructor Details

  • Method Details

    • getId

      public String getId()
    • from

      public static Story from(Class<?> userStoryClass)
      Obtain a story instance from a given story class. Story instances are used for recording and reporting test results.
    • withId

      public static Story withId(String storyId, String storyName)
      Create a story using a full class name as an id. Note that the class may no longer exist, so the story needs to be able to exist beyond the life of the original story class. This is used to deserialize stories from XML files.
    • withNarrative

      public Story withNarrative(String narrative)
    • withType

      public Story withType(String type)
    • withIdAndPath

      public static Story withIdAndPath(String storyId, String storyName, String storyPath)
    • called

      public static Story called(String storyName)
    • withId

      public static Story withId(String storyId, String storyName, String featureClassName, String featureName)
    • withIdAndPathAndFeature

      public static Story withIdAndPathAndFeature(String storyId, String storyName, String storyPath, String featureClassName, String featureName)
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getFeatureClass

      public static Class<?> getFeatureClass(Class<?> userStoryClass)
      What feature does this story belong to?
    • testedInTestCase

      public static Class<?> testedInTestCase(Class<?> testClass)
      Returns the class representing the story that is tested by a given test class This is indicated by the Story annotation.
    • getName

      public String getName()
      Each story has a descriptive name. This name is usually a human-readable version of the class name, or the story name for an easyb story.
    • getDisplayName

      public String getDisplayName()
    • getStoryClassName

      public String getStoryClassName()
    • getReportName

      public String getReportName(ReportType type)
      Find the name of the report for this story for the specified report type (XML, HTML,...).
    • getReportName

      public String getReportName()
    • getFeature

      public ApplicationFeature getFeature()
    • getPath

      public String getPath()
    • getStoryName

      public String getStoryName()
    • getNarrative

      public String getNarrative()
    • getNarrativeSummary

      public String getNarrativeSummary()
    • getType

      public String getType()
    • withPath

      public Story withPath(String path)
    • asFeature

      public Story asFeature()
    • asTag

      public TestTag asTag()
    • asQualifiedTag

      public TestTag asQualifiedTag()