Class Step
- java.lang.Object
-
- com.trivago.cluecumber.engine.json.pojo.ResultMatch
-
- com.trivago.cluecumber.engine.json.pojo.Step
-
public class Step extends ResultMatch
A Cucumber step.
-
-
Constructor Summary
Constructors Constructor Description Step()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)Comparison function for steps.List<ResultMatch>getAfter()Get the after hooks.List<ResultMatch>getBefore()Get the before hooks.DocStringgetDocString()Get the step's doc string.StringgetKeyword()Get the step keyword (Given, When, Then etc.).intgetLine()Get the line number where this step is located.StringgetName()Get the step name.List<Row>getRows()Get the data table rows.longgetTotalDuration()Get the step's total duration.StringgetUrlFriendlyName()Get the hash of this step in a format that can be used within a URL.inthashCode()Return the step hash.booleanhasHooksWithContent()Check if there are before or after step hooks with content.StringreturnNameWithArgumentPlaceholders()Get the step name with curly braces instead of concrete arguments.StringreturnNameWithArguments()Get an HTML representation of the step name with highlighted argument values.StringreturnTotalDurationString()Get the step's total duration as a human-readable string.voidsetAfter(List<ResultMatch> after)Set the after hooks.voidsetBefore(List<ResultMatch> before)Set the before hooks.voidsetDocString(DocString docString)Set the step's doc string.voidsetKeyword(String keyword)Set the step keyword (Given, When, Then etc.).voidsetLine(int line)Set the line number where this step is located.voidsetName(String name)Set the step name.voidsetRows(List<Row> rows)Set the data table rows.-
Methods inherited from class com.trivago.cluecumber.engine.json.pojo.ResultMatch
getArguments, getConsolidatedStatus, getConsolidatedStatusString, getEmbeddings, getGlueMethodName, getMatch, getOutput, getResult, getStatus, getStatusString, hasContent, hasEmbeddings, hasOutputs, isFailed, isPassed, isSkipped, setEmbeddings, setMatch, setOutput, setResult
-
-
-
-
Method Detail
-
hasHooksWithContent
public boolean hasHooksWithContent()
Check if there are before or after step hooks with content.- Returns:
- true if step hooks with content exist.
-
getBefore
public List<ResultMatch> getBefore()
Get the before hooks.- Returns:
- The list of
ResultMatchinstances.
-
setBefore
public void setBefore(List<ResultMatch> before)
Set the before hooks.- Parameters:
before- The list ofResultMatchinstances.
-
getLine
public int getLine()
Get the line number where this step is located.- Returns:
- The line number.
-
setLine
public void setLine(int line)
Set the line number where this step is located.- Parameters:
line- The line number.
-
getName
public String getName()
Get the step name.- Returns:
- The name.
-
setName
public void setName(String name)
Set the step name.- Parameters:
name- The name.
-
returnNameWithArguments
public String returnNameWithArguments()
Get an HTML representation of the step name with highlighted argument values.- Returns:
- The step name with highlighted arguments.
-
returnNameWithArgumentPlaceholders
public String returnNameWithArgumentPlaceholders()
Get the step name with curly braces instead of concrete arguments. This is used for the step overview and scenarios by step page.- Returns:
- The scenario name with empty arguments.
-
getKeyword
public String getKeyword()
Get the step keyword (Given, When, Then etc.).- Returns:
- The keyword.
-
setKeyword
public void setKeyword(String keyword)
Set the step keyword (Given, When, Then etc.).- Parameters:
keyword- The keyword.
-
setRows
public void setRows(List<Row> rows)
Set the data table rows.- Parameters:
rows- The list ofRowinstances.
-
getAfter
public List<ResultMatch> getAfter()
Get the after hooks.- Returns:
- The list of
ResultMatchinstances.
-
setAfter
public void setAfter(List<ResultMatch> after)
Set the after hooks.- Parameters:
after- The list ofResultMatchinstances.
-
getDocString
public DocString getDocString()
Get the step's doc string.- Returns:
- The
DocStringinstance.
-
setDocString
public void setDocString(DocString docString)
Set the step's doc string.- Parameters:
docString- TheDocStringinstance.
-
getTotalDuration
public long getTotalDuration()
Get the step's total duration.- Returns:
- The duration in nanoseconds.
-
returnTotalDurationString
public String returnTotalDurationString()
Get the step's total duration as a human-readable string.- Returns:
- The duration string.
-
getUrlFriendlyName
public String getUrlFriendlyName()
Get the hash of this step in a format that can be used within a URL.- Returns:
- The URL friendly step hash.
-
equals
public boolean equals(Object o)
Comparison function for steps.
-
-