mozilla

Revision 526817 of Gaia UI Tests Introduction

  • Revision slug: Mozilla/Firefox_OS/Platform/Automated_testing/gaia-ui-tests
  • Revision title: Gaia UI Tests Introduction
  • Revision id: 526817
  • Created:
  • Creator: chrisdavidmills
  • Is current revision? No
  • Comment

Revision Content

{{Next("Mozilla/Firefox_OS/Platform/Automated_testing/gaia-ui-tests/Part_1_Marionette_Firefox_OS_start")}}

Gaia-ui-tests is Mozilla's test suite for running end-to-end UI test cases against Gaia, the UI of Firefox OS. All the tests are written in Python with some JavaScript used for interacting with Firefox OS's APIs. This set of tutorial articles explains how to set up the environment to write and run tests.

Gaia-ui-tests uses Gaiatest, a Python package based around Marionette. Gaiatest is designed to wrap HTML locators, Marionette calls and API calls together for interoperble communication and functiuonality. Marionette is based on the W3C standard developed for the Selenium WebDriver a programming interface for browser automation. If you have used WebDriver and page/app objects before then you will find using Marionette and gaiatest easy.

Current material: Running and Writing Tests

Running Tests
Guides to running gaia-ui-tests against device and desktopb2g in a variety of configurations.
Gathering Power Draw
How to use gaiatest to log power draw while a test is running.

New material: heavily work-in-progress; don't use these yet

For those keen to get started with automated testing on Firefox OS we have a tutorial that will help you go from nothing to writing your own tests. Once you've completed this tutorial you'll have enough knowledge of testing, Firefox OS and Marionette to get started as a Mozilla contributor. It is highly recommended to complete this tutorial if you wish to become a contributor.

Part 1: Getting started with Marionette and Firefox OS
Installing Firefox OS and some basic software packges
Part 2: Basic interactions with Firefox OS using Marionette
Talk to Firefox OS using marionette and a Python console
Part 3: Upgrading our code into a reusable test
Put all the code into a Python file so we can re-use it
Part 4: Re-using commands to set up Firefox OS
Move some commands into Python methods
Part 5: Introducing a test runner
Use Python's unittest runner for testing framework
Part 6: Using Marionette's By class
Reduce duplication
Part 7: Writing your own tests
Start to write your own tests and dig into Firefox OS using Mozilla tools
Part 8: Using a base class
Abstract test runner code into a Python class
Part 9: Reducing duplication with app objects
Abstract code on the AUT into a Python class

See also

Questions/Comments/Concerns

This project is at a fairly early stage, and your feedback would be greatly appreciated:

Revision Source

<p>{{Next("Mozilla/Firefox_OS/Platform/Automated_testing/gaia-ui-tests/Part_1_Marionette_Firefox_OS_start")}}</p>
<div class="summary">
 <p>Gaia-ui-tests is Mozilla's test suite for running end-to-end UI test cases against Gaia, the UI of Firefox OS. All the tests are written in Python with some JavaScript used for interacting with Firefox OS's APIs. This set of tutorial articles explains how to set up the environment to write and run tests.</p>
</div>
<p>Gaia-ui-tests uses <strong>Gaiatest</strong>, a Python package based around <a href="https://developer.mozilla.org/en-US/docs/Marionette" title="https://developer.mozilla.org/en-US/docs/Marionette">Marionette</a>. Gaiatest is designed to wrap HTML locators, Marionette calls and API calls together for interoperble communication and functiuonality. Marionette is based on the W3C standard developed for the <a href="http://docs.seleniumhq.org/projects/webdriver/" title="http://docs.seleniumhq.org/projects/webdriver/">Selenium WebDriver</a> a programming interface for browser automation. If you have used WebDriver and page/app objects before then you will find using Marionette and gaiatest easy.</p>
<h2 id="Current_material.3A_Running_and_Writing_Tests">Current material: Running and Writing Tests</h2>
<dl>
 <dt>
  <a href="https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Platform/Automated_testing/gaia-ui-tests/Gaia_UI_Tests_Run_Tests" title="Gaia UI Tests Run Tests">Running Tests</a></dt>
 <dd>
  Guides to running gaia-ui-tests against device and desktopb2g in a variety of configurations.</dd>
 <dt>
  <a href="/en-US/Firefox_OS/Platform/Automated_testing/gaia-ui-tests/Gathering_power_draw_data_using_gaiatest">Gathering Power Draw</a></dt>
 <dd>
  How to use gaiatest to log power draw while a test is running.</dd>
</dl>
<h2 id="New_material.3A_heavily_work-in-progress.3B_don't_use_these_yet">New material: heavily work-in-progress; don't use these yet</h2>
<p>For those keen to get started with automated testing on Firefox OS we have a tutorial that will help you go from nothing to writing your own tests. Once you've completed this tutorial you'll have enough knowledge of testing, Firefox OS and Marionette to get started as a Mozilla contributor. It is <strong>highly</strong> recommended to complete this tutorial if you wish to become a contributor.</p>
<dl>
 <dt>
  <a href="/en-US/Firefox_OS/Platform/Automated_testing/gaia-ui-tests/Part_1_Marionette_Firefox_OS_start">Part 1: Getting started with Marionette and Firefox OS</a></dt>
 <dd>
  Installing Firefox OS and some basic software packges</dd>
 <dt>
  <a href="/en-US/Firefox_OS/Platform/Automated_testing/gaia-ui-tests/Part_2_Marionette_Firefox_OS_interactions">Part 2: Basic interactions with Firefox OS using Marionette</a></dt>
 <dd>
  Talk to Firefox OS using marionette and a Python console</dd>
 <dt>
  <a href="/en-US/Firefox_OS/Platform/Automated_testing/gaia-ui-tests/Part_3_Reusable_tests">Part 3: Upgrading our code into a reusable test</a></dt>
 <dd>
  Put all the code into a Python file so we can re-use it</dd>
 <dt>
  <a href="/en-US/Firefox_OS/Platform/Automated_testing/gaia-ui-tests/Part_4_Reusing_commands_Firefox_OS_setup">Part 4: Re-using commands to set up Firefox OS</a></dt>
 <dd>
  Move some commands into Python methods</dd>
 <dt>
  <a href="/en-US/Firefox_OS/Platform/Automated_testing/gaia-ui-tests/Part_5_Introducing_a_test_runner">Part 5: Introducing a test runner</a></dt>
 <dd>
  Use Python's unittest runner for testing framework</dd>
 <dt>
  <a href="/en-US/Firefox_OS/Platform/Automated_testing/gaia-ui-tests/Part_6_Marionette_By_class">Part 6: Using Marionette's By class</a></dt>
 <dd>
  Reduce duplication</dd>
 <dt>
  <a href="/en-US/Firefox_OS/Platform/Automated_testing/gaia-ui-tests/Part_7_Writing_your_own_tests">Part 7: Writing your own tests</a></dt>
 <dd>
  Start to write your own tests and dig into Firefox OS using Mozilla tools</dd>
 <dt>
  <a href="/en-US/Firefox_OS/Platform/Automated_testing/gaia-ui-tests/Part_8_Using_a_base_class">Part 8: Using a base class</a></dt>
 <dd>
  Abstract test runner code into a Python class</dd>
 <dt>
  <a href="/en-US/Firefox_OS/Platform/Automated_testing/gaia-ui-tests/Part_9_app_objects">Part 9: Reducing duplication with app objects</a></dt>
 <dd>
  Abstract code on the AUT into a Python class</dd>
</dl>
<h2 id="See_also">See also</h2>
<ul>
 <li><a href="https://github.com/mozilla-b2g/gaia/tree/master/tests/python/gaia-ui-tests">Gaia-ui-tests main repository</a>.</li>
</ul>
<h2 id="Questions.2FComments.2FConcerns_"><span class="mw-headline" id="Questions.2FComments.2FConcerns">Questions/Comments/Concerns </span></h2>
<p>This project is at a fairly early stage, and your feedback would be greatly appreciated:</p>
<ul>
 <li>Send mails to the <a href="http://mailto:_gaia-ui-automation@mozilla.org">gaia-ui-automation@mozilla.org</a> list.</li>
 <li>Alternatively, find us on <a href="https://wiki.mozilla.org/IRC">Mozilla IRC</a> at channels #ateam, #mozwebqa, and #moztpeqa.</li>
</ul>
Revert to this revision