Int4 Test Execution specific functions
This table lists the functions enabled by ASTER integration with Int4 Suite.
System functions
Name | Description | Usage Example |
|---|
DEBUG(x)
| Sends a debugging message with the content x to the test execution log. | DEBUG("Helpful notice");
|
INCLUDE(x)
| Includes and evaluates a script named x defined in Int4 Suite Scripts library. | INCLUDE("anotherScript");
FUN_FROM_ANOTHER("may be called");
|
LOAD(x)
| Loads and returns exact content of the scripting item named x defined in Int4 Suite Scripts library. | TR=LOAD(“xml_transform_example”);
RES=CXSLT(TR, xml_data);
|
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!");
|
LLM_BASIC_REQUEST(prompt, system_prompt)
| Given a configured LLM setup in Int4 Suite (look at help.int4.com) this function sends a one-shot request to the model provider and returns | LLM_BASIC_REQUEST(“Help me”, “You are a helpful agent”)
|
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. 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"]);
|
Name | Description | Usage Example |
|---|
GET_TEST_RUN()
| Returns current Test Run metadata if applicable. Will fail, if not executed within a context of a test run. Fields returned for the current test run: RUN_ID - Test Run ID USER - User login name NAME - Test Run name TYPE - Test Run type code SCENARIOID - If provided, root folder for Test Run testcases TC_COUNT - Total number of Test Cases in the Test Run IS_DEBUG - “X” if running in Debug mode IS_REVALIDATION - “X” if running in revalidation mode IS_REFRESH - “X” if running in result refresh mode IS_SV - “X” if running during service virtualization processing IS_PARALLEL - “X” if parallel test case execution was enabled for this run
| P=GET_TEST_RUN();
Returns a structure like:
CODE
[
RUN_ID => 4F375CA856F61FD0BAE2DA41F22A6404
USER => MGALCZYNSKI
NAME => Test run 06.01.2026 15:46:10
TYPE => UT
SCENARIOID => 0000000000
TC_COUNT => 1
IS_DEBUG =>
IS_REVALIDATION =>
IS_REFRESH =>
IS_SV =>
IS_PARALLEL =>
]
|
GET_PROCESS_TCLIST()
| Returns list with basic test case information for all test cases of currently executed process in Int4 Suite - that is a set of test cases in the current test run, connected with current test case by parent and/or child relationship. Fields defined for each test case:
SCENARIOID - Test Case Folder ID PARENTID - Parent Test Case ID TYPEID - Test Type ID Number CASEID - Test Case ID DESCR - Description AO - Automation Object name BO - Business Object name DOCNUM - Document Number STATUS - Execution Status (Empty or one of N E W S - No run, Error, Warning, Success) ME - _TRUE_ for currently executed test case
| P=GET_PROCESS_TCLIST();
Returns a structure like:
NONE
[
1 => [
SCENARIOID => 0000042278
PARENTID =>
TYPEID => 12
CASEID => 0000922123
DESCR => PO: POEXTSTAA001931, Customer: PRODUCE JUNCTION US
AO => CS_IF0056_PURCHASEORDER_EXT
BO =>
DOCNUM => AGcqG1RC71siJnO5Y6FXK-TvbZpV
STATUS =>
ME => X
]
]
Please note that during script design, this function is able to provide meaningful data only if test case number is provided in the editor. |
GET_PROCESS_TCDATA(x)
| Returns table with data of specific test cases from currently executed process, by index x. Indexes must match the indexes as returned by GET_PROCESS_TCLIST(). Fields defined for each test case: INPUT - Test Case Input Payload OUTPUTS - Test Case Output Payloads ACTUALS - Payloads captured during Test Case execution (only for cases with statuses E W S) VARIABLES - Test Case variables, structured as in result of GET_TC_VAR(x) (only for cases with statuses E W S) STATUS - Execution Status (Empty or one of N E W S - No run, Error, Warning, Success)
First execute the function GET_PROCESS_TCLIST() or Invalid Context Error will occur! |
CODE
PROC=GET_PROCESS_TCLIST();
IX = INDEXES(PROC);
FOR(I=1, I<=COUNT(IX), I+=1,
LOG_MESSAGE("I",
"STATUS OF TC " &
PROC[I]["CASEID"] &
": " &
GET_PROCESS_TCDATA(IX[I])["STATUS"]
)
);
Please note that during script design, this function is able to return meaningful data only if test case number is provided in the editor. |
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.