Chapter 15. Testing

Computers are good at following instructions, but not at reading your mind.

—Donald Knuth

WHAT'S IN THIS CHAPTER?

  • Basic facts on enterprise software testing.

  • Functional and unit testing.

  • Using testing frameworks.

  • Automated tests with Selenium.

Many people associate "testing" with measuring the performance of applications. These kinds of tests will be conducted in Chapter 17, but this chapter deals with testing on a much deeper level, namely testing whether an application works as expected or not. It is easy to underestimate this kind of testing because it may seem a trivial issue. Indeed, it is trivial for very small applications, but when they grow and gain new functionalities, testing becomes an indispensable part of the software development process. It is an area of computer science that focuses on the quality of software.

INTRODUCING TESTING

Imagine that you have just written a really cool app with abundant functionalities and you have instantly sold it at a premium price. However, after a week your customer wants his money back or even sues you because your software crashes once a day. So, you delivered a piece of software that could be really great, but in fact is useless for your customer. Generally speaking, software stability may be something not easily noticeable from a developer's point of view, but it is critical for end users who will work with this software every day in their environments.

How to Begin Testing

When starting a new project, some requirements ...

Get Building PHP Applications with Symfony™, CakePHP, and Zend® Framework now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.