I really don’t know what is wrong, I just panicked a bit, I have learned some things though. I’ve spent entirely too much time just trying to figure out what is causing the problem. All I know is when I run a test in docker, I get an error which says my
internal.GlobalVariables can’t be resolved. Starting to think this error is about as specific as a
About my logs I posted before, just started thinking, maybe its the order of operations. It clearly shows the
CustomKeywords are parsed and compiled before the
GlobalVariables. Probably not the issue though because the same command works on dev machines. Maybe it works on local machine because the
./bin is already made and therefore the globals would exist prior to the
CustomKeywords, whereas a Docker container builds it all from scratch.
The only solution I can think of that I have not tried is; maybe the
CustomKeywords should simply not use the
internal.GlobalVariables. In my case at least, only
CustomKeywords using the GlobalVariables implemented in the Listeners before and after methods fail with can’t resolve the Globals. Oddly enough, the test cases I ran all passed and they are all using the global variables. It’s just the Listeners do not run our before and after scripts because of the issue.
Here are a few things I found out in the course of battle. No solutions here but things to watch out for which may or may not cause
can't resolve the internal.GlobalVariables.
When I import a katalon project to eclipse, the
.project file is modifed. Then when you run through terminal you will get a whole bunch of weird and non fatal errors before everything runs fine. Katalon can regenerate the
.project file if you delete it.
If you were to delete and recreate any of the directories which come with a new katalon project, running through terminal will cause bad errors. For example, I deleted the
Test Listeners directory and copied it back from another project. From then on I get even more instances of
internal.GlobalVariable can't be resolved, even in the
I’m very suspicious of adding Groovy files outside of Katalon, i.e. from eclipse. It’s hard to confirm this causes issues though. Seems like a similar issue to the directory issue above.
Back to the deleting and recreating the default dirs, we do not commit our configs from the
Profiles dir. In our CI build we
mkdir Profiles and curl in a snippet containing the profile/config. Then the CI build simply uses default.glbl as the profile which can be different values depending on which one we injected with curl.
You can get issues sometimes when upgrading katalon to new version. I tried copying code from a project which was originally created in a previous version to a brand new project made by the new version. All of a sudden the console output was cleaner. Probably nothing to do with this issue though.
As mentioned earlier, I have no solutions yet, however I’m getting closer. Hopefully my story can help someone get closer to the real problem.