Skip to main content

Reuse input data across multiple steps with variables

Variables are useful when a value input during test recording needs to be reused later within the same test. It helps in

  • Eliminating hardcoded values
  • Maintaining tests easily. You can update the variable at one place rather than modifying it across multiple test steps.
  • Making tests more readable and self-explanatory by assigning meaningful names.

When to use variables?

  1. Use variables when dealing with repeated static values across different steps within a test. For eg:-
    • Validate full name or email in accounts profile section after logging in
    • Validate pricing details on checkout page after selecting a particular plan
  2. When the test requires dynamic input that may change during each test run which has to be consumed at a later point in the test.

  3. Use variables to centralize and manage data, for making tests easier to update and maintain.

How to create and use a variable?

Creating a variable can be done at any step where you have to input values. Whereas, reusing the variable can be done at any step where you have to input values or add a text validation.

Creating a variable

  1. Navigate to the step where you have an input value which has to be reused
  2. Click on the step name or the “>” icon to open the step configuration details
  3. Click on “Convert to variable” below the text input Convert variable
  4. Give a unique meaningful name to the variable and save it Save variable

Importing a variable

  1. Navigate to the step where you want to reuse the variable created
  2. Click on the step name or the “>” icon to open the step configuration details
  3. Click on “+” and select “Import a variable” if the step is an input step or click “{}” icon besides the text input if the step is a text validation step
    • Import variable in Input step Import variable in input step
    • Import variable in Text validation step Import variable in text validation
  4. Select the relevant variable you want to import Select variable

Managing a variable

  • Managing a variable is possible at any step where the variable is in use. You can navigate to the step configuration details and edit the variable to any value of your choice. Editing variable from a step

  • Additionally, Low Code Automation also allows you to manage your variables from a single configuration page where you can edit any variable value and delete any variable that is not in use. Click on the “” icon to access the page. Manage variable from test configuration

Note:
  1. A variable can only be deleted when it is not used in any other steps.
  2. A variable can not have a variable within it.

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked






Thank you for your valuable feedback

Is this page helping you?

Yes
No

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked






Thank you for your valuable feedback!

Talk to an Expert
Download Copy