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

m
 
(5 intermediate revisions by one other user not shown)
Line 8: Line 8:
  |- valign="top"
  |- valign="top"
  | '''Co-workers:'''
  | '''Co-workers:'''
  | Anthony Hughes
  | Anthony Hughes, Geo Mealer
  |- valign="top"
  |- valign="top"
  | '''Dates:'''
  | '''Dates:'''
Line 26: Line 26:
  |}
  |}


==Excerpt==
=Excerpt=
To ease the creation of Mozmill tests for a given subgroup, it's helpful to have a set of helper functions available, which can be called to achieve a wanted action. With the creation of shared modules we want to follow this idea and create function or even classes to simplify the access of single elements or whole dialogs.
To ease the creation of Mozmill tests for a given subgroup, it's helpful to have a set of helper functions available, which can be called to achieve a wanted action. With the creation of shared modules we want to follow this idea and create function or even classes to simplify the access of single elements or whole dialogs.


Line 44: Line 44:


==Filing a Bug==
==Filing a Bug==
To get the shared module implemented you will have to file a [https://bugzilla.mozilla.org/enter_bug.cgi?alias=&assigned_to=nobody%40mozilla.org&cc=hskupin%40gmail.com&component=Mozmill&form_name=enter_bug&keywords=&product=Testing&qa_contact=mozmill%40testing.bugs&rep_platform=All&short_desc=[shared%20module]%20Description new bug]. Use a clear summary and add the requirements you have compiled in the former chapter.
To get the shared module implemented you will have to file a [http://tinyurl.com/22pmx46 new bug]. Use a clear summary and add the requirements you have compiled in the former chapter.


==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.
 
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
2,398

edits