Web Testing: a critical step in web application developmentWe all want our web sites to work well and to make a good impression upon visitors. What can we do to be sure that we provide an excellent web site performance without any unpleasant surprises? The only solution here is to perform web tests where test volume and characteristics of expected traffic are simulated as realistically as possible. In this article we will explain the importance of web testing and the advantages you get using it. Also we’ll look more carefully on three main types of web tests according to the tasks they perform. Business view on web testingWeb site response time should be less than 10 seconds. This is shown by the following graph, taken from the “Load time – the three important limits” article by Jakob Nielsen:
Company expenditures on a Web site’s support should be adequate to site’s expected traffic. Ideally, you want to spend enough, and no more, allocating resources where they’ll generate the most benefit. For example, you don’t need to upgrade your Web servers if customers experience most delays in the database server or in some scripts. Thus, to maximize your ROI, you should determine when and how to upgrade IT infrastructure. Web testing can measure performance of your web system and its components allowing you to invest with maximum effectiveness. Technical view on web testingComplete web testing of a system before going live is the primary step to get assured of an entire web application’s ability to work properly. It can help address such issues like readiness of your web server for the traffic you are expecting and for the increasing number of users, the ability to survive a massive spike in user traffic, your server hardware sufficiency and so on. After performing web tests you’ll be able to find bottlenecks in your systems before they happen in a production environment. Neglecting performance problems can lead not only to poor end-user experience, but even application crashes. Many bugs can only be found when the system is placed under load. You won’t be able to discover these bugs by testing the system as a single user during the development process. That is why testing of web systems under load is really important. Performance, load and stress testing – what’s the difference?
Web testing software – how does it work?There is a wide range of web testing software which have different features and, of course, different price. Choosing a tool most suitable for one’s business often becomes rather difficult. You should consider what you need exactly to spend your money most effectively. When choosing a web testing tool you’d better try to find one that simulates real load conditions more effective than others do. This approach is much more efficient than producing stress test by sending many identical requests to the server. Usually it’s performed by simulating many different users coming from different IP addresses, each with their own parameters: cookies, input data for various page forms, name and password, connection speed and their own specific path through the site. Let’s take a closer look at some features of web testing tools. Virtual users and profilesWeb testing software emulates the activity of human users with the help of virtual users. Each virtual user emulates the actions of a single real user. A test run can contain hundreds or even thousands of virtual users to let you emulate the load experienced by a web site when the corresponding number of real users browse it. User profiles describe the behavior of virtual users. This allows to emulate a real workload on a tested server. A workload (or test volume) is the total amount of activity placed on the tested web application. It consists of a certain number of virtual users who process a defined set of transactions in a specified time period. For each user profile, you should specify web pages that will be requested (visited). It can be easily done with the help of recording tool. Recording toolUsually web testing software lets you create profiles for virtual users by recording your own actions when you browse the web site. You should perform all the steps of the virtual user for which you create the profile. The system then reproduces these steps during test run. All you have to do is to make some requests by clicking on necessary links like you do when surfing web pages in your browser. You can use this scenario later as many times as you want. Flexible load level definitionYou can either choose a constant load level for the whole test time, or increase the load after the specified time intervals during the test, or periodically increase/decrease the number of users by introducing 2 phases changing one another: one with a low load level and another with a high load level. You also specify the duration of test run and the number of virtual users for each profile. Overall load significantly depends on the type of users, so you can change it by introducing new types of users making them “slow” or “fast”. Test reports and graphsSummary reports and graphs are useful to determine the presence of any problems in the overall performance. It’s better to choose a web testing tool that provides you with the highest level of detail in report. When using a good web testing application you can check through more detailed reports down to the level of separate user profiles and pages to find specific bottlenecks. All reports are usually created in HTML format, so you can easily share them with your colleagues. Some tools also support saving test results in MS Excel compatible format. Conclusions
|