Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Design patterns in test
automation
Mikalai Alimenkou
http://xpinjection.com
@xpinjection
Disclaimer
This talk is based on
personal experience
Design pattern? What is it?
Classical
Design
Patterns
Main driver is *ity
Test
Logic
Application
Driver
Test
Data
Reliability
Clarity
Flexibility
Maintainability
Stability
Structural Patterns
Structure test code better to improve
maintainability, avoid duplicates and separate
concepts, so it b...
Index
Page
Main
Page
login
Search
Page
search
filter
ordersearch
Details
Page
open
see more
show me like this
close
#1. Pa...
Page structure
Available methods
#2. Fluent/Chain of invocations
#3. Factory/Page Factory
#4. Page Element/Composite
List of Items
Link
Menu
Panel
Checkbox
No duplicated code
#5. Loadable Component
#6. Strategy
• Validation
• Navigation
• Calculation
• Execution
Data Patterns
Separate data management from test logic
and reduce amount of data related boilerplate
code in tests, making...
#7. Value Object
#8. Builder
#9. Assert Object/Matchers
#10. Data Registry
#11. Object Pool/Flyweight
• DB instance
• Browser
• Pages
• Heavy domain objects
#12. Data Provider
Entity Driven Data Provider
Technical Patterns
Keep technical aspects separately from test
logic if some additional level of control or low
level data...
#13. Decorator
Driver in driver in
driver in driver in
driver in driver in
driver in driver in
driver…
#14. Proxy
Use HTTP proxy for tests
• Blacklist external resources (Facebook, Twitter, Ads,
etc.)
• Cache images and other nonfunctio...
Business Involvement Patterns
Try to bring business people and
requirements as close as possible to test
automation, makin...
#15. Keyword Driven Testing
#16. Behavior Specification
Behavior Driven Development
#17. Steps
WebDriver or Pages inside
Steps is a key for success
Acceptance
tests
Page
Objects
Steps in different formats
=
Testing
scenario
WebDriver
test
@xpinjection
http://xpinjection.com
mikalai.alimenkou@xpinjection.com
Design patterns in test automation
Design patterns in test automation
Design patterns in test automation
Upcoming SlideShare
Loading in …5
×

of

Design patterns in test automation Slide 1 Design patterns in test automation Slide 2 Design patterns in test automation Slide 3 Design patterns in test automation Slide 4 Design patterns in test automation Slide 5 Design patterns in test automation Slide 6 Design patterns in test automation Slide 7 Design patterns in test automation Slide 8 Design patterns in test automation Slide 9 Design patterns in test automation Slide 10 Design patterns in test automation Slide 11 Design patterns in test automation Slide 12 Design patterns in test automation Slide 13 Design patterns in test automation Slide 14 Design patterns in test automation Slide 15 Design patterns in test automation Slide 16 Design patterns in test automation Slide 17 Design patterns in test automation Slide 18 Design patterns in test automation Slide 19 Design patterns in test automation Slide 20 Design patterns in test automation Slide 21 Design patterns in test automation Slide 22 Design patterns in test automation Slide 23 Design patterns in test automation Slide 24 Design patterns in test automation Slide 25 Design patterns in test automation Slide 26 Design patterns in test automation Slide 27 Design patterns in test automation Slide 28 Design patterns in test automation Slide 29 Design patterns in test automation Slide 30 Design patterns in test automation Slide 31 Design patterns in test automation Slide 32 Design patterns in test automation Slide 33 Design patterns in test automation Slide 34 Design patterns in test automation Slide 35 Design patterns in test automation Slide 36 Design patterns in test automation Slide 37 Design patterns in test automation Slide 38 Design patterns in test automation Slide 39
Upcoming SlideShare
Java → kotlin: Tests Made Simple
Next

20 Likes

Share

Design patterns in test automation

Design patters exist for years in software development. Some developers love them, some think they are useless. But design patters has very clear goals: describe common solutions for common problems, create shared language for community, improve understanding and reuse of existing approaches. Test automation has its own set of problems, so there is a set of helpful design patterns for this area. In this talk I will run through all known patterns and describe them in details with several practical samples.

Related Books

Free with a 30 day trial from Scribd

See all

Related Audiobooks

Free with a 30 day trial from Scribd

See all

Design patterns in test automation

  1. 1. Design patterns in test automation Mikalai Alimenkou http://xpinjection.com @xpinjection
  2. 2. Disclaimer This talk is based on personal experience
  3. 3. Design pattern? What is it?
  4. 4. Classical Design Patterns
  5. 5. Main driver is *ity Test Logic Application Driver Test Data Reliability Clarity Flexibility Maintainability Stability
  6. 6. Structural Patterns Structure test code better to improve maintainability, avoid duplicates and separate concepts, so it becomes easier for test engineer to understand, change and support tests.
  7. 7. Index Page Main Page login Search Page search filter ordersearch Details Page open see more show me like this close #1. Page Object
  8. 8. Page structure
  9. 9. Available methods
  10. 10. #2. Fluent/Chain of invocations
  11. 11. #3. Factory/Page Factory
  12. 12. #4. Page Element/Composite List of Items Link Menu Panel Checkbox
  13. 13. No duplicated code
  14. 14. #5. Loadable Component
  15. 15. #6. Strategy • Validation • Navigation • Calculation • Execution
  16. 16. Data Patterns Separate data management from test logic and reduce amount of data related boilerplate code in tests, making logic more clear and maintainable for test engineers.
  17. 17. #7. Value Object
  18. 18. #8. Builder
  19. 19. #9. Assert Object/Matchers
  20. 20. #10. Data Registry
  21. 21. #11. Object Pool/Flyweight • DB instance • Browser • Pages • Heavy domain objects
  22. 22. #12. Data Provider
  23. 23. Entity Driven Data Provider
  24. 24. Technical Patterns Keep technical aspects separately from test logic if some additional level of control or low level data is needed, reducing tests complexity and improving test code maintainability.
  25. 25. #13. Decorator Driver in driver in driver in driver in driver in driver in driver in driver in driver…
  26. 26. #14. Proxy
  27. 27. Use HTTP proxy for tests • Blacklist external resources (Facebook, Twitter, Ads, etc.) • Cache images and other nonfunctional resources • Collect HTTP traffic for analysis (404, redirects, loading time, etc.) • Speedup page loading
  28. 28. Business Involvement Patterns Try to bring business people and requirements as close as possible to test automation, making it more valuable and helpful for the whole product team.
  29. 29. #15. Keyword Driven Testing
  30. 30. #16. Behavior Specification
  31. 31. Behavior Driven Development
  32. 32. #17. Steps
  33. 33. WebDriver or Pages inside
  34. 34. Steps is a key for success Acceptance tests Page Objects
  35. 35. Steps in different formats = Testing scenario WebDriver test
  36. 36. @xpinjection http://xpinjection.com mikalai.alimenkou@xpinjection.com
  • shibasahoo1

    Jul. 17, 2020
  • AyaOmar1

    Jul. 1, 2020
  • SergeyZastavnyuk

    Dec. 20, 2019
  • AndriiZinchuk

    Aug. 16, 2019
  • seshubabuInnamuri

    Feb. 19, 2019
  • CarlosGauto1

    Sep. 27, 2018
  • ashishkesarwani4

    Jul. 9, 2018
  • DmitriyPris

    Jun. 13, 2018
  • georgiazhu5

    Mar. 17, 2018
  • NibuBaby

    Dec. 5, 2017
  • avzaleski

    Oct. 1, 2017
  • vladsai

    Sep. 25, 2017
  • rahmanslideshare

    Sep. 20, 2017
  • AleksandrNesterovich

    Jul. 28, 2017
  • SergeiAlimov

    Jul. 24, 2017
  • OleksandrSamiilenko

    Jul. 11, 2017
  • powerirs

    Jul. 3, 2017
  • Sergey_Titkov

    Jun. 7, 2017
  • pishchin

    Jun. 4, 2017
  • ViktorLobanov1

    Feb. 27, 2017

Design patters exist for years in software development. Some developers love them, some think they are useless. But design patters has very clear goals: describe common solutions for common problems, create shared language for community, improve understanding and reuse of existing approaches. Test automation has its own set of problems, so there is a set of helpful design patterns for this area. In this talk I will run through all known patterns and describe them in details with several practical samples.

Views

Total views

22,813

On Slideshare

0

From embeds

0

Number of embeds

16,698

Actions

Downloads

0

Shares

0

Comments

0

Likes

20

×