Variables in Robonito

Variables in Robonito allow you to store dynamic values during test execution and reuse them in later steps. This makes test cases more flexible, reusable, and reliable by avoiding hard-coded values.

Robonito currently supports Local Variables, which are created and used within a single test case execution.

What Is a Local Variable?

A Local Variable is a value captured or defined during test execution and stored temporarily for use in subsequent steps.

Local variables:

  • Exist only within the current test case
  • Are created during recording or test editing
  • Can be reused in actions, validations, and assertions

Recording a Local Variable

To create a local variable, use the Record Local Variable option during recording or while editing a test case. Target Suite

Record Local Variable Dialog

When you select Record Local Variable, the Record Local Variable dialog opens. Target Suite

Variable Name *

Enter a unique name for the variable.

Examples:

  • userEmail
  • apiToken
  • orderId

Variable names should be meaningful and easy to identify.

Value

Enter the value you want to store in the variable.

This can be:

  • Text captured from the application
  • Static text
  • Dynamic content copied during recording

Save Variable

Click Save Variable to store the variable.

Once saved:

  • The variable becomes available within the test case
  • A new step is added to the test flow as Record Local Variable

Recorded Variable Step

After saving, the variable appears in the test steps list as:

  • Record local variable
  • Step type: LOCAL-VARIABLE
  • Associated with the active browser session

This step ensures the variable is created before it is used later in the test.

Using a Variable

To reuse a stored variable, select Use Variable from the automation tools. Target Suite

Use Variable Dialog

The Use Variable dialog allows you to insert previously recorded variables into test steps. Target Suite

Search Variables

  • Search for variables by name
  • Displays all available local variables for the test case

If no variables exist, the dialog shows:

  • No variables found

Where Variables Can Be Used

Variables can be used in:

  • Input fields
  • Assertions
  • Validations
  • API requests (where supported)
  • Conditional or dynamic test logic

Variable Scope & Behavior

  • Variables are local to the test case
  • They are evaluated during execution
  • Variable values are reset on each execution
  • Variables must be recorded before they are used in later steps

Best Practices for Variables

  • Use clear and descriptive variable names
  • Record variables as early as possible in the test flow
  • Avoid hard-coding values when dynamic data is available
  • Reuse variables to reduce test maintenance

Benefits of Using Variables

Using variables in Robonito helps you:

  • Build dynamic and reusable test cases
  • Handle changing data such as emails, IDs, or tokens
  • Reduce duplication and hard-coded values
  • Improve test stability and maintainability