rainmanwy / robotframework-SikuliLibrary

Sikuli Robot Framework Library provide keywords for Robot Framework to test UI through Sikuli.
Apache License 2.0
147 stars 61 forks source link

[RobotFramework][Jenkins/Linux][SikuliLibrary] Running sikuliLibrary with jenkins : getting error : Failed to get_keyword_names #127

Open sirin2020 opened 4 years ago

sirin2020 commented 4 years ago

Hello :) I'm trying to run some tests using RobotFramework and sikuliLibrary on jenkins ( installed on Linux machine) :

when running my tests i got the following error :

Test get_keyword_names failed! Connecting remote server at http://127.0.0.1:52081/ failed: <Fault 0: 'Failed to invoke method get_keyword_names in class org.robotframework.remoteserver.servlet.ServerMethods: java.lang.RuntimeException'>

sikuli

Could anywone help me to resolve this issue ? Thnx

sriramcse31 commented 2 years ago

Hi @sirin2020, Any luck with the resolution of the above issue? I am facing the same issue on AWS Code pipeline. Appreciate if you can provide any leads on this. Thanks.

rainmanwy commented 2 years ago

hi, @sriramcse31 you may check these links headless-execution-of-gui-tests-with-jenkins

could you post more details. OS: ? with desktop? Do you configure "DISPLAY" environment?

sriramcse31 commented 2 years ago

Hi @rainmanwy, thanks for your response.

I am trying to run robot sikuli tests against Linux image on AWS CodeBuild. I tried to follow the article you have suggested but i dont think there are add-on's for CodeBuild similar to what we have on Jenkins.

Below is error I am seeing while trying to run the tests. Please suggest if I need to start any server for this.

[ WARN ] Test get_keyword_names failed! Connecting remote server at http://127.0.0.1:37979/ failed: -- 729 | [ ERROR ] Error in file '/codebuild/output/src560271655/src/bitbucket.org/appservicesdevelopment/dts_test/application_modernization/tests/complaints/resources/complaints_common_keywords.robot' on line 4: Initializing library 'SikuliLibrary' with no arguments failed: Failed to get_keyword_names! 730 | Traceback (most recent call last): 731 | File "/root/.pyenv/versions/3.9.5/lib/python3.9/site-packages/SikuliLibrary/sikuli.py", line 54, in __init__ 732 | self.start_sikuli_process(port) 733 | File "/root/.pyenv/versions/3.9.5/lib/python3.9/site-packages/SikuliLibrary/sikuli.py", line 93, in start_sikuli_process 734 | self.remote = self._connect_remote_library() 735 | File "/root/.pyenv/versions/3.9.5/lib/python3.9/site-packages/SikuliLibrary/sikuli.py", line 208, in _connect_remote_library 736 | self._test_get_keyword_names(remote) 737 | File "/root/.pyenv/versions/3.9.5/lib/python3.9/site-packages/SikuliLibrary/sikuli.py", line 225, in _test_get_keyword_names 738 | raise RuntimeError('Failed to get_keyword_names!') 739 | Complaints.01 Complaints End To End :: Test complaint management app

Regards, Sriram