Class: Test

Test(suite, metadata, interactions)

Represent a single test

Constructor

new Test(suite, metadata, interactions)

Parameters:
Name Type Description
suite TestSuite The test suite that contains this test.
metadata string | object Metadata includes the description as a string or an object including the description property.
interactions array The interactions that form this test
Source:

Members

description

Get the Test's description.
Source:

description

Set the Test's description.
Source:

hasDeprecatedE2EOperators

Returns true if at least one of the interactions have operator ">", ">=", "<" and "<="
Source:

hasDeprecatedOperators

Returns true if at least one of the interactions have operator "==" or "=~"
Source:

hasExit

Indicates if this test uses exit
Source:

hasGoto

Indicates if this test uses goto
Source:

index

Get the Test's index.
Source:

index

Set the Test's index.
Source:

interactions

Get the Test's interactions.
Source:

only

If set to true this will be the only test to run.
Source:

skip

If set to true this test will be skipped
Source:

tags

Get the Test's tags.
Source:

tags

Set the Test's tags.
Source:

testSuite

Returns the complete test suite
Source:

Methods

toDTO() → {object}

Returns a non-circular DTO version of this Test
Source:
Returns:
a DTO including the description and interactions
Type
object

toYamlObject() → {object}

Returns the test as a yaml object { name: string, interaction:s object[]}
Source:
Returns:
Type
object

validate() → {boolean}

Make sure all any goto statements work
Source:
Throws:
Throws a Parser Error if any goto doesn't have a matching utterance
Type
ParserError
Returns:
Returns true if all goto have a matching utterance
Type
boolean