Class Scenario

java.lang.Object
io.karatelabs.gherkin.Scenario

public class Scenario extends Object
  • Constructor Details

  • Method Details

    • createError

      public static Scenario createError(Feature feature, String errorName, int line)
      Create a synthetic error scenario for error reporting when execution fails. Used when a feature fails before any scenario can be executed (e.g., dynamic expression evaluation failure).
      Parameters:
      feature - the feature that failed
      errorName - the name to use for the error scenario
      line - the line number
      Returns:
      a synthetic Scenario for error reporting
    • isEqualTo

      public boolean isEqualTo(Scenario other)
    • getNameAndDescription

      public String getNameAndDescription()
    • getRefIdAndName

      public String getRefIdAndName()
    • copy

      public Scenario copy(int exampleIndex)
    • replace

      public void replace(String token, String value)
    • getStepByLine

      public Step getStepByLine(int line)
    • getRefId

      public String getRefId()
    • getDebugInfo

      public String getDebugInfo()
    • getUniqueId

      public String getUniqueId()
    • getBackgroundSteps

      public List<Step> getBackgroundSteps()
    • getStepsIncludingBackground

      public List<Step> getStepsIncludingBackground()
    • getSection

      public FeatureSection getSection()
    • getFeature

      public Feature getFeature()
    • getLine

      public int getLine()
    • setLine

      public void setLine(int line)
    • getTags

      public List<Tag> getTags()
    • setTags

      public void setTags(List<Tag> tags)
    • getSelected

      public Boolean getSelected()
    • setSelected

      public void setSelected(Boolean selected)
    • getName

      public String getName()
    • setName

      public void setName(String name)
    • getDescription

      public String getDescription()
    • setDescription

      public void setDescription(String description)
    • getSteps

      public List<Step> getSteps()
    • setSteps

      public void setSteps(List<Step> steps)
    • isOutlineExample

      public boolean isOutlineExample()
    • isDynamic

      public boolean isDynamic()
    • getDynamicExpression

      public String getDynamicExpression()
    • setDynamicExpression

      public void setDynamicExpression(String dynamicExpression)
    • getExampleData

      public Map<String,Object> getExampleData()
    • setExampleData

      public void setExampleData(Map<String,Object> exampleData)
    • getExampleIndex

      public int getExampleIndex()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getUriToLineNumber

      public URI getUriToLineNumber()
    • isSetup

      public boolean isSetup()
    • isFail

      public boolean isFail()
    • getTagsEffective

      public List<Tag> getTagsEffective()
      Returns the effective tags for this scenario, including inherited feature-level tags. Feature tags are merged with scenario-level tags.
    • isIgnore

      public boolean isIgnore()
      Returns true if this scenario (or its feature) has the @ignore tag.