WebExtensions/Contribution Onramp: Difference between revisions

Add testing tips and reference to new Try server article
(→‎Submitting a Patch: more info on phabricator)
(Add testing tips and reference to new Try server article)
Line 45: Line 45:


These tests can be run with the “mach test” command. To run a specific test, use “mach test [paths to test files or directories]”.
These tests can be run with the “mach test” command. To run a specific test, use “mach test [paths to test files or directories]”.
Sometimes "mach test" has bugs (e.g. [https://bugzilla.mozilla.org/show_bug.cgi?id=1498636 bug 1498636] and  [https://bugzilla.mozilla.org/show_bug.cgi?id=1495311 bug 1495311]); in that case use "mach xpcshell-test" or "mach mochitest" instead of "mach test" to run the test.


Add your test to an existing file when it is small and fits in that test. Otherwise, create a new test file, and register the test file in one of the .ini files in the same directory as your test, usually browser-common.ini or xpcshell-common.ini.
Add your test to an existing file when it is small and fits in that test. Otherwise, create a new test file, and register the test file in one of the .ini files in the same directory as your test, usually browser-common.ini or xpcshell-common.ini.
Line 88: Line 89:
* QA will verify your patch after it lands, unless your mentor has added a “qa-not-needed” keyword.  
* QA will verify your patch after it lands, unless your mentor has added a “qa-not-needed” keyword.  
* Once your patch is accepted, you can expect to see your code in an upcoming version of Firefox!
* Once your patch is accepted, you can expect to see your code in an upcoming version of Firefox!
== Try server ==
To verify that the patch works as intended, your mentor may schedule a try job on the [[ReleaseEngineering/TryServer#Try_Server|Try Server]] to run tests. Contributors [[ReleaseEngineering/TryServer#Getting_access_to_the_Try_Server|with access to the try server]] can [[ReleaseEngineering/TryServer#How_to_push_to_try|push try jobs]] to run tests themselves.
See [[WebExtensions/Try_Server]] for more information about using the try server to test WebExtension code.
47

edits