Design Patterns in Test Automation
summary
Concrete test automation design patterns for Java WebDriver are presented, including Page Object, Factory, Composite elements, LoadableComponent, fluent chaining, Decorator, Builder, Data provider, Proxy, Registry, and Steps, with code and real examples (Yandex page, YouTube player). A mini-framework is shown that uses PageFactory, EventFiringWebDriver and integrations (jdi/html-elements, Serenity), caches pages, blacklists heavy resources via a proxy, generates unique users from a registry and serialized test data, and demonstrates that a single locator change can update many tests; runnable samples and readable step reports are provided using Page Object, Decorator, Data provider and Steps.
AI-written summary · about
chapters (13)
- 0:00Design patterns intro
- 7:55Page Object basics
- 15:52Factory for Page Objects
- 21:30Composite for complex pages
- 27:29Loadable Component
- 30:20Fluent Interface
- 32:28Decorator for elements
- 34:38Builder for objects
- 36:05Data Provider
- 38:30Proxy for network
- 39:34Registry for data
- 41:20Steps bridging manual and auto
- 44:12Conclusion & Q&A
related talks
48mDesign patterns to boost your test automation
46mTest Automation with Selenium WebDriver, Java, and JUnit
14mTest Automation Framework Design and Implementation
53mAdvanced Patterns for Automated UI Testing
46mHow to Create an Architecture for Web Test Automation
35mBuild an automation framework... with a developer mindset
13mCombining Automation Frameworks with Design Patterns
25mTest Craftsmanship: Clean code practices for Test Automation
