*Summary
I had an instance where one of my execution profiles was showing one value for a global variable in the GUI but was using a different value when it ran the tests. When I investigated I found 2 initValue entries for the global variable, the 1st was used when running the tests & the 2nd was shown in the GUI.
*Steps to reproduce
I have no idea how I got two initValues in my execution Profile but I can describe how you can see the issue if you have it. In this example, I have a classroom_base_url global variable in each of my profiles that defines the URL to the site I am testing.
- Launch Katalon Studio.
- Open your project.
- In the Test Explorer window open the Profiles folder.
- Double click on an execution profile. Note that only one instance of all the variables is displayed. (eg, classroom_base_url).
- Select the profile from Step 4 from the execution profile drop down.
- Run a test case & note the URL that is used. In this case I am writing out the URL to the log & instead of the value in Step 4 a different value is used.
- On your local machine navigate to the folder that contains your Katalon code.
- Navigate to the Profiles folder & open the .GLBL-file for the execution profile from Step 4 in a text editor.
*Expected Results
The values displayed for global variables in the execution profiles should be the ones used when running the app.
*Actual Results
While the value of 1st initValue is used when running the tests the value of the 2nd initValue is shown in the GUI.
Here is an example of my GLBL file with dupe initValues.
<?xml version="1.0" encoding="UTF-8"?>
<GlobalVariableEntities>
<description></description>
<name>Canary</name>
<tag></tag>
<defaultProfile>false</defaultProfile>
<GlobalVariableEntity>
<description>Main URL for API calls</description>
<initValue>'https://api.kiddom.co'</initValue>
<name>api_base_url</name>
</GlobalVariableEntity>
<GlobalVariableEntity>
<description>Main URL for the Classroom app</description>
<initValue>'https://pr8751.kidwebprd.pages.dev/'</initValue>
<initValue>'https://app-canary.kiddom.co'</initValue>
<name>classroom_base_url</name>
</GlobalVariableEntity>
<GlobalVariableEntity>
<description></description>
<initValue>'Prod'</initValue>
<name>backend</name>
</GlobalVariableEntity>
</GlobalVariableEntities>
*Screenshots / Videos
Inline with the steps
*Blocker?
No
Number of affected users?
Everyone
*Operating System
MacOS Ventura 13.6
*Katalon Studio version
version 8.6.8