CloudTest Objects

Document created by Chris Sommerstad Employee on Jul 22, 2017Last modified by Dave Murphy on Jul 24, 2017
Version 4Show Document
  • View in full screen mode

Since scripts are used in the same context in Test Clips as any other element—and Test Clips are contained by Test compositions within Tracks—the resulting object model is fairly simple. The following objects are contained in the object model and can be accessed in scripts using the $context variable.

 

 

 

composition

Specifies the current composition. For example,

$context.composition.stop()

A test composition is the root element in the SOASTA CloudTest Object Model and may contain some or all of the remaining objects.

For more information, see Composition Object.

 

Properties:
name, parent, propertyList, systemPropertyList, type, children, index, nextItem, previousItem

Methods:
abort, stop, getChild, and getItemViaPath

 

currentBand

Specifies the current Band according to context. Null if there is no band. The band is a container for track, and as a result, everything else in the object model may be contained within a band. For example, $context.currentBand.getChild()

 

For more information, see Band, Track, Chain, Checkpoint, and Script Objects.

Properties:

 

name, parent, propertyList, systempropertyList, type, children, index, nextItem, previousItem, REPEAT_TIMING_PARALLEL, REPEAT_TIMING_SERIAL, REPEAT_TYPE_COUNT_CONSTANT, and REPEAT_DISTRIBUTION_CONSTANT

Methods:
getChild, getItemViaPath, clearRepeat, setRepeat

 

currentTrack

Specifies the current track according to context. A track may contain one or more clips, which may in turn contain messages, checkpoints, chains, and scripts. Null if there is no current track.

 

For more information, see Band, Track, Chain, Checkpoint, and Script Objects.

Properties:

 

name, parent, propertyList, systemPropertyList, type, children, index, nextItem, previousItem, REPEAT_TIMING_PARALLEL, REPEAT_TIMING_SERIAL, REPEAT_TYPE_COUNT_CONSTANT, and REPEAT_DISTRIBUTION_CONSTANT

Methods:
getChild, getItemViaPath, clearRepeat, setRepeat

 

currentClip

Specifies the current Test Clip according to context. The test clip may contain messages, checkpoints, and scripts. Null if there is no current clip.

For more information, see Clip Object.

Properties:

 

name, parent, propertyList, systempropertyList, type, children, index, nextItem, previousItem, targets, REPEAT_TIMING_PARALLEL, REPEAT_TIMING_SERIAL, REPEAT_TYPE_COUNT_CONSTANT, and REPEAT_DISTRIBUTION_CONSTANT

 

Methods:
getChild, getTarget, getItemViaPath, clearRepeat, setRepeat

 

currentChain

Specifies the current chain. A chain is a grouping of messages, scripts, or checkpoints within the currentClip. This grouping may be used to control the timing of the chain members. Null if there is no current chain.

 

For more information, see Band, Track, Chain, Checkpoint, and Script Objects.

Properties:

 

name, parent, propertyList, systemPropertyList, type, children, index, nextItem, previousItem, REPEAT_TIMING_PARALLEL, REPEAT_TIMING_SERIAL, REPEAT_TYPE_COUNT_CONSTANT, and REPEAT_DISTRIBUTION_CONSTANT

Methods:
getChild, getItemViaPath, clearRepeat, setRepeat

 

currentMessage

Specifies the current message. The message is the basic unit of Test Compositions. Null if there is no current message.

 

For more information, see Message Object.

Properties:

 

name, parent, propertyList, systempropertyList, type, children, index, nextItem, previousItem, target, REPEAT_TIMING_PARALLEL, REPEAT_TIMING_SERIAL, REPEAT_TYPE_COUNT_CONSTANT,

 

currentBrowserAction

Specifies the current Browser Action according to the context in which the current script is executing. Null if there is no current Browser Action.

 

For more information, see Browser Action Object.

Properties:

 

name, parent, propertyList, systemPropertyList, type, children, target, index, nextItem, previousItem, REPEAT_TIMING_PARALLEL, REPEAT_TIMING_SERIAL, REPEAT_TYPE_COUNT_CONSTANT, and REPEAT_DISTRIBUTION_CONSTANT

Methods:
getChild, getItemViaPath, clearRepeat, setRepeat

 

currentCheckpoint

Specifies the current checkpoint. The checkpoint is a way of imposing a dependency, such as stopping action on whatever comes after it until an expected response is received.

 

For more information, see Band, Track, Chain, Checkpoint, and Script Objects.

Properties:

 

name, parent, propertyList, systempropertyList, type, children, index, nextItem, previousItem, REPEAT_TIMING_PARALLEL, REPEAT_TIMING_SERIAL, REPEAT_TYPE_COUNT_CONSTANT, and REPEAT_DISTRIBUTION_CONSTANT

Methods:
getChild, getItemViaPath, clearRepeat, setRepeat

 

currentScript

Specifies the current script. A script is another term for a script. Null if there is no current script.

 

For more information, see Band, Track, Chain, Checkpoint, and Script Objects.

Properties:

 

name, parent, propertyList, systemPropertyList, type, children, index, nextItem, previousItem, REPEAT_TIMING_PARALLEL, REPEAT_TIMING_SERIAL, REPEAT_TYPE_COUNT_CONSTANT, and REPEAT_DISTRIBUTION_CONSTANT

Methods:
getChild, getItemViaPath, clearRepeat, setRepeat

 

currentTarget

Specifies the current target. The target is the URL or destination of messages within the clip.

 

For more information, see Target Object.

Properties:

 

name, parent, propertyList, systempropertyList, type, children, index, nextItem, and previousItem

Methods:
getChild, getItemViaPath

 

currentDelay

Specifies the current delay according to the context in which the current script is executing. Null if there is no current Delay component.

 

Properties:

 

name, parent, propertyList, systempropertyList, type, children, index, nextItem, previousItem, REPEAT_TIMING_PARALLEL, REPEAT_TIMING_SERIAL, REPEAT_TYPE_COUNT_CONSTANT, and REPEAT_DISTRIBUTION_CONSTANT

Methods:
getChild, getItemViaPath, clearRepeat, setRepeat

 

Result Object

The Result object is a special case within the SOASTA CloudTest Object Model since results are a byproduct of "playing" a test composition that are not "parts’ of that composition. The $context variable includes results just as it does any of the objects that occur within a composition. For example,

$context.result.postMessage($context.result.LEVEL_INFO, "hello, world");

The above line of code uses the postMessage method to write a message to the result for the current composition.

You can post messages to the result object for the current context using the following properties: LEVEL_ERROR, LEVEL_STATISTICS, LEVEL_INFO, and LEVEL_VERBOSE.

For more information, see Result Object.

Attachments

    Outcomes