WebDriver vs RemoteWebDriver...

189 views
Skip to first unread message

mawa316

unread,
Aug 26, 2015, 1:48:38 PM8/26/15
to Selenium Users
Hi all,
 
I have posted about this before and the thread regarding remote execution of UI tests using Selenium sort or morphed into a Release Management discussion and has been moved there.  I wasn't sure if I should launch this discussion under that thread or start anew, but here goes.
 
Basically, what I would like to happen is for our Continuous Integration Build Server to run the unit tests, compile the code, deploy our site/apps to a QA test server then run the Selenium WebDriver tests I've coded so far.  That is what launched the connection with Release Management.  I was sort of hoping that there would be another way to accomplish this without introducing another layer (Release Management).  That hope is what brought be to RemoteWebDriver.  Is this what I could be looking into as an alternative?  Or, is there a way to work with my current WebDriver coded tests so they can execute on a different machine?
 
If RemoteWebDriver is the way to go, will this be a lot of code rework or just setting a different type of driver object with all underlying methods working without issue?
 
Any help, advice, tips, etc would be awesome!
 
Thanks in advance!!

mawa316

unread,
Aug 26, 2015, 1:52:54 PM8/26/15
to Selenium Users
Oh, and I'm not opposed to running what I have on the CI Build Server before deploying to the QA test server.
 
In this scenario I envision - unit test, compile, run app/Selenium tests, deploy to QA server.
 
I'm just hoping to hear some best practices, pitfalls, horror stories surrounding what people have tried or what has worked best for them.
 
Thanks Again!!

Shawn McCarthy

unread,
Aug 26, 2015, 3:58:13 PM8/26/15
to Selenium Users
Hopefully you don't create the new FirefoxDriver, ChromeDriver, etc in a lot of different spots. If you have this creation in one class, than it is simple to use RemoteWebDriver when you want to run your tests against a remote machine, or FirefoxDriver if you want to run your tests locally.

mawa316

unread,
Aug 26, 2015, 10:09:09 PM8/26/15
to Selenium Users
I only have a few tests coded at present so any changes wouldn't be too overwhelming at this point.  Is is just a matter of instantiating the different RemoteWebDriver then most of the other code would remain the same?

How does it work - the remote system is set in code and that simply tells Selenium to execute on that machine.  I believe there is some type of Server and Client piece as well.

Is the RemoteWebDriver the way to go or is it acceptable to run the UI test on the TFS Build Server after compile?

PeterJeffreyGale

unread,
Aug 27, 2015, 1:47:58 AM8/27/15
to Selenium Users
Why not execute the tests on the build server, but using a URL that points to the web app hosted and running on the release machine? RemoteWebDriver is not required at all then.

Krishnan Mahadevan

unread,
Aug 27, 2015, 7:13:55 AM8/27/15
to Selenium Users
Peter,
Wouldn't that basically pollute the intent of a build machine ?

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

On Thu, Aug 27, 2015 at 11:17 AM, PeterJeffreyGale <peterjef...@hotmail.co.uk> wrote:
Why not execute the tests on the build server, but using a URL that points to the web app hosted and running on the release machine? RemoteWebDriver is not required at all then.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/042c4a3c-c8ff-4595-b229-b2da9122c20b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

PeterJeffreyGale

unread,
Aug 27, 2015, 9:55:30 AM8/27/15
to Selenium Users
Krishnan,

Perhaps ...  and perhaps that's exactly why the previous thread morphed into a Release Management discussion ... but it meets the OP's stated requirements.

Peter

Shawn McCarthy

unread,
Aug 27, 2015, 10:40:18 AM8/27/15
to Selenium Users
It won't meet his requirements if the build machine runs linux and he wants to run tests against IE.

mawa316 .

unread,
Aug 27, 2015, 5:12:52 PM8/27/15
to seleniu...@googlegroups.com
Build machine is not running linux and the current tests are running against Firefox.
 
I fear that testing the UI in a development environment (TFS Build Server) will not be clean.  Is this what was meant earlier with... " pollute the intent of a build machine"?
 
That is why I would like to run the scripts remotely.
 
I'm still confused as to how the RemoteWebDriver works, if using it will be a big impact on my current code and if it is right for me.
 
Thanks for the discussion so far!!

--
You received this message because you are subscribed to a topic in the Google Groups "Selenium Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/selenium-users/3lemXe_06dc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to selenium-user...@googlegroups.com.

To post to this group, send email to seleniu...@googlegroups.com.
Message has been deleted

PeterJeffreyGale

unread,
Aug 28, 2015, 4:28:05 AM8/28/15
to Selenium Users
Mawa, What is YOUR intent for the build machine?

If the tests running against the app deployed and running on the QA test server fail, would that meant that the whole build should terminate as 'failed'?

mawa316 .

unread,
Aug 28, 2015, 9:52:18 AM8/28/15
to seleniu...@googlegroups.com
No, we have agreed that if the Selenium UI tests fail, hopefully I would be notified, but the build and deployment to QA would continue.

On Fri, Aug 28, 2015 at 4:28 AM, PeterJeffreyGale <peterjef...@hotmail.co.uk> wrote:
Mawa, What is YOUR intent for the build machine?

If the tests running against the app deployed and running on the QA test server fail, would that meant that the whole build should terminate as 'failed'?

--
You received this message because you are subscribed to a topic in the Google Groups "Selenium Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/selenium-users/3lemXe_06dc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.

PeterJeffreyGale

unread,
Aug 28, 2015, 1:58:51 PM8/28/15
to Selenium Users
Where are you building the initial UI tests, and where is the web server that you are running them against?

mawa316 .

unread,
Aug 28, 2015, 2:02:54 PM8/28/15
to seleniu...@googlegroups.com
The tests are checked in under our main web app solution.  I would guess the test .dll will be compiled on the Build Server.  The machine I want to test against is just another in house VM.

On Fri, Aug 28, 2015 at 1:58 PM, PeterJeffreyGale <peterjef...@hotmail.co.uk> wrote:
Where are you building the initial UI tests, and where is the web server that you are running them against?

--
You received this message because you are subscribed to a topic in the Google Groups "Selenium Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/selenium-users/3lemXe_06dc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.

PeterJeffreyGale

unread,
Aug 28, 2015, 2:06:15 PM8/28/15
to Selenium Users
I mean ... where do you write the UI tests, and run them first to test that they are working?

And where is the server hosted that you run the tests against at this time?

mawa316 .

unread,
Aug 28, 2015, 2:43:21 PM8/28/15
to seleniu...@googlegroups.com
I write them on my workstation and test them there.  When we run the Web App, it spins up a lite IIS instance and the tests hit http://localhost.  The backend database is on a different server and is set in a config file.

On Fri, Aug 28, 2015 at 2:06 PM, PeterJeffreyGale <peterjef...@hotmail.co.uk> wrote:
I mean ... where do you write the UI tests, and run them first to test that they are working?

And where is the server hosted that you run the tests against at this time?

--
You received this message because you are subscribed to a topic in the Google Groups "Selenium Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/selenium-users/3lemXe_06dc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.

PeterJeffreyGale

unread,
Aug 28, 2015, 2:56:53 PM8/28/15
to Selenium Users
So, why not replicate your local setup on the QA server and have the UI tests run against the localhost there? ... Or run them on your workstation and point them at the URL for the app running on the QA server? 

mawa316 .

unread,
Aug 28, 2015, 9:06:29 PM8/28/15
to seleniu...@googlegroups.com
QA wants the test server as close to a non-development environment as possible so setting up my local setup there probably isn't an option.  I think what I may try to do is simply point to the QA Server url and then run the tests on the build server.  Does that sound workable?

On Fri, Aug 28, 2015 at 2:56 PM, PeterJeffreyGale <peterjef...@hotmail.co.uk> wrote:
So, why not replicate your local setup on the QA server and have the UI tests run against the localhost there? ... Or run them on your workstation and point them at the URL for the app running on the QA server? 

--
You received this message because you are subscribed to a topic in the Google Groups "Selenium Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/selenium-users/3lemXe_06dc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.

PeterJeffreyGale

unread,
Aug 29, 2015, 3:23:37 AM8/29/15
to Selenium Users
That was my original suggestion. But it will mean replicating your email cal Selenium set up on the build machine an using it for what is effectively no longer a build related task, as Krishnan pointed out ... Will that be acceptable to all concerned?

PeterJeffreyGale

unread,
Aug 29, 2015, 5:09:40 AM8/29/15
to Selenium Users
Sorry, that should say: "... your local Selenium set up ..."

mawa316 .

unread,
Aug 29, 2015, 2:55:28 PM8/29/15
to seleniu...@googlegroups.com
I'll have to run that up the flag pole to see what happens.  My thought is that the build machine already needs the development environment set up so I don't see running the tests from there as a huge deal.

On Sat, Aug 29, 2015 at 5:09 AM, PeterJeffreyGale <peterjef...@hotmail.co.uk> wrote:
Sorry, that should say: "... your local Selenium set up ..."

--
You received this message because you are subscribed to a topic in the Google Groups "Selenium Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/selenium-users/3lemXe_06dc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.

mawa316 .

unread,
Sep 3, 2015, 9:12:05 PM9/3/15
to seleniu...@googlegroups.com
OK, I think I'm going to go with trying to run the automated UI tests on the build machine - pointing to the url of the site machine.
 
Next question - How is that done from the build definition.  I know this might be spilling into actual TFS territory, but I'm not sure how to pull it off.  I'll have our Selenium test .dll so do I just send some type of post build command line.
 
Another thing I'm hoping to avoid is customizing the TFS build template.  If you can't tell by now, I'm trying to keep this as basic as possible.  I'm not sure we need all the bells and whistles right away, but I guess I'll find out.
 
Anyway, if anyone can instruct how to fire my tests/dll during a Continuous Integration build I would greatly appreciate it.

PeterJeffreyGale

unread,
Sep 4, 2015, 4:07:45 AM9/4/15
to Selenium Users
As you suggest, it now seems like a TFS/CI question.

Can't the devs in charge of your CI machine help with that?

mawa316 .

unread,
Sep 4, 2015, 6:08:44 PM9/4/15
to seleniu...@googlegroups.com
Ah, I'm in charge of the CI machine and its all new to me/us, hence the questions!  I'll search for a post in a more suitable forum.  I just thought that since this is a Selenium Users group and my question is how to fire a Selenium test(s), use Selenium in the context of CI, that maybe someone could give a quick hint.

On Fri, Sep 4, 2015 at 4:07 AM, PeterJeffreyGale <peterjef...@hotmail.co.uk> wrote:
As you suggest, it now seems like a TFS/CI question.

Can't the devs in charge of your CI machine help with that?
--
You received this message because you are subscribed to a topic in the Google Groups "Selenium Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/selenium-users/3lemXe_06dc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.

PeterJeffreyGale

unread,
Sep 5, 2015, 12:00:08 PM9/5/15
to Selenium Users
How do you trigger the tests to run in your local setup?

mawa316 .

unread,
Sep 5, 2015, 7:31:05 PM9/5/15
to seleniu...@googlegroups.com
We currently don't have a formal UI testing process since we only have a few tests coded (the app is still pretty young).  Currently I just run the tests from the VS IDE.

That's why I'm also asking/posting the questions regarding incorporation into a CI process.

On Sat, Sep 5, 2015 at 12:00 PM, PeterJeffreyGale <peterjef...@hotmail.co.uk> wrote:
How do you trigger the tests to run in your local setup?

--
You received this message because you are subscribed to a topic in the Google Groups "Selenium Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/selenium-users/3lemXe_06dc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.

PeterJeffreyGale

unread,
Sep 6, 2015, 6:06:35 AM9/6/15
to Selenium Users
Are they run as nUnit tests?

mawa316 .

unread,
Sep 6, 2015, 11:16:46 AM9/6/15
to seleniu...@googlegroups.com
Not using nUnit currently.  Like I said, there is no real process yet.  I'm just developing the tests and testing them via Test-> /Run All or Selected Tests in the IDE.

Reply all
Reply to author
Forward
0 new messages