You are on page 1of 20

Load testing with WAPT

Quick Start Guide
This document describes step by step how to create a simple typical test for a web
application, execute it and interpret the results. A brief insight is provided on the additional
features available in WAPT Pro, extension modules and the x64 Load Engine.

© 2007-2015 SoftLogica Inc.

Load testing with WAPT: Quick Start Guide

Creating a test scenario
We will start with creating a test scenario. It includes all the general parameters of the test, such
as the number of virtual users, type of load and test duration.
Click the “New” button on the toolbar. This will launch the New Scenario Wizard.

In this example we will create a simple performance test. Choose the "Rump-up" option on
the first page of the Wizard and click the “Next” button to continue.
On the second page of the Wizard you can specify the basic parameters for the ramp-up load
recommended for the performance testing. The number of virtual users will grow during the test
and you can make it grow faster or slower. This will let you compare the performance of your web
application in different test periods depending on the changing load.
Click the “Next” button to proceed to Page 3.


One profile is created for each type of virtual users. As soon a user finishes its current session. Now let’s proceed to Page 4. it starts a new one. and so on until the test is finished.Load testing with WAPT: Quick Start Guide Test duration options On Page 3 you can choose the test duration. So. You can either specify an exact time for the test or set the total number of sessions that should be executed by all virtual users. The last page of the Wizard contains some important hints on how to create a test and interpret its results. during the test each virtual user emulates multiple successive real users visiting the site one after another. One execution of a profile creates one user session. One profile is usually executed by multiple virtual users concurrently. You need to create more than one profile only if you expect that some users will have significantly different behavior and/or will visit different parts of the site being tested (like site admins and regular users). It contains user path through the web site and other parameters required for the correct emulation of the user sessions. To do this click the “Test Volume” item in the left view of the WAPT window. Click the “Finish” button to proceed to the test recording. 3 . Note that any options you choose in the Scenario Wizard can be adjusted later. The type of test only changes the default values of the load parameters you see in the wizard. * * * The most important part of the work is the design of the virtual user profiles.

This modification is also called “parameterization”. Click the “Ok” button to start recording. After you complete the New Scenario Wizard. This is required to record a session independent from all the previous user activity that may have been performed on your system. or choose an external browser for this purpose. if you experience any problems using it (like JavaScript error messages appearing during recording or some application features not working). In the future you can click the “Rec” button on the toolbar to record another one. Note that it may take up to several minutes when you do this for the first time.Load testing with WAPT: Quick Start Guide Creating a virtual user profile Initially profiles are recorded with the help of a browser. During the test WAPT will execute multiple copies of the recorded session by sending the same sequence of requests with modified parameters. 4 . Embedded window provides more visibility and lets WAPT better organize the recorded requests. You should simply perform step by step all the actions of the user that you want to emulate. WAPT will record the produced HTTP requests. It is strictly recommended to delete browser cache files and cookies before starting the recording. It is required because some parameters should have different values in each emulated user session. You can either use the embedded Internet Explorer window for recording. WAPT will perform the cleanup automatically if you leave the corresponding options checked. WAPT will automatically proceed to recording a profile. Choose a name for your profile. but it has limited JavaScript support. try using one of the external browsers instead. So. This will open the “Recording Options” dialog. Only in such case it will be possible to reproduce the recorded session correctly.

Try to use it without haste.Load testing with WAPT: Quick Start Guide Recording a user session Type the URL of your web site or application to the address bar and click the “Go” button (or press “Enter”). You can record several more profiles in a similar way.js and . They can appear when you work with the web interface controls or at random times. All images and AJAX calls are placed on the same level with the pages of your site. Additional requests are initiated by JavaScript code running on the page. The list of requests added to the profile will be much shorter than the original one. WAPT will start processing the recorded content. but you can add bookmarks. click the “Stop Rec” button on the toolbar.css files from the page requests. or proceed with just one. Sometimes when you click a link WAPT adds several requests while the page loads. This is because all requests to page elements are placed on the “Page Elements” tabs for their parent pages. Note that WAPT works as a proxy between the browser and the target web site. 5 . As you navigate through the web site inside the browser window. It will separate images. . Because of that you may experience some delays when working with your web application . Initially they are recorded as a simple list without any structure. This is useful to mark each separate action inside the user session. You will see the requests appearing in the left view inside the “Recorder” folder. You cannot edit the requests while recording. After you finish recording. Do not click next link until you see that the current step has been fully recorded. WAPT will record all the HTTP requests generated by the browser.

6 . you can do this with the help of special WAPT functions. Initially all parameters have static values that were used in the recorded session. including WAPT. In the “Edit Parameter” dialog box you can specify how to calculate the value for the selected parameter. The right view will contain two tabs. The understanding of this concept is very important for the successful use of any load testing tool. These parameters deliver sessionspecific data from the client part of your web application to the server.Load testing with WAPT: Quick Start Guide Properties of a request and its parameterization Select a request in the left view. or provide a file with values instead. their names and values may be different for each request. This is called “Parameterization”. if you need each virtual user in your test to use a different name and password. many applications send user name and password as parameters of the login request. Each web application can use its own custom ones to pass its specific data. The number of parameters. extract them from server responses and use variables assigned earlier. You can specify longer list to have more samples. However you can change this. For example. select it in the list and click the “Edit” button to the right of the list (or just double-click the parameter line). In the example shown on the screenshot above the value of the parameter is calculated with the help of the “Ordered List” function that takes one of three names from the list. The most important property is the list of parameters. To edit any parameter. The “Properties” tab is where you can view and edit the properties of the selected request. Other functions can generate random values. There are no standard names and meanings for all parameters. For example.

The list of variables is provided at the top of the “Response processing” tab. whereas parameters are calculated before sending the request. You can specify custom validation rules here. During each session the user selects an item from the list. That is why you may need to specify how to extract the required value from the server response and assign it to a variable. You can assign variables using the same set of functions as for the parameters. modifies its properties and saves changes. if it does not contain the “error” word inside. In the above example. This variable can be used in all subsequent requests instead of the initially recorded value. This is done in a test for a web site forum.Load testing with WAPT: Quick Start Guide The processing of server responses Switch to the “Response processing” tab. 7 . the “$Search()” function is used to extract a random topic title from a page containing several such titles. In the above example the response is treated as valid. You can only take it from the page containing the list of items. The difference is that variables are updated after receiving server response. There is one more useful option on this page. You can search for any text there. To emulate such session properly you need to specify the correct item ID in the parameters of requests that work with the item. This is very useful. Here you can specify how to handle response to the selected request inside each user session. However this ID is different in each user session. The tab contains full information on the initially recorded request and response to it. You can make WAPT identify application-specific errors even if they are not reported through the HTTP response codes. Let’s suppose that the application you need to test works with some items or documents. if you want to find the initially recorded value and its bounding text which can be used to specify the arguments of the “$Search()” function.

The “Parameterization” dialog will appear. 8 . the place where the valu e appeared for the first time. Click the "Find" button to find all occurrences of the value in the profile. Specify the variable name and click the "Create variable and parameterize selected uses" button. WAPT will automatically create a variable from the selected source and assign it with the help of the “$Search()” function. You should select one source and put checkmarks near all "uses" that you want to parameterize. You can click on items inside both panes to see the details in the main WAPT window. This means all places in the server responses from which the value can be extracted. In the left pane of the dialog you will see all available "sources". It will also appear in all parameterized uses instead of the initial value.Load testing with WAPT: Quick Start Guide Bunch parameterization More than one request in a profile may require the same parameterization. To speed up the work with such value. You will be able to see that variable in the processing of the corresponding response. The right pane contains the list of all "uses" of the value. You can also open it through the “Edit” menu and enter the value manually. select it in the list of parameters and click the “Parametrize” button. It is usually preferable to select the earliest source. i.e. A session-specific value may be produced by the server inside the page code and used as a parameter in several subsequent requests.

To reduce the number of variables it is recommended to check the “Do not create variables for unused values” option. For each value you should specify its left and right boundary. It will also replace each value with the corresponding variable in all parameters of all subsequent requests. However if you have performed it once. this is the most common way to pass session-specific values from a server to the client. Not all hidden values are actually used in the test. in many cases recorded profiles do not require additional parameterization. WAPT will check all the web site responses for such values and will create a new variable for each one. That is why after recording a profile you will probably see many variables cre ated by WAPT and assigned with the help of the “Hidden” function. After you finish recording a profile. 9 . Click the “Settings” button on the toolbar and switch to the “Parameterization” tab. WAPT will create a variable for each hidden field of any HTML form found inside the server responses. This function returns the value of a variable with a specified name. The "Extract to variables values of hidden fields in HTML forms" option works in a similar way. You can also see how these variables are used in the parameters of the subsequent requests with the help of the “$Var()” function. In fact. Since this option is turned on by default. you can automate this process for any similar profile you record in the future. You can try temporary unchecking it to see how this affects the number of variables.Load testing with WAPT: Quick Start Guide Automatic parameterization The parameterization procedure can be a rather complex and time consuming task. Click “Add” button to create a new rule for extracting dynamic values contained on the recorded pages.

If your web site requires authentication or a client certificate. Note that “Default HTTP headers” and “Response validation rules” options can be overwritten in each request. 10 . Each profile is stored in a file with the “. Click the “Initial variables” button for this.Load testing with WAPT: Quick Start Guide Properties of a virtual user profile There are a number of options associated with each profile.wpp” extension. you can assign variables before the beginning of a user session. If your profile uses session-specific values in the very first request. You can change its name here. select the pr ofile in the left view. check the “Authentication” option and click the “Credentials/Certificates…” button to specify a set of credentials that virtual users will use when running this profile. To edit them.

you can use the logs. You can do this on the “Response processing” tab for the corresponding request. If you want to check this sequence step by step. This only means that the server requires authentication. You should check that your network configuration permits direct connection to it. For example. Note that the table also includes information about responses to page element requests. Similarly. but its page element was not found on the server. 11 . you should check if the same code was returned when you originally recorded the profile. This way you can check if the profiles are working correctly. but it will be followed with the “200 OK” code. it will be listed under 200 and 404. If any issues are found on verification. After that the same request will still produce the 401 code. WAPT will let you select profiles for verification and will execute each of the selected profiles one time. When the verification is finished. If you see a “Network error”. so you should provide user name and password in the profile properties. your site contains a broken link. you can expand the “Logs” folder in the left view to get more information on each problem. Note that response codes starting with “3” (like 302) are not errors. If you see the 404 code. this probably means that WAPT cannot connect to the target web site. For this reason it may list the same request with different codes. These are HTTP redirects that are processed by WAPT automatically. if you see that some request completed with the 401 code. You can also get other types of status codes like “Response body validation error” or “Timeout” here. If you find the same problem there. WAPT will show a simple report that contains summary information with the response/status code for each request. if a page request completed successfully. this is not a problem.Load testing with WAPT: Quick Start Guide Test verification Click the “Verify Test” button on the toolbar.

Requests completed with errors are painted red. Page requests. You can save all log files by choosing “File | Save Logs…” from the menu. In the upper right view you will see the log lines of the following types. Note that by default logging is disabled for efficiency reasons. responses. You can expand and collapse them. Requests to page elements in grey color with indent under each page request. sessions and requests. For each request you can switch between different tabs containing request and response headers and bodies. You can compare any part of the request or response with the initially recorded content. virtual users. You can select any line and see the details in the lower part of the view. Expand the “Logs” folder in the left view and select a session. “Local IP…” and any messages written to the log by JavaScript operators. 12 . Successful ones are painted green. The useful search option is also available here. This information is structured with the help of a tree view that includes profiles. This way you can find the differences and identify session-specific values. and errors appeared during the test run or verification. you should enable this feature on the “Log and Report Settings” page. which may indicate a problem.     Information messages like “Connecting to…”. “Values of variables” lines that provide information on the values of all variables used in the next request. You can also check if the server produced a significantly different content. So if you want to get logs after a test run.Load testing with WAPT: Quick Start Guide Log viewer Log Viewer provides the detailed information on all requests.

growing and periodic). Note that these options are shown for the currently selected profile (highlighted with blue selection). select it in the list. By default virtual users are allocated to agents automatically. Each profile is shown with a different color. which means that all agents execute all profiles. Keep all these files. In the Pro version of the product you can also specify different load agents for different profiles. if you want to open the same test in the future. In the right view you can see the list of all your profiles.Load testing with WAPT: Quick Start Guide Test Volume After making sure that all your profiles are working correctly you can specify the load parameters for the actual test. Now we have finished designing our test. In the above example. 13 . Click the “Save” button on the toolbar to save your test scenario to a file. Second profile (with the rump-up load) is selected and its options are shown below the list. so we can save it. we have 3 profiles with different types of load (constant. Check the ones you want to use in the test. If you want to edit options of a different one. All profiles will be also saved to separate files in the same folder. You can specify certain load options separately for each profile. Select the “Test Volume ” item in the left view inside the “Scenario” folder. The graph at the bottom of the page shows how the load will be distributed between profiles during the test.

you can add them manually with the help of the “Add” button. Click the “Search LAN for available load agents” button to search your Local Area Network for computers with installed agents. * Available only in Pro version 14 . Put checkmarks near agents that you want to use in the test. So you can run tests with help of a single workstation. Click the “Run Test” button on the toolbar to start your test. If you have remote agents located outside your LAN. so just click the “Run Test” button to start the test. you can add more load agents. Select the “Load Agents” item in the left view inside the “Distributed Test Run” folder. Since the connection between the workplace component and load agents is done over TCP/IP. you need to make sure that your network configuration allows connecting to the specified addresses. If you use the regular version of WAPT. the load will be generated by the only one built-in agent. By default one of the agents is installed on the same system with the workplace component. Each of these systems should run a special service called Load Agent.Load testing with WAPT: Quick Start Guide Selecting load agents* and starting the test WAPT Pro allows using several systems for the load generation. However if you need a greater load. You should check at least one.

whereas the number of active users (black graph) is specified on the right scale. the number of pages per second (yellow graph) is specified on the left scale. You may only need to wait several seconds for the first data to appear. Bottom left corner image ( ) near the parameter description means that the value is specified on the left scale. or as a special results file with the “. The results are represented in the form of Summary Report.wpr” extension. Summary Graphs and graphs for each user profile and single request. In the above example. Each parameter is shown with a specific shape and color. Bottom right corner image ( ) refers to the right scale. All graphs have two vertical scales to represent parameter values. On graphs you can choose between several tabs at the top and select parameters you would like to see on the graph at the bottom area. In the latter case you will be able to open that file with WAPT at any time again. You can select the corresponding option in the left view. browse graphs and work with the results like right after the test.Load testing with WAPT: Quick Start Guide Test results You can start monitoring the test results right after you launch the test. You can save the results of a test run either as an HTML report. 15 .

This will let you perform very deep and specific analysis of the test results. In the Pro version you can also use criteria implemented with the help of a JavaScript code. Click the “New from template…” button to add a criterion basing on the standard templates. Criteria are applied to the test results automatically on the completion of each test. You can also click the “Check and update report” button to apply the criteria to the latest test results. such as the error rate or the response time. You can see the result in the Summary Report. you can make WAPT automatically check all the conditions to mark each test as passed or failed. Select the “Pass/fail Criteria” item in the left view. The right view will contain the list of criteria that will be applied to the test results. This is what you will see in the report in case of the failure or success respectively. This is useful if you are fine-tuning your set of criteria. 16 .Load testing with WAPT: Quick Start Guide Pass/fail criteria If you have exact requirements for the performance of your web application. Each of them checks one of the parameters. The test is treated successful only if all criteria are met.

there is a module that allows working with any binary data that may appear inside the requests and responses:  Module for binary formats It is very easy to find out if you need a specific module to test your web applicatio n. To perform conversion of such structures to and from standard XML format. Still there are two situations in which you may benefit from using modules that provide extended support for some specific technologies. The following modules facilitate the test design process. When you finish recording a profile. The integration is very smooth. You only need to install the module on the system where you run WAPT or WAPT Pro workplace. but we recommend installing them in case your web application uses the corresponding technology.    Module for Adobe Flash testing Module for Silverlight testing Module for GWT testing Finally. Each module is provided with a separate installation package. 17 . Both modules are optional. the following modules are required.   Module for ASP. It is not usually important which framework and technologies were used to create the application and what hardware and software is used to run its components.Load testing with WAPT: Quick Start Guide Extension Modules WAPT can test any web application that uses HTTP(s) protocol for client-server testing Modules for JSON format With the help of these modules you will be able to create your tests faster and in a more convenient environment. WAPT will show you a warning message with recommendations. Some web technologies imply passing specific data structures during the client-server communication process.

Load testing with WAPT: Quick Start Guide The use of JavaScript* You can use JavaScript code for the calculation of any values inside user sessions. Note that JavaScript code can be used only for calculations. There is another way to use JavaScript in your profiles. Select the request after which you want to insert a JavaScript code. Choose “Add | JavaScript” on the toolbar. You can use those variables in subsequent requests. Initially the edit window contains a short instruction on how to use this feature. The results of such calculations should be assigned to WAPT variables. However you cannot initiate new requests or use GUI functions in the code. The JavaScript operator will be added to the profile. Click the “JavaScript Library” button to add files with more functions. It takes the actual name of the function you want to call as an argument. This may be necessary if you need to emulate complex data processing on the client. In your code you can use functions defined in the WAPT Pro JavaScript library. The result will be displayed in the “Output” window. You can call functions defined in the JavaScript library directly when you specify how to calculate values for the request parameters and variables. Select it to edit the code in the right view. * Available only in Pro version 18 . You can do this with the help of a special internal function called “JavaScript” . Click the “Check Syntax” button to check your code.

Click the “Add counters from repository…” button on the server properties page for that. Each counter is implemented as a JavaScript function that returns counter value. You can use the implementation of the predefined counters as examples and construct your own advanced counters in a similar way. Apache is specific for Apache web server. Select an interface in the tree view and click the “Add new server…” link in the right view. * Available only in Pro version 19 . You can add counters for it. WAPT Pro has a set of predefined counters for a number of server tools. This will cerate a new server.Load testing with WAPT: Quick Start Guide Performance counters* In addition to the client-side metrics. WAPT Pro can collect performance information directly from the loaded servers. - SNMP is common for all types of UNIX systems. You can also see it on graphs. You will see the counters grouped by the interface type. You can add and use them without any modification. such as response time. This information is added to the test report along with other parameters. WMI is native for Windows servers. Expand the “Performance Counters” item in the left view. ODBC is used to monitor database performance. Click the “Test” button in the server properties page to check that the counter retrieval works properly. it can be enabled on Windows as well.

A much higher engine capacity is achieved because of its native 64 bit architecture. It can be launched and managed from the Load Engine Manager available under the Start menu on the system where the engine is installed.000 virtual users in an average test. The engine runs as a system service. You can either download this product separately or use the 64 bit installation package of WAPT Pro. However the engine has much higher capacity. The engine can be installed on any system with 64 bit Windows OS starting from Windows XP. * Compatible only with Pro version 20 . There is no need to restart it manually after the system reboot. so you can start using it immediately after the installation. Note that 32 bit installation package of WAPT Pro does not include the x64 Load Engine . You can setup the engines on several systems and use them concurrently to create greater test volume. In most cases you can replace them with a single instance of the x64 Load Engine . By default this service is launched automatically. This means that for a 10.000 users load you would need to use 5 systems with agents.Load testing with WAPT: Quick Start Guide x64 Load Engine* The functionally of the x64 Load Engine is identical to the functionality of the regular load agent that comes with WAPT Pro. Regular agent can create about 2.