I have successfully set up Selenium GRID using Remote WebDriver which worked perfectly when using it locally without connecting to a remote node. If both the hub and the node are on the same machine it runs fine, but running a remote node only opens the browser without running the actual test. I am running this in this environment - Windows 8 (hub), both remote and local nodes are Windows 8.
This is the simple test:
driver = new RemoteWebDriver(new Uri("http://MYIPADDRESS:4466/wd/hub"), DesiredCapabilities.Firefox());
driver.Navigate().GoToUrl("https://www.bing.com");
when I debugged, I kept getting this error - Additional information: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:
I'm surprised for wanting to connect to localhost because I'm not using localhost but the IP address. How do I get it to run?
Related
I'm using Laravel homestead and I'm writing a little artisan command line tool that I need to browse my site with javascript execution.
I run dusk test regularly with no difficulty, so I thought I would use Laravel's tools for this script.
I started out by running this early in my script:
\Laravel\Dusk\TestCase::startChromeDriver();
This started the driver fine running on port 9515 running as user vagrant (default homestead user)
But when I tried to access it (also from within the script) I would get an error:
Failed to connect to localhost port 9515: Connection refused
If I instead started it manually on the command line:
$ ./vendor/laravel/dusk/bin/chromedriver-linux --port=9515
The driver started fine again running on port 9515 as user vagrant, but this time my tool runs fine.
But I really want to be able to start the ChromeDriver from within the tool. So I also tried:
$process = new \Symfony\Component\Process\Process('./vendor/laravel/dusk/bin/chromedriver-linux --port=9515');
$process->start();
Connection was refused again.
Any idea why this works when I start it from the command line but not within my artisan command?
I can't explain why this makes a difference but it has. If I launch the driver with the full path:
/home/vagrant/Code/mysite/vendor/laravel/dusk/bin/chromedriver-linux --port=8888
all works fine now.
I am trying to run JMeter Webdriver samplers in IE on a remote machine. I have changed remote_hosts to the IP address of the remote machine. JMeter server on the remote machine is also started. When I run the tests from the JMeter GUI on the local machine (Run->Remote Start menu) I can see the command line window in remote machine showing
"Started the test..."
and immediately
"Finished the test..."
So the test runs but nothing actually happens.
I must be missing some configuration.
Can someone please help?
You need to install the same Selenium/WebDriver Support plugin to the remote slave(s). This can be done either by copying the whole JMeter installation to the slave host(s) or using JMeter Plugins Manager on each slave.
You need to download Internet Explorer Driver binary and put it to the same location as on the master host.
In case of any problems check jmeter-server.log file on remote slave - normally it should contain the root cause (or clue on what is wrong)
I have some Selenium Webdriver/Capybara automation setup in a ruby app. Along with this in a VirtualBox VM using Linux I have a docker container for Selenium grid docker run -d -p 4444:4444 --name selenium-hub -e GRID_TIMEOUT=120000 selenium/hub:2.53.0 and a firefox node docker run -d --link selenium-hub:hub selenium/node-firefox:2.53.0. After adding a DNS entry to docker_opts on the VM, in my host machine if I run my Selenium test (which uses the grid on my VM) everything works fine.
After this I setup my automation code in a ruby container on my vm along side the grid and containers. The container builds just fine. I am also able to attach to it without issue and all my code is there as expected. from the terminal in my automation container if attempt to run a spec ex. rspec spec/some_spec.rb I will get a connection refused error
"Failed to open TCP connection to 127.0.0.1:4444 (Connection refused - connect(2) for \"127.0.0.1\" port 4444)"
of the 18 results googling up this issue the only thing I saw that seemed actionable mentioned creating a bridge, which I don't really understand. Any suggestions on how to correct this would be greatly appreciated.
It's not easy to say without seeing your specs but I'm guessing you connect to selenium on 127.0.0.1:4444 in your tests?
If so you should now connect to it on hub:4444 as that is the name which will resolve to the IP of your selenium hub container.
I have a Jenkins server running happily on a Windows server. I need to connect 2 other windows servers as slaves.
One connects in fine (start using JNLP, then installed as a Windows service).
The other fails to connect using JNLP. Whether I use the Launch button or the javaws command line it fails with 'Unexpected Error - Unable to launch Slave Agent for {node}'. If I start the slave using the headless command line it works, so I suspect it's not networking/firewall related.
I'd like to get the JNLP launch working so I can install it as a Windows service.
Other notes:
the Jenkins URL is set OK
we're using Matrix security, but anonymous has Slave/Connect
Any help gratefully received.
I setup a distributed load testing environment using JMeter in unbundu machines.
->Master: the system running JMeter GUI, control each slave.
->Slave: the system running jmeter-server, receive command from the master and send a request to server under test.
->Target: the web server under test, get request from slaves.
Basic requirements are done:
-The firewalls on the systems are turned off
-All the planned master and Slaves are in the same subnet
-The JMeter server can access the target.
-Same version of JMeter on all the systems (version 2.3.4 ).
I did the following:
1) Tried pinging form master to slave and vice versa through ubundu terminal. its happening ..
2) Added the following to client (master) jmeter.properties:
# Remote hosts and RMI configuration
remote_hosts=192.168.0.139:1099
# RMI port to be used by the server (must start rmiregistry with same port)
server_port=1099
3) Added the following to server (Slave) jmeter.properties:
# On the server(s)
set server_port=1234
start rmiregistry with port 1234
4) Now started the Jmeter engine on Master.
a) Started Jmeter on master machine (GUI)
b) Created test plan--> (added tread group , samplers and required listners)
c) Now start the Slave(s) from the GUI
-click Run at the top
-select Remote start
-select the IP address
But error popup came as :-
"Connection refused to host : 192.168.0.139; nested exception is : java.net.ConnectionException : Connection Refused"
what may be the reason for not connecting with the remote salve (say here : 192.168.0.139)
DO i need to do any more configuration in jmeter.properties file or in any other files (in both slave and master)?
I think you forgot to start the slave in "slave mode".
In command line mode, go to jmeter/bin directory and execute jmeter-server.bat
That will start the slave process and will keeps it listening for commands.
Then you can go forward, loading amd launching the script.
have a look at:
http://jmeter.apache.org/usermanual/jmeter_distributed_testing_step_by_step.pdf
Also be aware that:
- the two systems MUST run the same Jmeter version
- the two systems MUST be on the same subnetwork
- the two systems SHOULD be as similar as possible: same OS, same directory tree, etc
- "remote_hosts" only require the address. The port is specified by "server_port" parameter.