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

Line 117: Line 117:
Discussion [http://mozqa.ietherpad.com/refactor-discussion here]
Discussion [http://mozqa.ietherpad.com/refactor-discussion here]


; Generally Agreed
* We should always use the triple operator to not experience strange behavior  
* We should always use the triple operator to not experience strange behavior  
** ===/!== instead of ==/!=
** ===/!== instead of ==/!=
Line 123: Line 124:
* Class names have to start with a capital letter
* Class names have to start with a capital letter
* setupModule(module) and teardownModule(module) have to specify the module parameter
* setupModule(module) and teardownModule(module) have to specify the module parameter
* If variable name contains an acronym, capitalize the acronym
; Needs Discussion
* sleep() should only be used when an element/state is not available for waitFor()
* TestFilesAPI for loading of test files
** We should have a module specific to loading of test files
** We should also check how we can make sure those locations are easily replacable with other servers (apache, ...)
* Error message format
** "Expected password-save notification bar to be visible"
** Messages should be positive in nature
** <element> should be what the element represents
** <state> should be what state we expect that element to be in
** Mochitests are using: "- got XXX, expected YYY". We should show both values in the failure message. That will make it much easier to spot failures. The element itself isn't that necessary. You will see this by the line reference.
* Parameters should be named using aParam format
** shows that a variable inside a long function is a parameter and hasn't been declared locally
Confirmed users
14,525

edits