Book Image

Selenium Design Patterns and Best Practices

By : Dima Kovalenko
Book Image

Selenium Design Patterns and Best Practices

By: Dima Kovalenko

Overview of this book

Table of Contents (18 chapters)
Selenium Design Patterns and Best Practices
Credits
Foreword
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

The Chain Linked pattern


The Chain Linked pattern is an improvement on the Spaghetti pattern. Unlike the bowl of spaghetti, an outstretched length of chain can characterize this pattern. Each link in the chain is an individual test and is an entity on its own. Even though each test is self contained and does not share too much with its neighbors, it still relies on a rigid order of execution. Most tests in this pattern rely on previous tests to set up the environment to be just right. This pattern is a huge improvement on the Spaghetti pattern in its long-term maintainability; however, since the whole test suite needs to be executed every time, it is neither efficient nor easy to use. In conclusion, the Chain Linked pattern might not be the best way to approach writing a test suite. However, it is an overall improvement over the Spaghetti pattern, since it segregates individual tests into more or less self-contained units.