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

5 views
Skip to first unread message

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

unread,
Sep 9, 2019, 6:30:02 PM9/9/19
to jenkinsc...@googlegroups.com
Anthony Le created an issue
 
Jenkins / Bug JENKINS-59288
Not able to obtain RobotFramework-SikuliLibrary
Issue Type: Bug Bug
Assignee: Jan Niklas Hasse
Components: python-plugin
Created: 2019-09-09 22:29
Environment: Firefox: 60.8.0esr
RHEL: 3.10.0-1062.1.1.el7.x86_64
Python: 2.7.16
Java: 1.8.0_222
Jenkins: 2.194
Plugins:
Trilead API Plugin
Gradle Plugin
Folders Plugin
Branch API Plugin
Oracle Java SE Development Kit Installer Plugin
JavaScript GUI Lib: Handlebars bundle plugin
Script Security Plugin
Docker Commons Plugin
Structs Plugin
Pipeline: Step API
SCM API Plugin
Docker Pipeline
Pipeline: API
JUnit Plugin
JavaScript GUI Lib: Moment.js bundle plugin
Command Agent Launcher Plugin
bouncycastle API Plugin
Pipeline: Basic Steps
OWASP Markup Formatter Plugin
Token Macro Plugin
Pipeline: Stage View Plugin
Build Timeout
Credentials Plugin
Plain Credentials Plugin
Pipeline: Build Step
SSH Credentials Plugin
Credentials Binding Plugin
Timestamper
Pipeline: Model API
Pipeline: Supporting APIs
Durable Task Plugin
PAM Authentication plugin
Pipeline: Nodes and Processes
Matrix Project Plugin
Resource Disposer Plugin
GitHub API Plugin
Workspace Cleanup Plugin
Ant Plugin
JavaScript GUI Lib: ACE Editor bundle plugin
JSch dependency plugin
JavaScript GUI Lib: jQuery bundles (jQuery and jQuery UI) plugin
Pipeline: SCM Step
Git plugin
Pipeline: Groovy
Pipeline: Job
Apache HttpComponents Client 4.x API Plugin
Git client plugin
Display URL API
GitHub plugin
Mailer Plugin
Pipeline: REST API Plugin
Pipeline: Milestone Step
Jackson 2 API Plugin
Pipeline: Input Step
GIT server Plugin
Pipeline: Stage Step
Pipeline Graph Analysis Plugin
Pipeline: Declarative Extension Points API
Pipeline: Shared Groovy Libraries
Pipeline: Multibranch
Authentication Tokens API Plugin
Pipeline: Stage Tags Metadata
Pipeline: Declarative Agent API
Pipeline: Declarative
Lockable Resources plugin
Pipeline
GitHub Branch Source Plugin
Pipeline: GitHub Groovy Libraries
MapDB API Plugin
Subversion Plug-in
SSH Slaves plugin
Matrix Authorization Strategy Plugin
LDAP Plugin
Email Extension Plugin
Javadoc Plugin
Maven Integration plugin
Run Condition Plugin
Conditional BuildStep
Parameterized Trigger plugin
Build Pipeline Plugin
Mercurial plugin
SSH plugin
Pyenv Pipeline Plugin
WMI Windows Agents Plugin
ruby-runtime
External Monitor Job Type Plugin
pyenv plugin
Python Plugin
Python Wrapper Plugin
slave-status
Slave Utilization Plugin
Slave SetupPlugin
Slave squatter plugin
SSH Agent Plugin
JAXB plugin
Google APIs Client Library for Jenkins
jQuery plugin
Environment Dashboard Plugin
Bitbucket Plugin
Jython Plugin
Labels: jenkins Python SikuliLibrary RobotFramework
Priority: Major Major
Reporter: Anthony Le

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:

"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'>"

 

I've isolated the build to 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.

"from robot.libraries.Remote import Remote
remote = Remote('http://127.0.0.1:10000/')
remote.get_keyword_names()"

The expected outcome if the connection is successful would be a list of keywords from the library, as show below.

['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']

Is the Jenkins build cutting my remote server short? Based on my troubleshooting, I believe the above error is close to connecting but is prevented from completing. Otherwise, the error would be connection refused due to no available server.

Thank you for taking the time to read.

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 10, 2019, 10:46:03 AM9/10/19
to jenkinsc...@googlegroups.com
Anthony Le updated an issue
Change By: Anthony Le
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}
 

I've isolated the build to 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 expected outcome if the connection is successful would be a list of keywords from the library, as show 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}
I also tried just starting the server under Jenkins and attempting to connect to the server via CLI. I was met with the same runtime error.

Is the Jenkins build cutting my remote server short? Based on my troubleshooting, I believe the above error is close to connecting but is prevented from completing. Otherwise, the error would be connection refused due to no available server.

Thank you for taking the time to read.

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

unread,
Sep 10, 2019, 10:56:03 AM9/10/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 've isolated 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
expected outcome if build still failed.

*Test Case 2*: I started 
the connection is 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 would be .

*Test Case 4*: Of course running the server and python commands via CLI resulted in
a list of success. The result via CLI would display all the keywords from associated to the Sikuli library, as show 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}
I also tried just starting the server under Jenkins and attempting to connect to the server via CLI. I was met with the same runtime error.  

Is the Jenkins build cutting my remote server short? Based on my troubleshooting, I believe the above error is close to connecting but is prevented from completing. Otherwise, the error would be connection refused due to no available server.

Thank you for taking the time to read.
Reply all
Reply to author
Forward
0 new messages