Testing and Optimizing of what I call "traditional" page-based web applications is not too hard to do. Take CNN as an example. You have the home page www.cnn.com. From there you can click through the news sections such as U.S, World, Politics, ... - each click loading a new page with a unique URL. Testing this site is rather easy. Use Selenium, WebDriver or even a HTTP Based Testing tool to model your test cases. Navigate to all these URLs and - if you are serious about performance and load time - use tools such as YSlow, PageSpeed or dynaTrace AJAX Edition (these tools obviously only work when testing is done through a real browser). These tools analyze page performance based on common Best Practices for every individual tested URL.

This is great for traditional web sites but doesn't work anymore for modern Web 2.0 Applications that provide most of their functionality on a single page. An example here would be Google and their apps like Search, Docs or GMail. Only a very small time is actually spent in the initial page load. The rest is spent in JavaScript, XHR Calls and DOM Manipulations triggered by user actions on the same URL. By just following Best Practices we do not anlayze the User Interaction Time which is a very important factor in Web 2.0 Applications.

Read the rest of the article where I explain what the Best Practices approach misses, how we can best test web 2.0 applications using Selenium/WebDriver and how to analyze and optimize performance of user interactions.