B2G/QA/Automation/UI/Best Practices: Difference between revisions

Jump to navigation Jump to search
Line 50: Line 50:
* Should not call or verify UI controls or back-end APIs directly in test code.
* Should not call or verify UI controls or back-end APIs directly in test code.
* Should use a functional abstraction model like [http://martinfowler.com/bliki/PageObject.html Page Object Model].
* Should use a functional abstraction model like [http://martinfowler.com/bliki/PageObject.html Page Object Model].
* Encapsulate UI actions and checks in Page Objects.  The model is the only place UI is used directly.
* Encapsulate UI actions and checks in Page Objects.  The model should be the only place UI is used directly.
* Should favor verifications through UI over verifications of the back end.
* Encapsulate API details in object as well.
* Should favor verifications through UI over verifications of back end APIs.
* Will consist of a string of functions at high-level, such as calendar.createEntry(...) and calendar.getEntry() == defaultEntry.
* Will consist of a string of functions at high-level, such as calendar.createEntry(...) and calendar.getEntry() == defaultEntry.
* Will be longer and more complex, so need to be at a higher level of abstraction to promote reuse and keep clarity.
* Will be longer and more complex, so need to be at a higher level of abstraction to promote reuse and keep clarity.
canmove, Confirmed users
2,041

edits

Navigation menu