| Web testing: a critical step in web application | | | | maximum number of users will see your web pages |
| development | | | | and feel comfortable with your site. This is done by |
| We all want our web sites to work well and to make | | | | running regression tests against the system at a |
| a good impression upon visitors. What can we do to | | | | maximum load. |
| be sure that we provide an excellent web site | | | | Stress tests simulate “brute force” attacks |
| performance without any unpleasant surprises? The | | | | that apply excessive load to your Web server. |
| only solution here is to perform web tests where | | | | “Real world” situations like this can be |
| test volume and characteristics of expected traffic | | | | created by a massive spike of users – caused by |
| are simulated as realistically as possible. | | | | a large referrer (imagine your website being |
| In this article we will explain the importance of web | | | | mentioned on national TV…). |
| testing and the advantages you get using it. Also | | | | When to perform? |
| we’ll look more carefully on three main types of | | | | The best time to execute performance testing is at |
| web tests according to the tasks they perform. | | | | the earliest opportunity. Performance test at an early |
| Business view on web testing | | | | stage provides opportunity to prevent serious |
| Web site response time should be less than 10 | | | | performance problems and to find bottlenecks |
| seconds. This is shown by the following graph, taken | | | | before load testing. |
| from the “Load time – the three important | | | | Run load testing just after your eliminated the |
| limits” article by Jakob Nielsen: | | | | bottlenecks in your code (after performance testing). |
| | | | It is recommended that a stress test is performed |
| Poor performance on the Internet leads to | | | | after a load test phase. |
| dissatisfied users, and dissatisfied users may leave a | | | | Web testing software – how does it work? |
| web site and never return again. Thus, load testing | | | | There is a wide range of web testing software |
| implemented beforehand and corresponding measures | | | | which have different features and, of course, |
| taken to make you response time less than 10 | | | | different price. Choosing a tool most suitable for |
| seconds can prevent these losses. | | | | one’s business often becomes rather difficult. |
| Company expenditures on a Web site’s support | | | | You should consider what you need exactly to spend |
| should be adequate to site’s expected traffic. | | | | your money most effectively. When choosing a web |
| Ideally, you want to spend enough, and no more, | | | | testing tool you’d better try to find one that |
| allocating resources where they’ll generate the | | | | simulates real load conditions more effective than |
| most benefit. For example, you don’t need to | | | | others do. This approach is much more efficient than |
| upgrade your Web servers if customers experience | | | | producing stress test by sending many identical |
| most delays in the database server or in some | | | | requests to the server. Usually it’s performed by |
| scripts. Thus, to maximize your ROI, you should | | | | simulating many different users coming from different |
| determine when and how to upgrade IT | | | | IP addresses, each with their own parameters: |
| infrastructure. Web testing can measure performance | | | | cookies, input data for various page forms, name and |
| of your web system and its components allowing | | | | password, connection speed and their own specific |
| you to invest with maximum effectiveness. | | | | path through the site. Let’s take a closer look at |
| Technical view on web testing | | | | some features of web testing tools. |
| Complete web testing of a system before going live | | | | Virtual users and profiles |
| is the primary step to get assured of an entire web | | | | Web testing software emulates the activity of |
| application’s ability to work properly. It can help | | | | human users with the help of virtual users. Each |
| address such issues like readiness of your web | | | | virtual user emulates the actions of a single real user. |
| server for the traffic you are expecting and for the | | | | A test run can contain hundreds or even thousands |
| increasing number of users, the ability to survive a | | | | of virtual users to let you emulate the load |
| massive spike in user traffic, your server hardware | | | | experienced by a web site when the corresponding |
| sufficiency and so on. After performing web tests | | | | number of real users browse it. User profiles describe |
| you’ll be able to find bottlenecks in your systems | | | | the behavior of virtual users. This allows to emulate a |
| before they happen in a production environment. | | | | real workload on a tested server. A workload (or |
| Neglecting performance problems can lead not only | | | | test volume) is the total amount of activity placed on |
| to poor end-user experience, but even application | | | | the tested web application. It consists of a certain |
| crashes. Many bugs can only be found when the | | | | number of virtual users who process a defined set of |
| system is placed under load. You won’t be able | | | | transactions in a specified time period. For each user |
| to discover these bugs by testing the system as a | | | | profile, you should specify web pages that will be |
| single user during the development process. That is | | | | requested (visited). It can be easily done with the |
| why testing of web systems under load is really | | | | help of recording tool. |
| important. | | | | Recording tool |
| Performance, load and stress testing – | | | | Usually web testing software lets you create profiles |
| what’s the difference? | | | | for virtual users by recording your own actions when |
| - Performance testing is the process of identifying | | | | you browse the web site. You should perform all the |
| how an application responds to a specified set of | | | | steps of the virtual user for which you create the |
| conditions. | | | | profile. The system then reproduces these steps |
| - Load testing is a type of testing where realistic (or | | | | during test run. All you have to do is to make some |
| hyper-realistic) workloads are specified and simulated. | | | | requests by clicking on necessary links like you do |
| The load testing goal is to determine the maximum | | | | when surfing web pages in your browser. You can |
| time (from a usability and customer experience | | | | use this scenario later as many times as you want. |
| standpoint, not a technical one) it should take for all | | | | Flexible load level definition |
| page elements to load. | | | | You can either choose a constant load level for the |
| - The goal of stress testing is to estimate the | | | | whole test time, or increase the load after the |
| maximum load that your web server can support. | | | | specified time intervals during the test, or periodically |
| The point is that most performance issues arise only | | | | increase/decrease the number of users by |
| when the server is stressed with a high user load, | | | | introducing 2 phases changing one another: one with |
| because many important bugs simply do not surface | | | | a low load level and another with a high load level. |
| unless you deal with very large entities such as | | | | You also specify the duration of test run and the |
| thousands of users, thousands of mail server | | | | number of virtual users for each profile. Overall load |
| mailboxes, multi-gigabyte tables in databases, deep | | | | significantly depends on the type of users, so you |
| file/directory hierarchies on file systems, etc. | | | | can change it by introducing new types of users |
| Performance Testing Load Testing Stress Testing | | | | making them “slow” or “fast”. |
| Purpose | | | | Test reports and graphs |
| You do performance testing in order to find any | | | | Summary reports and graphs are useful to determine |
| bottlenecks in your web-application code and | | | | the presence of any problems in the overall |
| eliminate them. | | | | 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 |
| You do load testing in order to verify that your | | | | application you can check through more detailed |
| application can meet your desired performance | | | | reports down to the level of separate user profiles |
| objectives with a comfort for the users. | | | | and pages to find specific bottlenecks. All reports are |
| | | | | usually created in HTML format, so you can easily |
| You do stress testing in order to observe how the | | | | share them with your colleagues. Some tools also |
| system reacts to failure and how to improve it. | | | | support saving test results in MS Excel compatible |
| How it works? | | | | format. |
| Performance tests verify each part of the web | | | | Conclusion |
| server or the web application to discover how to | | | | Web testing software gives you an assurance of |
| optimize them. Most often this is done by testing | | | | reliability and stable work of your web sites or |
| various implementations of single web pages/scripts | | | | applications. Of course, you always can neglect |
| to check what version of the code is the fastest. All | | | | purchasing testing software and hope that |
| the activities take a white-box approach – the | | | | everything would be ok. But in that case nobody |
| system is inspected and monitored “from the | | | | guarantees that one day your web site won’t |
| inside out” and from a variety of angles. | | | | crash. So, web testing tool is a worthy purchase, |
| Load testing uses the best estimate of the traffic | | | | isn’t it? |
| your website needs to support to guarantee that the | | | | |