Starting IE and Safari parallel tests with clean sessions? A how to discussion

185 views
Skip to first unread message

David

unread,
May 20, 2013, 6:19:31 PM5/20/13
to webd...@googlegroups.com
See this recent post in Selenium dev group:


Here's a recap without viewing that post:

What you could try is to run sessions under different users on the same machine, through multiple user switching. You should be able to do the same with Safari as well.

Could you elaborate on how one might run parallel IE/Safari tests (say deployed over Grid) on same node using multiple user switching. Or does that approach only work a certain way? Would it be something like have multiple user accounts logged in to same machine (but one is active desktop while the others are backgrounded/locked in terms of Windows) but each one starts a node instance (supporting 1 IE/Safari browser) before being backgrounded? Or alternatively, we start multiple node instances on the logged in desktop/user, but for each instance we do "Run As" a particular user (on Windows) and for Mac assume use the terminal to switch to other user account and execute node instance?

I'm afraid I'm not an expert in Windows or Mac OS X admin, but what you suggested sounded reasonable, whichever works for you.

This is also in reference to new IE feature awaiting review: https://github.com/SeleniumHQ/selenium/pull/74

The feature is already in SafariDriver. I was wondering if anyone has tried something out with SafariDriver using the feature combined with parallel tests on same machine. Or anyone planning to do such with IE and/or Safari.

It would be an interesting topic to see if the two can be combine or if using clean sessions require running tests only in serial mode (no parallel tests on same machines) due to conflicts of session/cache data sharing.

Jason Leyba

unread,
Jun 5, 2013, 2:09:07 PM6/5/13
to webd...@googlegroups.com
On Monday, May 20, 2013 3:19:31 PM UTC-7, David wrote:
See this recent post in Selenium dev group:


Here's a recap without viewing that post:

What you could try is to run sessions under different users on the same machine, through multiple user switching. You should be able to do the same with Safari as well.

Could you elaborate on how one might run parallel IE/Safari tests (say deployed over Grid) on same node using multiple user switching. Or does that approach only work a certain way? Would it be something like have multiple user accounts logged in to same machine (but one is active desktop while the others are backgrounded/locked in terms of Windows) but each one starts a node instance (supporting 1 IE/Safari browser) before being backgrounded? Or alternatively, we start multiple node instances on the logged in desktop/user, but for each instance we do "Run As" a particular user (on Windows) and for Mac assume use the terminal to switch to other user account and execute node instance?

I'm afraid I'm not an expert in Windows or Mac OS X admin, but what you suggested sounded reasonable, whichever works for you.

This is also in reference to new IE feature awaiting review: https://github.com/SeleniumHQ/selenium/pull/74

The feature is already in SafariDriver. I was wondering if anyone has tried something out with SafariDriver using the feature combined with parallel tests on same machine.

The SafariDriver does not support parallel tests.

Alexandr Savchuk

unread,
Jun 6, 2013, 3:21:42 AM6/6/13
to webd...@googlegroups.com
Hi!

IEDriver at 2.33 has ability to pass CLI switches to IE.

So during starting of session you need to pass capabilties [1]:
forceCreateProcess
internetExplorerSwitches = "-private -nomerge"
and setup TabProcGrowth registry key to 0 at Windows node.

After that your IE sessions will be independent and cleaned at startup (not absolutely, but i suppose it'll be enought).

Another way instead of passing these capabilities is use properties of java node, i.e.
java -Dwebdriver.ie.driver.forcecreateprocess=1 -Dwebdriver.ie.driver.ieswitches="-private -nomerge" ...

Full list of supported properties during IE startup can be found in code [2]

[2] https://code.google.com/p/selenium/source/browse/java/client/src/org/openqa/selenium/ie/InternetExplorerDriverService.java

вторник, 21 мая 2013 г., 2:19:31 UTC+4 пользователь David написал:

David

unread,
Jun 6, 2013, 8:01:31 PM6/6/13
to webd...@googlegroups.com
Do we have the IE switches available for use with " --force-createprocess" option documented anywhere? Looking through the DesiredCapabilities and IE driver wiki pages, it doesn't seem to list out (all) the valid IE switches for that.

Alexandr Savchuk

unread,
Jun 7, 2013, 1:06:31 AM6/7/13
to webd...@googlegroups.com
Of course! MSDN has own page http://msdn.microsoft.com/en-us/library/hh826025(v=vs.85).aspx at which all IE CLI switches are documented.

I'm not sure that Selenium should copy others' product documentation in own wiki. For chrome CLI switches Selenium hasn't such info too.

пятница, 7 июня 2013 г., 4:01:31 UTC+4 пользователь David написал:

Mark Collin

unread,
Jun 7, 2013, 1:40:56 AM6/7/13
to webd...@googlegroups.com

I would say it should probably be linked to J

--
You received this message because you are subscribed to the Google Groups "webdriver" group.
To unsubscribe from this group and stop receiving emails from it, send an email to webdriver+...@googlegroups.com.
To post to this group, send email to webd...@googlegroups.com.
Visit this group at http://groups.google.com/group/webdriver?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages