QA/Mozmill Test Automation/Test Writing: Difference between revisions

Jump to navigation Jump to search
Line 64: Line 64:
* Now you are ready to begin writing your first test
* Now you are ready to begin writing your first test


==Implementing a Test==
== Writing Your First Test ==
At first you should read through the [https://developer.mozilla.org/en/Mozmill_Tests#Writing_Mozmill_Tests test writing guidelines] to get familiar with the test creation.
'''1) Know the Guidelines'''
* In case you missed it, or need a refresher, be sure you are familiar with the specifics of our [https://developer.mozilla.org/en/Mozmill_Tests#Writing_Mozmill_Tests Mozmill test writing guidelines].


Once it is clear check the [http://hg.mozilla.org/qa/mozmill-tests/file/default/templates available templates] which have been prepared for a new test. Copy and paste the content into a new file to get the raw structure for your test. Finally fill in your details in the license plate.  
'''2) Templates'''
* We've created a test skeleton template which should help you with getting started. Simply copy and paste the content of the template into a new file; this will give you the raw structure needed for a Mozmill tests. ''Make sure you fill in the license plate with your name and email address''.


Writing the Mozmill test means you should follow the steps given in the Litmus test as best as possible. If you have variations feel free to implement all of those. As more ways we are able to test as higher are the chances to find a regression in the future. Use available [[QA/Mozmill_Test_Automation/Shared_Modules|Shared Modules]] to create a test which is easy to understand by everyone.  
'''3) The Litmus Test'''
* When writing your Mozmill tests, you should follow the steps and expected results of the Litmus test as closely as possible. In some cases variation and deviation from the Litmus test may be desired or even warranted.  


To get the new test checked-in into our [http://hg.mozilla.org/qa/mozmill-tests/ mozmill-test repository] you will have to create a patch and go through the usual [https://developer.mozilla.org/en/Mozmill_Tests#Review_Process review cycle].
'''4) Shared Modules'''
* An integral part of our Mozmill tests API is the [[QA/Mozmill_Test_Automation/Shared_Modules|Shared Modules]]. These make it easier to implement your test by doing a lot of the getter, setter, and helper legwork required for many tests. Using the shared modules also makes it easier for others to understand what your code does. We strongly encourage familiarization with the shared modules.
 
== Landing Your First Test ==
'''1) Review'''
* Before we can land your test into the [http://hg.mozilla.org/qa/mozmill-tests/ mozmill-test repository] you will have to create a patch and go through our [https://developer.mozilla.org/en/Mozmill_Tests#Review_Process review process]. Reviewing patches is an iterative process of submitting a patch and asking experienced developers to check the code for style, completeness, functionality, and stability. ''Every patch which lands in a Mozilla repository undergoes a review''.
 
'''2) Super Review'''
* Once your patch passes review, known as ''r+'', it will be handed off to one of the project leads. The purpose of the super-review is to catch any last minute flaws which may have been missed during the initial review phase. It's a quick stop along the way to ensure the quality and stability of the test repository. ''Every patch which lands in the Mozmill Tests repository undergoes a super-review''.
 
'''3) Check-in'''
* Once your patch has been given r+ by both the reviewer and super-reviewer, it will be checked in across various branches of the Mozmill-tests repository. In general, there is nothing for you to do at this stage but to wait for someone on the team to check it in for you. You can take satisfaction in a job well done and the appreciation of Mozmill and the community.
 
'''You are now ready to write your next test'''


== Finishing up the Test  ==
== Finishing up the Test  ==
Confirmed users
14,525

edits

Navigation menu