Run nosetest with selenium grid - python

I'm currently trying to run python UI automations using selenium grid and nosetest. I finished setting up the hub and two nodes. I tried to run the tests by the command below:
nosetests-2.7 --tests=ui_tests/sample_tests.py --tc-file=conf/config.ini --nologcapture -v --with-holmium --holmium-browser=chrome --holmium-remote=http://<my_hub_ip>:4444/wd/hub --process-timeout=600 --holmium-browser-per-test --holmium-ignore-ssl-errors --processes=2
I get the error message on nodes below after some test cases finished running:
INFO:I/O exception (org.apache.http.nohttpresponseexception) caught when processing request to <>->http://<my_hub_ip>:4444: The target server failed to respond
I have done searching for this issue, but didn't find anything useful to solve the problem. I'm wondering if it is because the VM that is acting as the hub is not powerful enough.
I'm using selenium-server-standalone-2.53.1 and nosetests-2.7.

So I finally figured out the problem. Just download the newest version of selenium-server-standalone, it works perfectly. The version I'm using now is 3.0.1. They had a fix of the I/O exception in this version.

Related

VSCode Python SSH - Debug aborted without errors or warnings

I am developing an application on a remote server.
I'm using Python and am connected via ssh with the specific extension.
I start debugging and everything seems to proceed normally but suddenly debugging stops and there is no reason (error or warning).
Can anyone suggest me where to look for the reason or how to trace the problem?
The script, executed outside VSCode, runs smoothly.
Thanks in advance.
in the end I found a possible cause and, therefore, the solution.
There is a problem with the sequence of imports and module import for MariaDB. By moving this import to the head, the problem was solved.

Maximum retries exhausted. Could not install VS Code server on [azure compute instance name]: Cannot communicate with the Jupyter endpoint

I am trying to edit my jupyter notebook which is in Azure ML Workspace. I use the 'edit-in vscode' option, it opens the vs-code or when I try to connect to compute instance directly from vs code, then I am getting the following error:
[Info - 2021-11-08 07:06:06.885] Using commit id "b3318bc0524af3d74034b8bb8a64df0ccf35549a" and quality "stable" for server
[Error - 2021-11-08 07:06:06.971] Invalid response: 405 Method Not Allowed
[Error - 2021-11-08 07:06:06.971] Cannot communicate with the Jupyter endpoint.
[Error - 2021-11-08 07:06:07.981] Maximum retries exhausted. Could not install VS Code server on saksham-dubey: Cannot communicate with the Jupyter endpoint.
Earlier it was working fine and I had no issues with vs-code, I was able to edit/run files directly but without changing anything, it started giving me problem.
So far, I have tried uninstalling/removing vscode completely, reinstall it, deleting Azure compute instance and creating a fresh instance but nothing worked, I am still facing the issue.
What is the problem here and how to resolve this?
ps- saksham-dubey is my compute instance name, which is a Azure Compute Instance (Nvidia Tesla K80 GPU)
Been dealing with the same issue since Friday, tried pretty much anything to no avail.
Luckily I found a workaround by enabling SSH on a new GPU instance & connecting to the instance through Remote SSH from VS Code.
Will keep posted if I found a solution for the UI access.
I found the fix to the problem.
The problem was caused due to some backend error in the 'Azure Machine Learning' vs-code extension.
The issue was caused in the version: 0.6.26
The fix was implemented on the version: 0.6.27
Updating your vs-code extension will make it work.
For any further information you can refer: Github Link to vscode-tools-for-ai
Also you can open an issue on same Github page, if anything like this happens again.

Running an opencv based python script on a remote server with ssh forwarding from my macbook gives me an error

I am trying to run a python script on a remote server, which includes displaying images. The image does not get displayed and I get an error Gtk-WARNING **: cannot open display:
I have checked posts where they suggest editing the flags in sshd_config and also setting the DISPLAY variable manually. But, none of that seems to be working for me.
X11Forwarding yes
X11DisplayOffset 10
X11UseLocalhost no
XAuthLocation /usr/X11/bin/xauth
Running xclock or xeyes also gives me errors.
Edit: I used ssh -X and ssh -Y to ssh into the server, neither worked
Solution: Restart after installing XQuartz
After looking through multiple posts and trying to make it work, I realised that after installing XQuartz, the user is required to restart the machine. It allows to set the correct environment variables (like DISPLAY). It works for me now after having restarted.
Alternative
However, in case you face a similar problem, not stemming due to the restart issue, I found an alternate way as suggested in the following link:
https://uisapp2.iu.edu/confluence-prd/pages/viewpage.action?pageId=280461906

Tests fail ran by gitlab-ci, but not ran in bash

I'm using gitlab-ci to automatically build a C++ project and run unit-tests written in python (it runs the daemon, and then communicates via the network/socket based interface).
The problem I'm finding is that when the tests are run by the GitLab-CI runner, they fail for various reasons (with one test, it stalls indefinitely on a particular network operation, on the other it doesn't receive a packet that should have been sent).
BUT: When I open up SSH and run the tests manually, they all work successfully (the tests also succeed on all of our developers' machines [linux/windows/OSX]).
At this point I've been trying to replicate enough of the build/test conditions that gitlab-ci is using but I don't really know any exact details, and none of my experiments have reproduced the problem.
I'd really appreciate help with either of the following:
Guidance on running the tests manually outside of gitlab-ci, but replicating its environment so I can get the same errors/failures and debug the daemon and/or tests, OR
Insight into why the test would fail when ran by GitLab-CI-Runner
Sidetrack 1:
For some reason, not all the (mostly debugging) output that would normally be sent to the shell shows up in the gitlab-ci output.
Sidetrack 2:
I also played around setting it up with jenkins, but one of the tests fails to even connect to the daemon, while the rest do it fine.
-i usually replicate the problem by using a docker container only for the runner and running the tests inside it, dont know if you have it setup like this =(.
-Normally the test doesnt actually fail if you log in the container you will see he actually does everything but doesnt report back to the Gilab CI, dont freak out it does it job it simply does not say it.
PS: you can see if its actually running by checking the processes on the machine.
example:
im running a gitlab ci with java and docker:
gitlab ci starts doing its thing then hangs at a download,meanwhile i log in the container and check that he is actually working and manages to upload my compiled docker image.

Arelle Xbrl validation - unable to start web service - socket error 10013

I'm using the Arelle project to implement validation of my Xbrl files.
http://arelle.org/documentation/api-web-services/
When i try to start the webserver that i can call from my code i receive following error.
Been looking up how to fix this and it all points to disabling my antivirus. Got it disabled and i still get this error. Arelle is a Python project
This should start a webservice that i can reach on www.localhost:8082/rest/xbrl
Appearently this was an issue with the previous release of the project.
I installed the latest version 2013-07-25 and no longer had this socket error

Categories