Book Image

How to Test a Time Machine

By : Noemí Ferrera
Book Image

How to Test a Time Machine

By: Noemí Ferrera

Overview of this book

From simple websites to complex applications, delivering quality is crucial for achieving customer satisfaction. How to Test a Time Machine provides step-by-step explanations of essential concepts and practical examples to show you how you can leverage your company's test architecture from different points in the development life cycle. You'll begin by determining the most effective system for measuring and improving the delivery of quality applications for your company, and then learn about the test pyramid as you explore it in an innovative way. You'll also cover other testing topics, including cloud, AI, and VR for testing. Complete with techniques, patterns, tools, and exercises, this book will help you enhance your understanding of the testing process. Regardless of your current role within development, you can use this book as a guide to learn all about test architecture and automation and become an expert and advocate for quality assurance. By the end of this book, you'll be able to deliver high-quality applications by implementing the best practices and testing methodologies included in the book.
Table of Contents (19 chapters)
Part 1 Getting Started – Understanding Where You Are and Where You Want to Go
Part 2 Changing the Status – Tips for Better Quality
Part 3 Going to the Next Level – New Technologies and Inspiring Stories
Appendix – Self-Assessment

Dealing with dynamic object IDs

Although having a good development design with testability in mind is the ideal scenario (and we hope this book helps developers achieve it), the reality is not always as ideal. Sometimes, we inherit old code that has been built as a quick proof of concept or by someone that did not really care for testing so much. In this section, we will see some examples of that and what can we do to automate as much as possible around this. One example is the localized locators that we discussed earlier.

Items with dynamic locators

Sometimes, it is useful for an application to generate objects automatically. This happens quite frequently in games, where you can find sprites being generated as particles, bullets, or enemies. These may have an auto-generated ID (or another locator).

If that is the case, we should try looking for the object type, using a CSS locator for a particular class or similar.

Here’s an example of finding elements using a CSS...