Preface

Since I've stumbled upon Yii first and Codeception later on, I couldn't believe that someone actually thought of solving the eternal damnation of a difficult testing panorama that most web developers, including me, have suffered with for so many years.

I've poured a good part of myself into this book, hoping that I could finally create a book that I never managed to find when I needed to learn about testing.

I believe the hardest part has been concentrating all of the accumulated experience, reading, conferences, and chats I've had about quality assurance, testing, and project management.

But this wouldn't have been possible without the great effort that has been put into Yii in its current version (version 2) and Codeception. Both these pieces of software, and the rest that are noted throughout the book, are the result of the efforts of hundreds of developers across the globe.

With all of this, together with the compassion and patience of Cristina, who tolerated my restless evenings to exhaustion, I have the pleasure to release this book, hoping that you will find an inspiration to discuss, improve, and contribute to the testing and web development community.

What this book covers

Chapter 1, The Testing Mindset, starts by defining the concepts used throughout the book, tries to explain why testing is so important, introduces the major testing techniques, and shows you how to get into the right mindset to approach this book.

Chapter 2, Tooling up for Testing, introduces Yii 2 with an overview for you to understand how the code is organized. We also start defining the work that will be carried over to the remaining chapters from the testing perspective.

Chapter 3, Entering Codeception, introduces Codeception and explains what it does, how it's structured, and how it works.

Chapter 4, Isolated Component Testing with PHPUnit, demonstrates PHPUnit. The first unit tests are implemented in this chapter, with the help of data providers.

Chapter 5, Summoning the Test Doubles, introduces test doubles with the use of mocks and stubs, while still sticking to PHPUnit. We also appreciate an alternative BDD-like syntax to write our tests.

Chapter 6, Testing the API – PHPBrowser to the Rescue, gives an overview of functional tests and then shows their expansion relative to the REST interface that Yii 2 allows you to create.

Chapter 7, Having Fun Doing Browser Testing, finally shows some live action with acceptance tests using Selenium WebDriver.

Chapter 8, Analyzing Testing Information, covers some more advanced topics about tests and code optimization techniques, thanks to the reports generated by Codeception and other tools.

Chapter 9, Eliminating Stress with the Help of Automation, is a more advanced chapter and introduces continuous integration with the aim of automating tests and displaying their reports using Jenkins CI.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset