Skip to main content

Types of variables in TrueTest

TrueTest generated variables require user input before executing test cases. This guide will help you understand the different types of variables generated by TrueTest and the actions you need to take to ensure your tests run smoothly.

Global Variables

TrueTest stores global variables in the global profile of Katalon Studio. These variables are not provided with sample values, so you will need to input the correct values before executing the test cases. After defining the values, you can use them across all test artifacts in a project.

TrueTest generates global variables from the following sources:
URL Query parameters
TrueTest does not record the query parameters' values, therefore cannot automatically suggest the appropriate sample data. Instead, TrueTest divides the URL into two parts: application_domain and query_params. For example, if the URL is abc.com/url?id=1&name=aaa, TrueTest record abc.com as the application_domain, while the query_params (id=1&name=aaa) are stored in the global profile of Katalon Studio.
Dynamic URL clustered patterns
These variables are generated from patterns recognized in dynamic URLs. For example, in the URL abc.com/orgID/111/projectID/112, TrueTest identifies orgID and projectID as dynamic elements and generates global variables accordingly.
Before executing a test case, TrueTest will prompt you to input the correct values for global variables in Katalon Studio. To do so:
  1. In the Tests Explorer tab, open the Profiles menu and select the global profile you use.

  2. Add the values for the required variables accordingly. In this example, you need to input a value for query_params.

Test Case Variables

In Katalon Studio, you can find test case variables in the Variables tab, or in the associated test data files. Test case variables are generated from dynamic objects that TrueTest detects.

You can either use the sample value generated for the variables to run the test case immediately, or use another value. Do as follows:

  1. Locate the variable in the test case. For example, here we look at link_productSheetSander_dataTest.

  2. In the test case Data Binding tab, find the data file that the variable belongs to, and download that data file.

  3. Open the file in Excel/Google Sheet to add another value as needed.
  4. Save/Download the file.
  5. Import the file back to Katalon Studio as a new data file or override the existing one. For instruction, see Create an Excel data file.

Function Variables

Function variables are placed in the Common folder that are called by the corresponding test cases. TrueTest stores them in the test data file associated with the common functions, and provides sample values for them.

TrueTest detects dynamic objects in the common functions and creates variables for these objects. These variables are important because the functions are reused across multiple test cases.

Before executing test cases that have function variables, you can either use the sample values from the test data file, or manually enter the values for these variables in the test data file linked to the common functions.

Was this page helpful?