String Generation

This is a pre-built Action located under the @Generic Element. The functionality of this Action in Avo Assure is to generate a random string of the specified length. The extracted value is stored in the given dynamic variable for further use during test execution.

Syntax

Input Value: <type>;<length>

Note:

  • The following data types are supported:

    • Char/char (Character): Generates alphabetic characters (A–Z, a–z).

    • Num/num (Number): Generates numeric digits (0–9).

  • The string type is not case-sensitive. For example, both Char;9 and char;9 are valid.

Argument
Description

<type>

(Required)

Provide the data type (Char/Num) for the string you want to generate.

<length>

(Required)

Provide the length of the random string to be generated. This defines how many characters or numbers the string should contain.

Output Value: <Dynamic Variable>;<Dynamic Variable>(Optional)

Argument
Description

<Dynamic Variable>

(Required)

This dynamic variable stores the generated string.

<Dynamic Variable>

(Optional)

This dynamic variable stores the status as True or False.

Example: Generating a String with Specific Type and Length

In this example, we explain how to generate a string based on the specified type and length.

  • Action: String Generation

  • Input Value: char;4

    • The first argument (char) specifies the type of the string to generate an alphabetic string.

    • The second argument (4) specifies the length of the string to be generated.

  • Output Value: {Generated String}

    • The generated string (e.g., axyX) is stored in this {Generated String} dynamic variable.

    • If a second output variable is provided, the action returns the status as True or False:

      • True: If the string generates successfully.

      • False: If the string generation fails due to blank input or configuration error.

  • Logical Explanation: The String Generation action fetches the value from the Input Value column (char;4). This action generates a 4-character alphabetic string (e.g., axyX) and stores it in the {Generated String} variable.

Knowledge Bites:

Here are some examples of different string scenarios:

String Type
Input Value
Result

Character

char;8

uESrOCsL

Number

num;5

45689

Last updated

Was this helpful?