- Selenium Framework Design in Data-Driven Testing
- Carl Cocchiaro
- 220字
- 2025-02-18 04:59:03
DRY
DRY approaches to creating page object and test classes simply mean promoting the use of common classes, locators, methods, and inheritance to eliminate and avoid repeating the same actions over and over in multiple places. Instead, abstract base classes are created, containing all common objects and methods, and used as libraries to be called using parameters, which vary based on the data that is passed into them from the test classes. All subclasses derived from these base classes inherit all the common code, objects, locators, and methods, and enforce all of the abstract methods required by the base class. In essence, this approach avoids common copy and paste actions that result in duplicate code in multiple places.
As per Wikipedia (https://en.wikipedia.org/wiki/Data-driven_testing):