Getting "Failed to start Selenium listener." error message while running testcafe script through saucelabs - selenium

I am trying to run testcafe script through saucelabs. But getting the following error message.
MAIN failed to create listener on port 4445
MAIN possible socket error: libevent connection error
Failed to start Selenium listener. Please make sure there are no other applications using the Selenium port, or specify an alternative port for Sauce Connect via the --se-port option (exit code 2).

It looks like another application already used the 4445 port (see a similar discussion here).
 
Also, you can use the official Saucelabs Troubleshooting Guide to fix this problem.

Related

Running Karate UI tests in parallel [duplicate]

I am trying to execute a feature with 3 scenarios in it using:
Results results = Runner.parallel(tagQuery, featurePaths, null, new ArrayList<>(), 3, karateOutputPath);
With #parallel=false works fine however when I removed, it fails with the following error:
com.intuit.karate.exception.KarateException: test_input.feature:50 - driver config / start failed:
org.apache.http.conn.HttpHostConnectException: Connect to localhost:9222 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: connect, options: {type=chrome, target=null}
This occurs at the * driver <url> phase. This is an intermittent failure which most of the time 2/3 scenarios pass and one fails with this error.
Version: 0.9.6.RC3
I recommend using Zalenium like Remote Browser Grid to achieve parallelism and make sure that your scenario are self-contained or atleast keep feature independent.
Sorry, running browser tests in parallel is non-trivial which is why we have the Docker option.
EDIT: and in case you landed here because you wanted karate.callSingle() to work for UI tests, sorry that is not possible as well. But you are encouraged to perform an API sign-in via karate.callSingle() and then speed up your UI tests: https://github.com/intuit/karate/tree/develop/karate-core#hybrid-tests
Consider that this is not supported on a single node. It can be made to work if you know what you are doing, but you need to figure this out depending on whether you are using Chrome or WebDriver.
Please refer the docs: https://twitter.com/ptrthomas/status/1159295560794308609 | https://github.com/intuit/karate/tree/master/karate-core#configure-drivertarget
EDIT - also see this answer: https://stackoverflow.com/a/60387907/143475

Selenium Standalone Servers giving error "DefaultRemoteProxy unknown version,Connect to 10.0.2.15:5566 [/10.0.2.15] failed: connect timed out"

Selenium Grid Testing:
I have installed virtual box in my system and I am trying to use my local system as hub and the windows machine in the virtual box as node.
Whatever the selenium standalone server I use ( I tried a lot of versions) but it is always giving me the error "DefaultRemoteProxy unknown version,Connect to 10.0.2.15:5566 [/10.0.2.15] failed: connect timed out" on the grid console.
In the Command Prompt initially it is saying that the node is registered successfully but after some time it is saying " Marking the node http://10.0.2.15:5566 as down: cannot reach the node for 2 tries".
I have attached the screenshot. Because of this the tests are failing.
I have disable the windows firewall as well on both local and virtual box windows systems. But still no luck.
Is there anything wrong I am doing?
Can someone please help me with this?
Selenium Grid Console:
After trying a lot, I got the answer finally. This is related to network setup between my local host and the VM.
In VMBox, under the settings for a particular system, under network I have added one more adapter which is "Host-only adapter" in addition to the NAT and it resolved my problem.

Connect via ssh to CF - Error

I need to debug my application , we are using version 2.65 (Diego)
.
I use the following wiki
http://docs.cloudfoundry.org/devguide/deploy-apps/ssh-apps.html
while running cf ssh myapp via cli
nothing happens , what should I do in order
1. To see the container FS
2. To be able to debug it ?
The application was deployed successfully to CF.
Im using nodejs app.
all other commands are working well.
When I run the command cf ssh myapp I got this error after two minutes :
FAILED
Error opening SSH connection: dial tcp 52.23.201.1:2277: getsockopt: operation timed out
It sounds like a platform issue using non-standard ssh port.
You can find a bit more ssh access manual steps/troubleshooting tips on https://docs.cloudfoundry.org/devguide/deploy-apps/ssh-apps.html
If you believe it is a instance issue, you can download a copy of droplet/fs using api, more on https://apidocs.cloudfoundry.org/213/apps/downloads_the_staged_droplet_for_an_app.html

Getting error "org.openqa.selenium.WebDriverException: java.net.ConnectException: Connection refused:"

I am using selenium webdriver for the testing application. i am using using Marionettedriver for the browser. however when I run the code it gives the error "org.openqa.selenium.WebDriverException: java.net.ConnectException: Connection refused:" I have check the system path also no issue in the same.
so please suggest how to solve the error.
Also getting error " error: Found argument '--webdriver-port' which wasn't expected, or isn't valid in this context
USAGE:
geckodriver.exe [FLAGS] [OPTIONS]".
I am not able to understand for what issue this error is appears. So please let me know how to solve this
I have used the jar file for selenium server and selenium standalone server in the project. still same error shows. Also as mentioned above it shows the error of " error: Found argument '--webdriver-port' which wasn't expected, or isn't valid in this context
USAGE:
geckodriver.exe [FLAGS] [OPTIONS]".
When you run your webdriver tests, you need to "obtain" browser from selenium server/grid. Connection refused message means there is no listening server on a host/port you provided.

Testlink Jenkins result integration not working

I want to sync automation result from jenkins to testlink. I tried with Testlink -jenking plugin and testlink-api-client but not worked getting error.
Pre-setup :
$tlCfg-> api-> enabled
$tlCfg-> exec_cfg-> enable_test_automation
From Testlink UI enable automation for the project.
Test code :
TestLinkAPIClient testlinkAPIClient = new TestLinkAPIClient(APIKEY, "http://localhost/testlink/lib/api/xmlrpc/v1/xmlrpc.php");
testlinkAPIClient.reportTestCaseResult(Project, TestPlan, TEST_CASE, Build, notes/comments, teststatus);
output :
"testlink.api.java.client.TestLinkAPIException: The call to the xml-rpc client failed.".
References used :satishjohn.wordpress.com
2. softwaretestinghelp.com
and other stackoverflow threads.
I browsed and try out defined steps from some of the blogs but still facing same issue?. Can anyone help me to resolve this issue or other approach on sync result with testlink ?.
I believe you should follow the documentation(1) written by kino who wrote the plugin.We recently managed to sync automation results from Jenkins to Testlink by following above doc.Our auto tests were written based on testng framework, Hence we used "testng-results.xml" and TestNg method name based result seeking strategy.
We didn't come across an issue as you mentioned. From (2) and (3) you can get the plugin source .My advice is to debug the code after enabling the debug on Jenkins hosted tomcat server. So you can find the actual cause of the issue by yourself.
Reference:
(1) https://wiki.jenkins-ci.org/download/attachments/753702/jenkins.pdf
(2) https://github.com/jenkinsci/testlink-plugin
(3) https://github.com/kinow/testlink-java-apienter code here
You can run wireshark and filter on port "tcp port http" to see exact error you get from the server. When it was not working for us we were getting 200 OK with text "XML-RPC server accepts POST requests only."
You can also check /var/log/apache2/error.log for testlink errors.
We fixed the issue by setting following config in config.inc.php and restarting apache.
$tlCfg->api->enabled = TRUE;
$tlCfg->exec_cfg->enable_test_automation = ENABLED;