"GET_GLOBAL_VAR" Command

Description: This command retrieves the value of a global variable so that it can be used in any test case/execution set/load test. To retrieve the value of a global variable, a test case with Set_Global_Var must be executed first in order for the value to be stored in the server. Then the same variable name must be entered in the step with Get_Global_Var in order to retrieve the value from the server to be able to use this variable.

Scenario: Suppose we want to retrieve the global variable we set in https://subject7.atlassian.net/wiki/spaces/SD/pages/1111883777 and compare it with ‘2020-01-11 12:00:00’ to see if it’s older or more recent.

Procedure: 1- Define a step with Get_Global_Var command which uses the same variable from Set_Global_Var ‘last_edit_global’

image-20240610-162328.png

2- Define your conditional steps to compare the date from the variable above another date/time and perform a step based on the condition. For example, the steps below compare the date/time from the variable to ‘2020-01-11 12:00:00' and prints a message to indicate if the date is before or after '2020-01-11 12:00:00’.

image-20240610-162527.png

 

 

 

Â