You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 2, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: synthetics/test-config/global-variables.rst
+23-14Lines changed: 23 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,33 +11,39 @@ Global variables are pre-saved, reusable variables that you define once and use
11
11
12
12
13
13
How can you use a global variable?
14
-
===================================
15
-
Use global variables to store non-sensitive information for your browser and API tests. Splunk Synthetic Monitoring saves your global variables, but note that their values are visible to all users in your account.
Use global variables to store non-sensitive information for your browser and API tests. Splunk Synthetics saves your global variables, but note that their values are visible to all users in your account.
16
17
17
18
To preserve your account's security, don't use global variables to store sensitive information such as login credentials, API keys, or credit card information.
When you conceal a global variable, Splunk Synthetic Monitoring encrypts the variable's value in its database and scrubs its value from the Splunk Synthetic Monitoring UI, from test results, and from alert messages. However, concealed global variables were not designed to safeguard sensitive information or critical data; do not misuse them for such purposes.
24
+
25
+
When you conceal a global variable, Splunk Synthetics encrypts the variable's value in its database and scrubs its value from the Splunks UI, from test results, and from alert messages. However, concealed global variables were not designed to safeguard sensitive information or critical data; do not misuse them for such purposes.
#. From the Splunk Synthetic Monitoring landing page, select :guilabel:`Synthetics configuration`. The :guilabel:`Synthetics configuration` page opens, on the:guilabel:`Global variables` tab.
33
-
#. Select :guilabel:`+ Add` to open the creation dialog box.
35
+
#. On the Splunk Synthetics landing page, select the settings icon, and then select :guilabel:`Global variables`. The :guilabel:`Synthetics configuration` page opens onto its:guilabel:`Global variables` tab.
36
+
#. Select :guilabel:`Create variable`.
34
37
35
38
* Add a new global variable while editing a test:
36
39
37
-
In the right-hand :guilabel:`Variables` column, scroll to :guilabel:`Global variables` and select :guilabel:`Add`.
40
+
#. Expand the :guilabel:`Variables` pane on the right.
41
+
#. Select :guilabel:`Add`.
42
+
38
43
39
-
When you're in the :guilabel:`Add global variable` dialog box, enter the following:
40
-
44
+
When you're in the :guilabel:`Add variable` dialog box, enter the following:
45
+
46
+
#. Set :guilabel:`Variable type` to :guilabel:`Environment`.
41
47
#. In the :guilabel:`env` field, enter the name of the variable. You will use this key to access your variable within a test.
42
48
#. In the :guilabel:`value` field, enter the value that will replace the variable when the test is run.
43
49
#. (Optional) In the :guilabel:`Description` field, enter a description to explain the purpose of the variable for future reference. A description is particularly helpful when you conceal the variable and cannot reveal its value.
@@ -46,23 +52,26 @@ When you're in the :guilabel:`Add global variable` dialog box, enter the followi
46
52
47
53
48
54
Edit a global variable
49
-
====================================
50
-
To edit the key or description of a global variable, visit the :guilabel:`Global variables` page and edit within the field. Select :guilabel:`Save` when you're finished editing.
To edit the key or description of a global variable, navigate to the :guilabel:`Global variables` page and edit within the field. Select :guilabel:`Save` when you're finished editing.
51
58
52
59
Editing the value of a saved concealed global variable clears the previous value. You must provide a new value and select :guilabel:`Save` to apply it.
You can use a global variable to fill in fields in the :guilabel:`Steps` and :guilabel:`synthetic transactions` of a browser test, or in the requests of an API test. Global variables cannot be used in cookies.
59
67
60
68
While creating or editing a test, the right-hand :guilabel:`Variables` tab provides list of built-in variables and global variables you can use. Select the name of a variable to copy it to your keyboard.
You can also use a global variable to fill in any field in an API test. For instance, you can use a global variable to provide a URL for any request, a header value, or any other value.
0 commit comments