Variable Operations

In Avo Assure, we can automate special cases that involve data containing newlines and tabs. This can be achieved by making use of the dedicated dynamic variables in Avo Assure, as seen below:

Dedicated Dynamic Variables

Definition

{newline}

This can be used when the escape character ‘\n’ needs to be replaced.

{tab}

This can be used when the escape character ‘\t’ needs to be replaced.

Keyword: CREATEDYNVARIABLE

Description: This keyword or action instructs Avo Assure Client to create a new dynamic variable and assign the value specified to the created new variable.

Keyword

Input Syntax

Output Syntax

Supported Input Formats

createDynVariable

<variable name>; <value to be stored>

(Optional)

NA

Note: Variable name should be enclosed between { }.

Find the snippet of the keyword below:

In the above example, after the test case debug, the new dynamic variable is created with value “10,” and the execution status “True” / “False” will be stored in variable {CreateDynVar_aa}.

Keyword: CREATECONSTVARIABLE

Description: This keyword or action instructs Avo Assure Client to create a constant variable and assign the specified value.

Note:

  • Variable name should be enclosed between underscores (for ex: _var_).

  • A constant variable within Avo Assure will remain constant throughout the execution at the test suite level.

  • If the test step tries to modify the value of a constant variable, then the test step will fail.

  • If the constant variable is not created and used in the output field, then a constant variable, as specified by the user, will be created, and the result of the test step will be stored in it.

Keyword

Input Syntax

Output Syntax

Supported Input Formats

createConstVariable

<variable Name>;<value to be stored>

(optional)

  • Direct values

  • Static values

  • Dynamic variables

  • Constant variables

Find the snippet of the keyword below:

In the above example, after the test case debug, a constant variable with the value “1234” will be created, and the execution status (True/False) will be stored in the output variable (if provided).

Usage: If the keyword of a test step accepts a file path in its output field and the output field contains a constant variable (whose value is a file path), then the result of the test step will be written into the specified file path and the constant variable content will not be modified.

Below is a snippet of the constant variable being used for a keyword that accepts file path in its output variable:

In the above example, after the test case debug,

  • At the first test step, a constant variable with a value containing the file path “D:\Docs\demo.xls” will be created and can be referred to by its name (_constVar_).

  • At the second test step, the files will be compared, and the comparison result will be written to “D:\Docs\demo.xls” (since the constant variable, _constVar_ holds this file path as its value)

Keyword: DELETEDYNVARIABLE

Description: This keyword or action instructs Avo Assure Client to delete the existing dynamic variable.

Keyword

Input Syntax

Output Syntax

Supported Input Formats

deleteDynVariable

<variable>

(Optional)

NA

Note:

  1. The input variable should be existing.

  2. Variable name should be enclosed between { }.

  3. Multiple variables can also be deleted at once using semicolon as a separator. For example; the input will then be {var1};{var2}

Find the snippet of the keyword below:

In the above example, after the test case debug, variable {bb} is deleted, and the execution status “True” / “False” will be stored in variable {DeleteDynamicVariable}.

Keyword: DISPLAYVARIABLEVALUE

Description: This keyword or action instructs Avo Assure Client to display the variable value at the execution point.

Keyword

Input Syntax

Output Syntax

Supported Input Formats

displayVariableValue

<variable>

(Optional)

  • Text

  • Static values/ Dynamic variables

Note:

  1. Variable name should be enclosed between { }.

  2. A popup is displayed with the variable name and value.

  3. The input variable should be existing. When a non-existing variable is provided as input, “null” is displayed as a variable value.

  4. By default, the display popup is visible for 3 seconds. The time limit can be increased or decreased in config.json within the “displayVariableTimeOut” tag.

  5. Both static and dynamic variables can be displayed.

  6. Also, an index can be provided to a dynamic variable using another dynamic variable for that, and the index starts from 0. For example:

    1. For 1-dimensional: {variable[{index}]}

    2. For 2-dimensional: {variable[{index}],[{index}]}

Find the snippet of the keyword below:

In the above example, after the test case debug, it displays the variable values at the point of execution.

Keyword: MODIFYVALUE

Description: This keyword or action instructs Avo Assure Client to change the existing variable value to another value.

Keyword

Input Syntax

Output Syntax

Supported Input Formats

modifyValue

<variable whose value needs to be changed>; <new value>

(Optional)

NA

Note: Variable name should be enclosed between { }.

Find the snippet of the keyword below:

In the above example, after the test case debug, the new value in {bb} will be 30, and the execution status “True” / “False” will be stored in variable {ModifyValue}.

Keyword: COPYVALUE

Description: This keyword or action instructs Avo Assure Client to copy the value to a new variable from an existing variable.

Keyword

Input Syntax

Output Syntax

Supported Input Formats

copyValue

<target variable>; <source variable>

(Optional)

NA

Note: Variable name should be enclosed between { }.

Find the snippet of the keyword below:

In the above example, after the test case debug, the value of {aa} will be copied to variable {bb}, and the execution status “True” / “False” will be stored in variable {CopyValue}.

Keyword: GETINDEXCOUNT

Description: This keyword or action instructs Avo Assure Client to fetch the maximum array count in a variable and save the result in the output variable.

Keyword

Input Syntax

Output Syntax

Supported Input Formats

getIndexCount

<variable containing list value>

{Variable}

NA

Note: To display the variable,

  1. For a 1-dimensional array, the index starts from 0, and the array count will start from the 0th index. For example, if the count is 7, it will fetch a value of 6.

  2. For Desktop AppType, the index starts from 1, and the array count will start from the 1st index.

Find the snippet of the keyword below:

In the above example, after the test case debug, it fetches the count of variable {indexCount} and stores the value in {Gen_Count}.

Keyword: DELETECONSTVARIABLE

Description: This keyword or action instructs Avo Assure Client to delete an existing constant variable.

Keyword

Input Syntax

Output Syntax

Supported Input Formats

deleteConstVariable

<Variable Name>

(Optional)

NA

Note:

  • The input variable should be existing.

  • Variable names should be enclosed between underscores (for example, _var_).

  • Multiple variables can also be deleted at once using a semicolon as a separator. For example; the input will then be _var1_;_var2_

Find the snippet of the keyword below:

In the above example, after the test case debug, the constant variable “_var_” will be deleted, and the execution status (True/False) will be stored in the output variable (if provided).

Last updated