O'Reilly logo

PHPUnit Essentials by Zdenek Machek

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Testing in the browser

When we have installed these three components—the Selenium IDE, the Selenium Server, and the PHPUnit Selenium extension—we will write simple tests and see how they all work together.

Let's start with an example that might look simple and is a nice real-world example. We can use Google to search for the PHPUnit term. Expect a link to the PHPUnit manual to be returned as the first link, go to the PHPUnit manual page, click on the Selenium chapter link, and verify that the Selenium chapter is displayed.

This might sound simple, but we are jumping between two sites; Google uses Ajax to display the search response, so we know that JavaScript is definitely involved. This is the point of Selenium testing—to simulate user behavior ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required