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

Secret passage – automation at the base of the pyramid

As discussed in the last two sections, automation can be used to avoid repetitive code, both in unit testing and during mocking. In fact, mocking libraries are partially doing that very same thing. Furthermore, some integrated development environments (IDEs), such as IntelliJ IDEA, already have integrated plugins that can insert code automatically, and even create unit test classes. Visual Studio Code (VS Code) has several community-driven extensions that can automate these and other tasks that you are currently doing manually.

The first requirement to write automation over code is to be able to extract pieces of that code and give meaning to those pieces. This is usually done using an abstract syntax tree (AST) to represent this code:

  • With Python, the ast library (see [1] in the Further reading section at the end of the chapter) provides the methods to create one
  • In C#, they are referred to as “expression...