Changes

Jump to: navigation, search

Auto-tools/Projects/Mozbase

100 bytes removed, 17:07, 20 February 2014
Tests
* each mozbase package should have tests in a 'tests' subdirectory of its root
**''Example'': httpshttp://githubmxr.com/mozilla/mozbase/tree/master/mozprofile/tests * these should be self-executing [http://docs.python.org/librarymozilla-central/unittest.html python unittests]**''Example'': https:source//github.com/mozillatesting/mozbase/blob/master/mozprofile/tests/testprofile.py* these tests should be contained in a manifest; the master test manifest, https[http://githubmxr.mozilla.comorg/mozilla-central/mozbasesource/blobtesting/mastermozbase/test-manifest.ini test manifest], is executed via [httpshttp://githubmxr.commozilla.org/mozilla-central/mozbasesource/blobtesting/mastermozbase/test.py test.py]
==== Running the tests ====
Ensure that all mozbase packages are installed as the tests require them as well as 3rd party packages using 'python setup_development.py --extra'.
Then run the [httpshttp://githubmxr.commozilla.org/mozilla-central/mozbasesource/blobtesting/mastermozbase/test.py test.py] test runner from the root of the git repository:
$ python test.py
This will run all tests from [httpshttp://githubmxr.commozilla.org/mozilla-central/mozbasesource/blobtesting/mastermozbase/test-manifest.ini test-manifest.ini] which is parsed with [httpshttp://githubmxr.mozilla.comorg/mozilla-central/mozbasesource/treetesting/mastermozbase/manifestdestiny ManifestDestiny]. On success 'test.py' should print the number of tests run and 'OK':
----------------------------------------------------------------------
'''Third-party Packages Used in Mozbase Testing:'''
* mock
 
In general, additional requirements add overhead to code complexity, new contributor learning curve, maintenance cost, and portability, so the value added should justify the costs. Candidate packages should be discussed with Mozbase stakeholders preferably in a bug so that a record is kept.
Confirm
651
edits

Navigation menu