Class: InteractionResult

InteractionResult(interaction, assertion, error, errorOnProcess, timestamp)

Represents the result for a single interaction

Constructor

new InteractionResult(interaction, assertion, error, errorOnProcess, timestamp)

Parameters:
Name Type Description
interaction TestInteraction The interaction that generated these results
assertion Assertion The evaluated assertion
error Error | string the possible error
errorOnProcess boolean indicates if there was an external error while processing the interaction
timestamp Date the timestamp of when the interaction was processed
Source:

Members

assertion

returns the evaluated assertion
Source:

error

returns a generated Error object from the assertion if the interaction failed
Source:

errorMessage

returns the error message to print for the user
Source:

errorOnProcess

returns an error generated unrelated to the assertion if the interaction throws an exception during the process
Source:

errors

Get errors in case we are dealing with multiple errors per Interaction
Source:

exited

returns true if this assertion have the exit command
Source:

goto

returns true if this assertion have a goto
Source:

interaction

returns the interaction that generated this result
Source:

passed

returns true if this interaction has its assertion passed correctly
Source:

rawResponse

returns the raw response that was evaluated during the interaction
Source:

timestamp

returns the timestamp of when this interaction was executed
Source:

Methods

addError(error)

Add errors in case we are dealing with multiple errors per Interaction
Parameters:
Name Type Description
error string The error message added
Source:

toDTO() → {object}

returns a non circular DTO version of the interaction object
Source:
Returns:
Type
object