Class ExecutionResult

java.lang.Object
org.opentestfactory.messages.OTFMessage
org.opentestfactory.messages.WorkflowEvent
org.opentestfactory.messages.AbstractExecutionEvent
org.opentestfactory.messages.ExecutionResult
org.opentestfactory.dto.v1.ExecutionResult
All Implemented Interfaces:
EventDtoBase

public class ExecutionResult extends org.opentestfactory.messages.ExecutionResult implements EventDtoBase
Author:
lpoma
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     
    static class 
     
    static class 
    Technical class to facilitate the mapping between a step and the number of ExecutionResult it has generated during its lifecycle
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     

    Fields inherited from class org.opentestfactory.messages.ExecutionResult

    EXECUTION_RESULT_KIND

    Fields inherited from class org.opentestfactory.messages.AbstractExecutionEvent

    JOB_COMPLETED_ID_SEQUENCE, JOB_STARTED_ID_SEQUENCE, STEP_ID_KEY, STEP_SEQUENCE_ID_KEY

    Fields inherited from class org.opentestfactory.messages.WorkflowEvent

    JOB_ORIGIN_KEY

    Fields inherited from class org.opentestfactory.messages.OTFMessage

    apiVersion, NAME_KEY, WORKFLOW_ID_KEY
  • Constructor Summary

    Constructors
    Constructor
    Description
    ExecutionResult(String apiVersion, @Nullable List<String> attachments, @Nullable Long status, @Nullable List<String> logs, String kind)
     
    ExecutionResult(String apiVersion, List<String> attachments, Long status, List<String> logs)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    Return a properly designed data structure for handling attachments...
    getNbResult(String stepUuid)
    Calculate the total number of results generated from the step uuid provided.
    Shortcut to get optional metadata step_origin_status.

    Methods inherited from class org.opentestfactory.messages.ExecutionResult

    getAttachments, logs, status, stepOrigin, toString

    Methods inherited from class org.opentestfactory.messages.AbstractExecutionEvent

    isJobCompletedEvent, isJobStartedEvent, isStandardExecutionEvent, stepId, stepSequenceId

    Methods inherited from class org.opentestfactory.messages.WorkflowEvent

    jobId, jobOrigin, name, workflowId

    Methods inherited from class org.opentestfactory.messages.OTFMessage

    addMetadata, checkKind, equals, getApiVersion, getKind, getMetadata, hashCode, setApiVersion, setMetadata

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface EventDtoBase

    checkKind
  • Field Details

  • Constructor Details

  • Method Details

    • attachmentDetails

      public ExecutionResult.Attachments attachmentDetails()
      Return a properly designed data structure for handling attachments... The json message is poorly designed, and thus we need to transform attachment data to protect our code from the weird json schema.
      Returns:
      The attachment as a collection. Nothing fancy, just a simple collection of dedicated object with some useful methods.
    • stepOriginStatus

      public List<ExecutionResult.StepStatusDTO> stepOriginStatus()
      Shortcut to get optional metadata step_origin_status. Reserved for end-step and end-job events.
    • getNbResult

      public Integer getNbResult(String stepUuid)
      Calculate the total number of results generated from the step uuid provided. Used to know how many ExecutionResult are expected by a publisher module before trying to parse their attachments/test reports.
      Parameters:
      stepUuid -
      Returns:
      the total number of ExecutionResult linked to the step whose uuid is provided. Returns null if the expected number is not yet known (the number of executed commands may change as a result of conditional step execution in the workflow).
    • addAttachment

      public void addAttachment(ExecutionResult.Attachment attachment)