Set as default execution profile not work in GlobalVariables.groovy, it still use default profile
Our team is currently on it
Thank you for your reply. May I ask when the issue is expected to be resolved?
Hi Kryst, thanks for bringing this up to us. Since youāre paid user, Iām creating a Support Ticket here so we can discuss this issue on our Support Portal. We just tried to reproduce the issue on our side but no success:
- Open KS, set the QA profile as default execution profile instead of ādefaultā profile
- Trigger the test using GlobalVariable from QA
- The test is still using the GlobalVariable from QA instead of ādefaultā profile
KS version: 10.3.2 / 10.4.2
Please help to share with us more details such as screenshots/videos to demonstrate the issues for further assistant on this ticket.
When you are working on an environment, there are two items that you have to adjust. The first is to use your Profile folder and choose one of your options that you have made and, right click and āSet as your default Execution Profileā.
The second item you have to set is your environment.

Did you do both of these tasks before you ran your tests? As well, do you have the following import statement at the top of all your test cases?
import internal.GlobalVariable as GlobalVariable
can you share how you are invoking the default profile in your test case/suite?
let us know if your query resolved or not?
This usually happens because GlobalVariables.groovy is generated at build time and is strictly tied to the profile that was active when the test suite started, not the one selected as ādefaultā in the UI. Even if you set another profile as the default, Katalon will still load the variables from the execution profile selected at runtime, and if none is explicitly chosen, it falls back to the built-in Default profile.
In most cases, this issue occurs for one of these reasons:
-
The test run was triggered without specifying the profile, so Katalon falls back to the Default profile regardless of what was set as default in Project Settings.
-
GlobalVariables.groovy wasnāt regenerated, meaning it still contains values from the previous test run.
-
Command-line or CI execution didnāt pass the
-executionProfileargument, so the Default profile gets used.
To fix it, make sure you explicitly choose the profile when running your test, either from the Run dropdown or by adding the correct CLI option, for example:
-executionProfile="YourProfileName"
Also try closing and reopening the project or cleaning the temp folders so GlobalVariables.groovy is rebuilt. If everything is correct, Katalon will regenerate GlobalVariables.groovy using the profile you selected at execution timeānot the one marked as default in settings.
