Posted by
Brandon on
URL: http://manual-and-automated-testing.232.s1.nabble.com/Deploying-Selenium-IDE-exports-JUnit-4-Webdriver-to-Selenium-Grid-for-parallel-tests-tp4932235p4947084.html
tarunkumar, can I tell you that I love you? Because I do. True story. In all seriousness, thank you very much for being so helpful.
I have completely ditched using JUnit and have since adopted TestNG.
This is the newest latest. I have the grid up and running with one node. When running my test as a TestNG test, I'm seeing the following:
https://gist.github.com/1999151FTA -
FAILED: O13RegStaging
com.thoughtworks.selenium.SeleniumException: Connection refused: connect
at com.thoughtworks.selenium.HttpCommandProcessor.executeCommandOnServlet(HttpCommandProcessor.java:107)
at com.thoughtworks.selenium.HttpCommandProcessor.doCommand(HttpCommandProcessor.java:86)
at com.thoughtworks.selenium.DefaultSelenium.open(DefaultSelenium.java:335)
at com.example.tests.NewO13STAGING.O13RegStaging(NewO13STAGING.java:10)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
.....
....
Do I have to use the WebDriver instead of Selenium in order to run it from Eclipse? Or both?
IE -
WebDriver driver = new RemoteWebDriver(new URL("
http://seleniumgrid:4444/wd/hub"), capability);
Edit::
I DID IT. I DID IT. Okay... I think I'm going to write a tut for people like me - People who want to learn, but don't have the coding background to make it happen.
I simply copied an example project, and with some help made a superclass to replace the SeleniumTestNGhelper (which seemed to be causing a lot of problems for me) class.
Now, I'm trying to deploy them in parallel. I have it such that when I run the script, it will fire up Firefox, perform the test, and close the browser.
I've amended the following line to read as follows to deploy to chrome and firefox, but it's only opening up Firefox :
@BeforeClass
public void startSelenium() {
this.selenium = new DefaultSelenium("localhost", Integer.parseInt("4444"), "*firefox, *chrome", "
http://XXXXXXXXX.com");
this.selenium.start();
this.selenium.open("
http://XXXXXXXXX.com");
Any suggestions on how to make this work?