Class Feature

java.lang.Object
net.masterthought.cucumber.json.Feature
All Implemented Interfaces:
Durationable, Reportable

public class Feature extends Object implements Reportable, Durationable
  • Constructor Details

    • Feature

      public Feature()
  • Method Details

    • getId

      public String getId()
    • getUri

      public String getUri()
    • addElements

      public void addElements(Element[] newElements)
    • getElements

      public Element[] getElements()
    • getReportFileName

      public String getReportFileName()
    • getQualifier

      public String getQualifier()
    • setQualifier

      public void setQualifier(String qualifier)
      Parameters:
      qualifier - name of the JSON file with report, used for parallel testing
    • getTags

      public Tag[] getTags()
    • getStatus

      public Status getStatus()
      Specified by:
      getStatus in interface Reportable
      Returns:
      status for this element.
    • getName

      public String getName()
      Specified by:
      getName in interface Reportable
      Returns:
      name of the element that will be displayed to user.
    • getKeyword

      public String getKeyword()
    • getLine

      public Integer getLine()
    • getDescription

      public String getDescription()
    • getFeatures

      public int getFeatures()
      Specified by:
      getFeatures in interface Reportable
      Returns:
      number of features for this element.
    • getPassedFeatures

      public int getPassedFeatures()
      Specified by:
      getPassedFeatures in interface Reportable
      Returns:
      number of passed features for this element.
    • getFailedFeatures

      public int getFailedFeatures()
      Specified by:
      getFailedFeatures in interface Reportable
      Returns:
      number of failed features for this element.
    • getScenarios

      public int getScenarios()
      Specified by:
      getScenarios in interface Reportable
      Returns:
      number of scenarios for this element.
    • getSteps

      public int getSteps()
      Specified by:
      getSteps in interface Reportable
      Returns:
      number of all steps for this element.
    • getPassedSteps

      public int getPassedSteps()
      Specified by:
      getPassedSteps in interface Reportable
      Returns:
      number of passed steps for this element.
    • getFailedSteps

      public int getFailedSteps()
      Specified by:
      getFailedSteps in interface Reportable
      Returns:
      number of failed steps for this element.
    • getPendingSteps

      public int getPendingSteps()
      Specified by:
      getPendingSteps in interface Reportable
      Returns:
      number of pending steps for this element.
    • getSkippedSteps

      public int getSkippedSteps()
      Specified by:
      getSkippedSteps in interface Reportable
      Returns:
      number of skipped steps for this element.
    • getUndefinedSteps

      public int getUndefinedSteps()
      Specified by:
      getUndefinedSteps in interface Reportable
      Returns:
      number of undefined steps for this element.
    • getDuration

      public long getDuration()
      Description copied from interface: Durationable
      Returns duration for given item.
      Specified by:
      getDuration in interface Durationable
      Specified by:
      getDuration in interface Reportable
      Returns:
      duration as milliseconds for this element.
    • getFormattedDuration

      public String getFormattedDuration()
      Description copied from interface: Durationable
      Returns duration displayed in humanable format.
      Specified by:
      getFormattedDuration in interface Durationable
      Specified by:
      getFormattedDuration in interface Reportable
      Returns:
      formatted duration for this element.
    • getPassedScenarios

      public int getPassedScenarios()
      Specified by:
      getPassedScenarios in interface Reportable
      Returns:
      number of passed scenarios for this element.
    • getFailedScenarios

      public int getFailedScenarios()
      Specified by:
      getFailedScenarios in interface Reportable
      Returns:
      number of failed scenarios for this element.
    • setMetaData

      public void setMetaData(int jsonFileNo, Configuration configuration)
      Sets additional information and calculates values which should be calculated during object creation.
      Parameters:
      jsonFileNo - index of the JSON file
      configuration - configuration for the report