Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Design Pattern(s) in Test automation

Sponsored · SiteGround - Reliable hosting with speed, security, and support you can count on. →

Design Pattern(s) in Test automation

Avatar for varuna srivastava

varuna srivastava

August 08, 2021

Other Decks in Technology

Transcript

  1. @vibranttester Fruitful Design Patterns in Test automation Varuna Srivastava [email protected]

    @vibranttester SESSION August 2-7,2021 testinguy.org @testinguy | #testinguy
  2. @vibranttester Hello • Lead Quality Analyst at Thoughtworks • Testing

    traveler • @vibranttester • Blog https://srivastavavaruna.medi um.com/ 2
  3. @vibranttester Agenda • What are design patterns • Design pattern

    types • What does Design Pattern consist of • Design Pattern in Test automation • References 3
  4. @vibranttester Design pattern is a general repeatable solution to a

    commonly occurring problem in software design. 5
  5. @vibranttester Intent of the pattern briefly describes both the problem

    and the solution. What does Structure of classes shows each part of the pattern and how they are related Intent Motivation Structure Motivation further explains the problem and the solution the pattern makes possible Code Design pattern consist of? Code in any of the popular programming language makes it easier to grasp the idea behind the pattern 6
  6. @vibranttester Builder Pattern Immutable instances Complex objects Reusability creating immutable

    classes with large set of attributes Reuse the same construction code while representing various objects Alternate way to construct complex objects + + 14
  7. @vibranttester Advantages of Page Object DRY RTP SOR Build the

    right things without repeated code Abstraction allow separation of concerns Validate the business requirements following TP + + 19
  8. @vibranttester Chain of invocation Prettier Code Avoid object repetition Scalable

    framework Build the right things without repeated code Gives hint everytime by invoking some method on the object Don’t repeat putting object again & again after method invocation + + 21
  9. @vibranttester Page Factory Hide Complexity Encapsula- tion Dynamic element locator

    Work directly with page fields hiding the low level complexity. Locates element dynamically on a page Encapsulates page’s attribute by findby annotations + + 25
  10. @vibranttester Data Design Data uniqueness Separation of data and test

    code Nested Data Dynamic data in test automation Ways to pass test data in test intent Reduce boilerplate & code duplication in tests + + 30
  11. @vibranttester Advantages of Design Pattern 34 Platform and language independent

    One place to modify Enhance reliability Single ownership Save time and effort
  12. @twitterSpeaker1 | @twitterSpeaker2 | #testinguy Varuna Srivastava [email protected] @vibranttester varunasrivastava

    August 2-7, 2021 testinguy.org | @testinguy | #testinguy Questions? Thanks!!