Closed Bug 1050293 Opened 11 years ago Closed 11 years ago

Start multiple browser instances on different ports

Categories

(Remote Protocol :: Marionette, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: aoprea, Unassigned)

References

Details

(Keywords: pi-marionette-runner, Whiteboard: [affects=loop])

By default Marionette starts up on port 2828, I would expect that by calling the constructor with a different port and bin arguments it would start up a new Marionette instance on that port. Instead it tries binding to 2828 port and fails.
Whiteboard: [affects=loop]
Implementing this will allow Loop to better simulate an end-to-end call because we'll calling from one browser to another, rather than having a browser call itself, which is something that never happens in the wild.
Hi, I think I found a workaround for local marionette instances, but I'm not sure it is the way it must be fixed. If you add a line here: http://dxr.mozilla.org/mozilla-central/source/testing/marionette/client/marionette/geckoinstance.py#46 like this one: profile_args['preferences']["marionette.defaultPrefs.port"] = self.marionette_port Then you are able to start firefox with the good port for marionette - and so start multiple marionette instance with different ports. I don't send a patch as I'm not sure that overriding the "marionette.defaultPrefs.port" profile args value is a good idea. I write what I found in case it can helps someone. Well if it is the way to go, I can send a patch. :)
Julien, thanks for finding this; I missed it in my bug mail! David, would you be comfortable landing a patch that takes this approach, or would you prefer something else?
Flags: needinfo?(dburns)
Julien's approach sounds good to me. This is the approach that I have used in the past to make Selenium run in parallel.
Flags: needinfo?(dburns)
This has actually already been fixed (there is exactly the line suggested in comment 2). :) hg log -r 216642 changeset: 216642:76feeccb28cf user: Ted Mielczarek <ted@mielczarek.org> date: Thu Nov 20 08:34:37 2014 -0500 summary: Bug 1101539 - Make Marionette's GeckoInstance actually support passing a nonstandard port. r=jgriffin
detailed in comment 5
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Product: Testing → Remote Protocol
You need to log in before you can comment on or make changes to this bug.