# Test Suite Scoped Variables

This guide will help you to configure the variables inside the scope of a Test Suite and also guide you on how you may access those variables in the API Tests. You may even invoke utility methods (sync and async both) to initialize the test suite scoped variables, similar to global variables.

# Configuring the test suite scoped variables:

To configure the variables in the scope of a test suite, simply follow the steps below:

  1. Visit Configuration >> Test Suites section.
  2. Then click in the Data column for a specific test suite for which you would like to configure the variables.
  3. A modal window will appear. Here you may specify the test suite scoped variables as a JSON object. You may configure different types of variables as shown in the figure below:

# Using Test suite scoped variables inside API Tests

Once you have configured the test suite variables, then you may use them inside your API tests using a special syntax {{$ts.$data.VAR_NAME}}

For example, in the figure above, if you want to use the defined variables, then you may use them like this:

  1. {{$ts.$data.string_var}}
  2. {{$ts.$data.number_var1}}
  3. {{$ts.$data.boolean_var}}
  4. {{$ts.$data.obj_var}}
  5. {{$ts.$data.obj_var.key1}}
  6. {{$ts.$data.array_var}}
  7. {{$ts.$data.dynamic_var}}
  8. {{$ts.$data.utility_var}}