I got a ton of warnings shown on Gitlab-CI when the runner was running. The messages were in the form of ‘Groovy:unable to resolve class com.kms.katalon.*’. For example,
Groovy:unable to resolve class com.kms.katalon.core.annotation.Keyword
Groovy:unable to resolve class com.kms.katalon.core.testobject.ObjectRepository
Groovy:unable to resolve class com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords
Groovy:unable to resolve class com.kms.katalon.core.model.FailureHandling
Groovy:unable to resolve class com.kms.katalon.core.testdata.TestDataFactory
Groovy:unable to resolve class com.kms.katalon.core.testobject.TestObject
...
To be more specific, it resolved nothing but the tests could still be executed successfully. I am guessing that the problem lies in some files I didn’t push to the gitlab repo. In that case, what files should be included in the .gitignore file? Here is mine:
According to https://github.com/katalon-studio/docker-images, the latest docker image distributed in the Docker Hub is newer than the version 7.2.1. So the problem of Star import (*) should not happen with it.
I have tried t use 6.3.3 and also used the latest version and I am getting the same result.
When I am trying to run my Katalon Tests on multiple containers, they seem to stop working after generating these warnings randomly. I have no idea why that is happening
By Java/Groovy language definition, import com.kms.katalon.* tries to import classes that belong to the com.kms.katalon package only. Star import does NOT function recursively to “sub-packages”. In fact, in Java/Groovy, there is no “sub-packages” concept defined. Doubt it? See other resources for example:
Katalon API has many packages; so I need to write many import com.kms.katalon.core.XXXXX.* statements. Star import statements do not help shortening the code very much.
Personally I never use Star imports in Katalon TestCases.
The “Organize Imports” feature of Eclise editor by Ctrl+Shift+O is far more helpful for me.