CloudServices/Sync/FxSync/Archived/Testing: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
(→‎Running Tests: typo fix)
(added more info)
Line 3: Line 3:
== Running Tests ==
== Running Tests ==


Weave's code repository includes a variety of tests.  Some of these are [http://developer.mozilla.org/en/docs/Writing_xpcshell-based_unit_tests XPCShell-based unit tests], while others are Python-based.  Some tests are "logtests", which compare the logfile output of test code with a canonical representation.
Weave's code repository includes a variety of tests.  Some of these are [http://developer.mozilla.org/en/docs/Writing_xpcshell-based_unit_tests XPCShell-based unit tests], while others are Python-based.  Some tests are "logtests", which compare the logfile output of test code with a canonical representation.  There's also a set of [[Labs/Weave/ReferenceServer#Compliance_Tests|compliance tests]] for Weave servers.


All tests can be automatically found and run by executing the following command at the root of the repository:
All tests can be automatically found and run by executing the following command at the root of the repository:


   python scripts/runtests.py
   python scripts/runtests.py
The above command also automatically runs the compliance tests against the [[Labs/Weave/ReferenceServer|reference server]], so make sure that the reference server's default port is free before running the tests (there's no need to start the reference server, the testing suite does that part for you).


== Writing Tests ==
== Writing Tests ==


For information about writing new xpcshell-based tests, see [http://hg.mozilla.org/labs/weave/index.cgi/raw-file/tip/tests/readme.txt tests/readme.txt] in the Weave HG repository.
For information about writing new xpcshell-based tests, see [http://hg.mozilla.org/labs/weave/index.cgi/raw-file/tip/tests/readme.txt tests/readme.txt] in the Weave HG repository.

Revision as of 23:41, 15 July 2008

Back to Labs/Weave.

Running Tests

Weave's code repository includes a variety of tests. Some of these are XPCShell-based unit tests, while others are Python-based. Some tests are "logtests", which compare the logfile output of test code with a canonical representation. There's also a set of compliance tests for Weave servers.

All tests can be automatically found and run by executing the following command at the root of the repository:

 python scripts/runtests.py

The above command also automatically runs the compliance tests against the reference server, so make sure that the reference server's default port is free before running the tests (there's no need to start the reference server, the testing suite does that part for you).

Writing Tests

For information about writing new xpcshell-based tests, see tests/readme.txt in the Weave HG repository.