Mobile/Fennec Unittests: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
(Created page with 'This is a basic page that will be a central spot to learn more about unit tests on Fennec. == General == Fennec will run all the unittests that come with Firefox with few excep...')
 
No edit summary
Line 19: Line 19:
* mobile-browser/tests/unit <- for xpcshell
* mobile-browser/tests/unit <- for xpcshell


On the flip side there are specific tests in Firefox that we will want to exclude from Fennec.   
On the flip side there are specific tests in Firefox that we will want to exclude from Fennec.  For example:
* rss feeds (not supported for Fennec at the moment)
* browser-chrome and some chrome tests (chrome elements are different)
* private browsing (not supported for Fennec at the moment)
 
These excluded tests are tracked in {{bug|464081}}.  We still need consensus on the proper way to remove these tests from Fennec.  The most logical way is in the makefiles based off #IFDEF's.  Alternatively we can do this inside of the test as well.


== Requirements ==
== Requirements ==
To run the unit tests, we need to have a build of Fennec and a build of the test bits (do this by adding "ac_add_options --enable-tests" to your mozconfig).  Once you have the tests and Fennec binaries, we also need:
* Python (preferably 2.5) - and these modules:
** subprocess: Popen (wait, stdout.readline), PIPE, STDOUT
** os.path:  normpath, expanduser, join, exists, dirname, basename, abspath, realpath, splitext
** os: chdir, getcwd, remove, kill, mkdir, listdir, unlink
** shutil: rmdir, rmtree, copytree
** tempfile: mkdtemp()
** file: open, read, write, close


== Maemkit ==
== Maemkit ==

Revision as of 16:40, 12 June 2009

This is a basic page that will be a central spot to learn more about unit tests on Fennec.

General

Fennec will run all the unittests that come with Firefox with few exceptions. We are interested in:

    • Mochitest
    • Mochitest-Chrome
    • Mochitest-Browser-Chrome
    • Reftest
    • Crashtest
    • XPCShell

In general there will be some tests that are unique for Fennec and will not run on Firefox. For example automating the tab strip, bookmark manager or just panning and zoom.

We will store all the Fennec specific unittests in mobile-browser/tests. As tests arise, we will separate these based on type. For example:

  • mobile-browser/tests/browser <- for browser chrome (the majority will live here)
  • mobile-browser/tests/mochitest <- for plain mochitest
  • mobile-browser/tests/unit <- for xpcshell

On the flip side there are specific tests in Firefox that we will want to exclude from Fennec. For example:

  • rss feeds (not supported for Fennec at the moment)
  • browser-chrome and some chrome tests (chrome elements are different)
  • private browsing (not supported for Fennec at the moment)

These excluded tests are tracked in bug 464081. We still need consensus on the proper way to remove these tests from Fennec. The most logical way is in the makefiles based off #IFDEF's. Alternatively we can do this inside of the test as well.

Requirements

To run the unit tests, we need to have a build of Fennec and a build of the test bits (do this by adding "ac_add_options --enable-tests" to your mozconfig). Once you have the tests and Fennec binaries, we also need:

  • Python (preferably 2.5) - and these modules:
    • subprocess: Popen (wait, stdout.readline), PIPE, STDOUT
    • os.path: normpath, expanduser, join, exists, dirname, basename, abspath, realpath, splitext
    • os: chdir, getcwd, remove, kill, mkdir, listdir, unlink
    • shutil: rmdir, rmtree, copytree
    • tempfile: mkdtemp()
    • file: open, read, write, close

Maemkit

Assumptions / Decisions

Maemo

Windows Mobile

Symbian