Groovy:unable to resolve class internal.GlobalVariable


When I’m executing the test suite collection from the command line, I get the following error.

/%Users%admin%Katalon Studio%HiveClient%HiveClient.prj/Keywords/com/at/util/ScreenshotHelper.groovy: 24 Groovy:unable to resolve class internal.GlobalVariable

The test does not run after that message is give. It seems that the keywords that I have in my project are causing it to fail. The test executes correctly from Katalon Studio.

This is my console command:

./Katalon\ --args -runMode=console -consoleLog -projectPath=/Users/aidan/Katalon\ Studio/HiveClient/HiveClient.prj -testSuiteCollectionPath=/Test\ Suites/HiveSuiteCollection -browserType=Firefox

Any guidance would be much appreciated.

See here:

I’m having this problem also. Windows 10 Command Line - Error Groovy:unable to resolve class internal.GlobalVariable

I was having the same problem with CustomKeywords so this may be useful.

Solution 1:
The package call at the top of the imports is causing you to be out of scope


package // Your class package
CustomKeywords.‘com.helpers.findByID’(userType) // Your CustomKeywords

We can call our CustomKeywords like this if we require there be a package

new helpers().findByID(’’);

Solution 2:
Remove the package call to use CustomKeywords without creating a new class each time

By simply removing or commenting out the package call you should see this error go away…