Execution Profile/Global Variables Don't Work in Test Case Variables

Katalon Studio Version: 5.4
Browser: Firefox 59.0.2

I’ve just opened my existing test project - which was previously created/maintained using Katalon Studio v5.3.1 - with Katalon Studio v5.4. As described in the release notes, my global variables have been moved to the default execution profile.

Whilst this is generally working fine, I’ve found that using global variables in a test case’s “variables” tab results in an error such as the following:

Test Cases/Scripts/Regression Tests/Application/By Area/Comments Tests FAILED because (of) Variable ‘username’ is not defined for test case.

Referencing the following test case code snippet:

// generate the login URL
WebUI.navigateToUrl(WebUI.concatenate((([GlobalVariable.G_SiteURL, '/login']) as String[]), FailureHandling.STOP_ON_FAILURE))
// fill in the username and password
WebUI.setText(findTestObject('General/Login/input_username'), username)
WebUI.setText(findTestObject('General/Login/input_password'), password)

What this snippet does is provide the option of logging into an application using a default username and password (stored in the execution profile) or overriding the username/password used on a case by case basis. This code was working fine until v5.4, however now I find that:
- “G_SiteURL” is working fine
- “username” and “password” are both local variables to this test case. Both are configured with a default value type set to “Global Variable” and the default value set to the correct corresponding variable in the execution profile (eg GlobalVariable.G_Username and GlobalVariable.G_Password)
- The test case dies as soon as it tried to access the username variable

I believe that this is a bug with Katalon Studio and is not being caused by me using global variables/execution profiles incorrectly, however i’m happy for someone to point out if I’m wrong … :slight_smile:




Please check the imports and fix them. I was faced with the same issue.

Thanks we’ve been noticed on this issue will fix it soon.


Jan Zinserling said:

Please check the imports and fix them. I was faced with the same issue.

Hi Jan
Could you please provide some more information around what you mean by this? If you mean adding the following to the top of the script, we have that in there already:

import internal.GlobalVariable as GlobalVariable


FYI - I can confirm that this issue has been resolved in v5.4.1 of Katalon Studio. Thanks devs for responding so quickly to this issue

Thanks all. This issue has been fixed in 5.4.1 but we forgot to inform you about this, once again thanks for your information regard to this issue.