CMD execution : Custom Keyword class do not generate sometimes

Hello,

It is observed that Katalon fails to generate custom keywords class files some times.
As a result of this the test case execution fails with java.lang.ClassNotFoundException:

Its a Katalon command line execution. The project folder do not initially contains the /bin folder. The project is freshly cloned from source repo.
Executing from the command line should generate the /bin folder, and it does , but some times it do not create the .class files for some custom keywords. as a result of this we get class not found exception later when any test case invoke any method from such a class.

Here is a related post to this issue

Looks like its an issue with Katalon ?
Or do we have any workaround to solve this ?

Thanks
Musaffir

Hello @Andreas_Voit can you please let me know how did you resolve this issue earlier ?
Jenkins option “Throttle builds” to 15 seconds. — does this meant some kind of delay before katalon builds the project ?

@kazurayam just FYI

Thanks

Hi. What did Katalon print on the console?

The test is executed by a test suite collection , so I do not get useful logs in the console here to figure out issue.
And it is not always issue, but some times.

The exception trace I see is

Caused by: java.lang.ClassNotFoundException: wsPackage.responseValidationKeywords
at com.kms.katalon.core.main.CustomKeywordDelegatingMetaClass.getCustomKeywordClassAndSetMetaClass(CustomKeywordDelegatingMetaClass.java:100)
at com.kms.katalon.core.main.CustomKeywordDelegatingMetaClass.invokeStaticMethod(CustomKeywordDelegatingMetaClass.java:45)
at Verify DV Error fails.run(Verify DV Error fails:32)
at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)
at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)
at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:337)
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:328)
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:307)
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:299)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:233)
at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:114)
at com.kms.katalon.core.keyword.builtin.CallTestCaseKeyword$_callTestCase_closure1.doCall(CallTestCaseKeyword.groovy:59)
… 20 more

Hello @musaffir.puthukudi,

yes this option makes a delay between the builds and solved my problem.

1 Like

Thank you @Andreas_Voit . really appreciate your reply :slight_smile:
Does that means, once you clone the project and when you got the project folder, you wait for some time (few seconds) before running katalon command line for the project, for it to get build ?

No, the parameter Jenkins option “Throttle builds” to 15 seconds. does the delay.

When executing manually I never get this problem, it only occures on jenkins task.

ah ok … I get it , you make it wait for 15 sec with the help of Jenkins option … Thank you…