Skip to main content

Variables

Module variables, overrides, and namespaces.

Override module variables You can override module variables to customize their values for each module instance. This feature helps you adapt modules while adapting them to different test scenarios, without changing the module itself. When you import a module into a test, all variables defined in that module appear in the test steps. By default, each variable retains the value originally assigned in that module. However, you can override these values within the current module instance. This reduces module duplication, makes modules usable across specific contexts without edits, supports module instance-specific use of local and other variables. Example use cases:

  • Run a login module with different credentials for each test.
  • Use a registration module with unique user data per test.
  • Change API endpoints or payloads for different environments. When you override module variables, only the current module instance uses the new values. Other instances of the module in the same or different tests remain unaffected.
  • Overriding module variables is available on the Pro plan and above.
  • You can only override variables that were created inside the module. You cannot override Global variables, Shared variables, Secret variables, or other types, even if they are used within the module.
  • Dynamic variables created from steps like extract value, API step, custom action, database call cannot be overriden because their value is derived dynamically during runtime. To override module variables in a test:
  1. Go to the step where you want to use the module, click Add step, and select Import a module.
  2. After importing, locate the module in the test steps panel. The module displays all the variables in it, such as userName and passwd.
  3. Click the Override icon at the top of the module to open the Override module variables pane.
  4. You can override any variable that is already used inside your module. The override pane automatically shows you a list of all eligible variables from that module. For each variable, click the Override icon and enter a new value in the field.
  5. To override with a new variable, click the + icon and import the desired variable.
  6. Click Override variable, then click Override again to confirm. The test steps panel now shows the overridden values. These changes only affect the current test and do not impact other tests using the same module. Variables in Modules
  • Variables used within a module have a module namespace, similar to dataset variables.
  • Variables from the module can be used outside the module in other steps within the test.
  • Variables from outside the module cannot be used inside the module during import. This is enforced during module creation. However, you can override a module variable with a variable from outside the module.

Was this page helpful?