8.2. The Importance of Performance Testing

When developing web applications, one of your goals should be to have extremely happy clients, not just happy clients, clients who will rant and rave about the quality of the application that was delivered. Web applications that generate errors or have a poor response time make for customers that are frustrated or upset. In recent years developers have seen an increase of business applications that were originally developed as "client/server" or "thick client" applications moving to the web. Some call this phenomenon the Semantic Web or Web 2.0. Call it what you will but this phenomenon has changed how web applications need to be created.

Users of these types of applications expect the newly adapted web applications to perform as well and as reliably as their desktop counterparts. In the past the web has had a reputation of being "slow and clunky," whereas the "thick client" applications were "mean and lean." With the advancement of broadband connections and technologies such as AJAX, web applications are no longer "slow and clunky."

Performance testing can be considered the forgotten second cousin of unit testing. Most developers put this type of testing off until the very last minute, if they even get to it at all. Performance issues tend to have a habit of turning up late in the application cycle, and the later that you find them the greater the cost. Studies have shown that most performance defects are "firefighting" defects, meaning they are resolved while the system is in production. These issues require costly time-consuming work from developers to get the issues resolved quickly. In some situations the applications are even taken offline while the performance issues are resolved.

As with other types of testing, there is a cost to conducting a very in-depth analysis of the performance of a web application, and many managers do not see the need for up-front performance testing. There are plenty of web applications where performance testing has not been performed and they are working correctly, but they have been lucky enough not to have reached the tipping point where the database has grown substantially or become overwhelmed with visitors. These types of issues tend to appear out of nowhere and can affect even the smallest of web applications. That being said, some level of performance testing should be performed on all web applications at least at a high level.

It's extremely important to think of the performance of a web application as a feature. When you think of performance as a feature, you can plan for it, work through multiple iterations to test the performance, and make adjustments accordingly. Thinking of performance as a feature will also keep you from waiting until the very last minute and hastily throwing together a performance test suite that is not up to your normal quality of work. Start performance testing very early in the application lifecycle.

Back when the ASP.NET DataGrid control was first introduced, developers were attracted to this control like bees to honey. Developers liked to use this control because of its ease of use. In many of the demos, Microsoft Employees touted the fact that "you don't need to write any code for the DataGrid to work." We are sure that many readers have been burned by the DataGrid control in one way or another. One of the most common performance issues of ASP.NET can be related to the DataGrid control, and how it handles data paging. For example, if you have a DataGrid on an ASP.NET page that displays 10 records at a time, but the dataset that is bound to the DataGrid contains 200,000 records, by default, each time the user selects a new page, those 200,000 records are requested from the database even though you are only showing the user 20 at a time. As the data in web applications that use the DataGrid to render data to a user grow, the application loses performance. This example stresses how important it is to test early in the application development phase, and to use a realistic amount of data as test data.

Having a well thought-out performance test will help you push your web application to the limits of its configuration. Knowing if you can add more hardware to increase capacity will help you sleep better at night. You never know when your application will grow to have 1,000,000 users.

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

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