Class StepResult

java.lang.Object
io.karatelabs.core.StepResult

public class StepResult extends Object
  • Method Details

    • passed

      public static StepResult passed(Step step, long startTime, long durationNanos)
    • failed

      public static StepResult failed(Step step, long startTime, long durationNanos, Throwable error)
    • skipped

      public static StepResult skipped(Step step, long startTime)
    • fakeSuccess

      public static StepResult fakeSuccess(String message, long startTime)
      Create a fake success step result (for @fail tag handling).
    • fakeFailure

      public static StepResult fakeFailure(String message, long startTime, Throwable error)
      Create a fake failure step result (for @fail tag handling).
    • getStep

      public Step getStep()
    • getStatus

      public StepResult.Status getStatus()
    • getStartTime

      public long getStartTime()
    • getDurationNanos

      public long getDurationNanos()
    • getDurationMillis

      public double getDurationMillis()
    • getError

      public Throwable getError()
    • getLog

      public String getLog()
    • setLog

      public void setLog(String log)
    • appendLog

      public void appendLog(String message)
    • getEmbeds

      public List<StepResult.Embed> getEmbeds()
    • addEmbed

      public void addEmbed(StepResult.Embed embed)
    • getCallResults

      public List<FeatureResult> getCallResults()
    • setCallResults

      public void setCallResults(List<FeatureResult> callResults)
    • hasCallResults

      public boolean hasCallResults()
    • isPassed

      public boolean isPassed()
    • isFailed

      public boolean isFailed()
    • isSkipped

      public boolean isSkipped()
    • getErrorMessage

      public String getErrorMessage()
    • toJson

      public Map<String,Object> toJson()
      Convert to JSON format (V1 nested structure). Uses nested `step` and `result` objects for V1 compatibility.