[JIRA] (JENKINS-59288) Not able to connect to RobotFramework-SikuliLibrary

13 views
Skip to first unread message

a.le@tac-eng.com (JIRA)

unread,
Sep 12, 2019, 2:29:03 PM9/12/19
to jenkinsc...@googlegroups.com
Anthony Le updated an issue
 
Jenkins / Bug JENKINS-59288
Not able to connect to RobotFramework-SikuliLibrary
Change By: Anthony Le
Summary: Not able to obtain connect to RobotFramework-SikuliLibrary
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

a.le@tac-eng.com (JIRA)

unread,
Sep 17, 2019, 11:28:03 AM9/17/19
to jenkinsc...@googlegroups.com
Anthony Le updated an issue
Change By: Anthony Le
Component/s: robot-plugin

a.le@tac-eng.com (JIRA)

unread,
Sep 17, 2019, 5:37:02 PM9/17/19
to jenkinsc...@googlegroups.com
Anthony Le updated an issue
Robot Framework along with the Sikuli Library are being used to automate some GUI testing. Jenkins has been chose to help automate this process as well as the rest of our CI pipeline. Robot Framework and the Sikuli Library work completely fine via the CLI.

My Jenkins build executes shell commands to run my robot script. The failed build describes an issue with connecting to the remote server Java process:
{code:java}
Traceback (most recent call last):
13:54:15  File "/tmp/jenkins6279614729324543791.py", line 3, in <module>
13:54:15    remote.get_keyword_names()
13:54:15  File "/usr/lib/python2.7/site-packages/robot/libraries/Remote.py", line 74, in get_keyword_names
13:54:15    % (self._uri, error))
13:54:15 RuntimeError: Connecting remote server at[ http://127.0.0.1:10000/|http://127.0.0.1:10000/] failed: <Fault 0: 'Failed to invoke method get_keyword_names in class org.robotframework.remoteserver.servlet.ServerMethods: java.lang.RuntimeException'>
{code}
 

*Test case 1*: I simplified the build to only start the java process (e.g java -jar /<path to Sikuli library>/SikuliLibrary.jar 10000 /<Captured Images path>) and then execute a few python lines to reach the remote server to the SikuliLibrary, as show below.
{code:java}
from robot.libraries.Remote import Remote
remote = Remote('http://127.0.0.1:10000/')
remote.get_keyword_names()
{code}
The build still failed.

*Test Case 2*: I started the server via Jenkins and ran the python lines via CLI. I was met with the same runtime error.

*Test Case 3*: Reversing roles, I started the server via CLI and ran a python script via Jenkins. The build was successful.

*Test Case 4*: Of course running the server and python commands via CLI resulted in a success. The result via CLI would display all the keywords associated to the Sikuli library, as shown below.
{code:java}
['openApplication', 'closeApplication', 'imageCount', 'changeScreenId', 'captureRegion', 'selectRegion', 'clickIn', 'setRoi', 'highlightRoi', 'mouseDown', 'getExtendedRegionFrom', 'getNumberOfScreens', 'addImagePath', 'wheelDown', 'getScreenCoordinates', 'getCurrentScreenId', 'clearAllHighlights', 'waitForImage', 'waitUntilScreenContain', 'getText', 'inputText', 'doubleClickIn', 'click', 'captureScreen', 'doubleClick', 'screenShouldContain', 'clearHighlight', 'mouseUp', 'readTextFromRegion', 'pasteText', 'setCaptureFolder', 'clickNth', 'waitForMultipleImages', 'dragAndDrop', 'highlight', 'highlightRegion', 'typeWithModifiers', 'pressSpecialKey', 'rightClickIn', 'resetRoi', 'captureRoi', 'clickRegion', 'mouseMove', 'waitUntilScreenNotContain', 'wheelUp', 'rightClick', 'setTimeout', 'dragAndDropByOffset', 'screenShouldNotContain', 'exists', 'getImageCoordinates', 'setCaptureMatchedImage', 'removeImagePath', 'getMatchScore', 'setShowActions', 'setOcrTextRead', 'setSlowMotionDelay', 'setWaitScanRate', 'setMinSimilarity', 'setMoveMouseDelay', 'stop_remote_server']{code}
 

Is the Jenkins build cutting my remote server short? Based on my troubleshooting Ultimately , I believe the above error is close am just trying to connecting but is prevented from completing run a robot script that tries to pull the SikuliLibrary . Otherwise However , the error would python script for get_keyword_names cannot be connection refused due to no available server invoked .  

Thank you for taking the time to read.

a.le@tac-eng.com (JIRA)

unread,
Sep 19, 2019, 7:17:03 PM9/19/19
to jenkinsc...@googlegroups.com
Anthony Le updated Bug JENKINS-59288
 

XVFB was the solution. Sikuli requires a frame buffer to allow the connection.

If you run a Jenkins build that involves Robot Framework with the Sikuli Library, then XVFB will resolve connection issues.

Change By: Anthony Le
Status: Open Fixed but Unreleased
Assignee: Jan Niklas Hasse Anthony Le
Resolution: Fixed

aleksi.simell@eficode.com (JIRA)

unread,
Jan 17, 2020, 12:57:04 AM1/17/20
to jenkinsc...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages