2019-01-29 18:18:42 +03:00
|
|
|
Testing
|
|
|
|
=======
|
|
|
|
|
2019-02-17 18:18:47 +03:00
|
|
|
The remote agent has unit- and functional tests located under
|
|
|
|
`remote/test/{unit,browser}`.
|
2019-01-29 18:18:42 +03:00
|
|
|
|
2019-02-17 18:18:47 +03:00
|
|
|
You may run all the tests locally using `mach test` like this:
|
2019-01-29 18:18:42 +03:00
|
|
|
|
2019-04-25 13:47:31 +03:00
|
|
|
% ./mach test remote/test
|
2019-01-29 18:18:42 +03:00
|
|
|
|
2019-02-17 18:18:47 +03: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 18:18:42 +03:00
|
|
|
chatty, it can sometimes be useful to run the tests in sequence:
|
|
|
|
|
2019-04-25 13:47:31 +03:00
|
|
|
% ./mach xcpshell-test --sequential remote/test/unit/test_Assert.js
|
2019-01-29 18:18:42 +03: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 18:18:47 +03:00
|
|
|
|
|
|
|
|
|
|
|
Functional tests
|
|
|
|
----------------
|
|
|
|
|
|
|
|
We also have a set of functional [browser chrome] tests located
|
|
|
|
under _remote/test/browser_:
|
|
|
|
|
2019-04-25 13:47:31 +03:00
|
|
|
% ./mach mochitest -f browser remote/test/browser/browser_cdp.js
|
2019-02-17 18:18:47 +03:00
|
|
|
|
|
|
|
[browser chrome]: https://developer.mozilla.org/en-US/docs/Mozilla/Browser_chrome_tests
|