Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a serverHostname property to AbstractJasmineMojo. Useful when using... #198

Merged
merged 2 commits into from
Nov 12, 2013
Merged

Conversation

skrall
Copy link
Contributor

@skrall skrall commented Sep 23, 2013

... the RemoteWebDriver.

@skrall
Copy link
Contributor Author

skrall commented Oct 21, 2013

Just some more information on why we needed this, and why it seems like a good thing to have.

We use the selenium Remote Web Driver from Jenkins to run our tests against various browser types / versions / OSs. Without this setting, the plugin always tried to connect to localhost:, but with the remote web driver, it wouldn't be on localhost, it would be on a remote ip address. I left the default to be localhost, so it shouldn't break any existing setups.

If you need anything else, have any issues with this change - just let me know.

* <p>The <code>jasmine:test</code> goal to specify hostname where the server is running. Useful when using
* the RemoteWebDriver.</p>
*
* @since 1.3.1.3
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1.3.1.3 has been released already. This will need to be updated to 1.3.1.4

@ghost ghost assigned klieber Nov 12, 2013
klieber added a commit that referenced this pull request Nov 12, 2013
Add a serverHostname property to AbstractJasmineMojo.
@klieber klieber merged commit 58b746b into searls:master Nov 12, 2013
@klieber
Copy link
Collaborator

klieber commented Nov 12, 2013

Thanks!

@tfga
Copy link

tfga commented Apr 2, 2014

@skrall Two questions for you:

  1. How did you do it?!

    I searched all over the docs (and the code!) and found nothing that would allow me to connect to a remote selenium server. I ended up implementing it myself (Ability to connect to remote Selenium server #235)

  2. What strategy did you use to run the tests against different OS + browser combinations? Here's what I came up with: multiple invocations of mvn, with different profiles, e.g.:

    mvn jasmine:test -Pwindows.chrome
    mvn jasmine:test -Pwindows.firefox
    mvn jasmine:test -Pwindows.ie
    
    mvn jasmine:test -Plinux.chrome
    mvn jasmine:test -Plinux.firefox

    Did you do something different?

@skrall
Copy link
Contributor Author

skrall commented Apr 2, 2014

There is a Java property that selenium looks at if no URL is passed into a RemoteWebDriver. I believe it's webdriver.remote.server. So, when I ran ran maven, I was sure that property was set. java -Dwebdriver.remote.server=http://selenium:4444/wd/hub for example. There are of course other ways to set the property.

See code here.

But I do think your new property is much easier, I like it.

As for the various browsers / os, I was lucky, we only have to support one browser / version. But it's not the same version of the OS that our tests ran on. So we needed the RemoteWebDriver. But if I had to support multiple, I would do what you have done with the profiles.

@tfga
Copy link

tfga commented Apr 3, 2014

There is a Java property that selenium looks at if no URL is passed into a RemoteWebDriver. I believe it's webdriver.remote.server.

Hum... the mystery is solved...

But I do think your new property is much easier, I like it.

:)

Thanks!

@tfga
Copy link

tfga commented Apr 4, 2014

@skrall You might also be interested in this: #236.

@nemosx
Copy link

nemosx commented Jan 13, 2015

@tfga Did your remoteWebDriverUrl property ever make it into any searls 1.3.1.x releases? If not, did you just use the -Dwebdriver.remote.server property? Thanks in advance!

@tfga
Copy link

tfga commented Jan 13, 2015

@nemosx

Did your remoteWebDriverUrl property ever make it into any searls 1.3.1.x releases?

No, it didn't. The project seems dead.

If not, did you just use the -Dwebdriver.remote.server property?

No, I'm using my fork. I published it internally with a different groupId and that's what we've been using.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants