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 |
Members
description
Get the Test's description.
description
Set the Test's description.
hasDeprecatedE2EOperators
Returns true if at least one of the interactions have operator ">", ">=", "<" and "<="
hasDeprecatedOperators
Returns true if at least one of the interactions have operator "==" or "=~"
hasExit
Indicates if this test uses exit
hasGoto
Indicates if this test uses goto
index
Get the Test's index.
index
Set the Test's index.
interactions
Get the Test's interactions.
only
If set to true this will be the only test to run.
skip
If set to true this test will be skipped
tags
Get the Test's tags.
tags
Set the Test's tags.
testSuite
Returns the complete test suite
Methods
toDTO() → {object}
Returns a non-circular DTO version of this Test
Returns:
a DTO including the description and interactions
- Type
- object
toYamlObject() → {object}
Returns the test as a yaml object
{ name: string, interaction:s object[]}
Returns:
- Type
- object
validate() → {boolean}
Make sure all any goto statements work
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