Closed Bug 797912 Opened 13 years ago Closed 12 years ago

Need to get more marionette commands into Marionette JS framework

Categories

(Remote Protocol :: Marionette, defect)

x86
All
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: mdas, Assigned: mdas)

References

Details

The Marionette JS tests(https://developer.mozilla.org/en-US/docs/Marionette/Marionette_JavaScript_Tests) are really limited in what they can do, since they were first written to consume a subset of mochitests. We'll need to get full marionette functionality in these tests. Since we now have 2-way communication between Marionette and the test, what we can do is make a call available to the tests, similar to the runEmulatorCmd command, which will run any marionette command. It will work similarly: marionette("command", parameter_object, callback). This way, we won't need to rely on a JS client for marionette
Another angle that might be worth considering: bump the priority of writing the code that speaks the Firefox debug transport for Marionette into WebDriver proper. Then, instead of needing to maintain our own JS bindings, we could piggyback on what appears to be turning into a defacto node standard: WD.js. This would allow us to also take advantage of the ecosystem growing up around WD.js, some of which is reviewed at <http://sauceio.com/index.php/2012/07/javascript-testing-in-parallel-with-wd-js-and-selenium/>. This would also be a win for teams inside Mozilla who need to write code and tests for multiple browsers: they'd be able to share tests for their apps across Fennec, FirefoxOS, Mobile Chrome, Mobile Safari, etc. Downstream from internal Mozilla needs, this would seem to also be an attractive value proposition for independent web developers. It could conceivably even help attract folks away from the proprietary ecosystems towards web-based ones.
(In reply to Dan Mosedale (:dmose) from comment #1) From what I can see in WD.js, it speaks the webdriver JSON protocol. Marionette already supports this, so we should have support for WD.js if it just directs its JSON commands over to the Marionette socket. This particular bug is to get our Marionette JS tests, which are based off of mochitest. Adding this functionality will let testers write mochitest-style tests with some marionette commands built in, so they won't need to learn how to use WD.js. If they want to use WD.js, they should be able to, since we speak the same protocol. The issue here is that automation support will have to be built out for it, and then we'd need a bunch more work to get that automation into releng. For Mozilla specific work, the mochitest-style test is the easiest, least painful way to write tests right now.
Assignee: nobody → mdas
Ah, I had been hoping that perhaps the automation stuff referenced in the saucelabs blog post would be sufficient, but I have no specific reason to believe that's actually true.
We can't currently "just point wd.js at the marionette socket" unfortunately. The main issue, ignoring that wd.js speaks http and we speak tcp, is that our command/response structure is different. I have raised a bug 807282 to get this corrected. We do have the Selenium-Proxy[1] that allows Selenium bindings to Marionette translation but its not production ready since only I have needed it to get Selenium tests running. I have raised bug 807284 to get that done. [1] https://github.com/automatedtester/Selenium-Proxy
Depends on: 807282
No longer blocks: 805838
We probably will not do this, now that lightsofapollo is writing a dedicated JS client.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → WONTFIX
Product: Testing → Remote Protocol
You need to log in before you can comment on or make changes to this bug.