Gaia UI Tests Introduction

  • Revision slug: Mozilla/Firefox_OS/Platform/Testing/gaia-ui-tests
  • Revision title: Gaia UI Tests Guidelines
  • Revision id: 450295
  • Created:
  • Creator: kscarfone
  • Is current revision? No
  • Comment Editorial review

Revision Content

This page isn't finished yet.
Your feedback to gaia-ui-automation@mozilla.org would be greatly appreciated.

Introduction

Gaiatest is a Python package based on Marionette, which is designed specifically for writing tests against Gaia. It's like a mobile phone version of Selenium Webdriver in python version. Basically, it's using python to communicate with a device/emulator, and it would execute JavaScript inside the device/emulator to act as the device/emulator.

The main repository is currently in github: Mozilla/gaia-ui-tests. Due to Taiwan's local test needs, we also have another repository synchronized with main repository: Mozilla-TWQA/gaia-ui-tests. Before you start a new area of test script writing, you might want to look into Mozilla-TWQA/gaia-ui-tests to see if they have something ready for you already.

Running and Writing Tests

Environment Setup
What you'll need and need to do before you run or write the gaiatest the first time.
Tests Runnning
How to run the gaiatest.
Tests Writing
How to write the tests for gaiatest.
Function Reference
Marionette method overview
    shortcut to "Basic Action" part
    shortcut to "Action Chain" part
Gaia-ui-test method overview (note that this is only draft now)
Gaia-ui-test apps overview

Bugs

There are two categories of bugs when using gaia-ui-tests, marionette related or gaia-ui-tests related. It's kind of ambiguous to distinguish between these two. However, you can follow the basic rules:
1. Marionette related bugs: If there are connection issues, marionette command not recognized, or tests that started to fail without much change in gaia, this might be a marionette related bug. Before you report the bug, make sure it's not because of your unupdated marionette client/server.
*You can also view a list of current bugs to see if your problem is already being addressed. Report bug in bugzilla is the best way to do so.
2. Gaia-ui-tests: When tests started to fail without much changes in gaia and marionette client, it might be gaia-ui-tests bug.
*You can view bugs or report bugs in github of Mozilla/gaia-ui-tests.

Questions/Comments/Concerns

Email to gaia-ui-automation@mozilla.org. Or, find us on irc at channels #ateam, #mozwebqa, and #moztpeqa.

Revision Source

<div class="warning">
  <p><em><strong>This page isn't finished yet.<br />
    Your feedback to gaia-ui-automation@mozilla.org would be greatly appreciated.</strong></em></p>
</div>
<h2 id="Introduction">Introduction</h2>
<p>Gaiatest is a Python package based on <a href="https://developer.mozilla.org/en-US/docs/Marionette" title="https://developer.mozilla.org/en-US/docs/Marionette">Marionette</a>, which is designed specifically for writing tests against <a href="https://github.com/mozilla-b2g/gaia" title="https://github.com/mozilla-b2g/gaia">Gaia</a>. It's like a mobile phone version of <a href="http://docs.seleniumhq.org/projects/webdriver/" title="http://docs.seleniumhq.org/projects/webdriver/">Selenium Webdriver</a> in python version. Basically, it's using python to communicate with a device/emulator, and it would execute JavaScript inside the device/emulator to act as the device/emulator.</p>
<p>The main repository is currently in github:<a href="https://github.com/mozilla/gaia-ui-tests" title="https://github.com/mozilla/gaia-ui-tests"> Mozilla/gaia-ui-tests</a>. Due to Taiwan's local test needs, we also have another repository synchronized with main repository: <a href="https://github.com/Mozilla-TWQA/gaia-ui-tests" title="/Mozilla-TWQA/gaia-ui-tests">Mozilla-TWQA/gaia-ui-tests</a>. Before you start a new area of test script writing, you might want to look into Mozilla-TWQA/gaia-ui-tests to see if they have something ready for you already.</p>
<h2 id="Running_and_Writing_Tests">Running and Writing Tests</h2>
<dl>
  <dt>
    <a href="https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Platform/Testing/gaia-ui-tests/Gaia_UI_Tests_Installation" title="Gaia UI Tests Environment Setup">Environment Setup</a></dt>
  <dd>
    What you'll need and need to do before you run or write the gaiatest the first time.</dd>
  <dt>
    <a href="https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Platform/Testing/gaia-ui-tests/Gaia_UI_Tests_Run_Tests" title="Gaia UI Tests Run Tests">Tests Runnning</a></dt>
  <dd>
    How to run the gaiatest.</dd>
  <dt>
    <a href="https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Platform/Testing/gaia-ui-tests/Gaia_UI_Tests_Write_Tests" title="Gaia UI Tests Write Tests">Tests Writing</a></dt>
  <dd>
    How to write the tests for gaiatest.</dd>
  <dt>
    Function Reference</dt>
  <dd>
    <a href="https://developer.mozilla.org/en-US/docs/Marionette/Marionette" title="https://developer.mozilla.org/en-US/docs/Marionette/Marionette">Marionette method overview</a><br />
    &nbsp;&nbsp;&nbsp; shortcut to <a href="https://developer.mozilla.org/en-US/docs/Marionette/Marionette#DOM_Element_Methods" title="https://developer.mozilla.org/en-US/docs/Marionette/Marionette#DOM_Element_Methods">"Basic Action" part</a><br />
    &nbsp;&nbsp;&nbsp; shortcut to <a href="https://developer.mozilla.org/en-US/docs/Marionette/Marionette#Action_Chain_Methods" title="https://developer.mozilla.org/en-US/docs/Marionette/Marionette#Action_Chain_Methods">"Action Chain" part</a><br />
    <a href="https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Platform/Testing/gaia-ui-tests/method_overview" title="https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Platform/Testing/gaia-ui-tests/method_overview">Gaia-ui-test method overview</a> (note that this is only draft now)<br />
    Gaia-ui-test apps overview</dd>
</dl>
<h2 id="Bugs">Bugs</h2>
<p>There are two categories of bugs when using gaia-ui-tests, marionette related or gaia-ui-tests related. It's kind of ambiguous to distinguish between these two. However, you can follow the basic rules:<br />
  1. Marionette related bugs: If there are connection issues, marionette command not recognized, or tests that started to fail without much change in gaia, this might be a marionette related bug. Before you report the bug, make sure it's not because of your unupdated marionette client/server.<br />
  *You can also view a <a class="external text" href="https://bugzilla.mozilla.org/buglist.cgi?product=Testing&amp;component=Marionette&amp;resolution=---&amp;list_id=1844713" rel="nofollow">list of current bugs</a> to see if your problem is already being addressed. Report bug in <a href="http://bugzilla.mozilla.org/" title="http://bugzilla.mozilla.org/">bugzilla</a> is the best way to do so.<br />
  2. Gaia-ui-tests: When tests started to fail without much changes in gaia and marionette client, it might be gaia-ui-tests bug.<br />
  *You can view bugs or report bugs in github of <a href="https://github.com/mozilla/gaia-ui-tests/issues?state=open" title="https://github.com/mozilla/gaia-ui-tests/issues?state=open">Mozilla/gaia-ui-tests</a>.</p>
<h2 id="Questions.2FComments.2FConcerns_"><span class="mw-headline" id="Questions.2FComments.2FConcerns">Questions/Comments/Concerns </span></h2>
<p>Email to gaia-ui-automation@mozilla.org. Or, find us on irc at channels #ateam, #mozwebqa, and #moztpeqa.</p>
Revert to this revision