Page object pattern presentation - Ultimate QA

Selenium Webdriver. 40.0. 3.1.2. 2015. 2.53.1. NUnit. 3.4.1.0. www.ultimateqa.com. Record and Replay: How many tests need to be updated due to a change in ...
展开查看详情

1.1 1 Nikolay Advolodkin QA Automation Engineer www.ultimateQA.com @Nikolay_A00 A Single Pattern to Drastically Improve Your Test Automation 

2.What is one problem that most of us face with functional test automation? 

3. 20  5  4 Poll: How many tests can you run per day that will give the correct result with 95% accuracy ? 3 3  2  3  2 501 - 1000 1001 - 5000 5000+ 101 - 500 51 - 100 0 - 50

4.4 4 Flaky tests (6)  Lack of knowledge (6)  Framework (6)  Synchronization (4)  Other, one off issues  Poll: What is a problem that you have with test automation?

5.Why is functional test automation so flaky? 

6.6 User Experience Canvas Touch Events Angular JS    SVG Drag & Drop AJAX    http://www.evolutionoftheweb.com/

7.How can Automation Engineers handle such an evolving world? 

8.“The only thing constant in software development is change.” 

9.Tools Used 9 9 Version Firefox Selenium Builder Visual Studio Selenium Webdriver 40.0 3.1.2 2015 2.53.1 NUnit 3.4.1.0

10.Record and Replay: How many tests need to be updated due to a change in AUT? 10 10 How many tests need to be changed? Driver Initialization Url Locators User names/passwords Synchronization issues Change Agents All All All All All

11.11 Methods Resilient Lemon drops oat cake oat cake sugar plum sweet gingerbread chocolate cake gingerbread. Portfolio Five Reusable Lemon drops oat cake oat cake sugar plum sweet gingerbread chocolate cake gingerbread. Portfolio Four Advantages of using Keyword Driven Approach

12.12 Too much in 1 file Flow changes break all tests Lemon drops oat cake oat cake sugar plum sweet gingerbread chocolate cake gingerbread. Portfolio Five Method for every action Lemon drops oat cake oat cake sugar plum sweet gingerbread chocolate cake gingerbread. Portfolio Four Disadvantages of using Keyword Driven Approach

13.13 13 So what can I do then????  Give me the answer already  So unstable!!  Arghhhh  It’s Brittle bro! 

14.Page Object Pattern 

15.15 Page Object Pattern Object – Page.cs

16.16 Page Object Pattern Use your code to interact with the application page just like you would interact with it manually Page.ClickStartHereButton () Page.GoToVideoTutorials ()

17.17 Abstraction Logical Follows Good Design Principles Maintainable Readable Tests Advantages of Page Object Pattern

18.18 DRY – Don’t Repeat Yourself

19.“Duplication is the primary enemy of a well-designed system” Martin, Robert 

20.20 Increased barrier to entry Requires constant improvement Lemon drops oat cake oat cake sugar plum sweet gingerbread chocolate cake gingerbread. Portfolio Five Many different options Lemon drops oat cake oat cake sugar plum sweet gingerbread chocolate cake gingerbread. Portfolio Four Disadvantages of using Page Objects

21.3 Actionable Tips 21 21 Start Using Page Objects Use Test Driven Development Stop being WET   

22.Resources 22 22 Code and Slide Deck - http://wp.me/P7absY-8j Martin , Robert C.. Clean Code: A Handbook of Agile Software Craftsmanship ( Kindle Locations 4076-4077). Pearson Education. Kindle Edition. Selenium Wiki on Page Objects Martin Fowler on Page Objects Dave Haeffner on Page Objects