KRE - "No such property: xxx for class: internal.GlobalVariable"

Hi,

I’m currently deploying my scripts to the target server to execute them with Katalon Runtime Engine.

On last Friday, my scripts were executing correctly. Nothing changed in the code but I’m now facing a weird issue when trying to execute some test suite:

2023-01-16 11:19:09.190 INFO  c.k.k.c.keyword.builtin.CommentKeyword   - Profil : Rec
2023-01-16 11:19:09.233 ERROR c.k.katalon.core.main.TestSuiteExecutor  - ? No such property: connectionString for class: internal.GlobalVariable
2023-01-16 11:19:09.317 INFO  c.k.katalon.core.main.TestSuiteExecutor  - --------------------
2023-01-16 11:19:09.317 INFO  c.k.katalon.core.main.TestSuiteExecutor  - END Test Suites/xxx

The concerned Global Variable (“connectionString”) is common to all environments, so it’s located in the “default” profile.
But I’m executing the test suite with the “Rec” environment:

katalonc -noSplash -runMode=console -projectPath="xxx" -retry=0 -testSuitePath="Test Suites/xxx" -browserType="Chrome" -executionProfile="Rec" [...]

Here’s some code of the test suite:

import internal.GlobalVariable

@SetUp(skipped = false) // Please change skipped to be false to activate this method.
def setUp() {
	def executionProfile = RC.getExecutionProfile()
	WebUI.comment("Profil : ${executionProfile}")
	
	// Initialisation des variables
	Variables.connectionString = GlobalVariable.connectionString;

All is working when executed with Katalon Studio and was working with the Katalon Runtime Engine until last Friday… :frowning:

Thanks a lot for your help.

I guess, <projectDir>/Libs/internal/GlobalVariable.groovy file and/or <projectDir>/bin/lib/internal/GlobalVariable.class file is corrupted; so you should recreate them.

Try deleting the following folders:

  • <projectDir>/bin
  • <projectDir>/Libs
  • <projectDir>/.caches

It is safe to delete them as they will certainly be recreated when the project runs again.

Why it happened? — Who knows. Only you could. Nobody else.

Thanks for your quick answer!

Unfortunately, removing the 3 directories does not fix the issue :frowning:

Oh. I have no more idea.

Thanks however :slight_smile:

I finally found a problematic commit in my Git repository: I recompiled some days ago a library with common functions with Gradle and included the new library in the “Drivers” folder of my project. For some reason, this seems to have caused the issue… I just restored the old library and everything is now working fine with KRE.

Thanks a lot for your help :slightly_smiling_face: