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

Summary


To be completely honest, managing test data is by far the single most difficult task with test automation. Locating an element on a complicated web page pales in comparison in complexity, compared to dealing with test data. There are so many technical and legal restrictions whenever production data is used that maintaining a grid of hundreds of browsers will feel like a vacation.

In this chapter, we only scratched the surface of data management. By using fixtures, we can control some of the chaos in the CI test environment. When fixtures are not an option, we can find other ways to interrogate the state of the application by using API endpoints, or we can stub out external services to make sure our application can still function. With the use of the faker library and default values pattern, we can simplify our test implementation by generating real-looking data that has been abstracted away.

In the next chapter, we will be improving the stability of our small test suite. We will fix...