Slides from SmartBear Software's webinar on test design: Scaling UI Automation from the Ground Up.
Watch the full webinar here: http://www2.smartbear.com/outbound-TestComplete-Scalability-Webinar-Replay.html
4. 4
On our plate today
5
Application of these frameworks in real world
1
Where does UI automation go wrong?
2
Why UI tests are critical?
4
Design frameworks to overcome the UI challenges
3
An example of a badly written test
5. 5
UI testing starts off great, but..
Expensive to maintain Not Stable Difficult to debug
6. 6
Take the following as an example..
Text
Duplication
Maintainability
Magic Strings
8. 8
Having UI tests ensure thorough coverage
Browser: Chrome
End-to-end testing
x x x x
HTML5, Angular JS Network Service/API/Database
9. 9
Create one page object for each page
Home Page of Amazon
Result Search Page
Product Details Page
Confirmation Page
10. 10
Three ways to building upon page objects
2
Model 2
3
Model 3
Abstraction Increases
Model 1
1
11. 11
Let’s start with abstraction model 1
Page Object Class 1
TestAbstract control identification
Test steps
Page Object Class 2
Abstract control identification
12. 12
A real world example looks like
Redundancy
Maintainability
Abstracting control identification
Using the abstracted control identification
13. 13
Model 2 solves some of these problems
Page Object Class 1
Test
Page Object Class 2
Abstract control identification
Test steps
Abstract control identification
Abstract control actions
Abstract control actions
14. 14
It still has one problem
Magic StringsLocating the control
Abstracting the set text action for the control
Using the abstracted set text action
15. 15
So to overcome that we have 3rd model
Page Object 1
Test
Page Object 2
Abstract finding controls
Abstract finding controls
Test Steps
Abstract actions
Abstract actions
Abstract magic strings
Abstract magic strings
17. 17
Takeaways
1
UI tests are critical for determining end-to-end behavior
2
Implement a page object model
4
The abstraction increases as you move from framework 1 to 3
3
3 design frameworks to overcome UI challenges