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

Introducing the Spaghetti pattern


In automated test projects, the Spaghetti pattern development is characterized by lack of perceived architecture and design. This style of test development evokes an image of bowl of spaghetti, where each strand of spaghetti can represent a single test or multiple tests intertwined so tightly together that it becomes difficult to tell one apart from another. Furthermore, it is close to impossible to understand anything at a glance without spending time fishing out and untangling each individual strand of spaghetti from the bowl.

Tests in this pattern not only depend on the execution order of all the tests, but also tend to over-share internal private components with each other. The run order is important because each test is not self sufficient and independent, and thus needs previously run tests to set up the test environment. For example, a login test requires the registration test to successfully register a new user, instead of having an existing user...