mozilla

Revision 389587 of Gaia UI Tests Introduction

  • Revision slug: Mozilla/Firefox_OS/Platform/Testing/gaia-ui-tests
  • Revision title: gaia-ui-tests
  • Revision id: 389587
  • Created:
  • Creator: ypwalter
  • Is current revision? No
  • Comment

Revision Content

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.

    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.

 

Installation

Basic information

    You will need to install most-up-to date marionette client  or matching marionette client version since gaia-ui-tests is using marionette client to communicate  between marionette server inside device/emulator. Usually, marionette client would come with your B2G code from github after excuted "config.sh" ({B2G HOME DIRECTORY}/gecko/testing/marionette/client).

    There are two different ways to install gaia-ui-tests depending on your needs.

Choice 1: If you only want to do the tests, just the command below in command line.

easy_install gaiatest

Choice 2: If you anticipate in modifying gaiatest, you can instead:

git clone git://github.com/mozilla/gaia-ui-tests.git
cd gaia-ui-tests
python setup.py develop

Virtual environment setup

    In case you want to switch back and forth with marionette clients version, setting up virtual environment might be a cleaner way to do so. You sometimes need to go back and forth to know if it's a device/emulator changes or a change in gaia-ui-tests/marionette-client. You could find the tutorial on virtualenv official website.

 

   

Running Tests

Testing on a device

 

Testing on emulator

Automatically launched emulator

 

Mannually launched emulator

 

Testing on desktop B2G

 

 

Test Types

 

Test Variables

 

Test Data Prerequisites

 

How to Contribute

Get your github account

 

Fork it and clone it

 

Branch out

 

Take issues and send pull requests

 

Writing Tests

Test guidelines and examples

 

Functions reference

 

Formatting

 

Debugging

 

CSS Locators and XPath Locators Resources

 

Revision Source

<h2 id="Introduction">Introduction</h2>
<p>&nbsp;&nbsp;&nbsp; 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>.</p>
<p>&nbsp;&nbsp;&nbsp; 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>.</p>
<p>&nbsp;</p>
<h2 id="Installation">Installation</h2>
<h3>Basic information</h3>
<p>&nbsp;&nbsp;&nbsp; You will need to install most-up-to date <a href="https://pypi.python.org/pypi/marionette_client/" title="https://pypi.python.org/pypi/marionette_client/">marionette client</a>&nbsp; or matching marionette client version since gaia-ui-tests is using marionette client to communicate&nbsp; between marionette server inside device/emulator. Usually, marionette client would come with your<a href="https://github.com/mozilla-b2g/B2G" title="https://github.com/mozilla-b2g/B2G"> B2G code from github</a> after excuted "config.sh" ({B2G HOME DIRECTORY}/gecko/testing/marionette/client).</p>
<p>&nbsp;&nbsp;&nbsp; There are two different ways to install gaia-ui-tests depending on your needs.</p>
<p>Choice 1: If you only want to do the tests, just the command below in command line.</p>
<pre>
<code>easy_install gaiatest
</code></pre>
<p>Choice 2: If you anticipate in modifying gaiatest, you can instead:</p>
<pre>
<code>git clone git://github.com/mozilla/gaia-ui-tests.git
cd gaia-ui-tests
python setup.py develop</code></pre>
<h3>Virtual environment setup</h3>
<p>&nbsp;&nbsp;&nbsp; In case you want to switch back and forth with marionette clients version, setting up virtual environment might be a cleaner way to do so. You sometimes need to go back and forth to know if it's a device/emulator changes or a change in gaia-ui-tests/marionette-client. You could find the tutorial on <a href="https://pypi.python.org/pypi/virtualenv" title="https://pypi.python.org/pypi/virtualenv">virtualenv official website</a>.</p>
<p>&nbsp;</p>
<p>&nbsp;&nbsp;&nbsp;</p>
<h2 id="Running_Tests">Running Tests</h2>
<h3 id="Testing_on_a_device">Testing on a device</h3>
<p>&nbsp;</p>
<h3 id="Testing_on_emulator">Testing on emulator</h3>
<h4 id="Automatically_launched_emulator">Automatically launched emulator</h4>
<p>&nbsp;</p>
<h4 id="Mannually_launched_emulator">Mannually launched emulator</h4>
<p>&nbsp;</p>
<h3 id="Testing_on_desktop_B2G">Testing on desktop B2G</h3>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h2 id="Test_Types">Test Types</h2>
<p>&nbsp;</p>
<h2 id="Test_Variables">Test Variables</h2>
<p>&nbsp;</p>
<h2 id="Test_Data_Prerequisites">Test Data Prerequisites</h2>
<p>&nbsp;</p>
<h2>How to Contribute</h2>
<h3>Get your github account</h3>
<p>&nbsp;</p>
<h3>Fork it and clone it</h3>
<p>&nbsp;</p>
<h3>Branch out</h3>
<p>&nbsp;</p>
<h3>Take issues and send pull requests</h3>
<p>&nbsp;</p>
<h2 id="Writing_Tests">Writing Tests</h2>
<h3 id="Test_guidelines_and_examples">Test guidelines and examples</h3>
<p>&nbsp;</p>
<h3 id="Functions_reference">Functions reference</h3>
<p>&nbsp;</p>
<h3 id="Formatting">Formatting</h3>
<p>&nbsp;</p>
<h3 id="Debugging">Debugging</h3>
<p>&nbsp;</p>
<h3 id="CSS_Locators_and_XPath_Locators_Resources">CSS Locators and XPath Locators Resources</h3>
<p>&nbsp;</p>
Revert to this revision