Design Patterns - POM and LFM Leeds Sharp 27/08/2015 by John Staveley Page Object Model and Logical Functional Model For automated user testing Selenium, WatiN, CodedUI etc Increase maintainability and reduce brittleness of UI tests NB: I assume you've used a UI testing framework (we'll be using Selenium) from www.seleniumhq.org – a firefox addin
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Design Patterns - POM and LFM
Leeds Sharp 27/08/2015 by John Staveley
Page Object Model and Logical Functional Model For automated user testing Selenium, WatiN, CodedUI etc Increase maintainability and reduce brittleness of UI tests NB: I assume you've used a UI testing framework (we'll be using Selenium) from www.seleniumhq.org – a
firefox addin
A sample page to test
Our test: The meaning of life, the universe and everything....
CF: Hitchhikers guide to the galaxy, computer at the end of the universe
The meaning of life
6x7=42
Export the test case
Some maintenance issues
6+1-2=5 66/11=6 6*4=24 56-39=18 Any change to the number 6 breaks all of these tests
Page Object Model
Create a class to represent the page Abstract away the operation of the web testing framework
Page Object Model in a test
Logical Functional Model (LFM)
Sits as a layer above POM Abstracts away further the implementation of interacting with
a page Increases reuse of your test code, particularly repeated
operations Enables less technical users to create tests