hare v0.2.2 Hare.Context.Result
This module defines the Hare.Context.Result
that represents the result
of a ran set of steps.
It contains the following fields:
steps
- A list of maps that represent the result of each stepexports
- The data exported by the context
Steps
The steps field keeps information about all steps in inverse order. The steps/1
function is provided to return them in the proper order.
Each step may have one of the following formats:
- On success:
%{status: :success, config: step_config, info: info}
- On failure:
%{status: :failure, config: step_config, reason: reason}
- When not run:
%{status: :not_done, config: step_config}
Summary
Types
The possible formats of a step depending on whether it succeeded, failed or was not run
A list of pairs {module, result} representing a step
Functions
Adds a failure step to the given result
Creates a new empty result
Adds a not_done step to the given result
Returns the step results in the order they ran in
Adds a success step to the given result, and updates exports
Types
step_result :: %{status: :success, config: config, info: info} | %{status: :failure, config: config, reason: reason :: term} | %{status: :not_done, config: config}
The possible formats of a step depending on whether it succeeded, failed or was not run.
A list of pairs {module, result} representing a step.
Functions
Adds a failure step to the given result.
Creates a new empty result.
Adds a not_done step to the given result.