
Model Your Real Life Conditions
If you want to get an accurate idea of how your Web site is going to perform in the real world, then you need to model the conditions that your site will experience. That means different work flows representing different users and different actions per flow. This will give the confidence that the application will react in a similar way as to the load conditions. In order to model the test correctly and accurately, the following aspects should be considered:
Configuration management: You must make sure the testing environment is ready for the load that will be generated. Ensure the testing hardware is dedicated to the testing effort. Ensure the database is not changed and that it is populated as it would be in production. When changes are made to the application, make these on at a time between test runs.
Application Work Flows (Scenarios): This is most critical aspect of successful application testing and input should be provided by all teams which have the relevant knowledge. It could be marketing, sales or product management. In the case of existing applications, it should be modeled on known usage patterns and log files or other analytic tools which may also be used. Load testing is not functional testing and not every link should be clicked upon. However, the recorded scenarios should reflect typical usage of the application and these scenarios run according the appropriate percentages.
Sleep Times: User spend time on web pages reading, filling in a form, watching a media clip or interacting with a client side object before the next click which sends a server request. This time parameter is extremely influential on the load created. People interact at different times, some read all the content and some scan briefly over the text. People using the same site repeatedly may quickly click through a number of screens. The Sleep time in the test should therefore be realistic often defined as random number within a specific range based on what is possible on a specific page. Also note that running a test without Sleep times is extremely difficult to quantify in terms of real users. It may be a good stress test but will not provide the answers needed for an accurate performance test. If the tools you are using do not have recorded Sleep time, try to obtain this important information from server logs.
Usage Patterns of Usage in web applications: The web is not a 9:00 – 5:00 interface for doing business. Web sites may have a global reach or may be accessed during typical work hours. Some applications are continually accessed whilst other may be accessed once per week or less than that. For ecommerce, users use this always open interface to shop at any time in the day. There are however times where there may be less or more users. And there may be great variations as well as extreme peaks of load on the application. A marketing campaign for Christmas shopping or a large sporting event with web access can create such peaks. An educational application may have the greatest load at 8:00 in the morning when an online lesson begins. These patterns and peaks should be tested for in order to be ready for changing load as well as peak load periods.
Browsers: The http header sent together with a web request may result in a different response from the server. A request from a mobile telephone may return a different result set than a browser. May require different server side activities and return a different result set.
Connection speeds: In early web testing when homes were connected via a modem at the transmission speed 28.8 Kbps simulating such a slow speed actually made it easier for web applications to respond. The slow times were a result of the slow connection and not the slow response of the application. Today with ever increasing access speeds and fiber to the home, the load should be generated at such speeds and also generated at a mix of different speeds simulating different populations.
Different, Remote Geographic Locations: Typically web performance testing is done in a lab environment. However different locations around the world may take longer due to the distance or web traffic at peak hours. There are ways to test this to get a true report of client side response times. Some tools have a remote roaming client which can be installed anywhere in the web to run at the same time as the load test. If it is an internal application, tests can be run from various locations or branches of the company. You can request from someone at a remote location to access the location whilst testing. This is generally recommended anyway to do even in the lab when testing. Recently with the development of Cloud computing there are some new exciting possibilities to resolve this problem of remote geographical locations as well as the ability to generate large leads with enough bandwidth. Using the services of a third-party company that specializes in testing a Web site from different locations around the world.
Poor performance and slow reaction times will both have negative consequences on companies. These could be decreased sales in web commerce, customer abandonment, harmed reputation and wasted resources. Good test planning where the objectives have been set and the correct tests are based on these objectives will ensure that web application will perform as expected. Once these tests are run as close as possible to real life scenarios, you can be sure that the small insurance paid for the application testing it is a great investment.