No signature of method: static com.kms.katalon.core.configuration.RunConfiguration.getOverridingGlobalVariable()


#1

Hi,

when I run my test case in Jenkins I get the following error sometimes, but not always which is why I think it is a bug in Katalon Studio:

Test Cases/XYZ because (of) (Stack trace: groovy.lang.MissingMethodException: No signature of method: static com.kms.katalon.core.configuration.RunConfiguration.getOverridingGlobalVariable() is applicable for argument types: (java.lang.String) values: [Login_to_Tool] at groovy.lang.MetaClassImpl.invokeStaticMissingMethod(MetaClassImpl.java:1503) at groovy.lang.MetaClassImpl.invokeStaticMethod(MetaClassImpl.java:1489) at org.codehaus.groovy.runtime.callsite.StaticMetaClassSite.call(StaticMetaClassSite.java:53) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125) at internal.GlobalVariable.<clinit>(GlobalVariable.groovy:124) at sun.misc.Unsafe.ensureClassInitialized(Native Method) at sun.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(UnsafeFieldAccessorFactory.java:43) at sun.reflect.ReflectionFactory.newFieldAccessor(ReflectionFactory.java:156) at java.lang.reflect.Field.acquireFieldAccessor(Field.java:1088) at java.lang.reflect.Field.getFieldAccessor(Field.java:1069) at java.lang.reflect.Field.get(Field.java:393) at org.codehaus.groovy.reflection.CachedField.getProperty(CachedField.java:54) at groovy.lang.MetaClassImpl.getProperty(MetaClassImpl.java:1805) at groovy.lang.MetaClassImpl.getProperty(MetaClassImpl.java:3735) at org.codehaus.groovy.runtime.callsite.ClassMetaClassGetPropertySite.getProperty(ClassMetaClassGetPropertySite.java:51) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(AbstractCallSite.java:296) at Script1543237758265.run(Script1543237758265.groovy:26) at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:183) at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:108) at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:294) at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:285) at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:264) at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:256) at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:200) at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:99) at com.kms.katalon.core.keyword.builtin.CallTestCaseKeyword$_callTestCase_closure1.doCall(CallTestCaseKeyword.groovy:60) at com.kms.katalon.core.keyword.builtin.CallTestCaseKeyword$_callTestCase_closure1.call(CallTestCaseKeyword.groovy) at com.kms.katalon.core.keyword.internal.KeywordMain.runKeyword(KeywordMain.groovy:54) at com.kms.katalon.core.keyword.builtin.CallTestCaseKeyword.callTestCase(CallTestCaseKeyword.groovy:81) at com.kms.katalon.core.keyword.builtin.CallTestCaseKeyword.execute(CallTestCaseKeyword.groovy:45) at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:53) at com.kms.katalon.core.keyword.BuiltinKeywords.callTestCase(BuiltinKeywords.groovy:334) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325) at groovy.lang.MetaClassImpl.invokeStaticMethod(MetaClassImpl.java:1469) at org.codehaus.groovy.runtime.callsite.StaticMetaClassSite.call(StaticMetaClassSite.java:53) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:141) at Script1543237758061.run(Script1543237758061.groovy:24) at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:183) at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:108) at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:294) at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:285) at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:264) at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:256) at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:200) at com.kms.katalon.core.main.TestSuiteExecutor.accessTestCaseMainPhase(TestSuiteExecutor.java:129) at com.kms.katalon.core.main.TestSuiteExecutor.accessTestSuiteMainPhase(TestSuiteExecutor.java:112) at com.kms.katalon.core.main.TestSuiteExecutor.execute(TestSuiteExecutor.java:81) at com.kms.katalon.core.main.TestCaseMain.startTestSuite(TestCaseMain.java:142) at com.kms.katalon.core.main.TestCaseMain$startTestSuite$0.call(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:141) at TempTestSuite1546614875646.run(TempTestSuite1546614875646.groovy:36) at groovy.lang.GroovyShell.runScriptOrMainOrTestOrRunnable(GroovyShell.java:263) at groovy.lang.GroovyShell.run(GroovyShell.java:518) at groovy.lang.GroovyShell.run(GroovyShell.java:507) at groovy.ui.GroovyMain.processOnce(GroovyMain.java:653) at groovy.ui.GroovyMain.run(GroovyMain.java:384) at groovy.ui.GroovyMain.process(GroovyMain.java:370) at groovy.ui.GroovyMain.processArgs(GroovyMain.java:129) at groovy.ui.GroovyMain.main(GroovyMain.java:109) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.codehaus.groovy.tools.GroovyStarter.rootLoader(GroovyStarter.java:109) at org.codehaus.groovy.tools.GroovyStarter.main(GroovyStarter.java:131) )

The globa variable “Login_to_Tool” is an URL like:
https://xxx.xyz.xxx/xxx/xxx?service=https://abc.server.lan:/tool/

Again: It works sometimes, like 50/50, hence probably a bug, because if there would be an actual issue with the URL, then it should never work.

Is there a workaround or anythin I can change to make the execution stable?

Thank you,
Dennis


#2

Thank you for the report. We will take a look. Would it be possible for you to share the scripts?

@Loan_Tran @Alice


#3

Hi @Dennis_Raunitschke,
According to the log
“No signature of method: static com.kms.katalon.core.configuration.RunConfiguration.getOverridingGlobalVariable() is applicable for argument types: (java.lang.String) values: [Login_to_Tool]”, it means RunConfiguration.getOverridingGlobalVariable() has not imported yet. So, try to imported the library by the line “import com.kms.katalon.core.configuration.RunConfiguration” first then run the script. If you still meet the issue, share us your script for further investigation.


#4

Hi @Loan_Tran,
thanks for the suggestion, but unfortunately the problem still occurs after I added the library.

Here is a the current Error Message and below are the scripts:

Note: There error occurs in the Log In test case that is called from the main test case

01-07-2019 11:52:44 AM - [PASSED] - Browser is opened with url: ‘’
01-07-2019 11:52:44 AM - [END] - End action : openBrowser
01-07-2019 11:52:44 AM - [START] - Start action : Statement - If (Environment == “Test1” || Environment == “Test2”)
01-07-2019 11:52:44 AM - [END] - End action : Statement - If (Environment == “Test1” || Environment == “Test2”)
01-07-2019 11:52:44 AM - [ERROR] - Test Cases/Tool/Tool_log_in FAILED because (of) (Stack trace: groovy.lang.MissingMethodException: No signature of method: static com.kms.katalon.core.configuration.RunConfiguration.getOverridingGlobalVariable() is applicable for argument types: (java.lang.String) values: [Login_to_Tool]

Main Test case:

import static com.kms.katalon.core.testcase.TestCaseFactory.findTestCase
import static com.kms.katalon.core.testobject.ObjectRepository.findTestObject

import com.kms.katalon.core.configuration.RunConfiguration
import com.kms.katalon.core.model.FailureHandling as FailureHandling
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI

import internal.GlobalVariable as GlobalVariable

WebUI.callTestCase(findTestCase(‘Tool/Tool_log_in’), [:], FailureHandling.STOP_ON_FAILURE)

WebUI.click(findTestObject(‘Tool/Page_1/a_1’))

WebUI.waitForElementNotVisible(findTestObject(‘Tool/General_Objects/Block_UI_Wrapper’), 30, FailureHandling.OPTIONAL)

WebUI.verifyElementPresent(findTestObject(‘Tool/General_Objects/Filter_Link’), 0)

WebUI.click(findTestObject(‘Tool/General_Objects/Filter_Link’))

WebUI.verifyElementPresent(findTestObject(‘Tool/General_Objects/Filter_Body’), 0)

WebUI.verifyElementVisible(findTestObject(‘Tool/General_Objects/Filter_Body’))

WebUI.verifyElementPresent(findTestObject(‘Tool/General_Objects/First_deal_in_list’), 0)

WebUI.click(findTestObject(‘Tool/General_Objects/First_deal_in_list’))

WebUI.verifyElementPresent(findTestObject(‘Tool/General_Objects/first_deal_in_list_details’), 0)

WebUI.verifyElementVisible(findTestObject(‘Tool/General_Objects/first_deal_in_list_details’))

WebUI.verifyElementPresent(findTestObject(‘Tool/General_Objects/Second_deal_in_list’), 0)

WebUI.click(findTestObject(‘Tool/General_Objects/Second_deal_in_list’))

WebUI.verifyElementPresent(findTestObject(‘Tool/General_Objects/second_deal_in_list_details’), 0)

WebUI.waitForElementVisible(findTestObject(‘Tool/General_Objects/second_deal_in_list_details’), 0)

WebUI.closeBrowser()

Log In Test Case:

import static com.kms.katalon.core.testobject.ObjectRepository.findTestObject
import com.kms.katalon.core.configuration.RunConfiguration
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI

import internal.GlobalVariable as GlobalVariable

WebUI.openBrowser(’’)

if (GlobalVariable.Environment == ‘Test1’ || GlobalVariable.Environment == ‘Test2’) {
WebUI.navigateToUrl(GlobalVariable.Login_to_Tool)

WebUI.setText(findTestObject('Tool/Page_Login/input_username'), 'some_user')

WebUI.setEncryptedText(findTestObject('Tool/Page_Login/input_password'), '12345')

WebUI.click(findTestObject('Tool/Page_Login/input_submit'))

} else {
WebUI.navigateToUrl(GlobalVariable.Tool_Link)
}

Thank you so much!


#5

Just a guess - what is the type of GlobalVariable.Login_to_Tool? Is it String or something else?


#6

Yes, it is the URL as a String.

Like:
https://xxx.xxx.xx/xxx/login?service=https://xxxx.server.lan:1234/Tool/


#7

Additional Info:
If I set retry=2 the first run still fails, but during the second no problem occurs.

Looks like a bug to me.
Otherwise the error should always occur.


#8

It sounds like a bug for me. But I am concerned that the behavior is not deterministic. Given that the test is still the same, it should follow the same path. And also I don’t know what “Overridden Global variable” is.


#9

Hi @Dennis_Raunitschke,
Can you provide us a screen shot of variables you set in default profile? We need to check name and value of the variables, at least 3 ones: Environment, Login_to_Tool, and Tool_Link. Besides, if you run the script by Jenkins job, give us your batch command as well so that we can check if the issue comes from overriding global variables via command?


#10

Hi,
I am not using the default environment, but here is the data for the environment I use.
Unfortunately I have to anonymize the link, but I kept all special characters in there:

grafik

Note on variable Tool_Link:
Only used when environment == LOCAL. Here I always use either Test1 or Test2 environment
grafik

Batch Command:

set +x
mkdir console_mode_reports

xvfb-run ${HOME}/Katalon_Studio/katalon -noSplash -runMode=console
-projectPath="${WORKSPACE}/Tool_UI_Tests/Tool_UI_Tests.prj"
-testSuitePath=“Test Suites/Tool/test_test_suite”
-executionProfile=“AC1” -browserType=“Firefox (headless)”
-summaryReport -reportFolder="${WORKSPACE}/console_mode_reports" \


#11

@Loan_Tran
I set the the executionProfile to “default” , still doesn’t work consistently.


#12

@Dennis_Raunitschke,
I verified your issue on Win and MAC but it works okay. I’m trying to set up the environment to check your issue on Linux. I’ll keep you posted as soon as possible.


#13

@Loan_Tran
Thank you for investigating this further.

In the meanwhile I am still attempting to resolve this, too.

Searching through the forum, I currently try the following settings @Vinh_Nguyen recommended in a different thread:

  1. Import the project /bin folder into the GIT repository
  2. Do not clean up the Jenkins workspace with every build
  • we upgraded Katalon from 5.8.5 to 5.10.1

This setup is currently in Test. So far it worked two builds in a row.
I’ll let you know if this fixed the issues.

Thanks,
Dennis


#14

Good Morning,
the tests ran 9 times over the weekend w/o problems.

Current setup / run config to mitigate the issue:

  1. Katalon Version 5.10.1
  2. Import the project /bin folder into the GIT repository
  3. Do not clean up the Jenkins workspace with every build

Execution profile is != “default” -> still works fine.