Katalon command is not running properly on Jenkins


#1

So I am trying to run a katalon comand in Jenkins and the problem is that my second test fails, so the entire job fails.
In my first one I try to load something to the web page and it passes correctly but nothing really happens. I think this is because whenever I execute my katalon test cases in Jenkins my browser does not open so nothing happens. I think this is the reason why my second test case fails.

This is the command I use:
cd C:\Users\bvares\Documents\Katalon Studio\Katalon_Studio_Windows_64-6.2.0
katalon -noSplash -runMode=console -projectPath=“C:\Users\bvares\Katalon Studio\plexusPrueba\plexusPrueba.prj” -retry=0 -testSuitePath=“Test Suites/TestSuitePlexus” -executionProfile=“default” -browserType=“Chrome”

The TC are working fine in Katalon Studio so I do not know what to do specially because I am new to Jenkins.
If anyone has an idea of what is happening and can help me, it will be highly appreciated. If you need more information to help me, just ask for it.


#2

Can you share the Jenkins console log for the run?


#3

Yes, here it is:

This is the first error that appears on the console when I run it
Unable to click on object ‘Object Repository/Page_Recepcin de Muestras/a_Recepcin de Muestras’ (Root cause: com.kms.katalon.core.exception.StepFailedException: Unable to click on object ‘Object Repository/Page_Recepcin de Muestras/a_Recepcin de Muestras’
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.stepFailed(WebUIKeywordMain.groovy:64)
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:26)
at com.kms.katalon.core.webui.keyword.builtin.ClickKeyword.click(ClickKeyword.groovy:86)
at com.kms.katalon.core.webui.keyword.builtin.ClickKeyword.execute(ClickKeyword.groovy:67)
at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:56)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.click(WebUiBuiltInKeywords.groovy:616)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$click$3.call(Unknown Source)
at RecepcionMuestras.run(RecepcionMuestras:34)
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.TestSuiteExecutor.accessTestCaseMainPhase(TestSuiteExecutor.java:133)
at com.kms.katalon.core.main.TestSuiteExecutor.accessTestSuiteMainPhase(TestSuiteExecutor.java:116)
at com.kms.katalon.core.main.TestSuiteExecutor.execute(TestSuiteExecutor.java:83)
at com.kms.katalon.core.main.TestCaseMain.startTestSuite(TestCaseMain.java:157)
at com.kms.katalon.core.main.TestCaseMain$startTestSuite$0.call(Unknown Source)
at TempTestSuite1562935866420.run(TempTestSuite1562935866420.groovy:35)
Caused by: org.openqa.selenium.ElementNotVisibleException: element not interactable

As you can see, it looks like a typical error that could appear in Katalon, but in Katalon works correctly

This is the last thing the console shows:
C:\Users\bvares\Documents\Katalon Studio\Katalon_Studio_Windows_64-6.2.0>exit 3 Build step ‘Ejecutar un comando de Windows’ marked build as failure Finished: FAILURE

Here is the entire pipeline I created. As you can see it fails when the test cases fail:
pipelineFail


#4

Try adding a waitForElementVisible before you click that object.


#5

Question:
Should I install the .war jenkins instead of the windows one? I was doing a little bit more of research I found that it could be a problem. I will try that and if it does not work, then I will try your solution


#6

Dude !! My problem was exactly that !!


#7

Cool. Glad it helped.


#8