QA/Mozmill Test Automation/Shared Modules: Difference between revisions

Line 47: Line 47:


==Implementation==
==Implementation==
The creation of shared modules is not as easy as creating tests, but it's more challenging because you really have to think in an abstract way. If you haven't written a shared module yet, please check our [http://hg.mozilla.org/qa/mozmill-tests/file/default/shared-modules/ existing shared modules]. Those can give you an insight how the code has to look like.
The creation of shared modules is not as easy as creating tests, but it's more challenging because you really have to think in an abstract way. If you haven't written a shared module yet, please check our [http://hg.mozilla.org/qa/mozmill-tests/file/default/shared-modules/ existing shared modules]. Those can give you an insight how the code has to look like. You should also obey the [https://developer.mozilla.org/en/Mozmill_Tests#Writing_Mozmill_Tests test writing guidelines].


==Using a Shared Module==
While creating the shared module you should immediately check if the functions you have added are working as expected. Therefore you can create a helper test module under [http://hg.mozilla.org/qa/mozmill-tests/file/default/firefox/helperClasses firefox/helperClasses] with the same name as the shared module itself. The [https://developer.mozilla.org/en/Mozmill_Tests/Shared_Modules#How_to_use_a_Shared_Module shared module documentation] explains how to include the shared module into a test.
While creating the shared module you should immediately check if the functions you have added are working as expected. Therefore you can create a helper test module under [http://hg.mozilla.org/qa/mozmill-tests/file/default/firefox/helperClasses firefox/helperClasses] with the same name as the shared module itself. The [https://developer.mozilla.org/en/Mozmill_Tests/Shared_Modules#How_to_use_a_Shared_Module shared module documentation] explains how to include the shared module into a test.
Before the shared module can be checked-in a review is necessary. Therefore create a patch and ask for review. Details about that process can be found on [https://developer.mozilla.org/en/Mozmill_Tests#The_Review_Process MDC].
canmove, Confirmed users, Bureaucrats and Sysops emeriti
4,714

edits