2019-01-29 15:18:42 +00:00
|
|
|
Testing
|
|
|
|
=======
|
|
|
|
|
2019-02-17 15:18:47 +00:00
|
|
|
The remote agent has unit- and functional tests located under
|
|
|
|
`remote/test/{unit,browser}`.
|
2019-01-29 15:18:42 +00:00
|
|
|
|
2019-02-17 15:18:47 +00:00
|
|
|
You may run all the tests locally using `mach test` like this:
|
2019-01-29 15:18:42 +00:00
|
|
|
|
2019-04-24 17:18:37 +00:00
|
|
|
% ./mach test --setpref "remote.enabled=true" remote/test
|
2019-01-29 15:18:42 +00:00
|
|
|
|
2019-02-17 15:18:47 +00:00
|
|
|
The tests are currently not run on try.
|
|
|
|
|
|
|
|
|
|
|
|
Unit tests
|
|
|
|
----------
|
|
|
|
|
|
|
|
Because tests are run in parallel and [xpcshell] itself is quite
|
2019-01-29 15:18:42 +00:00
|
|
|
chatty, it can sometimes be useful to run the tests in sequence:
|
|
|
|
|
2019-04-24 17:18:37 +00:00
|
|
|
% ./mach xcpshell-test --setpref "remote.enabled=true" --sequential remote/test/unit/test_Assert.js
|
2019-01-29 15:18:42 +00:00
|
|
|
|
|
|
|
The unit tests will appear as part of the `X` jobs on Treeherder.
|
|
|
|
|
|
|
|
[xpcshell]: https://developer.mozilla.org/en-US/docs/Mozilla/QA/Writing_xpcshell-based_unit_tests
|
2019-02-17 15:18:47 +00:00
|
|
|
|
|
|
|
|
|
|
|
Functional tests
|
|
|
|
----------------
|
|
|
|
|
|
|
|
We also have a set of functional [browser chrome] tests located
|
|
|
|
under _remote/test/browser_:
|
|
|
|
|
2019-04-24 17:18:37 +00:00
|
|
|
% ./mach mochitest --setpref "remote.enabled=true" -f browser remote/test/browser/browser_cdp.js
|
2019-02-17 15:18:47 +00:00
|
|
|
|
|
|
|
[browser chrome]: https://developer.mozilla.org/en-US/docs/Mozilla/Browser_chrome_tests
|