Skip to main content
Skip table of contents

Int4 Test Execution specific functions

This table lists the functions enabled by ASTER integration with Int4 Suite.

System functions

Name

Description

Usage Example

INCLUDE(x)

Includes a script named x defined in Int4 Suite Scripts library.

INCLUDE("anotherScript");
FUN_FROM_ANOTHER("may be called");

DEBUG(x)

Sends a debugging message with the content x to the test execution log.

DEBUG("Helpful notice");

LOG_MESSAGE(x,y)

Sends a log message y with status x to the test execution log.

Message types:

  • E Error

  • I Info

  • S Success

  • W Warning

LOG_MESSAGE("E","Error");

LOG_MESSAGE("S","Eureka!");

Variable-related functions

Name

Description

Usage Example

GET_TC_VAR(x)

Reads the value(s) of variable x from the execution context.

This function returns two dimensional table. The first dimension represents the Variable state.

  • "VAR" - for value before execution

  • "NEWVAR" - for value post execution

Second dimension is a numbered list containing all the variable values. E.g. for a variable filled with multiple materials GET_TC_VAR("MATERIAL")["VAR"][2] will return the second material.

X=GET_TC_VAR("PO");

Please note that during script design, this function is not able to return any meaningful data. For design we’re recommending to rely on the _DESIGN_MODE_ constant and using it to refer to test case payloads during script design, as shown below.

Example:

CODE
PAYLOAD = 
IF(_DESIGN_MODE_,
 ("MAT1", "MAT2", "MAT3"),
 GET_TC_VAR("MATERIAL")["VAR"]);

Payload-related functions

Name

Description

Usage Example

GET_CONTEXT_PAYLOAD()

Returns a single payload relevant to current test execution processing step.

Specifically:

  • Variable read - stored input payload

  • Variable replace - preprocessed input payload

  • Variable find - one of the output payloads captured from system under test, they will be all processed separately, one script run for each

  • Payload processing - payload content dependent on the processing step where script is applied

  • Test Case Analysis - stored input payload

This function returns an empty dataset if executed in Custom Validations scripts.

P=GET_CONTEXT_PAYLOAD();

Please note that during script design, this function is not able to return any meaningful data. For design we’re recommending to rely on the _DESIGN_MODE_ constant and using it to refer to test case payloads during script design, as shown below.

Example:

CODE
PAYLOAD = 
IF(_DESIGN_MODE_,
 GET_TC_OUTPUTS()[1],
 GET_CONTEXT_PAYLOAD());

GET_VALIDATION_PAYLOADS()

For Custom Validations scripts.
Returns a list of payloads (even if there is only one) and DB validation XML data. These are all outputs from the current test case execution.

This function is dedicated for the Custom Validations scripts only. It will return empty dataset if used in other context.

Please note that during script design, this function is not able to return any meaningful data. For design we’re recommending to rely on the _DESIGN_MODE_ constant and using it to refer to test case payloads during script design, as shown above.

GET_TC_INPUT()

Returns the Input payload from Test Case in the execution context.

P=GET_TC_INPUT();

GET_TC_OUTPUTS()

Returns the Output payloads list from Test Case in the execution context.

P=GET_TC_OUTPUTS()[1];

GET_TC_REF_DB_DATA()

Returns the XML representation of reference Database Data payload from Test Case in the execution context.

P=GET_TC_REF_DB_DATA();

GET_TC_PAYLOAD(x,y)

Returns the specific numbered payload y of specified type x from the Test Case in the execution context.

Please see more details in the Int4 Suite configuration tables and data dictionary for applicable payload types.

A=GET_TC_PAYLOAD("P");
B=GET_TC_PAYLOAD("P",1);

GET_TC_PAYLOAD is reserved for very special cases of payload handling, e.g. if access to message header is needed. For most of the cases, the convenient GET_CONTEXT_PAYLOAD() feature, and the dedicated functions for INPUT, OUTPUTS and REFERENCE DATABASE DATA, should be sufficient.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.