{"id":117,"date":"2013-02-07T11:38:15","date_gmt":"2013-02-07T11:38:15","guid":{"rendered":"http:\/\/blog.mozilla.org\/webqa\/?p=117"},"modified":"2013-02-07T11:38:15","modified_gmt":"2013-02-07T11:38:15","slug":"part1-firefoxos-and-marionette","status":"publish","type":"post","link":"https:\/\/blog.mozilla.org\/fxtesteng\/2013\/02\/07\/part1-firefoxos-and-marionette\/","title":{"rendered":"Part 1: UI Testing on Firefox OS using Marionette; a background"},"content":{"rendered":"<p>by Zac Campbell<\/p>\n<p>While the main B2G team at Mozilla is developing Firefox OS, our support teams, Dev Tools, and the A-team are working hard to build the tools and framework to develop and test HTML5 applications.<\/p>\n<p>Building these tools and framework are important to support not only the development of Firefox OS itself, but the apps that the Mozilla community will develop. We want solid, reliable apps that users will love and to support them we need reliable test tools.<\/p>\n<p>On the Web QA team we are using these tools to write automated tests to cover the apps that are to be delivered with Firefox OS.<\/p>\n<p>We\u2019re doing this for the same reasons that we always do test automation like this; provide consistent, repeatable tests against daily builds and to spare the wear and tear on our manual testers\u2019 fingers!<\/p>\n<p>For automated UI testing of Firefox OS, we use a tool called <a title=\"Marionette\" href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Marionette\" target=\"_blank\">Marionette<\/a>. This has been developed by Mozilla\u2019s <a title=\"A-team\" href=\"https:\/\/wiki.mozilla.org\/Auto-tools\/The_Ateam\" target=\"_blank\">A-team<\/a> to enable us to run tests against Firefox OS.<\/p>\n<p>Marionette allows us to control aspects of the user interface, for example clicking icons, keying in text and pressing buttons. Just a few quick examples of tests we have written so far are to take a photo using the camera, send and receive SMS messages, and play an MP3.<\/p>\n<p>It\u2019s based on the W3C WebDriver specification, so if you\u2019re familiar with Selenium and WebDriver then you\u2019ll have no problems adapting to Marionette and Firefox OS.<\/p>\n<p>We\u2019ve connected these tests to our Jenkins, some slaves and real phones. The tests really do make calls, send SMS and play music!<\/p>\n<p>Enough about how we\u2019re using it; over the next few weeks the Web QA team will publish a series of blog posts explaining the differences with testing on Firefox OS. Although they are HTML5 apps, their design and structure are different and so is the OS they\u2019re running on. We\u2019ll talk you through creating reliable tests and using the power of the WebAPIs.<\/p>\n<p>You can learn from our experience to give you a head start when the time comes to write tests for your own app.<\/p>\n<p>In <a title=\"Part 2: UI Testing on Firefox OS. Working with iframes\" href=\"http:\/\/blog.mozilla.org\/webqa\/2013\/02\/13\/part-2-ui-testing-on-firefox-os-working-with-iframes\/\" target=\"_blank\">part 2<\/a> we\u2019ll have a look at how Firefox OS uses &lt;iframe&gt; for running apps and how we use Marionette to switch between the context of apps and the operating system.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>by Zac Campbell While the main B2G team at Mozilla is developing Firefox OS, our support teams, Dev Tools, and the A-team are working hard to build the tools and &hellip; <a class=\"go\" href=\"https:\/\/blog.mozilla.org\/fxtesteng\/2013\/02\/07\/part1-firefoxos-and-marionette\/\">Read more<\/a><\/p>\n","protected":false},"author":1359,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[24660],"tags":[4261,24660,27793,25193],"_links":{"self":[{"href":"https:\/\/blog.mozilla.org\/fxtesteng\/wp-json\/wp\/v2\/posts\/117"}],"collection":[{"href":"https:\/\/blog.mozilla.org\/fxtesteng\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.mozilla.org\/fxtesteng\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/fxtesteng\/wp-json\/wp\/v2\/users\/1359"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/fxtesteng\/wp-json\/wp\/v2\/comments?post=117"}],"version-history":[{"count":0,"href":"https:\/\/blog.mozilla.org\/fxtesteng\/wp-json\/wp\/v2\/posts\/117\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.mozilla.org\/fxtesteng\/wp-json\/wp\/v2\/media?parent=117"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.mozilla.org\/fxtesteng\/wp-json\/wp\/v2\/categories?post=117"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.mozilla.org\/fxtesteng\/wp-json\/wp\/v2\/tags?post=117"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}