SeleniumlogoIt's time to automate your browser testing.

Selenium is a great response to the lack of "front end" testing tools.
The realm of unit testing is full of different tools, automations and monitors to make sure every function is doing what it's suppose to do.
Almost every MVC has its own implementation of Unit Testing, and if you don't like that, you can implement a separate Unit Testing framework (e.g. PHPUnit).

But what about what the user actually sees?
What happens if you have an error as a reaction to one of the user’s actions?

The thing is, even if the function get_user_profile() returns the wanted result,
what happens when the user is logged in and tries to edit his profile,
but due to some JavaScript error (say someone changed the call behavior) he can't see his profile page?

This error can only be reproduced by either someone clicking everywhere on the website
every time something is committed to the code (because sometimes it’s difficult to determine
if some other sections might affected), or using some sort of browser automation software.

In comes Selenium IDE!
Written as a Firefox Plugin (3rd party plugins can be found for Chrome, IE, Android, iPhone & even Windows Phone [go figure]), it lets you record actions that you do on the browser, such as Click, Type, Open addresses, etc.
Afterwards it lets you have assertions (just like Unit testing!), so you can assume what’s suppose to happen.

An interesting example can also be if you want to make sure that each of your category pages has the right title, as well as the articles under that category.
Perhaps you want to make sure that if the user clicks on “Hire Me!” he gets your email address.

The behaviors you can test are without end obviously, and it’s very useful for big websites with huge catalogs,
I can’t even count the number of times that bugs were found on specific product/article pages that no one could find a few months later.

There’s also the Selenium WebDriver.
This is like Selenium on steroids,
it lets you test under different environments for even more power & customizable testing.
I definitely would recommend starting to work with Selenium IDE first,
especially to get a good idea of how this kind of testing works.

Selenium has some interesting plugins, such as taking screenshots when the test fails,
or some other minor improvements. The most interesting plugin (for me at least),
would be the Jenkins plugin.
This is actually the other way around, because it’s a Jenkins and not a Selenium plugin,
but it allows Jenkins to fire Selenium tests, automating it all to an
ultimate-testing-monster-thingy (you can name it however you want).