/design-patterns-test-autom

Common design patterns for test automation.

Primary LanguageJava

Creating maintainable test automation frameworks

Better coding practices and design patterns for maintainable test automation frameworks.

  1. Single Responsibility Principle: Instead of creating just page classes in UI automation, create classes for different components on UI and use these classes in your page classes. This way your classes remain smaller, code can be reused and if there are any changes in any component, you just need to make changes to that component class.
  2. Factory Design Pattern: Create a class that acts as a factory for page objects generation. Also, dont keep your page objects public after creating a Factory class as keeping them public will allow object creation without use of Factory class as well.


Credits: @Vinoth Selvraj's design pattern course on Udemy.