-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Description
Following steps from funq tutorial
The upshot is that something is wrong with connecting to the injected server. Here are some details.
- macOS 11.6.2, Qt 5.15.6
- installed nose, funq and funq-server with no errors (see deps at the bottom)
- built player_tester app and set up the config, alias etc files as per tutorial
- created the test_*.py per tutorial
- Python v.2.7.16 (system version I believe)
- pip v.20.3.4
- funq-1.2.0-py2-none-any.whl (57 kB)
- funq_server-1.2.0-py2-none-any.whl (25 kB)
- running tests using:
coder$ nosetests --with-funq -s -x test_1.py
launches player_tester app and then in a few seconds I get the following:
coder$ nosetests --with-funq -s -x test_1.py
E
======================================================================
ERROR: test_1.py:MyTestCase.test_my_first_test
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/coder/Library/Python/2.7/lib/python/site-packages/funq/testcase.py", line 273, in setUp
self.__ctx = self._create_funq_ctx()
File "/Users/coder/Library/Python/2.7/lib/python/site-packages/funq/testcase.py", line 307, in _create_funq_ctx
ctx = ApplicationContext(self.__app_config__)
File "/Users/coder/Library/Python/2.7/lib/python/site-packages/funq/client.py", line 418, in __init__
timeout_connection=appconfig.timeout_connection
File "/Users/coder/Library/Python/2.7/lib/python/site-packages/funq/client.py", line 105, in __init__
wait_for(connect, timeout_connection, 0.2)
File "/Users/coder/Library/Python/2.7/lib/python/site-packages/funq/tools.py", line 74, in wait_for
raise res
error: [Errno 61] Connection refused
-------------------- >> begin captured logging << --------------------
funq.client: INFO: The tested application will be launched in the directory '/Users/coder/projects/funq-master/server/build-player_tester-PT_Clang_Qt5_15_6-Release/player_tester.app/Contents/MacOS' with the command ['/Users/coder/Library/Python/2.7/bin/funq', '/Users/coder/projects/funq-master/server/build-player_tester-PT_Clang_Qt5_15_6-Release/player_tester.app/Contents/MacOS/player_tester']
funq.client: INFO: Launching tested application [52131].
--------------------- >> end captured logging << ---------------------
----------------------------------------------------------------------
Ran 1 test in 20.905s
FAILED (errors=1)
Running the app with server injection
coder$ funq --host 0.0.0.0 --port 58000 /Users/coder/projects/funq-master/server/build-player_tester-PT_Clang_Qt5_15_6-Release/player_tester.app/Contents/MacOS/player_tester &
then running a python script below
from funq.client import FunqClient
funq = FunqClient("127.0.0.1", 58000)
funq.widget('btnTest').click()
My expectation here was that the above script would click Test button in player_tester app. I got this:
coder$ python funq-client.py
Traceback (most recent call last):
File "funq-client.py", line 3, in <module>
funq = FunqClient("localhost", 58000)
File "/Users/coder/Library/Python/2.7/lib/python/site-packages/funq/client.py", line 105, in __init__
wait_for(connect, timeout_connection, 0.2)
File "/Users/coder/Library/Python/2.7/lib/python/site-packages/funq/tools.py", line 74, in wait_for
raise res
socket.error: [Errno 61] Connection refused
No app apparently binds to 58000 (or any other port I tried).
Dependencies
libFunq.dylib:
libFunq.1.dylib (compatibility version 1.0.0, current version 1.0.0)
@rpath/QtGui.framework/Versions/5/QtGui (compatibility version 5.15.0, current version 5.15.6)
/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (compatibility version 45.0.0, current version 2022.44.149)
/System/Library/Frameworks/Metal.framework/Versions/A/Metal (compatibility version 1.0.0, current version 244.119.0)
@rpath/QtCore.framework/Versions/5/QtCore (compatibility version 5.15.0, current version 5.15.6)
/System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration (compatibility version 1.0.0, current version 1.0.0)
/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0)
/System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)
/System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 905.6.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1292.100.5)
/projects/funq-master/server/build-player_tester-PT_Clang_Qt5_15_6-Release/player_tester.app/Contents/MacOS/player_tester:
@rpath/QtWidgets.framework/Versions/5/QtWidgets (compatibility version 5.15.0, current version 5.15.6)
@rpath/QtGui.framework/Versions/5/QtGui (compatibility version 5.15.0, current version 5.15.6)
/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (compatibility version 45.0.0, current version 2022.44.149)
/System/Library/Frameworks/Metal.framework/Versions/A/Metal (compatibility version 1.0.0, current version 244.119.0)
@rpath/QtCore.framework/Versions/5/QtCore (compatibility version 5.15.0, current version 5.15.6)
/System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration (compatibility version 1.0.0, current version 1.0.0)
/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0)
/System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)
/System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 905.6.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1292.100.5)
Thank you
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels