-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Selenium Design Patterns and Best Practices
By :

Jeff Roggers and Kristan Vingrys initially developed the write once, test everywhere pattern while working at ThoughtWorks. The concept centers on taking advantage of shared behavior between multiple implementations of one application. For example, it should be possible to purchase a product from our website no matter whether the user is using our full website, the mobile version, or native mobile application. If the feature definitions are well written, the steps used to implement the test can be interchangeable.
The write once, test everywhere pattern is also known as the pluggable test pattern, since we can plug the implementation of tests into different contexts. As we change the context from the desktop website to mobile to API tests, we plug in the correct implementation.
The write once, test everywhere pattern has several advantages going for it; here is a list of a few of them:
Foresight...
Change the font size
Change margin width
Change background colour