Neoload Manual Document
Neoload Manual Document
3.1
NeoLoad® Documentation: 3.1
Published 25 October 2010
Copyright © 2005, 2010 Neotys.
All right reserved. No part of this book shall be reproduced, stored in a retrieval system, or transmitted by any means, electronic, mechanical,
photocopying, recording, or otherwise, without written permission from the publisher and the copyright holder.
Table of Contents
I. Getting Started ................................................................................................................ 1
1. Overview ............................................................................................................... 3
Welcome to NeoLoad Help .................................................................................. 3
Contents .................................................................................................... 3
Formats .................................................................................................... 3
Legal Issues ............................................................................................... 3
About Load Testing ............................................................................................ 3
Why Load Test Web Applications ? ............................................................... 3
Load Testing with NeoLoad ......................................................................... 4
2. Installation ............................................................................................................. 5
Requirements ..................................................................................................... 5
Operating System ....................................................................................... 5
Disk Space ................................................................................................ 5
CPU & Memory ......................................................................................... 5
Installation ........................................................................................................ 5
Installing the Controller ............................................................................... 5
Installing a Load Generator .......................................................................... 6
License Key Management .................................................................................... 7
The Standard Key ....................................................................................... 7
The Floating Key ...................................................................................... 10
Changing Mode ........................................................................................ 12
Running NeoLoad ............................................................................................. 12
Running the Controller .............................................................................. 12
Launching the Load Generator Agent ........................................................... 14
Stopping the Agent ................................................................................... 14
Files ............................................................................................................... 15
The Installation Directory ........................................................................... 15
The User Directory ................................................................................... 15
Project Directory ...................................................................................... 16
Log Files ................................................................................................. 17
Advanced Installation ........................................................................................ 17
Using a Firewall Between the Controller and Load Generator ............................ 17
Increasing Available Memory for Load Generators .......................................... 18
Increasing Available Memory for the Controller ............................................. 18
3. Quick Start .......................................................................................................... 20
Recording the Test Scenario ............................................................................... 20
Running the Test .............................................................................................. 24
Test Results ..................................................................................................... 25
To Learn More ................................................................................................. 28
II. Reference Guide ........................................................................................................... 29
4. Menus ................................................................................................................. 34
5. Preferences ........................................................................................................... 37
Global Preferences ............................................................................................ 37
HTTP Recorder Settings ............................................................................ 37
Proxy Settings .......................................................................................... 38
Browser Settings ....................................................................................... 39
Skins ...................................................................................................... 40
Graphs .................................................................................................... 41
Frameworks ............................................................................................. 43
License ................................................................................................... 44
Oracle Forms ........................................................................................... 44
iii
NeoLoad® Documentation
iv
NeoLoad® Documentation
v
NeoLoad® Documentation
vi
NeoLoad® Documentation
vii
NeoLoad® Documentation
viii
NeoLoad® Documentation
ix
NeoLoad® Documentation
x
NeoLoad® Documentation
xi
List of Examples
5.1. Apache-Tomcat server on Windows : ............................................................................. 59
5.2. Apache-Tomcat server on Windows : ............................................................................. 60
7.1. Oracle JDBC URL: ................................................................................................... 287
7.2. MySQL JDBC URL: ................................................................................................. 296
7.3. DB2 JDBC URL: ...................................................................................................... 303
7.4. PostgreSQL JDBC URL: ............................................................................................ 308
16.1. Example of load balancing according to load factor ....................................................... 666
xii
Part I. Getting Started
Table of Contents
1. Overview ....................................................................................................................... 3
Welcome to NeoLoad Help .......................................................................................... 3
Contents ............................................................................................................ 3
Formats ............................................................................................................ 3
Legal Issues ...................................................................................................... 3
About Load Testing .................................................................................................... 3
Why Load Test Web Applications ? ....................................................................... 3
Load Testing with NeoLoad ................................................................................. 4
2. Installation ..................................................................................................................... 5
Requirements ............................................................................................................. 5
Operating System ............................................................................................... 5
Disk Space ........................................................................................................ 5
CPU & Memory ................................................................................................. 5
Installation ................................................................................................................ 5
Installing the Controller ....................................................................................... 5
Installing a Load Generator .................................................................................. 6
License Key Management ............................................................................................ 7
The Standard Key ............................................................................................... 7
The Floating Key .............................................................................................. 10
Changing Mode ................................................................................................ 12
Running NeoLoad ..................................................................................................... 12
Running the Controller ...................................................................................... 12
Launching the Load Generator Agent ................................................................... 14
Stopping the Agent ........................................................................................... 14
Files ....................................................................................................................... 15
The Installation Directory ................................................................................... 15
The User Directory ........................................................................................... 15
Project Directory .............................................................................................. 16
Log Files ......................................................................................................... 17
Advanced Installation ................................................................................................ 17
Using a Firewall Between the Controller and Load Generator .................................... 17
Increasing Available Memory for Load Generators ................................................. 18
Increasing Available Memory for the Controller ..................................................... 18
3. Quick Start .................................................................................................................. 20
Recording the Test Scenario ....................................................................................... 20
Running the Test ...................................................................................................... 24
Test Results ............................................................................................................. 25
To Learn More ......................................................................................................... 28
2
Chapter 1. Overview
Welcome to NeoLoad Help
NeoLoad is a load testing tool providing an easy and efficient way to test web applications such as intranets
or websites.
Contents
This documentation contains:
When using NeoLoad, press (F1) at any time to obtain context-sensitive help.
Formats
The NeoLoad documentation is available on the Neotys website in several formats (PDF, HTML, ...).
http://www.neotys.com/support/documentation.html
Legal Issues
Third party software license terms can be found in the /legal sub-directory of the NeoLoad installation
directory.
This software includes software libraries developed by the Apache Software Foundation (http://
www.apache.org).
This product includes software developed by the Indiana University Extreme! Lab (http://
www.extreme.indiana.edu/).
3
Overview
NeoLoad includes a proxy server that records all server requests and responses.
Define virtual user behavior and set scenario parameters such as load policy (constant, ramp-up, peak
or custom) or the number of virtual users to be simulated in the test.
Set performance monitors (CPU, memory, disk usage,...) for your servers.
Monitor the ongoing test with the aid of real-time graphs and stats.
Obtain a summary of the test and then examine its details using the graphs and statistical tables.
NeoLoad records and replays browser requests to the server, which means that NeoLoad:
• can simulate requests made by components such as plug-ins, Java applets, ActiveX, Flash
animations,...
• cannot simulate local actions such as updating a graphical component using client-side JavaScript.
To run your first test, please refer to the Quick Start guide.
4
Chapter 2. Installation
Requirements
Operating System
This software supports the following operating systems:
• Windows NT, Windows 2000, Windows 2003, Windows 2008, Windows XP, Windows Vista,
Windows 7.
• Linux x86 (kernel 2.6) - tested on Red Hat 9 and Mandriva 10.
• Solaris SPARC (8+). System patches may be required. See the "System Requirements" section in http://
java.sun.com/javase/6/webnotes/install/jre/install-solaris.html.
NeoLoad is written in Java and should run on any platform supporting Java 6:
2. Replace the bundled JRE (<install_dir>/jre) with a Java interpreter (JRE) from a Java SE
Development Kit (JDK) compatible with the platform used (Java 6 required). To do this, install a
JDK 1.6 on your platform, then copy the <jdk install_dir>/jre directory into the NeoLoad
installation directory.
Disk Space
The controller and load generator require 230 Mb disk space each for installation.
During the test, the load generator's CPU and memory usage is monitored in the Runtime screen. If the
CPU or memory usage level regularly exceeds 90%, either the number of virtual users must be reduced,
or the think time between pages increased. Alternatively, additional load generators may be used.
As a guideline, the controller requires 75 Mb of memory to run a test involving 250 virtual users and with
a 3-second wait time between pages, when using its built-in load generator. A stand-alone load generator
requires 60 Mb of memory to run the same test.
Installation
Installing the Controller
The controller is used to:
5
Installation
Note
The controller has a built-in load generator.
Windows:
Run neoload_windows_<version>.exe
Run ./neoload_<platform>_<version>.sh
Extract the compressed archive to the desired destination directory: tar -xzf
neoload_<platform>_<version>.tar.gz
If the installer is invoked with the -c argument, interaction with the user is
performed in the terminal from which the installer was invoked. For example: ./
neoload_linux_3_1_0.sh -c
Windows:
run loadGenerator_windows_<version>.exe
run ./loadGenerator_<platform>_<version>.sh
Extract the compressed archive to the desired destination directory: tar -xzf
loadGenerator_<platform>_<version>.tar.gz
If the installer is invoked with the -c argument, interaction with the user is
performed in the terminal from which the installer was invoked. For example: ./
loadGenerator_linux_3_1_0.sh -c
Warning
When the agent is installed using the root account under Unix, the agent is automatically
declared as a service on the system. The AgentService service is subsequently launched each
time the system is started.
6
Installation
Note
See the section called “Advanced Installation” for more information about firewall and memory
issues.
• Standard license. Either permanent or temporary, this license is linked to a machine and cannot
easily be moved.
• Floating license. The floating license allows the product to be used on several machines, but not
simultaneously.
This license makes collaboration on a NeoLoad project much simpler. Using the NeoLoad controller
on several machines (consecutively) is very quick and easy.
Warning
The license key is stored in the user profile of the account used to launch NeoLoad. If several
users use different accounts on the same machine, the license must be activated for each of these
users. A floating license reserved by one user can only be released by that same user.
7
Installation
The licenses, excepting those for trial versions, must be activated once the key has been installed. See the
section called “Activating the license key”.
Note
Keys for trial versions do not need activating.
8
Installation
After installation of the license key, and if that key requires activating, the Activation Wizard is displayed :
Note
The Activation Wizard also may be run via the "Help / License management..." menu
item and clicking the "Activate license" button.
• Activating on-line: NeoLoad connects to the Internet and automatically registers and activates your
license key.
2. You will need to send this file to Neotys either using the web form, found at http://
www.neotys.com/support/licenseManagement.html , for an immediate activation, or by e-mail to
<[email protected]>.
3. You will receive in return a file containing the license activated for the machine that issued the
request.
4. Once the activated license file has been received, run the Activation Wizard by selecting "Help /
License Management..." and "Activate license key...".
6. Select the activated license file on your hard disk. The activated license is now installed.
9
Installation
Once the key has been disabled, it can be re-enabled on the new machine.
1. Open the license management panel via the "Help / License management..." menu item.
5. You will receive a return e-mail from Neotys confirming that the key has been disabled for that
machine.
6. You may then use the license on another machine. See the section called “Installing the license key”.
Warning
Please transfer the license before uninstalling NeoLoad.
The license is reserved from a license server, the Neotys License Server. Once reserved by a user,
and until its release, the license is no longer available to other users.
Download Neotys License Server from the download page at: http://www.neotys.fr/support/
download.html.
10
Installation
The procedure for reserving a license key from the license server is described below.
1. In NeoLoad, open the license management panel via the "Help / License management"
menu item.
3. Check or enter the license server parameters. The default port is 7777.
4. Click on the "Get" button to display the list of licenses on the server.
• Per Session. NeoLoad automatically releases the key when the user quits the application.
11
Installation
Check "Automatically reserve the next time NeoLoad starts" to try to reserve
this same license each time NeoLoad starts. If the license is not available at start-up, another license
must be selected.
• Permanent. The user must deliberately release the license by clicking on the "Release..."
button in the license management panel, under Preferences.
Note
The list of licenses only contains the licenses compatible with the current version of NeoLoad.
1. Open the license management panel via the "Help / License management..." menu item.
Changing Mode
Switching from a standard license to a floating license
Once a standard key has been installed and activated, it's possible to use a floating key reserved from the
license server.
1. Either retain the key for later use, after returning to standard license mode, or
2. Retain the floating key for later use, upon returning to the license server-based mode.
Running NeoLoad
Running the Controller
Running the graphical interface
Windows: <install_dir>\bin\NeoLoadGUI.exe.
Unix: <install_dir>/bin/NeoLoadGUI.
12
Installation
Note
Paths are relative to the NeoLoad directory.
Sample
<taskdef name="neoload"
classname="com.neotys.nl.ant.NeoLoad"
classpath="${NEOLOAD.install.dir}/lib/ant-neoload.jar" />
<neoload
projectFile="projects/jpetstore/jpetstore.nlp"
scenarioname="scenario1"
testdescription="Nightly Load-Test ${testID}"
showgui="false"
report="projects/jpetstore/reports/report.xml"
exit="true"
/>
Note
Paths are relative to the NeoLoad directory.
13
Installation
The taskdef definition must occur only once in each ANT build file and can appear anywhere on the
top level, below the project element.
If you move the ant-neoload.jar archive to another location, then you must specify the location of the
NeoLoad command line executable using the controllerExecutable parameter.
Parameters:
Windows:
Unix:
• If installed with the root account, by launching service AgentService start with the root account.
Windows:
• If the agent was started as a service, by stopping "NeoLoad Agent" in the Windows Services control
panel.
• Using the NeoLoad icon in the Windows system notification area.
• Using the "Shutdown Agent" shortcut in the Start menu.
• By entering the command line <install_dir>\bin\Agent.exe -stop
Unix:
14
Installation
• If the agent was started with service AgentService start, by launching service AgentService stop.
• Using the NeoLoad icon in the system notification area (if displayed).
Files
The Installation Directory
The program's installation directory, for example c:\program files\NeoLoad\ , contains the
following items:
• /legal - license files for the external components and libraries used by NeoLoad.
For example:
15
Installation
c:\windows\system32\config\systemprofile\AppData\Roaming\
If a log file is too big, the log files will not be retrieved. You may change the maximum size
setting in bytes for retrieved log files in the <agent>/conf/agent.properties file under
collected.lg.logs.size.max key in the Logs section. The default size is 10 Mb (10485760).
If a log file's retrieval from one of the load generators exceeds a certain time limit, it is terminated to allow
the test to finish. The default timeout is 30 seconds, but it may be edited in the controller's <neoload>/
conf/controller.properties file under the collected.lg.logs.timeout key in the
Runtime section.
Project Directory
Each NeoLoad project contains the following:
• /lib - the libraries used by the project. These are divided into the following sub-directories:
# /plugins - the libraries required to decode module requests (AMF, Oracle Forms, GWT, Java
Serialization and RTMP).
• /SqlTemp - the data for SQL-type variables is temporarily stored in this directory.
16
Installation
• /test_X - test directory. Each test directory contains the results of the test, plus the following sub-
directories:
# /debug - this is only created when a test has been launched in debug mode, and contains the files
relating to the virtual users' runs.
# /logs - the log files for the load generators used in the test.
# /summary - the resources for the summary displayed in NeoLoad's "Results" section.
• /config.zip - contains the configuration for the entire project. Project backups are made regularly and
are named config.zip.<date>.bak
Note
The projects' default directory may be changed in the NeoLoad preferences ( "Edit /
Preferences" menu item, "General Settings" tab, "Advanced" section).
Log Files
By default, the NeoLoad controller, agent and load generator store their log files in the logs subdirectory
of the user directory.
Tip
You may quickly access the logs directory via NeoLoad's "Help / Open log
directory..." menu item, or the "Open log directory..." item in the menu accessed
via the Agent icon in the notification area.
Advanced Installation
Using a Firewall Between the Controller and Load
Generator
To use a controller and load generator either side of a firewall, you need to open ports TCP 7100
and 7101 on the load generator's interface. These connections are established in the controller to load
generator direction.
Opening these two ports is sufficient to allow you to use the remote generator. Other ports must be opened
on the firewall if you want to use the automatic discovery function: UDP 1359 in the controller to generator
direction and TCP 4569 in the generator to controller direction. If these ports remain closed, you will need
to declare the load generating machine's host name manually on the controller.
17
Installation
2. Port TCP 7101 is opened by the load generator. This port may be changed by
editing the [Network]lg.server.port key in the <Load Generator>/conf/
agent.properties file on the generator side. The load generators may use different ports.
3. Port TCP 4569 is opened by the controller. This port may be changed by
editing the [Network]controller.server.port key in the <Controller>/conf/
controller.properties file.
4. Port UDP 1359 is opened by the generator's agent. This port may
be changed by editing the [Network]multicast.port key in the
<Load Generator>/conf/agent.properties file on the generator side,
and the [Network]agent.multicast.port key in the <Controller>/conf/
controller.properties file on the controller. Note that all the generators must have the same
port declared.
Note
This limit must not exceed the maximum physical memory available in order to avoid the use
of swap files.
These modifications will allow the controller to use up to 850Mb of memory. The default memory
allocation is 512 Mb, sufficient for most projects.
18
Installation
Note
This limit must not exceed the maximum physical memory available in order to avoid the use
of swap files.
19
Chapter 3. Quick Start
Learn the basics of NeoLoad by performing a first test:
Click on the "Start recording" button on the controller to start recording the scenario.
2. Browser settings
NeoLoad will capture pages and record them into a virtual user profile. Choose the name of the profile
to record, then select "Adobe RTMP" if your application is using the RTMP protocol. By default,
NeoLoad records only HTTP traffic.
Next, specify which web browser is to be used for the recording and whether the browser's cache and
cookies should be cleared before recording.
The browser displays the NeoLoad recording page, indicating that the browser settings are correct.
The browser is now ready to record the scenario. Enter the URL of the site to be tested and browse
as normal.
20
Quick Start
At any time during the recording, you may create named containers in which to group the visited
pages. These containers represent the business transactions within your scenario.
Close the browser to stop recording. You may also click on the controller's "Stop recording"
button.
Once the recording is finished, a pop-up wizard is displayed. Follow the steps through the wizard
(See the section called “Post-Recording Wizard”).
21
Quick Start
On the "Virtual Users" tab, you may configure the think time for the user. The think time is a
simulation of the time spent by the user on the previous page before accessing the current page. This
delay may be for each page individually, for all pages globally or variable within a given range.
Complex scenarios may require advanced settings. A failure to implement these settings will result
in errors and an unexpected behavior for the virtual user. For example, the virtual user will not create
entries in the database.
Check the validity of the virtual user via the "Run / Start checking" menu item.
The "Check Virtual User" dialog displays the HTTP request and the HTTP response of each
NeoLoad request.
22
Quick Start
NeoLoad automatically flags in error any responses whose HTTP response code is an error code,
for example "500 Internal Error". Nevertheless, many applications return error messages
within a valid "200 OK" response. In these cases, NeoLoad does not automatically detect the error.
If the virtual user does not behave as expected, check the responses to see if they contain an error
message or an unexpected content.
Failure to handle a dynamic parameter will cause an error. See the section called “Handling an
Application's Dynamic Parameters”.
Generally, it means that you may need to extract and inject some data. See the section called “Creating
a Variable Extractor”.
8. Creating a population
Click on the "Populations" tab. A pop-up wizard prompts you to create a population for the test.
A population is a group of virtual users. In this example, the population only contains the previously-
recorded virtual user.
23
Quick Start
Configure the settings such as test duration, load policy (constant, ramp-up, peaks, custom) and the
number of virtual users.
Run the test by clicking on "Run" top menu, and then click on the "Start playing" button.
24
Quick Start
This panel monitors the test sequence. It provides immediate statistics such as hits/sec., average
response time and errors. The test may be stopped at any time by clicking on the "Stop" button.
Test Results
1. The Test Summary tab
The test summary provides general statistics for the test, including total test duration, throughput,
total number of hits, number of errors and average response time, together with important information
such as slowest pages, pages with the highest error rates etc.
25
Quick Start
• quickly plot all the graph curves for a web page, HTTP request, a monitor or an indicator.
• sort the request and web page statistics.
Use "Filters" to filter the displayed results by load generator, population or virtual user.
Use the "Type" drop-down list to switch between Web Pages, HTTP Requests, Performance
counters and Indicators.
26
Quick Start
The "Graphs" tab can be used to plot a graph curve for any statistic in any request. Simply select
the required statistic among average response time, hits/sec., error rate etc., then drag and drop a Web
Page, a HTTP request or a Performance counter into the graph pane to the right.
You may also plot a curve for a previous test by selecting that test in the Results drop-down list
or compare two tests by selecting "Compare..." .
This tab displays detailed information on request errors encountered during the test. It itemizes
the requests sent to the server, the server's response and the results of the assertions checking its
validity. To help pinpoint the source of the error, you may access the request that precedes the request
containing the error from this tab.
27
Quick Start
Click on "Response" or see Appendix C, NeoLoad Status Codes to obtain an explanation of the
response codes.
To Learn More
The Design User Guide is a short guide that summarizes the steps in designing a virtual user. We
recommend you read the guide before carrying out your first tests.
28
Part II. Reference Guide
Table of Contents
4. Menus ......................................................................................................................... 34
5. Preferences ................................................................................................................... 37
Global Preferences .................................................................................................... 37
HTTP Recorder Settings .................................................................................... 37
Proxy Settings .................................................................................................. 38
Browser Settings ............................................................................................... 39
Skins .............................................................................................................. 40
Graphs ............................................................................................................ 41
Frameworks ..................................................................................................... 43
License ........................................................................................................... 44
Oracle Forms ................................................................................................... 44
Adobe Flex/AMF .............................................................................................. 46
Advanced Parameters ........................................................................................ 47
Project Preferences .................................................................................................... 48
Page Naming Policy .......................................................................................... 48
SSL Client Certificates ...................................................................................... 49
Runtime .......................................................................................................... 51
Oracle Forms ................................................................................................... 53
Libraries Manager ............................................................................................. 54
CA Application Performance Management ............................................................ 59
dynaTrace ........................................................................................................ 64
6. Design ......................................................................................................................... 67
Recording a Test Scenario .......................................................................................... 67
Recording HTTP Applications ............................................................................ 67
Recording Adobe RTMP Applications .................................................................. 68
Starting Recording ............................................................................................ 69
Creating a Virtual User Profile ............................................................................ 69
The Recording Bar ............................................................................................ 70
Post-Recording Wizard ...................................................................................... 71
Troubleshooting ................................................................................................ 81
Servers .................................................................................................................... 81
Authentication .......................................................................................................... 82
Supported authentication mechanisms ................................................................... 82
The Negotiate scheme with SPNEGO and Kerberos ........................................ 83
Scheme priority order ........................................................................................ 83
Virtual Users ............................................................................................................ 83
Creating a Virtual User ...................................................................................... 84
Virtual User Runtime Settings ............................................................................. 84
Customizing a Virtual User ................................................................................ 85
Checking a Virtual User .................................................................................... 88
Web pages ............................................................................................................... 94
Requests .................................................................................................................. 95
HTTP Requests ................................................................................................ 95
SOAP requests ................................................................................................ 111
Oracle Forms Requests ..................................................................................... 119
Adobe Flex/AMF requests ................................................................................ 128
Adobe RTMP Requests .................................................................................... 138
Google Web Toolkit requests ............................................................................ 148
Java Serialization Requests ............................................................................... 156
Polling Requests ............................................................................................. 165
Streaming Requests ......................................................................................... 168
30
Reference Guide
31
Reference Guide
32
Reference Guide
33
Chapter 4. Menus
Description of the NeoLoad controller menus:
1. File.
Note
You may change the default NeoLoad project directory in the global preferences ("Edit /
Preferences"), in the "Advanced" section.
• Close: Close the current project and display the NeoLoad welcome screen.
• Export project...: Export the current project either to disk in a ZIP archive or to NeoLoad Support.
• Exit: Close the NeoLoad graphical user interface and exit the program.
2. Edit.
• Preferences: Open the NeoLoad preferences pane (global preferences and current project
preferences).
• Variables: Open the variable editing panel. Use this panel to create, edit or delete NeoLoad variables.
• Results Manager: Display the Results Manager. Use this to select, filter, edit or delete a result, or
to compare two test results.
For more information, see the section called “The Results Manager”.
• JS Libraries: Display the JavaScript library manager. Use this to add, edit or delete JavaScript
libraries.
34
Menus
• Search and replace: Display the "Design" view of NeoLoad and launch the "Search and Replace"
Wizard.
For more information, see the section called “Search and Replace”.
3. Record.
• Start recording: Display the new virtual user window in order to begin a new recording.
For more information, see the section called “Recording a Test Scenario”.
For more information, see the section called “HTTP Recorder Settings”.
4. Run.
• Start playback: Display the NeoLoad "Runtime" section and start the test for the current scenario.
For more information, see the section called “Starting the Test”.
When a test is running in normal mode, this menu is replaced by "Stop test", which allows you
to stop the test being run.
• Start debug: Display the NeoLoad "Runtime" section and start the test for the current scenario
in debug mode.
For more information, see the section called “Starting the Test”.
When a test is running in debug mode, this menu is replaced by "Stop test", which allows you
to stop the test being run.
For more information, see the section called “Checking a Virtual User”.
5. Help.
Context-sensitive help is available by pressing F1; you may also carry out a search in the "Search
Help" toolbar.
Note
Help is also available on-line in HTML and PDF formats on the Neotys web site. See the
"Documentation Center" menu.
• Documentation center...: Launch the machine's default web browser and display the Neotys on-line
documentation center.
• Open logs folder...: Open the machine's file explorer and display the NeoLoad log files directory.
35
Menus
• Support...: Launch the machine's default web browser and display the Neotys on-line support request
page.
• About NeoLoad...: Display copyright and license information and the NeoLoad version number.
36
Chapter 5. Preferences
The NeoLoad preferences can be accessed from the "Edit / Preferences" menu item.
Global Preferences
HTTP Recorder Settings
Set the port for the recording proxy . The HTTP recorder uses a proxy that records the requests passing
between your browser and the web server.
• Include list. If the Include list contains an entry, then NeoLoad will only record those URLs matching
at least one regular expression pattern. Use the Include list only to record requests sent to one or two
servers.
• Exclude list. The request will be recorded if it does not match any of the regular expression patterns
in the list. Use the Exclude list to avoid recording requests sent to certain listed servers, or requests for
jar or image files for example. Note that URLs authorized by the Include list must pass through the
Exclude filter, otherwise they will be rejected.
All the filters consist of regular expressions. Remember to escape special characters such as the period.
Here is an example of a filter: http://windowsupdate\.microsoft\.com.*
37
Preferences
Proxy Settings
Configure the user proxy .
The proxy settings are used both in recording a scenario and in playing back a test. When a scenario is
recorded, the recorder connects to the server via this proxy. Likewise, when a test is played back, the load
generator connects to the server via this same proxy, which means the proxy itself is load tested during
the test. Therefore, the proxy can be a source of bottlenecks that slow down performance.
There are three ways to configure the proxy in NeoLoad. If more than one method is selected, they are
executed in the following order: auto-detect settings, automated script, and manual setting.
This option automatically detects the proxy settings. It requires implementation of the WPAD protocol
over the network (via the DHCP or DNS server).
With this option, you may specify the address of the automated configuration script (PAC file), if your
network has one. If the URL is incorrect, NeoLoad will switch to Manual mode or, failing that, not
use a proxy at all.
• Manual setting
This option allows you to manually enter the addresses of the HTTP, HTTPS and FTP proxies and their
ports (the three fields may be identical if one proxy handles all three protocols).
38
Preferences
The exceptions list lets you specify the names of the machines or IP addresses for which the proxy should
not be used (direct connection). Each element must be separated by a semicolon. The "*" (star) character
can be used to enter a wild card string. For example, to specify all the machines in the mydomain.com
domain, you can enter *.mydomain.com.
• Advanced settings
# Authentication
NeoLoad handles basic, Digest, NTLM and Negotiate (Kerberos) authentications. This option,
therefore, is used to specify the user name and password for identification on the proxy.
# Caching policy
This option is linked to the auto-detect and automated script modes. It allows the user to specify the
optimization level to be applied by NeoLoad when executing the automatic configuration script.
# Cache per generator: each load generator will share the proxy settings among all the virtual users.
This is the fastest method, but it can produce distorted results with some complex automated scripts.
If you have only one proxy, use this method.
# Cache per virtual user: each virtual user will use its own settings. This intermediate method should
be used if each user always uses the same proxy, for example, if the automated setting is based on
the client's IP address for the purposes of load balancing.
# No cache: if this option is selected, the automated script will be played at each request. This can
adversely affect test performance, but it provides the most accurate simulation. This option is
useful, for example, in the case of random method load balancing.
Browser Settings
Define the browsers that may be launched automatically on recording. The browsers are discovered and
added to the browser list when NeoLoad is run. You may add other browsers using the "Add" button.
Select the default browser to be used for recording by checking the "Default" box. Please refer to the
Recording chapter for details on browsers and recording scenarios.
39
Preferences
Skins
Change the look of NeoLoad Controller and the language used. The program must be restarted for the
changes to take complete effect.
40
Preferences
Graphs
This section allows to define NeoLoad's graph parameters, in particular the plotting interval.
41
Preferences
Definition: The plotting interval is the time lapse between two plotted points. For example, a curve with
a plotting interval of 30 secs will have a point plotted every 30 seconds. The plotted value is the average
of the values obtained over the plotting interval.
Runtime graphs
Configure the graph parameters displayed during the test runtime ( "Runtime / Runtime Graphs")
42
Preferences
Frameworks
Frameworks can be used to define rules for NeoLoad to configure the user profiles automatically after
a recording. Each framework can contain dynamic parameters (see the section called “Frameworks”) as
well as the specific rules for handling Push technologies (see the section called “Push Frameworks”).
43
Preferences
License
Oracle Forms
Oracle Forms preferences are divided into two tabs :
• General settings: these settings are for defining regular expressions used to identify Oracle Forms
requests and responses.
• Session settings: these settings are for defining session identifiers used by NeoLoad to differentiate
concurrent Oracle Forms applets.
44
Preferences
General settings
Oracle Forms general settings allow the user to define :
• The regular expression that identifies the Content-type header in Oracle Forms requests and
responses. In most cases, Oracle Forms requests and responses are sent in binary format; therefore, the
Content-type header value is generally application/octet-stream.
• The regular expressions that identify the User-agent and Server HTTP headers. In NeoLoad,
several values may be defined for each HTTP header.
# The Content-type HTTP header in the request and response matches the given regular expression.
# The User-agent HTTP header matches at least one of the given regular expressions.
# The Server HTTP header matches at least one of the given regular expressions.
Care should be taken in modifying these settings. Any incorrect configuration can cause NeoLoad to
wrongly identify Oracle Forms requests.
All these settings have preconfigured default values that allow the recording of Oracle Forms requests
using an Oracle Forms 9i or 10g application server.
45
Preferences
Session settings
In order to differentiate between Oracle Forms applets executing simultaneously in a same web page
(or simultaneously in different browser tabs), NeoLoad needs a unique identifier for each Oracle Forms
session: the session identifier. NeoLoad is able to look for session identifiers in Applet URL requests.
Session settings are preconfigured for Oracle Forms 9i and 10g application servers.
Adobe Flex/AMF
AMF is a binary transport protocol between client and server operating over HTTP in the network
application layer. This protocol is used by some Adobe Flash applications developed using Adobe Flex
language.
The Adobe Flex global preferences allow you to define AMF response error codes that NeoLoad should
NOT treat as errors.
46
Preferences
• AMF response error codes are automatically extracted from AMF responses.
• The extracted AMF error codes are compared to the ones configured in this panel. If the error code is
not listed here, the request will be displayed as having encountered an error.
Advanced Parameters
Allows you to modify the NeoLoad advanced parameters.
47
Preferences
• Updates:
Note
Bugfix versions (e.g. 3.1.X) may be installed using the NeoLoad update utility.
Minor and major versions (adding new features, e.g. 3.X, 4.X...) must be downloaded and
installed manually. A specific license may be required to use these versions.
Project Preferences
Page Naming Policy
By default, when the scenario is recorded, the page name is the URL of the first request on the page. You
may change this behavior and specify several page naming templates.
48
Preferences
• $plugin$ : represents the name of the XML request played when it is the first request in the page.
You may define a list of templates. The pages will be named according to the first template; if one of the
values cannot be found (page title or parameter), the next template is applied. If none of the templates can
be applied, the default page naming is applied.
The Client Certificate Manager is accessed from the: "Edit / Preferences / Project
preferences / Certificate management" menu item.
49
Preferences
Importing certificates
Certificates must be imported before they can be used. Use the "Import certificates" button to add
certificates to a project. This import procedure merely copies the files selected in the project's "client-
certificates" directory. It is possible therefore to copy the files directly to this directory.
The certificates must contain the private key and therefore must be in PKCS12 format, the file extension
usually being .pfx, .p12 or .pkcs12.
Use the "Check certificate" button to check the password, format and content of a certificate.
Select the file to be used in the drop-down list, or enter the file name manually together with the
certificate's password. The file name must be the same as in the '"client-certificates" directory
(e.g. user1.pfx).
Playback certificates
During the test, the virtual users may use:
50
Preferences
2. Create a variable containing the file names and corresponding passwords (or modify a file containing
existing accounts).
• Using the Edit / Variables menu, create a List or File type variable. The value change
policy must be "For each virtual user".
• Depending on the variable type, either create a CSV file or directly enter the data via the graphical
interface
• Each line must represent a virtual user and each column a piece of data relating to the user.
Some columns may also contain information useful for your particular application (name, address,
telephone number...) and others the following information: the user certificate's file name and also
its corresponding password.
Example
An example of data:
Declare the accounts file-type variable and rename the columns by clicking on the column header. Then
use ${accounts.certificate} for the name and ${accounts.passwd} for the password used
within the certificate manager.
Tip
Variable names may be used in combination, for example, "${accounts.login}.pfx" .
Security concerns
The recording certificate password is stored in the NeoLoad project in encrypted form. However, this does
not ensure its total security.
Playback passwords, and all NeoLoad variables, are stored in plain-text format. Therefore, it is important
when testing to use test certificates and not real certificates, and only to test a system that is in not in
production.
If this is not the case, then access to the NeoLoad project must be secured in order to protect the certificates
and their relevant passwords.
Runtime
The runtime settings allow you to set the NeoLoad logging level.
51
Preferences
JavaScript
See the section called “Logger”
Error handling
NeoLoad can be configured not to flag as errors some requests that failed on recording. This is required
when some errors are "normal" for the application. NeoLoad should play these requests to be realistic but
should not flag them as error.
This is typically the case for missing resources (images, css,..) that send back a "404 Not Found" error
code. Check the "Do not mark the specified error code..." box to ignore the errors with
the "404" code if the recorded code was "404". Note that requests with a valid return code ("200 OK")
on recording will be flagged as errors if a "404" error occurs at runtime.
Statistics
The "Collect separate statistics from each load generator" option allows NeoLoad
to collect different statistics (average response time, hits/s,...) for all project items, such as requests or
containers, for each load generator.
This option is useful for a test that uses several load generators located in different geographic locations.
In that case you may wish to obtain generator-specific, and thus location-specific, statistics. This will
highlight any performance glitches due to the user's geographical position with regard to the web
application being load tested.
• by using the filters of the "Results" section. (See the section called “Filtering by Load Generator,
Population or Virtual User”).
52
Preferences
• by generating a filtered test result. (See the section called “Test Result Filters”).
Warning
This option may impact considerably the time spent to compute statistics at the end of the test
and the time needed to generate a report, since it multiplies the amount of data collected by the
number of load generator used during the test.
Oracle Forms
Configures how Oracle Forms components are managed during runtime. For more information about
Oracle Forms components, please see the Oracle Forms sample message.
During the recording, references to components that previously have been destroyed or have never been
created are removed from requests.
When an Oracle Forms response is received, it is correlated with the recorded response to determine
which handlerId may have changed.
If a handlerId has changed during runtime, the recorded value is replaced by the runtime value in
the subsequent requests using it.
When sending an Oracle Forms request, NeoLoad checks all handlerIds. When a handlerId does
not exist, an NL-OF-PLUGIN-ENGINE-03 error for the request is displayed in the virtual user validity
check and in the results errors pane. This can be useful, since Oracle Forms Server does not report a
request sending an unknown handlerId as an error.
Note
It's recommended to leave all these options enabled.
53
Preferences
Libraries Manager
The libraries manager allows you to select the libraries needed to decode requests and responses for the
AMF, RTMP, GWT and Java Serialization modules.
Adobe Flex/AMF
These preferences allow you to:
• Select the server-side AMF implementation; "Adobe" is the value selected by default. Implementations
provided by Adobe and GraniteDS are officially supported.
# Adobe Flex/AMF project preferences allow you to declare/delete AMF libraries on-the-fly, without
the need to restart NeoLoad.
# When a JAR file has been successfully loaded, the JAR file is copied into the currently-open project's
directory (in the <NeoLoad Project>/lib/plugins/amf/ directory).
# Each time an AMF library is declared, every AMF request within the project is inspected; NeoLoad
will try to repair the requests whose content has not been fully converted into XML format.
# When load testing an Adobe Flex/AMF application, the declared AMF libraries are copied
automatically to each load generator selected in the scenario.
54
Preferences
In this case, implementing java.io.Externalizable server-side allows you to customize how Java
objects are sent over the network. To display these objects correctly in NeoLoad, JAR files containing the
Java classes need to be declared (including all dependent Java classes and third party libraries).
2. Click on the "+" button and select the JAR files used by the Flex application being tested.
3. NeoLoad automatically repairs all AMF requests not already successfully converted into XML.
4. In the event of failure, more information is available in the appropriate log file plugins.log.XXX
(the logs directory can be opened from the NeoLoad menu by clicking "Help / Open logs
folder...").
Note
AMF libraries can be drag and dropped from the file explorer into the declared libraries table.
GraniteDS allows you to customize the way objects are sent over the network. To display these objects
correctly in NeoLoad, the following elements need to be declared:
• JAR files containing Java Beans: the Java objects exchanged between the client and the server using
custom mechanisms and all their Java dependents.
2. Click on the "+" button and select the granite-config.xml file on your hard disk drive.
3. Click on the "+" button again and then select the JAR files containing the custom GraniteDS
mechanisms and the Java Beans used by the Flex application being tested.
4. NeoLoad automatically repairs all AMF requests not already successfully converted into XML.
5. In the event of failure, more information is available in the appropriate log file plugins.log.XXX
(the logs directory can be opened from NeoLoad menu by clicking "Help / Open logs
folder...").
Note
AMF libraries can be drag and dropped from the file explorer into the declared libraries table.
55
Preferences
Adobe RTMP
To decode these RTMP requests and responses correctly in NeoLoad, JAR files containing the Java classes
need to be declared (including all dependent Java classes and third party libraries).
1. Click on the "+" button and select the JAR files used by the RTMP application being tested.
2. NeoLoad automatically repairs all RTMP requests not already successfully converted into XML.
3. In the event of failure, more information is available in the appropriate log file plugins.log.XXX
(the logs directory can be opened from the NeoLoad menu by clicking "Help / Open logs
folder...").
Note
RTMP libraries can be drag and dropped from the file explorer into the declared libraries table.
56
Preferences
• Java objects that are transmitted over the network between client and server using GWT-RPC.
• The interfaces of the services called by the client application using GWT-RPC.
1. Click the "+" button, then select the JAR files used by the GWT applications to be tested.
2. NeoLoad automatically repairs any GWT requests flagged as incorrectly converted to XML.
3. If the repair fails, you will find further information on the error in the log file: plugins.log.XXX
(the logs directory can be accessed via the "Help / Open logs folder..." NeoLoad menu
item).
Note
GWT libraries can be drag and dropped from the file explorer into the declared libraries table.
57
Preferences
Java Serialization
For NeoLoad to decode the Java Serialization requests and responses into XML, the required libraries
must be declared. The libraries that are required are:
• Java objects that are transmitted over the network between client and server.
1. Click the "+" button, then select the JAR files used by the Java Serialization applications to be tested.
2. NeoLoad automatically repairs any Java Serialization requests flagged as incorrectly converted to XML.
3. If the repair fails, you will find further information on the error in the log file: plugins.log.XXX
(the logs directory can be accessed via the "Help / Open logs folder..." NeoLoad menu
item).
Note
Java libraries can be drag and dropped from the file explorer into the declared libraries table.
58
Preferences
3. Edit the j2ee.pbd file in the CA APM Java agent's installation directory.
59
Preferences
TraceOneMethodWithParametersIfFlagged: HttpServletTypeSpecificServiceTracing
Here is the first line which is a single line even though it appears multiple lines in this document:
SetTracerClassMapping: SynthHttpServletTracer
com.wily.introscope.agent.trace.SynthHttpServletTracer
com.wily.introscope.probebuilder.validate.ResourceNameValidator
Second line :
Warning
It's recommended to copy the correct lines from the j2ee.pbd sample file located in the
<neoload_install_dir>/conf/ca apm/ directory in order to avoid any character
coding problems resulting from a cut and paste from this document.
4. Edit the IntroscopeAgent.profile file in the CA APM Java agent's installation directory:
C:\Program Files\apache-tomcat-5.5.12\wily\IntroscopeAgent.profile
• The three keys under the "URL Grouping Configuration" heading must not start with the
# character and must be filled in as follows:
introscope.agent.urlgroup.keys=default
introscope.agent.urlgroup.group.default.pathprefix=*
introscope.agent.urlgroup.group.default.format=
Note
See the CA APM documentation for more details on configuring URL grouping.
• The two keys under the "Transaction Tracer Configuration" heading must not start
with the # character and must be filled in as follows:
introscope.agent.transactiontracer.userid.method=HttpServletRequest.getHeader
introscope.agent.transactiontracer.userid.key=Synthetic_Trace_By_Vuser
Warning
It's recommended to copy the correct lines from the IntroscopeAgent.profile sample
file located in the <neoload_install_dir>/conf/ca apm/ directory in order to
avoid any character coding problems resulting from a cut and paste from this document.
60
Preferences
When the CA APM option is enabled, NeoLoad sends additional HTTP request headers with information
about virtual users and transactions. This information is extracted by the CA APM Java agents and enables
CA APM to segregate web page response times and other performance metrics by virtual users and
transactions under the Frontends branch of the Investigator window in the CA APM Workstation and
WebView tools. Here's an example of a NeoLoad virtual user profile:
61
Preferences
As the scenario is run, data relating to the virtual users simulated is fed into the CA APM Java agents and
stored in CA APM's SmartStor database along with all other metrics.
62
Preferences
Three option boxes are used to configure the path of the executed request. Each element in the path
represents a tree node in the CA APM Investigator view.
• When the Virtual user name option is selected, the names of the virtual users are displayed in the CA
APM Investigator view.
• When the Container name option is selected, the container names are displayed in the CA APM
Investigator view.
• When the Other action names option is selected, the names of any other actions (such as Loop, If...
The... Else etc.) are displayed in the CA APM Investigator view.
63
Preferences
When the Enable tracing by virtual user option is enabled, Introscope traces a percentage of the virtual
user instances. This percentage must be a decimal number between 0 and 100. This value expresses the
probability a virtual user instance has of being traced. For example, a load test using 100 virtual users and
with a tracing percentage set at 10% will return specific metrics for approximately 10 instances and global
statistics for the remaining 90. The metrics provided for the non-traced virtual users are merged into a
same node labelled with the name of the virtual user.
dynaTrace
During a test, NeoLoad can send data to enable the correlation of requests sent by NeoLoad, the analysis
being done by the dynaTrace® server from dynaTrace Software.
64
Preferences
dynaTrace 2.X
The recording is always carried out using the default name.
NeoLoad communicates with dynaTrace using the JMX protocol. Enter the connection parameters:
• "System": the dynaTrace system's name. Click the "Fill in" button to fill in the list of available
systems automatically.
dynaTrace 3.X
With dynaTrace 3.0, the recording is always carried out using the default name.
With dynaTrace 3.1, the recording's name takes the form: "NeoLoad-<project name>-<scenario name>".
65
Preferences
NeoLoad communicates with dynaTrace using the JMX protocol. The dynaTrace JMX monitoring and
management service must be activated for automatic session recording to function (Menu Tools > Manage
servers... , Services section, Management tab).
• System: the dynaTrace system's name. Click the "Fill in" button to fill in the list of available
systems automatically.
Warning
No authentication is required to use the dynaTrace 3.X JMX interface.
66
Chapter 6. Design
Recording a Test Scenario
Recording HTTP Applications
Set-up
NeoLoad allows you to record a scenario using just a basic browser. The NeoLoad Recorder, seen as a
proxy by the browser, records each HTTP request and response to and from the server:
Where the browser already accesses the server via a proxy, the recording proxy will use this same user
proxy to access the server:
SSL support
The recorder supports SSL secured servers. When first accessing the server during the recording, the
browser will generate security alerts concerning the validity of the server's certificate. These alerts are
quite normal, since the recorder intercepts the traffic from the server and provides its own certificate. You
may ignore these alerts and continue to browse as normal.
To create a scenario on an application that requires client certificates, it's necessary to install these
certificates into NeoLoad before starting recording. Client certificates should be installed from the project
preferences.
To allow NeoLoad to capture the HTTPS requests sent from a Java Applet, the Java plug-in of the browser
must be configured to use the NeoLoad recording proxy as a proxy server.
67
Design
To change the proxy settings in Internet Explorer, click on Tools/Internet options , then on the
Connections tab.
• If you connect to the server via a local network, go to the Local Area Network (LAN)
settings section and click on the LAN settings button.
• If you connect via a modem, go to the Dial-up and Virtual Private Network Settings
section and click on the Settings button.
For other browsers, the proxy settings are accessible via the browser's preferences.
Test the set-up by entering the URL http://neoload/. If the page displays correctly, the settings
are correct (this URL is not recorded).
The recorder's exclusion filter already blocks a certain number of access requests by default. If other
unwanted requests remain, these must be either deleted after recording or added to the filter (See the section
called “HTTP Recorder Settings”).
68
Design
Note
You need to purchase the optional RTMP module for RTMP requests to be handled. This module
is included in the demo version of NeoLoad.
Limitations
There are certain limitations regarding the recording of Adobe RTMP applications:
• NeoLoad must be started using an administrator-level account for it to be able to register itself as the
network adapter driver.
• Under Windows Vista / 7, when User Account Control (UAC) is activated, NeoLoad must be launched
by right-clicking on the program file and selecting "Run as Administrator" in the pop-up menu.
Starting Recording
The Start recording button is accessed from either the toolbar or the virtual user profiles description
panel.
69
Design
• Virtual user name. In the "Name" text field, enter the virtual user name. When the recording ends,
the virtual user with this name will contain all the recorded pages and requests.
• Recorded protocols. Select the protocols you want NeoLoad to record.
If the license permits, you may activate recording for Adobe RTMP (Real Time Messaging Protocol).
RTMP is a streaming protocol developed by Adobe that works on top of TCP/IP. See the documentation
on the RTMP module for more information.
Warning
Recording a RTMP application in NeoLoad is subject to certain limitations. See the recording
limitations for more information.
• Launch browser. Automatically launches the selected browser and opens the test URL http://
neoload/ using the automatically-configured proxy settings. If this page displays correctly, the recording
proxy has been set up correctly. Closing the browser stops the recording.
Clear this option to manually configure the recording proxy settings , manually launch the browser and
record the scenario.
• Delete cookies. Deletes cookies prior to recording in order to simulate a user's first visit to the
application.
Cookies are restored when recording ends. As Internet Explorer's cookies may be cached in the system
memory, this browser is not recommended if a precise monitoring of cookies is required.
• Clear cache. Clears the browser's cache in order to simulate a user's first visit to the application.
With Internet Explorer, the cache is permanently cleared; with other supported browsers, the cache is
restored when recording ends.
Supported browsers
Browsers for which automatic proxy management, cache clearing and cookie deletion are supported:
• For Windows: IE5, IE6 , IE7, IE8, Mozilla, Firefox, Netscape 6/7, Netscape 4.7.
• For Unix: Mozilla, Firefox, Netscape 6/7, Netscape 4.7 and Konqueror (Linux).
Other browsers may be used to record test scenarios but these must be configured manually. Browsers that
are not detected automatically may be manually entered in the preferences.
•
Clicking the "Stop" button stops the recording and opens the Post-Recording Wizard.
70
Design
pages. Delete the container name to end the collection of new pages within the container and to allow
the creation of a new container.
•
Click on the "Rendezvous" icon to insert a rendezvous point. See the section called
“Rendezvous” for more details.
Post-Recording Wizard
At the end of the recording, NeoLoad gives you the option of carrying out various tasks on the scenario
you have just recorded. The wizard comprises several modules that are displayed according to the recorded
scenario's characteristics. These modules are:
• Java library handling. Some web applications using the Adobe Flex/AMF, Adobe RTMP, GWT and
Java Serialization technologies require Java libraries to be declared in order to play back the virtual user's
requests correctly. See the documentation for each technology for more details on the Post-Recording
Wizard.
For example, see the section called “Post-Recording Wizard” for the Adobe Flex/AMF module.
• Push application handling. Some web applications using Push technology need advanced
configuration in order to play back the virtual user correctly. NeoLoad can create part of this advanced
configuration for a number of frameworks. For more information of the frameworks supported, see the
section called “Push Frameworks”. For more details on the automation provided by NeoLoad, see the
section called “Frameworks”.
• Dynamic parameter handling. Certain form or request parameters are server-generated and must
be extracted from the server response during the test. This step detects and automatically configures
these dynamic parameters.
• Think time between pages. The think time between pages is an important component in any load
test. The think time between pages must be realistic for each user type if a realistic server load is to
be generated.
71
Design
The wizard gives you the option of either using the think times as recorded, or overriding the think time
value for all a virtual user's pages with a new value.
Warning
When overriding the think time value for all pages is selected, the current virtual user's settings
are updated.
Note
The think time for each page may be set in the Virtual Users section. You may also
override the think time for all a virtual user's pages in the Runtime parameters panel in
the Design / Virtual Users section.
• Basic, Digest, NTLM or Negotiate authentication. When NeoLoad detects a Basic, Digest, NTLM
or Negotiate authentication during recording, the wizard gives you the option of configuring the
authentication either to use the recorded account for all virtual users or to vary the accounts for each user.
72
Design
When the "Use the recorded account" option is selected, the account used is the one used in
the recording. The account may be changed by editing the server settings.
When the "Use multiple accounts" option is selected, the accounts data is sourced either from
a list of static values (to be entered directly via the NeoLoad interface), or from a CSV file.
# Using a list-type variable. NeoLoad creates a list-type variable and configures the server used in
the recording to use that variable for NTLM authentication. The values for the variable are specified
in the user login handling panel.
73
Design
Note
The column names can be changed by clicking on each column's header.
# Using a file-type variable. NeoLoad creates a file-type variable and configures the server used in
the recording to use that variable for NTLM authentication. The values for the variable are specified
in the user login handling panel.
74
Design
Note
The column names can be changed by clicking on each column's header
Once the variable has been filled in, you must specify the column to be used for logins and the column
to be used for passwords.
When an authentication form is detected, NeoLoad presents you with a list of possible forms for basic
authentication. Check the authentication forms in the list, then click Next.
75
Design
The list contains all the text -type fields found in the form. Select the field containing the user login
id among the fields shown.
76
Design
The list contains all the password -type fields found in the form. Select the field containing the user
password among the fields shown.
You may use the recorded account for all instances of the virtual user profile or use multiple user
accounts.
77
Design
When the "Use the recorded account" option is selected, the account used is the one used in
the recording. The account may be changed by editing the server settings.
When the "Use multiple accounts" option is selected, the accounts data is sourced either from
a list of static values (to be entered directly via the NeoLoad interface), or from a CSV file.
78
Design
# Using a list-type variable. NeoLoad creates a list-type variable and configures the server used
in the recording to use that variable for form-based authentication. The values for the variable are
specified in the user login handling panel.
79
Design
Note
The column names can be changed by clicking on each column's header.
# Using a file-type variable. NeoLoad creates a file-type variable and configures the server used
in the recording to use that variable for form-based authentication. The values for the variable are
specified in the user login handling panel.
Note
The column names can be changed by clicking on each column's header.
Once the variable has been filled in, you must specify the column to be used for logins and the column
to be used for passwords.
80
Design
Troubleshooting
If you have any problems with recording, please refer to the Troubleshooting Guide .
Servers
The servers pane is used to declare and modify the web servers used in the scenario. The servers are
automatically created when the scenario is recorded. The server settings are centralized, which means the
target server for the test can be quickly changed. It is possible, for example, to quickly switch from the
development to the pre-production server.
81
Design
• Http server. Displays the Http server definition. Change hostname and port to switch physical server
for all requests using the current server.
# Authorization. User accounts used to authenticate to the server. The password-protected zones
(realms and domains) are detected during the recording and automatically added. The accounts may
be dynamic and changed for each user being simulated, using variables.
See the section called “Authentication” for more details on how authentication works in NeoLoad.
# HTTP URL rewriting. Session tracking is automatically enabled when cookies are used. For
servers that use URL rewriting to track a session, the session argument must be defined (e.g.
SESSIONID or JSESSIONID for most servers). When detected during recording, the argument is
automatically filled in.
• Server. Displays the non-Http server definition. Change hostname and port to switch physical server
for all requests using the current server.
Authentication
Supported authentication mechanisms
NeoLoad supports the following authentication mechanisms: Basic, Digest, NTLM and Negotiate.
82
Design
Note that Integrated Windows Authentication on Microsoft IIS uses both Kerberos v5 and
NTLM authentication.
For performance reasons however, NeoLoad uses NTLM in place of SPNEGO as the default underlying
mechanism for Negotiate, since SPNEGO+Kerberos has a major impact on Load Generator performance.
When SPNEGO+Kerberos is used, a Load Generator cannot generate as many Virtual Users.
Enabling SPNEGO therefore, is not recommended. If it is absolutely required however, follow this
procedure:
3. Edit the <neoload>/conf/krb5.conf file and set the Key Distribution Center (KDC) for each
Realm and Domain.
Virtual Users
A virtual user simulates the browsing activity of a real visitor. The virtual user is a succession of web pages,
which may contain logical actions such as containers, loops or delays to create a more complex behavior.
In NeoLoad, virtual users are created and managed in the "Design" section's "Virtual Users" tab.
83
Design
To create a new, empty virtual user, right-click on the "Virtual User Profiles" node and select
the "New virtual user" menu item.
Note
A virtual user will not stop running within a try container.
Think time
The think time simulates the time spent by a user on the preceding page before accessing the current page.
This time delay may be set for each individual page, or globally for all pages.
The think time options available for each virtual user are:
84
Design
• Use think time defined on pages: By default, the think time set for each page is the think
time measured during recording.
• Override think time for all pages with: Use a global think time for all the virtual
user's pages. You may use a variable to obtain a dynamic behavior.
• Apply this factor for each page: Apply a factor to the think time used for the pages. For
example, by entering a factor of 130%, you can increase the think time for the pages by 30%. A factor
under 100% will reduce the pages' think time.
The "Add a random delay of +/- X %" option can be used to add a random element to the delay.
The time delay thus obtained is between "delay + x%" and "delay - x%".
Tasks
This panel is used to access the following tasks:
• Check the virtual user validity. Opens the virtual user checking window with the current virtual
user preselected. See the section called “Checking a Virtual User”.
• Search for dynamic parameters. Starts a search for dynamic parameters. See the section called
“Frameworks”.
For a more complex behavior, NeoLoad allows you to add control components such as loops, conditions,
containers etc. See the section called “Logical Actions”.
Adding an element
To add an element such as a loop or a simple container to a container, use the right-click pop-up menu
and select "Insert into". The menu displays the child elements compatible with the selected parent
element.
To add one element directly after another, use the right-click pop-up menu and select "Insert after".
The menu displays the elements that may be inserted at the specified location.
An alternative is simply to drag and drop the element from the "Actions" pane located beneath the virtual
users tree. See the section called “Moving an element” for more information on dragging and dropping
in the virtual users tree.
Deleting an element
To delete an element, use the right-click pop-up menu and select "Delete" or use the "Delete" button
in the button array to the right of the virtual users tree.
85
Design
Moving an element
To move an element:
• Use the button array to the right of the tree. You may move the selected element up or down the
tree using the "Up" and "Down" buttons in the button array. Use the ">" button to place the selected
element in last position in the first container encountered above the selected element. Use the "<" button
to place the selected element immediately after its parent.
• Drag and drop. When dropping, there are three target zones: the top zone indicates that the moved
element will be inserted above the target element, the middle zone indicates that the moved element
will be inserted inside the target element, and the bottom zone indicates that the moved element will
be inserted below the target element.
When over the middle zone, the target element is only highlighted if insertion is allowed. In the case of
the top or bottom zone, a hyphen is displayed to show that the insertion is allowed.
Warning
A page is a container, since it can contain other pages (frames or iframes). Be careful not to
place one page inside another accidentally. Make sure the hyphen is displayed before dropping
a page.
Note
Confirmation of a move is required when the time delay between drag and drop is very short
in order to avoid any accidental moves. When the delay is longer, NeoLoad assumes the move
is deliberate and does not ask for confirmation.
• Insert after. Inserts a new element immediately after the selected element.
86
Design
• Shared. Shares a container element so that it can be re-used in several virtual users. See the section
called “Shared Containers”.
• Flag requests... Opens the flags window to search for requests in the current virtual user. See the
section called “Flags”.
• Cut. Places the element on the clipboard. Once pasted, the element is removed.
• Paste after. Inserts the clipboard contents after the selected element.
• Paste in. Inserts the clipboard contents into the selected container.
• Select in "Check virtual user" window. Opens the virtual user checking window with the current
virtual user preselected and displays the selected element.
This option is only available if the current virtual user has been previously validated. See the section
called “Checking a Virtual User”.
• Select in results panel. Displays the "Values" tab in the "Results" section and selects the element
in the results table.
This option is only available if the element was played back during the test corresponding to the current
results. See the section called “Values”.
• Expand all. Recursively expands all the tree nodes below the selected node.
• Collapse all. Recursively collapses all the tree nodes below the selected node.
• Virtual user.
# Check this virtual user. Opens the virtual user checking window with the current virtual user
preselected. See the section called “Checking a Virtual User”.
# Search for dynamic parameters. Starts a search for dynamic parameters. See the section called
“Frameworks”.
# Search and replace. Launches the Search and Replace Wizard. See the section called “Search
and Replace”.
# Advanced / Rename pages. Allows you to change the page naming policy and to apply that policy
to the selected virtual user's pages for bulk re-naming. See the section called “Page Naming Policy”.
# Advanced / Apply recording filter. Applies the recording filter to omit requests already recorded
after the filter was modified. See the section called “HTTP Recorder Settings” for more information
on URL include and omit filters.
• Requests.
# Add the server to the omit list. Allows you to omit the server from the request in subsequent
recordings. NeoLoad generates a regular expression for the appropriate server and adds it to the omit
87
Design
list. See the section called “HTTP Recorder Settings” or more information on URL include and omit
filters.
Afterward, you may use the "Advanced / Apply recording filter" menu option for the
current virtual user to remove all the requests using the same server as the selected request.
Use the "Run / Start checking" menu item to display the checking window.
During the checking process, NeoLoad runs a virtual user and displays details of all the actions played,
be they logical actions (pages, container ...) or requests.
Summary
At the end of the checking process, a summary is displayed containing the statistics for the virtual user
just played:
• Page count: the number of pages played during the checking process.
88
Design
• Request count: the number of requests played during the checking process.
• Push message count: the number of Push messages played during the checking process.
• Virtual user size: overall size of all the pages played during the checking process (sum of the sizes of
all the server responses).
• Virtual user duration: total time taken to run the virtual user. During the virtual user check, think times
are not played by default. However, the virtual user duration includes the calculated think times to reflect
the actual time that will be taken by the virtual user during the test.
Note
See the section called “Advanced settings” to play think times when checking the virtual user.
• Errors count: total number of requests containing errors ( HTTP and validation errors).
• View used variables during the validation: link to view the variables used and extracted during the
checking process.
89
Design
Request
For each request, a detailed analysis can be made of the request sent by NeoLoad, the server response
and any assertions. To do this, you just need to click on the request in the table and select the detail to be
displayed (Request, Response, Assertions, Variables) in the Details section.
Note
For quick and easy selection, the request and page names are linked to the virtual user profiles.
90
Design
A server response may be displayed in a browser window. In this case, NeoLoad opens a browser that
displays the page containing the server response returned during the checking process. This allows you
to preview the page itself, rather than view the HTML source code. Images are not displayed during this
preview, as only the HTML code for the current request is sent to the browser.
You may also compare the request and server response with those recorded.
91
Design
Pages
For each page, the details include the page duration (including think time -not played during the checking
process) and its size (sum of the sizes of all the requests in the page).
Tip
For quick and easy selection, the page name is linked to the virtual user profiles.
Note
As some requests are played concurrently, the page duration is not the sum of the request response
times.
An HTML view of the page is available in the "HTML Rendered" tab, displaying the page as seen by
the virtual user during the check. This view is available during the checking process when the think times
are played.
During the checking process, the HTML rendering of each played-back page may be enabled automatically
when think times are played. To enable the automatic rendering of HTML pages, edit the advanced settings:
make sure "Play virtual user-defined think times" is checked, then check "Enable
page rendering during validation".
92
Design
Important
The HTML rendering may be incorrect (missing images, page layout), especially with AJAX
applications. The rendering is provided for information purposes to quickly detect any problems
with the scenario and cannot precisely reflect the rendering obtained by the real user.
Advanced settings
When checking a virtual user, some of the virtual user's advanced settings may be modified:
• browser
• cookie handling
• cache behavior
Export
The current check also may be exported. In this case, NeoLoad creates an XML file containing all the sent
requests as well as the server responses. This may be useful for analyzing a script or when contacting our
technical support team. Here is a sample of an XML export:
93
Design
<Request binary="false">
<Body><![CDATA[GET http://host/jpetstore/ HTTP/1.1...]]></Body>
</Request>
<Response code="200" type="text/html; charset=UTF-8">
<Headers><![CDATA[HTTP/1.1 200 OK...]]></Headers>
<Body><![CDATA[...]]></Body>
</Response>
</Transaction>
...
</Project>
Import
You may import a virtual user check that has been exported in XML format by clicking the "Import"
button and selecting the file to be imported.
Warning
The user whose check file has been exported must be in the same state (requests, logical actions...)
at importation as it was at exportation.
Web pages
The web page is the page as rendered by a web browser. It consists of the HTML page and all its sub-
components, such as image files and CSS style sheets.
94
Design
in a form before submission. Use this box to set the think time for this page or click on the link to the
runtime settings pane to set a global think time for all pages. The default policy is to use the think time
defined for each page (to change this policy, click on the same link).
Note
In the virtual user definition, you will find several ways of managing think times (add a factor
to all think times, vary the think times by a random amount ...).
• Page screenshot: a screenshot of the browser content at the instant the web page was recorded.
Please note that this function is only available in Windows and is merely a reminder of what was
displayed in the browser window when the web page was recorded. Screenshots are only available for
web pages with an HTML content. If the screenshot does not mirror the actual web page, it may be
deleted.
Automatic screenshots during recording may be turned off by changing the value of the
recorder.screenshot.enabled key in the [GUI] section of the <NeoLoad>/conf/
controller.properties file to false.
• Advanced: Web page advanced settings.
# Request playback: The NeoLoad default setting is to play back requests in compliance with the
HTTP protocol with the browser using several parallel connections to retrieve a page's resources.
For specific needs, you may force NeoLoad to play the requests sequentially and according to their
order in the page definition contained in the Virtual User profiles.
Requests
HTTP Requests
In NeoLoad, an HTTP request is a request sent over a network using the HTTP or HTTPS protocol.
Normally the request is followed by a server response, which can be in the form of an HTML web page,
image or CSS file among others.
95
Design
Type
The request type can be defined in four ways:
• Use a manual definition. Manually define the request. Allows you to enter the URL and set the
parameters to be used for the request. See the section called “Use a manual definition”.
• Follow a redirect of the previous request. Indicates that the present request is the target of an HTTP
redirect in the response to the preceding request. See the section called “Follow the redirect of the
previous request”.
• Follow a link from the previous request. Extracts and follows a link matching a dynamic definition.
This option should be used when a scenario includes a click on a dynamically-generated link. The load
generator dynamically extracts the link from the results of the preceding request (referrer) and follows
the link. See the section called “Follow a link from the previous request”.
• Submit a form from the previous request. Extracts and submits a form from a form in the previous
request. This option should be used when a scenario includes the submission of a form containing a
dynamic hidden field. The load generator dynamically extracts the form from the results of the preceding
request (referrer), allowing the dynamically-extracted values to be submitted. See the section called
“Submit a form from the previous request”.
96
Design
• The method (GET, POST, HEAD, PUT, DELETE, OPTIONS, TRACE, CUSTOM).
• The server.
• The parameters (each parameter may contain variables in the name or value).
Request parameters
Parameters may be defined for any type of request (GET, POST, HEAD, PUT...). Some may be applied
to static values and others to dynamic values by using variables.
Editing a parameter name or value is done in a dedicated window. Double-click on a name or value in the
parameters table to open the window.
97
Design
Parameter Name
The name may contain plain text or a NeoLoad variable. When the Encode name box is checked,
the specified name is encoded in MIME application/x-www-form-urlencoded format before
being submitted (e.g. spaces are encoded as %20). Clear the check box if the name is already encoded.
Parameter Value
Use an expression. The value's expression may contain plain text and NeoLoad variables. The value
may comprise several lines in the case of a POST.
98
Design
Use an extracted value. This option allows you to define a value extracted from a previous server
response. This option typically is used in the case of a server-generated dynamic value that changes for
each user.
The extractor to be used can be modified manually using the "Edit extractor configuration"
button. Clicking the button displays the variable extractor interface, giving you the additional option of
selecting the request on which the extraction should be carried out. If no configuration is applied, NeoLoad
offers the option of configuring the extractor automatically (see below).
Clicking the "Automatic configuration" button starts a search for the parameter in the previous
requests. NeoLoad searches the previous requests for the parameter's value and for the best regular
expression to extract it. If one of the tested configurations works, NeoLoad will replace the existing
extractor with the one found.
The "Add to framework parameters" button allows you to add the variable extractor as a
framework parameter and carry out a dynamic parameter search. For more details, see the section called
“Frameworks”
If the "Encode value" box is checked, the specified value is encoded in MIME application/x-
www-form-urlencoded format before being submitted (e.g. spaces are encoded as %20). Clear the
check box if the value is already encoded.
POST parameters
Whatever the type, POST-type requests may have parameters contained within the URL. The POST and
URL parameters may be processed separately using the tabs provided.
In the above example, the URL obtained during the test will be: http://jack:80/loadtest/
form/doit.jsp?
firstname=john&lastname=smith&[email protected].
99
Design
100
Design
Each part is described by a name attribute and a value. It also features an optional specific content type,
charset and transfer encoding. Refer to RFC1867 [http://www.ietf.org/rfc/rfc1867.txt] for more details.
Each field may be replaced by a variable. The value may be a string or a file input.
The filename field describes the file name within the part. The part's content data is described by the source
file field. The file may be identified using a set path or one related to the project. The files are automatically
copied to all the load generators when the test is started.
Indicates that the present request is the target of an HTTP redirect in the response to the preceding request.
When a request is defined as an HTTP redirect, the load generator will not use the recorded URL or
101
Design
the parameters to play the request. Instead it will use the result of the preceding request dynamically
(the preceding request must have a response of the type "302 Moved Temporarily"). This is
extremely useful in the case of pages causing redirects containing dynamically-generated parameters (e.g.
/searchresult.jsp?searchID=481825 where searchID is generated by the server).
In this mode, it's possible to edit the referrer, in other words the request whose response is the redirect.
This request must be located earlier than the current request in the scenario. NeoLoad then displays the
redirect URL used in the recording.
Extracts and follows a link matching a dynamic definition. This option should be used when a scenario
includes a click on a dynamically-generated link. The load generator dynamically extracts the link from
the results of the preceding request (referrer) and follows the link. The referrer may be changed by clicking
on "Change the referrer"; note that the referrer must always be located earlier in the scenario
than the current request.
When defining the link to be extracted, you may specify the HTML attributes of the link to be followed
(name, id, link text, alt), or define all the link's elements (URL, parameters). A typical case is
where one or more of the link's parameters are dynamic.
Warning
When using a regular expression for the HTML attribute or for the path, the regular expression
special characters must be escaped. The following characters must be escaped using "\": [ ]
^ \ { } ( )
Where several links in the server response match the definition, the last option in the panel allows you to
extract a link randomly or specify the occurrence to be extracted.
102
Design
Request parameters
Parameter definition is used to define, in particular, the request's dynamic parameters. Each parameter in
the definition must be present in the link to be extracted. NeoLoad will be able to use a link that contains
additional parameters to those present in the definition.
Editing a parameter name or value is done in a dedicated window. Double-click on a name or value in the
parameters table to open the window.
When extracting a link, you may automatically create NeoLoad variables containing the parameter values
when the link is executed. This allows you to extract the dynamic part of the link and use it in subsequent
requests. If, for example, the application frequently uses the same dynamic parameter, you may define
a link extractor at the parameter's first use and use the variable in all the other requests that use that
same parameter. This avoids multiplying searches in the server response pages and results in better load
generator performance.
Parameter Name
The name may contain plain text or a NeoLoad variable. When the Encode name box is checked,
the specified name is encoded in MIME application/x-www-form-urlencoded format before
being submitted (e.g. spaces are encoded as %20). Clear the check box if the name is already encoded.
103
Design
Parameter Value
The value must be an expression. The value's expression may contain plain text and NeoLoad
variables. The link that NeoLoad is going to extract must contain this parameter with this value. This
implies that the value is static and that any link containing this parameter but with a different value should
be ignored.
The parameter must exist, whatever its value. The link that NeoLoad is going to extract must contain
this parameter, whatever its value. This generally implies that the parameter's value is dynamic and is
not known beforehand. This dynamic value may then be placed in a NeoLoad variable by editing the
"Extract in variable" column in the parameters table.
The value must match a regular expression. The link that NeoLoad is going to extract must contain
the parameter and the value must match the regular expression. This generally implies that part of the
parameter's value is dynamic and is not known beforehand. The value used may then be placed in a
NeoLoad variable by editing the "Extract in variable" column in the parameters table.
Example
Let's look at an example: the web application generates a search id named searchID, and this id is
transferred from page to page as a request parameter. The request's recording looks like this:
104
Design
During a test, NeoLoad will play back the request using the searchID that was recorded.
Therefore, we need to replace the searchID with the appropriate value. The preceding
page contains the following link: <a href="http://ServerHostname/search.php?
searchID=<mygoodsearchid>&page=2">Page2</a>
So this manual request must be changed to a "Follow a link from the previous request"
type:
105
Design
In this example, the searchID's value is set at <MUST BE PRESENT>, which means that the
searchID may have any kind of value. Using this configuration, NeoLoad will search for a link using:
• a searchID parameter.
As the server response contains only one link matching the description, NeoLoad will use this link with
the searchID parameter value present in the server response.
We can also set the "page" parameter to "<MUST BE PRESENT>". If the response contains several
links such as:
<a href="search.php?searchID=<mygoodsearchid>&page=2">page2</a>
<a href="search.php?searchID=<mygoodsearchid>&page=3">page3</a>
<a href="search.php?searchID=<mygoodsearchid>&page=4">page4</a>
then all these links match the definition and NeoLoad will select either one at random or a specific
occurrence, depending on how the parameter has been configured.
Extracts and submits a form from a form in the previous request. This option should be used when
a scenario includes the submission of a form containing a dynamic hidden field. The load generator
dynamically extracts the form from the results of the preceding request (referrer), allowing the dynamically
extracted values to be submitted.
Using this option allows you to define a target form on which to work. Selecting the form is done via
the button in the Extracted Form section, which displays a new window with further options. Once
the form has been selected, the forms various elements can be used in the request to be submitted (URL,
parameter value).
106
Design
The form to be extracted must be present in the response to the referring request. You may change the
referrer by clicking the "Change the referrer" button; note that the referrer must always be located
earlier in the scenario than the current request. Three options are available when defining the form to be
extracted:
• Form's id or name HTML attribute. This field may contain a regular expression.
• Form's occurrence within the page (e.g. extract the 2nd form in the server's response).
• Form matching the following definition: URL, and parameter names are required (NeoLoad will not be
able to use a link that contains additional parameters to those present in the definition).
Warning
When using a regular expression for the HTML attribute or for the path, the regular expression
special characters must be escaped. The following characters must be escaped using "\" : [ ]
^ \ { } ( )
Where several forms in the server response match the definition, the last option in the panel allows you to
extract a link randomly or specify the occurrence to be extracted.
107
Design
Request parameters
Editing a parameter name or value is done in a dedicated window. Double-click on a name or value in the
parameters table to open the window.
When extracting a form, you may automatically create NeoLoad variables containing the parameter values
when the form is submitted. This allows you to extract a dynamic parameter in a form and use it in
subsequent requests. If, for example, the application frequently uses the same dynamic parameter, you
may define a form extractor at the parameter's first use and use the variable in all the other requests that use
that same parameter. This avoids multiplying searches in the server response pages and results in better
load generator performance.
Parameter Name
The name may contain plain text or a NeoLoad variable. When the Encode name box is checked,
the specified name is encoded in MIME application/x-www-form-urlencoded format before
being submitted (e.g. spaces are encoded as %20). Clear the check box if the name is already encoded.
108
Design
Parameter Value
Use an expression. The value's expression may contain plain text and NeoLoad variables. The value
may comprise several lines.
Use value from extracted form. NeoLoad will use the value from the extracted form for the parameter.
This generally implies that the parameter's value is dynamic and is not known beforehand. This dynamic
value may then be placed in a NeoLoad variable by editing the "Extract in variable" column in
the parameters table. Each "Submit a form from the previous request"-type request is
presumed to contain at least one parameter of this type.
Use an extracted value. This option allows you to define a value extracted from a previous server
response. It should be used typically in cases where a dynamic value generated by the server does not
appear in the form's HTML code (otherwise the "Use value from extracted form" option is
more appropriate). Usually, if the parameter value is generated in JavaScript, the value must be extracted
using a variable extractor.
The extractor to be used can be modified manually using the "Edit extractor configuration"
button. Clicking the button displays the variable extractor interface, giving you the additional option of
selecting the request on which the extraction should be carried out. If no configuration is applied, NeoLoad
offers the option of configuring the extractor automatically (see above).
The "Add to framework..." button allows you to move the variable extractor as a framework
parameter and carry out a dynamic parameter search. For more details, see the section called “Concept”
Clicking the "Automatic configuration" button starts a search for the parameter in the previous
requests. NeoLoad searches the previous requests for the parameter's value and for the best regular
109
Design
expression to extract it. If one of the tested configurations works, NeoLoad will replace the existing
extractor with the one found.
Example
Let's take the case of an application with a search form such as this one:
In this example, the "computedValue" hidden field is generated server-side and is different for each
call.
During a test, NeoLoad will play back the request using the value for the "computedValue" parameter
as recorded. It needs to be replaced with the appropriate value, so the manual request type must be changed
into a "Submit a form from the previous request" type:
110
Design
Using <FORM VALUE> as the value for computedValue allows you to extract the value generated
by the server.
Furthermore, using <FORM VALUE> for the country field means you can choose a random value among
those available for this option. Likewise, the fastsearch field will have a random "YES" or "NO" value
during the test.
Therefore, the form extractor not only allows you to extract the dynamic values generated by the server,
it also allows you to use the various form choices in a random manner.
SOAP requests
NeoLoad's optional SOAP module can be used to load test Web services using the SOAP protocol.
• Declare, then enter, the SOAP request's call parameters (manually or using a WSDL description file)
• Record a SOAP request played by an existing client application, then modify its parameters.
2. In the virtual user, container or page's pop-up menu, select "Insert as child / SOAP
Request".
111
Design
i. Enter the URL containing the WSDL. Use the file browse button to select a file on
the hard drive, or enter a web server URL, for example: http://myserver/app/
myservice?WSDL.
ii. In the drop-down list, select the method (or operation) to be tested.
iv. Enter the URL of the web service ("Endpoint"). The URL defined in the WSDL is displayed
by default.
112
Design
• hostname: name or IP address of the machine currently running the NeoLoad Controller.
• port: the NeoLoad HTTP recorder's port, 8090 by default. This setting can be changed in the
NeoLoad preferences.
Please refer to the documentation accompanying your web services framework for instructions on
how to change the proxy settings. As a guide:
System.setProperty("http.proxyHost", "localhost");
System.setProperty("http.proxyPort", "8090");
<configuration>
<system.net>
<defaultProxy>
<proxy
usesystemdefault = "false"
proxyaddress="http://localhost:8090"
bypassonlocal="true"
/>
</defaultProxy>
</system.net>
</configuration>
2. Run NeoLoad
3. Start a recording (See the section called “Recording a Test Scenario”). Since the recording does not
require a browser, we recommend clearing the "Launch browser" option .
4. Launch your SOAP client application. Since the application has been configured to use the NeoLoad
recorder as a proxy, NeoLoad records the request.
113
Design
• WSDL. URL for the WSDL. For a file on the hard drive, the URL will take the form file:/
C:/... Use the file browse button to select the file. For an online file, use the standard http://
myserver/myapp/myservice?WSDL.
The Reload button allows the WSDL to be reloaded and to choose a method from the WSDL. It
reconfigures the request parameters according to the new selected method. After confirmation, the
request's original parameters are deleted.
• Edition mode.
This mode is available if a WSDL file has been defined. It allows the call parameters to be entered
based on the WSDL definition. See the section called “Editing the parameters extracted from the
WSDL”.
# XML mode
This mode allows the request to be edited directly in XML format. See the section called “Editing
the XML content”.
• Method. SOAP Method to be called, cannot be edited directly. Another method can be selected when
clicking on the Reload button, if a WSDL is provided.
• Content. Edit the WSDL parameters or XML content, depending on the mode selected.
114
Design
• Test. Provides a quick way to test the request. Clicking on "Check" creates a virtual user containing
the edited request, then launches the virtual user check.
Note
The "Advanced..." and "Check..." buttons provide the same features as for a standard
HTTP request, allowing the editing of HTTP headers, the creation of variable extractors and the
checking of contents.
When NeoLoad loads the WSDL file, it generates a default tree structure for the parameters and SOAP
headers. Optional parameters may be deleted and other parameters added if the WSDL description permits.
Parameters
The parameters tab allows the user to edit, delete or add parameters.
This value may be an actual value or a variable. Encoding allows special characters such as '>' and '<'
to be encoded. If the value is a variable, the "encode value" option may be cleared if the variable's
value is already encoded
115
Design
The value type displayed is the 'type' in the WSDL sense of the term, for example: {http://
www.w3.org/2001/XMLSchema}string. The user must ensure that the value type syntax is
adhered to.
# Elements of type "Sequence" contain other elements in a specific order and follow the cardinality
described in the WSDL. For example, the S sequence must contain between zero and three A
elements and at least one B element, in that order;
# Elements of type "All" contain other elements once, and only once, in an unspecified order;
# Elements of type "Choice" contain a single child element among the various child elements allowed.
The container element's restrictions are displayed for information purposes in the "Children"
section at the bottom of the container's edit pane.
To add an element to a container , either click on the '+' button, or right-click on the element, then
select "Add". In either case, the list of elements to be added is limited by the child elements allowed by
the WSDL. The element is automatically inserted in the appropriate place, among the other child elements
where an order constraint exists.
To delete an element from a container , either click on the '-' button, or right-click, then select
"Delete".
To move an element within a container , use the appropriate direction button, or right-click, then select
"Move up" or "Move down".
116
Design
Note
If a restriction imposed on the container by the WSDL is not complied with, an error icon is
added to the container's icon. An error message also appears in the "Child elements" section
of the appropriate container's edit panel.
The attributes section allows the user to edit the parameter's attributes. The permitted attributes are listed
in the table. The first column, "Use", allows the attribute to be added to the parameter. Entering a value
in the value column automatically adds the attribute to the parameter. It is not possible to add attributes
not intended by the WSDL.
Headers
This tab is used to configure the SOAP headers declared in the WSDL.
The specific SOAP Header section allows the user to define the SOAP protocol's "Actor" attribute.
Advanced
• encapsulation format for the binary attachments: MIME or DIME. As with the message style, this
parameter is extracted from the WSDL and should not normally be changed.
XML preview
This allows the user to preview the XML body of the request exactly as it will be generated. The preview
cannot be edited and only includes the XML body of the message (not the binary attachments, where
present).
Carry out a request validation to obtain a preview of the complete HTTP request.
117
Design
Flat XML
Tip
Right click or use 'Ctrl-F' to search.
XML Tree
This tab is used to edit the nodes of the XML tree using the open tree view. The variable picker in this
view makes it especially useful when using variables.
If a node value contains a variable, and this variable is already encoded, the option not to encode it
XML-wise is available. In this case, NeoLoad adds the attribute NeoLoad-encode="false" to the
corresponding node, visible in the XML text tab view. This additional attribute will be deleted during
the XML encoding phase of the test and will not be sent to the server.
Preview
This tab provides a read-only preview of the body of the request to be sent.
The variables are interpreted and the carriage returns deleted (see tip below).
Tip
The request has the carriage returns removed to make it more compact for the test. Right-click
and select "Format as pretty XML" to obtain a more readable presentation.
118
Design
SOAP 1.1 requires the presence of the SOAPAction HTTP request header. This header is automatically
added, with the appropriate value, when the WSDL is loaded, or recorded if the request is recorded.
Edit the request's HTTP headers to modify this value. To do this, click on the "Advanced..." button
and select the "Request header" tab .
NeoLoad creates a virtual user containing the single request, then displays the validation window for that
virtual user. Click on the Start check button.
The Details section provides details of the request sent and of the server's response, and access to the
assertion messages.
Tip
Right-click and select "Format as pretty XML" in the text field to obtain a more easily-
readable detail report for the sent request. Right-click and select "Find..." or use Ctrl-F
to search.
Recording
The diagram below shows how the Oracle Forms module functions during the recording:
119
Design
The binary data exchanged between the client and server transit via the Recording Proxy. It's during this
transit that the Oracle Forms module analyzes and decodes the requests. Once they've been translated into
XML, the requests are inserted in the project.
Execution
The diagram below shows how the Oracle Forms module functions when a test is run:
The variables in the XML request are calculated and the module's engine translates the XML into binary
data, which is then sent to the server. The binary response received is translated into XML, after which
the validations and variable extractors in the played request are executed.
Configuring NeoLoad
To record Oracle Forms requests, NeoLoad needs a JAR file, obtained from the Oracle 10g application
server. When recording an Oracle Forms request without this JAR file having been previously loaded,
NeoLoad displays a warning message.
If the Oracle server is part of the Oracle Applications Suite, open the
<oracle_applications_home>/tech_st/<version>/forms/java directory, where
<oracle_applications_home> is the Oracle Applications installation directory and
<version> is the server version. For example, for the VISION demo version of Oracle E-Business
R12, the directory would be: c:\oracle\VIS\apps\tech_st\10.1.2\forms\java.
6. Restart NeoLoad.
Note
This JAR file is automatically copied to each Load Generator when a scenario is launched.
120
Design
There are several ways to enable component naming, depending on the Oracle Forms server's set-up:
Procedure 6.5. Modify the Oracle Forms applet's baseHTML file (default:
basejini.htm)
1. Open the applet's baseHTML file (default: <Oracle Home>/forms/server/
basejini.htm).
4. Once modified, the line should look like this: <PARAM name="serverArgs"
VALUE="............%otherParams% record=names">
5. If there is more than one occurrence of the serverArgs parameter, repeat the above modification
for each occurrence.
Procedure 6.6. Modify the Web CGI configuration file (default: formsweb.cfg)
1. Open the Web CGI configuration file (default: <Oracle Home>/forms/server/
formsweb.cfg).
e. Once modified, the line should look like this: <PARAM name="serverArgs"
VALUE="............%otherParams% record=%xrecord%">
f. If there is more than one occurrence of the serverArgs parameter, repeat the above
modification for each occurrence.
121
Design
Procedure 6.7. Modify the user profile in the Oracle Applications suite
1. Once logged in as administrator to the Application Server Control Console, via the web browser,
click on the System Administrator link.
3. In the Find System Profile Values window, fill in the fields as follows:
b. Check the User check box, then fill in the name of the required user.
4. In the System Profile Values window, locate the line that refers to the profile ICX: Forms
Launcher, and insert the user value ?play=&record=names
6. Connect to the Oracle Forms application, always using the specially-configured user account.
• The JAR file containing the Oracle Forms applet must have been copied into NeoLoad.
• All running browser instances connected to an Oracle Forms application must be closed.
3. Copy the entire content of the file by right-clicking in the text, then selecting Select All, then
right-clicking again and selecting Copy.
122
Design
5. Paste the previously-copied content at the end of the file. The content must be added; be sure not to
delete anything in this file.
This procedure must be carried out in order to record SSL-secure Oracle Forms requests. NeoLoad does
not need to be restarted for these changes to take effect.
User interface
Editing a request in text mode
An XML module's editing pane allows the user to edit, and define variables for, the request's XML content.
This XML content is displayed in an enhanced text field with syntax highlighting.
If the request's XML content has been modified, the changes can be saved by clicking the "Apply" button.
If a problem is detected, an error message notifies you of the problem and the changes will not be applied.
If no problems are detected, the changes are applied.
The text field features an auto-complete function that makes entering variable names easier.
123
Design
You must click the "Apply" button to save any changes you make to the request.
Warning
Using a variable other than in an element's content (for example, to replace an XML node) will
use up a large amount of system resources.
124
Design
Validating a response in XML format is almost identical to the standard procedure. For information on
how to validate an HTTP request, see the documentation on validating an HTTP request.
You may define validations on the XML response using XPath. To recap, XPath is a syntax that points
to a portion of an XML document.
• For the entire response: these are standard validators that validate the response's content.
• For a particular XML node: these are validators that are specific to the XML modules. An XML node
can then be specified by selecting it in the dialog box that is displayed by clicking on the magnifying
glass next to the field.
This will create an XPath expression based on the selected XML node. You may edit the expression
manually, but you must make sure the XPath expression remains valid. The XPath expression may be
variabilized.
You will then return to the normal procedure, except that instead of carrying out the validation on the
entire server response, it will be done only on the part specified by the XPath expression.
1. Create a validator.
3. Click on the magnifying glass next to the text field below and select the XML node to be validated.
125
Design
4. Click "OK". The XPath expression for the selected node is displayed in the text field.
5. Select the text to be validated by clicking on the magnifying glass next to the text field below.
Warning
Response validations on XML nodes are resource-hungry operations. Only use this type of
validation if absolutely necessary.
The procedure for extracting variables in XML-format response is almost identical to the standard
procedure. For details on extracting variables in a standard HTTP request, see the section of the
documentation on extracting variables.
1. Create an extractor.
3. Click on the magnifying glass next to the text field, then select the XML node to be extracted.
4. Click "OK". The XPath expression for the selected node appears in the text field.
The following screen shots show the normal and advanced variable extraction modes. The red frames
highlight the parts that change in the case of an XML request.
• In normal mode:
126
Design
• In advanced mode:
127
Design
Warning
Extracting variables on an XML node are resource-hungry operations. Only use this type of
extraction if absolutely necessary.
• AMF0: This version is used in Flex applications written in ActionScript 1.0 and 2.0.
• AMF3: Adobe introduced this protocol, very similar to AMF0, from ActionScript 3.0 onwards. The
protocol allows the exchange of objects created by the application's developer between the client and
server.
Note
Managing AMF requests requires the purchase of the optional Adobe FLEX/AMF XML module.
This module is included in the demo version of NeoLoad.
Dependent libraries
128
Design
When recording AMF3 requests, depending on the server-side implementation, the Java classes of the
objects exchanged have to be declared in NeoLoad. See the documentation relating to managing AMF
libraries for more information.
Recording
The diagram below shows how the Adobe Flex/AMF module functions during the recording:
The binary data exchanged between the client and server transit via the recording proxy. It's during this
transit that the Adobe Flex/AMF module analyzes and decodes the requests. Once they've been translated
into XML, the requests are inserted in the project.
Execution
The diagram below shows how the Adobe Flex/AMF module functions when a test is run:
The variables in the XML request are calculated and the module's engine translates the XML into binary
data, which is then sent to the server. The binary response received is translated into XML, after which
the validity checks and variable extractors in the played request are executed.
AMF streaming
In addition to the standard request/response exchange, the AMF protocol also can be used in streaming.
In this case, the server is responsible for sending AMF packets to the connected client in real time.
NeoLoad natively handles Push technologies, including AMF streaming. For more information on the
Push technologies supported by NeoLoad, see the section called “Push Frameworks” and the section called
“AMF Streaming”. For more information on streaming, see the section called “Streaming Requests”.
129
Design
Lastly, an example can be viewed in the Adobe Flex/AMF: Handling polling and streaming tutorial.
Post-Recording Wizard
When the recording ends, the AMF libraries declaration panel is displayed if any Java classes are missing:
• Depending on the server-side implementation of the Adobe Flex/AMF application being tested, it may
be necessary to declare some AMF libraries to ensure the successful recording and playback of the AMF
requests. Please see the AMF libraries manager documentation for more information.
To declare the missing AMF Java libraries (XML and JAR files):
2. Select the XML and/or JAR files to be loaded, then click "Select". Repeat the operation as many
times as required.
3. A message confirms whether the declaration has been successful or not. Whenever an error occurs,
make sure that all the necessary AMF Java libraries have been declared.
Once all the necessary libraries have been declared, the following screen is displayed:
130
Design
Declaring the AMF Java libraries at the end of the recording must be done to ensure successful playback
of all the recorded requests.
• Declaring AMF Java libraries is done in the project's AMF library manager, which can be accessed
through the project preferences.
The AMF requests that are missing an AMF Java library are identified by a warning symbol:
Importing the SSL certificate tells the browser's Adobe Flash plug-in that the NeoLoad recording proxy
can be trusted.
• on recording: When the browser asks you to accept the certificate, it often gives you the option of
importing it.
131
Design
This simple procedure is unique to each browser. This is the procedure for importing the NeoLoad
certificate in Internet Explorer:
1. Open Internet Explorer > Tools > Internet Options > Content >
Certificates.
5. Internet Explorer should notify you that the certificate has been successfully imported.
For other browsers, see the relevant documentation for details on importing certificates.
Prerequisites
The application must communicate with the remote server using the HTTP protocol.
5. Check the "Use a proxy server for your LAN...". If proxy settings already exist, see
the section called “Proxy Settings”
6. Click on the "Advanced" button and set the proxy ("localhost" : "8090" by default). For more details,
see the section called “Manually configuring the recording proxy settings”
The following procedure describes how to configure the proxy settings on a Windows machine that does
not have Internet Explorer installed.
132
Design
2. Click "Control panel" > "Network and Internet Connections" > "Internet
Options".
3. Then follow steps 3 through 6 in the Configuring the proxy settings using Internet Explorer procedure.
Once the proxy settings have been configured correctly, continue as follows:
Procedure 6.11. Recording the Adobe AIR application's HTTP requests once the
proxy is configured
1. Launch NeoLoad.
2. Make sure the previously-configured proxy setting match those in "Edit" > "Preferences" >
"Global Settings" > "HTTP Recorder".
4. Un-check the "Launch browser..." check box, then click "OK" to start recording
5. Launch the Adobe AIR application and record the actions you require.
6. Stop the recording. The recorded virtual user contains the HTTP requests sent by the Adobe AIR
application.
Note
The original proxy settings must be restored manually.
• clientId
• messageId
• DSId
• responseURI
Note
The clientId and DSId can be handled manually by replacing their values with a variable.
User interface
Editing a request in text mode
An XML module's editing pane allows the user to edit, and define variables for, the request's XML content.
This XML content is displayed in an enhanced text field with syntax highlighting.
133
Design
If the request's XML content has been modified, the changes can be saved by clicking the "Apply" button.
If a problem is detected, an error message notifies you of the problem and the changes will not be applied.
If no problems are detected, the changes are applied.
The text field features an auto-complete function that makes entering variable names easier.
134
Design
You must click the "Apply" button to save any changes you make to the request.
You may use NeoLoad variables in a request's XML content. To do this, you need to use the expression
${VariableName}, which NeoLoad will replace with the value during the test. All the elements in the
XML request may be variabilized.
Warning
Using a variable other than in an element's content (for example, to replace an XML node) will
use up a large amount of system resources.
Validating a response in XML format is almost identical to the standard procedure. For information on
how to validate an HTTP request, see the documentation on validating an HTTP request.
You may define validations on the XML response using XPath. To recap, XPath is a syntax that points
to a portion of an XML document.
135
Design
• For the entire response: these are standard validators that validate the response's content.
• For a particular XML node: these are validators that are specific to the XML modules. An XML node
can then be specified by selecting it in the dialog box that is displayed by clicking on the magnifying
glass next to the field.
This will create an XPath expression based on the selected XML node. You may edit the expression
manually, but you must make sure the XPath expression remains valid. The XPath expression may be
variabilized.
You will then return to the normal procedure, except that instead of carrying out the validation on the
entire server response, it will be done only on the part specified by the XPath expression.
1. Create a validator.
3. Click on the magnifying glass next to the text field below and select the XML node to be validated.
4. Click "OK". The XPath expression for the selected node is displayed in the text field.
5. Select the text to be validated by clicking on the magnifying glass next to the text field below.
Warning
Response validations on XML nodes are resource-hungry operations. Only use this type of
validation if absolutely necessary.
136
Design
1. Create an extractor.
3. Click on the magnifying glass next to the text field, then select the XML node to be extracted.
4. Click "OK". The XPath expression for the selected node appears in the text field.
The following screen shots show the normal and advanced variable extraction modes. The red frames
highlight the parts that change in the case of an XML request.
• In normal mode:
• In advanced mode:
137
Design
Warning
Extracting variables on an XML node are resource-hungry operations. Only use this type of
extraction if absolutely necessary.
• RTMP, the basic data transfer protocol that works on top of TCP/IP;
• RTMPE, RTMP protocol encrypted using proprietary Adobe algorithms. This protocol is not supported
by NeoLoad.
Note
To be able to handle RTMP requests, you will need to purchase the optional Adobe RTMP and
Adobe AMF modules. These modules are included in the demo version of NeoLoad.
138
Design
Warning
Recording a RTMP application in NeoLoad is subject to certain limitations. See the recording
limitations for more information.
Dependent libraries
When recording RTMP-type requests, you will need to load the Java classes for the objects exchanged.
For more information, see the documentation on managing RTMP libraries.
Recording
The following diagram shows how the Adobe RTMP module works during recording:
The RTMP data exchanged between the client and server is captured by NeoLoad. The Adobe RTMP
module comes into play, analyzing and decoding the requests. Once translated into XML, the requests are
inserted in the project.
Runtime
The following diagram shows how the Adobe RTMP module works during a test run:
The XML request's variables are evaluated and the module's engine translates the XML to binary data.
This data is then sent to the server. The binary response received is translated into XML and the validity
checks and variable extractors of the played request are executed.
139
Design
RTMP channel
RTMP channels are requests with special characteristics:
• The client does not send any requests, the channel being created upon connecting to the server.
The way these requests behave has an impact on the virtual user's design:
• the RTMP channel's activity is suspended pending the next server response, that is to say it prevents the
virtual user continuing its execution thread as long as the response has not been received.
• Each time a response is received, the variable extractors and assertions placed on the request are
executed.
At the end of recording, NeoLoad detects the presence of the RTMP channel and offers to create a new
version of the virtual user. This is an example of a virtual user created with an RTMP channel:
The RTMPChannel_1 logical action is used to execute the RTMP channel in a secondary execution
channel in the virtual user. For more information, see the documentation on the Fork logical action.
NeoLoad natively handles Push technologies, including RTMP. For more details on the Push technologies
supported by NeoLoad, refer to the section called “Push Frameworks” and the section called “RTMP”.
For more details on streaming, see the section called “Streaming Requests”.
Post-Recording Wizard
At the end of recording, the JAR declaration panel is displayed if any externalizable objects have missing
Java classes:
140
Design
• Externalizable objects (which extend java.io.Externalizable in Java) are objects that are
responsible for saving and restoring the contents of their instances themselves.
• All the classes for the externalizable objects sent must be loaded.
• This panel only displays part of the missing classes; not all the missing classes can be resolved.
To declare the missing Java RTMP libraries (JAR files), follow this procedure:
2. Select the JAR files to be loaded, then click "Select". Repeat the operation as many times as is
necessary.
3. A message confirms the declaration. If the operation fails, make sure that all the required Java RTMP
libraries have been declared.
When the libraries have been successfully declared, the following screen appears:
141
Design
Declaring the Java RTMP libraries at the end of recording is a compulsory step if all the requests are to
be played back.
• Declaring Java RTMP libraries is carried out in the project's RTMP libraries manager in the project
preferences.
RTMP requests with missing Java RTMP libraries are identified by a small "Warning" symbol:
NeoLoad then offers to create a modified virtual user. This step is necessary because the virtual user cannot
be simulated in its present state. For more details on the modifications NeoLoad automatically proposes,
see the section called “RTMP”
142
Design
The NeoLoad SSL certificate must be imported into the browser in order to record SSL-secure Adobe
RTMP requests. The Adobe Flash plug-in checks the browser's certificates and decides whether or not to
authorize the Flash application to communicate with the server.
Importing the SSL certificate instructs the browser's Adobe Flash plug-in to trust the NeoLoad recording
proxy (Trusted).
• on recording: when the browser asks you to accept the certificate, it also asks you if you want to import it;
This procedure is specific to each browser. This is the procedure for importing the NeoLoad certificate
in Internet Explorer:
1. Open "Internet Explorer > Tools > Internet Options > Content >
Certificates".
5. Internet Explorer should confirm that the certificate has been successfully imported.
For other browsers, refer to the documentation provided with the browser to find out how to import a
certificate.
• clientId
• messageId
• DSId
• responseURI
Note
The clientId and DSId can be handled manually by replacing their values with a variable.
User interface
Editing a request in text mode
An XML module's editing pane allows the user to edit, and define variables for, the request's XML content.
This XML content is displayed in an enhanced text field with syntax highlighting.
143
Design
If the request's XML content has been modified, the changes can be saved by clicking the "Apply" button.
If a problem is detected, an error message notifies you of the problem and the changes will not be applied.
If no problems are detected, the changes are applied.
The text field features an auto-complete function that makes entering variable names easier.
144
Design
To access the advanced XML editor, select a request, then click the "Advanced XML editor..."
button. This is the same editor as the one used for the SOAP module. For more information on how it
works, see Editing a SOAP Request.
You must click the "Apply" button to save any changes you make to the request.
You may use NeoLoad variables in a request's XML content. To do this, you need to use the expression
${VariableName}, which NeoLoad will replace with the value during the test. All the elements in the
XML request may be variabilized.
Warning
Using a variable other than in an element's content (for example, to replace an XML node) will
use up a large amount of system resources.
Validating a response in XML format is almost identical to the standard procedure. For information on
how to validate an HTTP request, see the documentation on validating an HTTP request.
You may define validations on the XML response using XPath. To recap, XPath is a syntax that points
to a portion of an XML document.
145
Design
• For the entire response: these are standard validators that validate the response's content.
• For a particular XML node: these are validators that are specific to the XML modules. An XML node
can then be specified by selecting it in the dialog box that is displayed by clicking on the magnifying
glass next to the field.
This will create an XPath expression based on the selected XML node. You may edit the expression
manually, but you must make sure the XPath expression remains valid. The XPath expression may be
variabilized.
You will then return to the normal procedure, except that instead of carrying out the validation on the
entire server response, it will be done only on the part specified by the XPath expression.
1. Create a validator.
3. Click on the magnifying glass next to the text field below and select the XML node to be validated.
4. Click "OK". The XPath expression for the selected node is displayed in the text field.
5. Select the text to be validated by clicking on the magnifying glass next to the text field below.
Warning
Response validations on XML nodes are resource-hungry operations. Only use this type of
validation if absolutely necessary.
146
Design
1. Create an extractor.
3. Click on the magnifying glass next to the text field, then select the XML node to be extracted.
4. Click "OK". The XPath expression for the selected node appears in the text field.
The following screen shots show the normal and advanced variable extraction modes. The red frames
highlight the parts that change in the case of an XML request.
• In normal mode:
• In advanced mode:
147
Design
Warning
Extracting variables on an XML node are resource-hungry operations. Only use this type of
extraction if absolutely necessary.
The GWT (Google Web Toolkit) module allows you to load test applications programmed with the GWT
framework and using the GWT-RPC protocol.
Note
To be able to handle GWT requests, you will need to purchase the optional Google Web Toolkit
module. This module is included in the demo version of NeoLoad.
Dependant libraries
When recording GWT-type requests, you need to load the Java classes for the objects being exchanged,
as well as the client interfaces for the called services. For more information, see the documentation on
managing GWT libraries.
Recording
148
Design
The following diagram shows how the Google Web Toolkit module works during the recording:
The binary data exchanged between the client and server pass through the recording proxy. The Google
Web Toolkit module comes into play as the data travels through the proxy, analyzing and decoding the
requests. Once translated into XML, the requests are inserted in the project.
Execution
The following diagram shows how the Google Web Toolkit module works during a test run:
The XML request's variables are evaluated and the module's engine translates the XML to binary data.
This data is then sent to the server. The binary response received is translated into XML and the validations
and variable extractors of the played request are executed.
Post-recording wizard
When the recording is finished, and if there are Java classes missing, the JAR declaration pane is displayed:
149
Design
• You need to load the Java classes for the objects being exchanged, as well as the client interfaces for
the called services.
• This pane only displays part of the missing classes; not all the missing classes can be resolved.
To declare the missing GWT Java libraries (JAR files), follow this procedure:
2. Select the JAR files to be loaded, then click "Select". Repeat the operation as many times as is
necessary.
3. A message confirms the declaration. If the operation fails, make sure that all the required GWT Java
libraries have been declared.
Declaring the GWT Java libraries at the end of recording is a compulsory step if all the requests are to
be played back.
150
Design
• Declaring GWT libraries is carried out in the project's GWT libraries manager in the project preferences.
GWT requests with missing GWT Java libraries are identified by a small "Warning" symbol:
User interface
Editing a request in text mode
An XML module's editing pane allows the user to edit, and define variables for, the request's XML content.
This XML content is displayed in an enhanced text field with syntax highlighting.
If the request's XML content has been modified, the changes can be saved by clicking the "Apply" button.
If a problem is detected, an error message notifies you of the problem and the changes will not be applied.
If no problems are detected, the changes are applied.
The text field features an auto-complete function that makes entering variable names easier.
151
Design
You must click the "Apply" button to save any changes you make to the request.
Warning
Using a variable other than in an element's content (for example, to replace an XML node) will
use up a large amount of system resources.
152
Design
Validating a response in XML format is almost identical to the standard procedure. For information on
how to validate an HTTP request, see the documentation on validating an HTTP request.
You may define validations on the XML response using XPath. To recap, XPath is a syntax that points
to a portion of an XML document.
• For the entire response: these are standard validators that validate the response's content.
• For a particular XML node: these are validators that are specific to the XML modules. An XML node
can then be specified by selecting it in the dialog box that is displayed by clicking on the magnifying
glass next to the field.
This will create an XPath expression based on the selected XML node. You may edit the expression
manually, but you must make sure the XPath expression remains valid. The XPath expression may be
variabilized.
You will then return to the normal procedure, except that instead of carrying out the validation on the
entire server response, it will be done only on the part specified by the XPath expression.
1. Create a validator.
3. Click on the magnifying glass next to the text field below and select the XML node to be validated.
153
Design
4. Click "OK". The XPath expression for the selected node is displayed in the text field.
5. Select the text to be validated by clicking on the magnifying glass next to the text field below.
Warning
Response validations on XML nodes are resource-hungry operations. Only use this type of
validation if absolutely necessary.
The procedure for extracting variables in XML-format response is almost identical to the standard
procedure. For details on extracting variables in a standard HTTP request, see the section of the
documentation on extracting variables.
1. Create an extractor.
3. Click on the magnifying glass next to the text field, then select the XML node to be extracted.
4. Click "OK". The XPath expression for the selected node appears in the text field.
The following screen shots show the normal and advanced variable extraction modes. The red frames
highlight the parts that change in the case of an XML request.
• In normal mode:
154
Design
• In advanced mode:
155
Design
Warning
Extracting variables on an XML node are resource-hungry operations. Only use this type of
extraction if absolutely necessary.
The Java Serialization module allows you to load test web applications programmed in Java and using
specific frameworks such as Spring Remoting (Spring's HTTP Invoker).
Note
To be able to handle Java Serialization requests, you will need to purchase the optional Java
Serialization module. This module is included in the demo version of NeoLoad.
Warning
RMI over HTTP is not supported.
Dependent libraries
156
Design
When recording Java Serialization requests, you will need to load the Java classes for the objects
exchanged, as well as the client interfaces for the called services. For more information, see the
documentation on managing Java Serialization libraries.
Recording
The following diagram shows how the Java Serialization module works during recording:
The binary data exchanged between the client and server passes through the recording proxy. The Java
Serialization module comes into play as the data travels through the proxy, analyzing and decoding the
requests. Once translated into XML, the requests are inserted in the project.
Important
Only requests with the "Content-Type: application/x-java-serialized-
object" header are recorded.
Runtime
The following diagram shows how the Java Serialization module works during a test run:
The XML request's variables are evaluated and the module's engine translates the XML to binary data.
This data is then sent to the server. The binary response received is translated into XML, after which the
validity checks and variable extractors in the played request are executed.
157
Design
• hostname: host name or IP address of the machine with the running NeoLoad controller.
• port: the HTTP recording port used by NeoLoad, default is 8090. This setting may be changed
in NeoLoad's preferences.
a. For a Java applet application: No modifications are required to record Java Serialization
requests.
ii. Select the General tab, then click on the Network settings button.
iii. Select Use proxy server and set the machine name as localhost and the NeoLoad
proxy port (default is 8090)
iv. Validate these settings and re-start your Java application before making a new recording.
System.setProperty("http.proxyHost", "localhost");
System.setProperty("http.proxyPort", "8090");
2. Launch NeoLoad
3. Begin a recording (see the section called “Recording a Test Scenario”). Since a standalone Java
application doesn't require a browser, we recommend you clear the "Launch browser" check box.
4. Launch the Java client. If everything is working correctly, the HTTP requests sent by the Java
application should be visible in NeoLoad.
5. Stop recording.
Post-Recording Wizard
At the end of recording, the JAR declaration panel is displayed if any Java classes or JAR files are missing:
158
Design
• All the classes for the Java objects exchanged between the client and server, as well as the JARs for the
framework used to transport the customized Java objects must be loaded.
• This panel only displays part of the missing classes; not all the missing classes can be resolved.
To declare the missing Java Serialization libraries (JAR files), follow this procedure:
2. Select the JAR files to be loaded, then click "Select". Repeat the operation as many times as is
necessary.
3. A message confirms the declaration. If the operation fails, make sure that all the required Java
Serialization libraries have been declared.
When the libraries have been successfully declared, the following screen appears:
159
Design
Declaring the Java Serialization libraries at the end of recording is a compulsory step if all the requests
are to be played back.
• Declaring Java Serialization libraries is carried out in the project's Java Serialization libraries manager
in the project preferences.
Java Serialization requests with missing Java Serialization libraries are identified by a small "Warning"
symbol:
User interface
Editing a request in text mode
An XML module's editing pane allows the user to edit, and define variables for, the request's XML content.
This XML content is displayed in an enhanced text field with syntax highlighting.
160
Design
If the request's XML content has been modified, the changes can be saved by clicking the "Apply" button.
If a problem is detected, an error message notifies you of the problem and the changes will not be applied.
If no problems are detected, the changes are applied.
The text field features an auto-complete function that makes entering variable names easier.
161
Design
You must click the "Apply" button to save any changes you make to the request.
You may use NeoLoad variables in a request's XML content. To do this, you need to use the expression
${VariableName}, which NeoLoad will replace with the value during the test. All the elements in the
XML request may be variabilized.
Warning
Using a variable other than in an element's content (for example, to replace an XML node) will
use up a large amount of system resources.
Validating a response in XML format is almost identical to the standard procedure. For information on
how to validate an HTTP request, see the documentation on validating an HTTP request.
You may define validations on the XML response using XPath. To recap, XPath is a syntax that points
to a portion of an XML document.
162
Design
• For the entire response: these are standard validators that validate the response's content.
• For a particular XML node: these are validators that are specific to the XML modules. An XML node
can then be specified by selecting it in the dialog box that is displayed by clicking on the magnifying
glass next to the field.
This will create an XPath expression based on the selected XML node. You may edit the expression
manually, but you must make sure the XPath expression remains valid. The XPath expression may be
variabilized.
You will then return to the normal procedure, except that instead of carrying out the validation on the
entire server response, it will be done only on the part specified by the XPath expression.
1. Create a validator.
3. Click on the magnifying glass next to the text field below and select the XML node to be validated.
4. Click "OK". The XPath expression for the selected node is displayed in the text field.
5. Select the text to be validated by clicking on the magnifying glass next to the text field below.
Warning
Response validations on XML nodes are resource-hungry operations. Only use this type of
validation if absolutely necessary.
163
Design
1. Create an extractor.
3. Click on the magnifying glass next to the text field, then select the XML node to be extracted.
4. Click "OK". The XPath expression for the selected node appears in the text field.
The following screen shots show the normal and advanced variable extraction modes. The red frames
highlight the parts that change in the case of an XML request.
• In normal mode:
• In advanced mode:
164
Design
Warning
Extracting variables on an XML node are resource-hungry operations. Only use this type of
extraction if absolutely necessary.
Polling Requests
Overview
Polling is a mechanism used by the Push technology whereby a request is sent by the client to the server
at regular intervals. In return, the server updates the status of each connected client. Between two polling
requests, the server stores the updates sent to the client in its memory until the next polling request is
received.
NeoLoad uses a special request to represent a polling request in virtual user profiles.
Note
Using polling requires the "Push" module, which is licensed.
165
Design
• is a multi-response request
Multi-response request
At the end of recording using a Push framework, NeoLoad creates a copy of the recorded virtual user.
This copy is modified so that the polling requests can be handled correctly (see the section called
“Push Frameworks”). A single, special request replaces all the polling requests captured in the recording
containing all the responses received for each polling request. In a polling request's "Advanced" section,
the "Recorded response" tab shows a list of all the responses received.
This list allows you to view all the responses received. When a response is selected, its content is displayed
on the right. The search field allows you to search for text contained in the responses. When the search
text is entered, the response list is filtered to leave only those responses containing the searched-for text.
Furthermore, each occurrence of the text is underlined; the next / previous buttons allow you to browse
the occurrences.
For more details on Push message handling, see the section called “Push Messages”.
166
Design
For more details on calculating Push message response times, see the section called “Push message
response times”.
You may create a polling request manually in the interface by right-clicking on a request container and
selecting Insert as child / Push Action / <Framework> request .
167
Design
Streaming Requests
Overview
Streaming is a mechanism used by the Push technology whereby a blocking request is sent by the client to
the server. In other words, the client never completely finishes reading the server's response to the request,
the server sending back several separate response messages in the same response flow.
NeoLoad uses a special request to represent a streaming request in virtual user profiles.
Note
Using streaming requires the "Push" module, which is licensed.
• is a blocking request
• is a multi-response request
• is a Push message container
• contains a rule to calculate the response time
Holding request
By default, a streaming request blocks the connection until the server closes the socket. You may
also define the stop conditions for streaming. When the stop conditions are fulfilled, NeoLoad closes the
streaming connection and moves on to the next action.
168
Design
Multi-response request
By definition, a streaming request contains a number of server responses. The browser issues a single
request and, in return, receives several updates. In the streaming request's Advanced section, the
Recorded response tab shows a list of all the responses received.
169
Design
This list allows you to view all the responses received. When a response is selected, its content is displayed
on the right. The search field allows you to search for text contained in the responses. When the search
text is entered, the response list is filtered to leave only those responses containing the searched-for text.
Furthermore, each occurrence of the text is underlined; the next / previous buttons allow you to browse
the occurrences.
During playback, the variable extractors and assertions placed on this request are executed for each
response received.
For more details on handling Push messages, see the section called “Push Messages”.
For more details on calculating Push message response times, see the section called “Push message
response times”.
170
Design
You may create a streaming request manually in the interface by right-clicking on a request container and
selecting Insert as child / Push Action / <Framework> request .
171
Design
Push Messages
Overview
Using Push technologies (polling and streaming) with NeoLoad requires an optional module (Push
module).
When using a Push framework (see the section called “Push Frameworks”), all the application's updates
are carried out via the Push channel, whether by polling or streaming. NeoLoad provides a mechanism to
simplify the creation of user profiles so that certain actions are carried out according to the type of response
received via the Push channel. Each type of response configured in NeoLoad is called a Push message.
172
Design
A Push message is a container of actions that defines actions or transactions to be executed when the
message is received.
A message is defined by the list of conditions that must be fulfilled for it to be executed. When a server
response is received via the Push channel, NeoLoad applies the message rules that have been defined and
executes the messages for which the conditions are fulfilled.
• Classname
This option is only available for XML (AMF, RTMP, RTMPT) -type Push frameworks. The message
executes if a response object is of the specified class's type. Where the response object is a table or
collection, NeoLoad checks each of the top-level children.
Where the object is a container recognized by the framework, the algorithm is applied on the contained
object and not on the envelope.
• Default
173
Design
The message executes if no other message has been executed for the response. A default message is not
compulsory in a Push request definition. If several default messages are defined for a same request, they
will all be executed if no other message fulfills the conditions.
• Conditions
A condition comprises two operands and an operator. The operators are as follows:
# is not equal to - true if the 2 operands do not have the same value
# starts with - true if operand1 starts with operand2, including where the 2 operands are equal.
# does not start with - true if operand1 does not start with operand2.
# ends with - true if operand1 ends with operand2, including where the 2 operands are equal.
# does not end with - true if operand1 does not end with operand2.
# matches the regular expression - true if operand1 matches the regular expression for
operand2.
# does not match the regular expression - true if operand1 does not match the regular
expression for operand2.
# is greater than or equal to - true if operand1 is greater than, or equal to, operand2.
# is lesser than or equal to - true if operand1 is lesser than, or equal to, operand2.
# exists - true if operand one is the name of a variable that does not have a nil value. Operand2
cannot be defined.
Each operand may be either a ${variableName} variable or a static string. In the case of the
exists operator, operand1 can only be a variableName variable name.
Several conditions may be used in a Push message. To add a condition, click on the "+" button under
the conditions table. You then need to configure whether the action is executed if all the conditions are
174
Design
true ("Match any of the following"), or if at least one of the conditions is true ("Match
all of the following").
In the following case for example, the profile carries out a new subscription upon receiving a message of
the type flex.samples.marketdata.Stock.
Note
Since the Push message is executed in the same execution thread as the Push request, we
recommend placing all the actions for a message in a fork action to avoid interfering with the
polling or streaming request's execution.
NeoLoad calculates the response time using a timestamp embedded in the server response. Depending on
the framework being used, the timestamp extraction needs to be configured manually.
Important
For the response times for Push message to be coherent, the load generators' and application
server's system clocks need to be synchronized.
175
Design
in order to retrieve this information. Once the timestamp has been embedded in the server responses, you
need to configure its extraction method in the Push request definition's advanced parameters. To extract
the timestamp, NeoLoad offers to define a regular expression for extraction and a value template to be
able to isolate the timestamp.
Regular expression used to extract the value: The regular expression must contain parentheses around
the parts to be extracted (valid example: timestamp="(\d+?)", invalid example: timestamp="\d
+?"). Refer to the Regular Expressions Guide for help on this subject.
Template used to construct the value: This is an arbitrary string with specific elements that refer to the
groups within the regular expression (a group is a dynamic portion of the regular expression, set between
parentheses): $0$ refers to the entire text matching the expression, $1$ refers to group 1, $2$ refers to
group 2, etc. Using an illegal group identifier will prevent extraction; this can happen, for example, when
parentheses are missing in the regular expression to be matched.
Advanced parameters
Variable extractors
A variable extractor set on a message works in exactly the same way as a variable extractor set on a response
to a request (see the section called “Variable Extractors”). The only difference is that you may select
176
Design
the response on which the extraction attempt will be carried out. Clicking on the response name opens
the response picker. In the picker, only those responses that fulfill the message condition are available.
Selecting a new response will cause the test value to be calculated using that response.
Validation
As with a request, an assertion can be set to validate a message. (see the section called “Validation”).
When configuring a content validation, the picker allows you to choose the message to work on to define
the assertion. In the picker, only those responses that fulfill the message condition are available.
177
Design
Validation
Allows you to add assertions to the server responses to check their validity. The validity of the content
returned by the server may be checked using the following criteria: delay, page size or page content.
Note
Validation cannot be applied to failed requests ( HTTP error, network error...).
178
Design
Duration
Specifies the maximum delay tolerated in ms.
Content length
Defines the exact, minimum and maximum sizes of the server response's body. HTTP header lengths are
disregarded. The default length is the length of the server response's content at the time of recording.
"Greater than" denotes greater than or equal to; "Lower than" denotes smaller than or equal to.
Reply content
Checks whether or not the server response contains a certain content. The server response is considered
valid if all the content conditions are satisfied.
Depending on the type of HTTP response, the validation can be based on:
• the response as a whole: the validation check will be carried out on the HTTP responses headers and
body. This is the default option.
• a particular node: the validation check will be carried out on one of the nodes in the response body.
This node is defined using an XPath expression. This option is only used for XML and HTML responses,
as well as for SOAP, GWT, Adobe Flex/AMF, Oracle Forms, Java Serialization and RTMP responses.
• contains: checks if the body of the server response contains the specified text (example: "<span
class="welcome">Welcome</span>").
• contains regular expression: checks if the body of the server response contains the specified regular
expression (example: "<span class="welcome">Welcome \w+ \w+ </span>").
Please refer to the Regular Expressions Guide for help on regular expressions.
Variable Extractors
A variable extractor extracts a string from the server's response to the request and assigns the string to a
variable. The variable extractor features two operating modes, simple and advanced. In simple mode, the
user defines the string to be extracted; in advanced mode, the user can define more complex extractions
using regular expressions.
179
Design
# Variable name. The name of the variable automatically created to contain the value extracted.
# Extract the value from. Extract the value from either the body, the headers of the server response
or the content of a NeoLoad variable. Extracting a variable from the content of another variable,
allows you to extract a content in several steps. First extract a part of the response based on a regular
expression, then use another regular expression to extract a part of that.
Note
The extractors are ordered and executed in the order they are defined. You can re-order the
extractors using the arrow buttons.
Extracting using an XPath expression is only available for HTML and XML responses, as
well as for SOAP, GWT, Adobe Flex/AMF, Oracle Forms, Java Serialization and RTMP
responses.
# Starts with. The phrase in the server response appearing immediately before the value to be
extracted.
# Followed by. The definition of the string's main body. The extracted string is the concatenation
of all the parts selected for extraction.
# Ends with. The phrase in the server response appearing immediately after the value to be extracted.
180
Design
# Occurrence to extract in the page. If the definition is matched more than once, select the
occurrence to be used. The default value is 1 (use the first occurrence) but you can choose to use a
random occurrence or all occurrences (useful with loops).
If you choose to process all the matched occurrences, the following variables are automatically
created:
# <VariableName>_matchNr - the number of occurrences found; can be 0.
# <VariableName>_n, where n = 1,2,3 etc - the strings as generated by the value template.
# <VariableName>_n_gm, where m=0,1,2 - the groups matching n
# <VariableName> - always attached to the default value
# <VariableName>_rand, random string from generated strings
# <VariableName>_rand_gm, where m=0,1,2 - the groups matching rand
# Value is HTML encoded. When this option is checked, the value will be decoded before being
placed in the variable. If the string extracted from the server response is start&end, the value
in the NeoLoad variable will be start&end if the option is checked, and start&end if the
option is checked.
Note
When switching to advanced mode, the definition is automatically converted from simple
to advanced.
# Stop extraction at first successful extraction. When this option is checked, the variable extractor
will stop its execution once the first extraction has been completed. This behavior is local to each
virtual user.
• Definition (Advanced mode). Extraction is carried out on the server response using a regular
expression.
# Variable name. The name of the variable automatically created to contain the value extracted.
181
Design
# Extract the value from. Extract the value from either the body of the server response, XML nodes
using XPath expression, the headers of the server response or the content of a NeoLoad variable.
Extracting a variable from the content of another variable, allows you to extract a content in several
steps. First extract a part of the response based on a regular expression, then use another regular
expression to extract a part of it.
Note
The extractors are ordered and executed in the order they are defined. You can re-order the
extractors using the arrow buttons.
Extracting using an XPath expression is only available for HTML and XML responses, as
well as for SOAP, GWT, Adobe Flex/AMF, Oracle Forms, Java Serialization and RTMP
responses.
# Regular expression to match. The regular expression used to extract the value. Within the
expression, the parts to be extracted must be enclosed in brackets (valid: value="(.+?)", invalid:
value=".+?"). Please refer to the Regular Expressions Guide for help on regular expressions.
# Occurrence to extract in the page. If the definition is matched more than once, select the
occurrence to be used. The default value is 1 (use the first occurrence) but you can choose to use a
random occurrence or all occurrences (useful with loops).
If you choose to process all the matched occurrences, the following variables are automatically
created:
# <VariableName>_matchNr - the number of occurrences found; can be 0.
# <VariableName>_n, where n = 1,2,3 etc - the strings as generated by the value template.
# <VariableName>_n_gm, where m=0,1,2 - the groups matching n
# <VariableName> - always attached to the default value
# <VariableName>_rand, random string from generated strings
# <VariableName>_rand_gm, where m=0,1,2 - the groups matching rand
# Value template. The template used to construct the value. This is an arbitrary string containing
special elements that refer to groups within the regular expression (a group is a dynamic portion of
the regular expression set within brackets): $0$ refers to the entire text matching the expression, $1$
refers to group 1, $2$ refers to group 2, and so on. Using an illegal group will cause the extraction to
fail and the value <NL-Illegal-groupIndex> will be set in the variable during the test. This
typically arises when no brackets are specified in the regular expression to be matched.
# Value is HTML encoded. When this option is checked, the value will be decoded before being
placed in the variable. If the string extracted from the server response is start&end, the value
in the NeoLoad variable will be start&end if the option is checked, and start&end if the
option is checked.
Note
When switching to simple mode, the last simple definition is used, since advanced-simple
conversion is impossible.
Examples
# Extracting from the server response body. Given the following content: Your order number
Mr Smith is:12345; and that the string to be extracted is '12345', to be used in a subsequent
request.
# Value template: '$2$' as it's the order number that must be extracted and not the name of the person.
# Use $1$ to obtain the name. ($0$ would return the complete matched text: 'Your order number
Mr Smith is:12345;')
# Extracting from the server response header: The variable extractor is defined thus:
# Value template:'$1$'
• Test. This tab allows you to test the variable extractor. Enter the text corresponding to the server
response in the text box. The "value extracted from page" field value contains the value
extracted from the page.
183
Design
• Errors. This panel allows you to specify the action to take if the definition is not matched in the
server response. Two choices are available:
# Treat as an assertion failure, thus causing the request to be error-flagged in the test results.
• Response content. The server response's content. Only the text content (text/html, text/xml, ...) is
available.
184
Design
Advanced Parameters
• Request headers. HTTP request headers. Existing headers may be edited or deleted or new headers
added. A variable may be used as a header value.
• Advanced settings.
# Request parameters. Specifies whether or not a sent request should include an equals character
after the parameter name if its value is empty (e.g.: a request may be sent as /page.jsp?
myparam= rather than /page.jsp?myparam).
# Advanced definition. Allows you to configure the referrer of the current request. The referrer is
the request containing the link to the current request. By default, the referrer is set during the recording
phase. You may alter the referrer by clicking on the "Change referrer" button. When altering
the referrer, make sure that the new referrer's request call precedes the current request's call in the
virtual user definition.
In this case, NeoLoad fetches the link or form definition in the server's response to the referrer.
# a redirect
In this case, NeoLoad fetches the value of the Location header in the server's response to the
referrer.
185
Design
# Form charset. Denotes the charset used to encode the form parameters (UTF-8, ISO-8859-1, ...).
By default, NeoLoad uses an algorithm similar to the one used by web browsers to determine which
charset to use: NeoLoad uses the charset of the HTML page containing the form. If the charset is not
found, "ISO-8859-1" is used.
Do not confuse this charset, used to convert characters into bytes, with plain URL Character
Encoding, which converts, for example, the space character into %20. Specifically, URL Character
Encoding differs according to the charset used.
# Timestamp extractor. Used for certain Push requests (polling or streaming). For more details, see
the section called “Push message response times”
# Streaming stop conditions. Used for certain Push requests (streaming only). For more details, see
the section called “Streaming Requests”
• Variable extractors. Extracts a string from the server's response to this request and assigns the string
to a variable. See the section called “Variable Extractors”
• Recorded request. The request content that was recorded when recording the scenario.
• Recorded response. The response content that was returned by the server when recording the
scenario.
Shortcuts
You can use shortcuts from the Virtual User Profiles tree to quickly and easily access the requests and
pages in the current test results or in the Virtual User validation pane.
Note that the shortcut will only work if the Check Virtual User feature has been used or if the scenario
containing the request or page has been previously played in the project.
1. In the tree, right-click on the node for the selected request or page.
• Select in validation window: selects the virtual user and the request in the validation
window. If the user hasn't yet been validated, its scenario is greyed out.
• Select in results pane: selects the request, page or container in the "Values" tab in the
"Results" section. If the current request does not appear in the results, a pop-up window warns
that the request could not be found.
186
Design
Logical Actions
NeoLoad provides a number of logical actions that can be used to add, for example, delays, loops and
containers to virtual users, to create more complex scenarios.
Delay
This action pauses the virtual user for a specified duration. The delay is expressed in milliseconds and may
be set as a NeoLoad variable (useful for random delays).
Loop
Used to iterate various items such as pages, the number of iterations being defined by the user. This number
may be a variable, in which case the variable will be evaluated once only, before the first iteration.
A variable named <MyLoopName>_counter is created within the loop containing the current iteration
number. This value starts at 1, for the first iteration, and is incremented by 1 at each next iteration.
187
Design
Note
Loop -type logical actions may be shared among several virtual users. See the documentation
on shared elements for more details.
While
The while action allows various items, such as web pages, to be iterated while a condition remains false.
A condition is composed of two operands and an operator. The operators are:
• Doesn't equal - true if the 2 operands do not have the same value
• Starts with - true if operand1 begins with operand2, including if the 2 operands are equal.
• Doesn't start with - true if operand1 does not begin with operand2.
• Ends with - true if operand1 ends with operand2, including if the 2 operands are equal.
• Doesn't end with - true if operand1 does not end with operand2.
• Doesn't match regexp - true if operand1 does not verify the regular expression of operand2.
• Exists - true if operand1 corresponds to a name of a variable whose value is not nil. Operand2 cannot
be defined.
Each operand may be a variable ${VariableName} or a static string. In the case of the Exists
operator, operand1 can only be a VariableName variable name.
Several conditions may be used within a while action. To add a condition, simply click on the "+" button
below the table of conditions. You must then specify whether the action is executed if all the conditions
are true (Resolve all the following items), or if at least one of them is true (Resolve one
of the following items).
188
Design
Note
While -type logical actions may be shared among several virtual users. See the documentation
on shared elements for more details.
• Doesn't equal - true if the 2 operands do not have the same value
• Starts with - true if operand1 begins with operand2, including if the 2 operands are equal.
• Doesn't start with - true if operand1 does not begin with operand2.
• Ends with - true if operand1 ends with operand2, including if the 2 operands are equal.
• Doesn't end with - true if operand1 does not end with operand2.
• Doesn't match regexp - true if operand1 does not verify the regular expression of operand2.
• Exists - true if operand1 corresponds to a name of a variable whose value is not nil. Operand2 cannot
be defined.
Each operand may be a variable ${VariableName} or a static string. In the case of the Exists
operator, operand1 can only be a VariableName variable name.
189
Design
Several conditions may be used within an If ... Then ... Else action. To add a condition,
simply click on the "+" button below the table of conditions. You must then specify whether the action
is executed if all the conditions are true (Resolve all the following items), or if at least one
of them is true (Resolve one of the following items).
Variable Modifier
Using a Modify variable action, you can change the value of a variable defined in the configuration.
A variable's value can be changed (take next value) or the variable can be reset (reset to first value). This
action allows the variable's value to be changed without affecting its value change policy. For example,
you may change the value of the variable within a virtual user loop.
Specify the variable name on which the action will be performed. Use a name, such as "myVar", but not an
expression such as "${myVar}". Nevertheless, the name can be composed, for example "data_for_
${login}" if the variable "data_for_jsmith" is defined.
Containers
A container allows you to group certain actions, relating to a business action for example, for statistical
purposes. The container is viewed in the same way as other result actions such as web pages. Thus, the
user can obtain statistics including average time, hits/sec., etc..
190
Design
A pacing delay may be set on a container. The pacing delay is the minimum time a container must take
to execute. If the container's execution takes less time than the pacing time set, the virtual user will wait
until the end of the pacing time before continuing the scenario.
For example, if a container has a pacing of 30 seconds and the actual time to execute the actions in the
container is only 20 seconds, the virtual user will pause for 10 seconds before resuming. On the other hand,
if the actual time is 45 seconds, the virtual user will continue immediately.
Note
Container -type logical actions may be shared among several virtual users. See the
documentation on shared elements for more details.
Random Containers
A Random Container is used to specify pages to be played in a random sequence. All the requests
in a container may be played, or only some.
• Play all pages in random sequence. All the pages in the container will be played once, in random
sequence.
• Play a number of pages in random sequence. In this mode, the number of random pages to be
played may be selected. At each iteration, one of the pages within the container is chosen at random and
played. It is possible therefore that a page might be played more than once.
Note
Only the top-level actions are randomly executed. If a random container contains a container,
and this second container is played, all the actions within that container will be executed in their
correct sequence.
A pacing delay may be set on a random container. The pacing delay is the minimum time a container must
take to execute. If the container's execution takes less time than the pacing time set, then the virtual user
will wait until the end of the pacing time before continuing the scenario.
For example, if a random container has a pacing of 30 seconds and the actual time to execute the actions in
the container is only 20 seconds, the virtual user will pause for 10 seconds before resuming. On the other
hand, if the actual time is 45 seconds, the virtual user will continue immediately.
191
Design
Note
Random container -type logical actions may be shared among several virtual users. See the
documentation on shared elements for more details.
When creating a Try...Catch action, two containers are created: Try and Catch. All the actions in
the Try container are executed until an error or assertion occurs (depending on the action's configuration).
When an error or assertion occurs, the actions in the Catch container are executed.
Note
Within a Try container, the virtual user will not be halted upon the error or assertion's occurrence,
even if it is configured so to do.
Fork
How it works
The Fork action is used to play actions in a different execution thread to the current one. This execution
thread is parallel to the main chain used by the virtual user. When the virtual user's main execution thread
stops, all the threads created using fork actions are immediately halted.
192
Design
In particular, this action can be used to modelize automatic actions played by the browser while the user
is using the web application normally. Let's take the example of an action played every x seconds on the
server to refresh a web component (Ajax, Flash plug-in...). This request must be made in parallel to the
standard scenario for the virtual user.
Fork -type logical actions may be shared among several virtual users. See the documentation on shared
elements for more details.
If, in due course, two execution threads modify the same variable, each of the threads obtains its own
variable. This allows the use of the same variable extractors derived from the framework parameters in
several execution threads without having to worry about clashing values.
Lastly, in the case of same variables used in different execution threads, variables' visibility is based on
hierarchy: a fork can access variables that have been modified locally by its parent until such time as
it modifies them itself.
Limitations
When checking a virtual user, the actions played as part of a fork action appear in the list at the moment
they are executed. This can make reading the validation results more complicated, as the list will contain
several overlapping execution threads.
Wait Until
The Wait Until action pauses the current execution thread until certain conditions have been verified.
• Doesn't equal - true if the 2 operands do not have the same value
193
Design
• Starts with - true if operand1 begins with operand2, including if the 2 operands are equal.
• Doesn't start with - true if operand1 does not begin with operand2.
• Ends with - true if operand1 ends with operand2, including if the 2 operands are equal.
• Doesn't end with - true if operand1 does not end with operand2.
• Doesn't match regexp - true if operand1 does not verify the regular expression of operand2.
• Exists - true if operand1 corresponds to a name of a variable whose value is not nil. Operand2 cannot
be defined.
Each operand may be a variable ${VariableName} or a static string. In the case of the Exists
operator, operand1 can only be a VariableName variable name.
You may also set a maximum timeout delay in milliseconds. Once this delay is timed out, the thread is
restarted. The following action is then executed, even if the conditions have not been verified.
JavaScript
How it works
NeoLoad allows the execution of JavaScript within virtual users, which means you may insert a JavaScript
action when designing a virtual user. The code used may invoke common JavaScript functions declared
in the NeoLoad JavaScript libraries.
194
Design
The NeoLoad API is mainly used to manipulate NeoLoad variables and set up cookies for the current
virtual user. Basic JavaScript functions allow the handling of strings and dates, calculation etc...
the section called “API overview” describes the NeoLoad API's features.
The script does not run within the context of the HTML request, so manipulating a request response's
DOM tree is impossible. Consequently, functions built into browsers for extracting or manipulating the
HTML document are not included.
The following is a non-exhaustive list of functions or objects that are not supported:
• window
• document (of which document.cookie, document.forms[0],
document.getElementById(), ...)
• navigator
• alert()
• confirm()
• ...
Note that scripts using these objects compile correctly but their running will halt when it reaches the non-
supported object.
JavaScript actions
A JavaScript action may be added to a virtual user's definition. A JavaScript action is identified by a name
and a description and contains the script to be executed.
3. Drag and drop the action at the desired point in the virtual users tree.
195
Design
NeoLoad creates the action using an outline script, which you can either adapt to your requirements or
delete to begin a new script.
You may compile your JavaScript scripts prior to running. Compiling will check the script syntax (missing
parentheses...) but not its validity (method names ...).
Errors
During a test, a JavaScript action will be flagged as an error in the following cases:
196
Design
JavaScript actions are systematically displayed during the virtual user checking process and will appear
in the error table if the script has been error-flagged.
JavaScript libraries
JavaScript libraries allow you to create functions that can be used in all the virtual user scripts. Libraries
not only allow code sharing between several scripts, they also help reduce memory usage on the load
generators, since the code stored in the libraries is shared by the users, whereas code contained in scripts is
loaded into memory for each virtual user. It is therefore recommended, wherever possible, to use functions
whose code is stored in a library.
A JavaScript library is identified by its name and library file. You may use an existing file or create a new,
empty file. Each library may contain one or several JavaScript functions.
197
Design
4. Choose either to create a new library or use an existing file, whichever is appropriate.
If you edit the file using an external text editor, use the 'Reload' button to reload the file into the NeoLoad
interface.
Use the "Compile" button to compile your JavaScript libraries prior to execution. Compiling will check
the script syntax (missing parentheses...) but not its validity (call method names ...).
API overview
This section gives an overview of the NeoLoad API. Please refer to the API documentation for more
detailed information.
Execution context
NeoLoad provides an execution context for each script in order to manipulate variables, errors and cookies:
the predefined context variable which allows procedures to be carried out on the virtual user being run.
Managing Variables
NeoLoad features a Variable Manager, which allows the user to retrieve the value of a variable, create a
new variable, or increment the value of a variable defined in NeoLoad. The Variable Manager is accessed
via the context.variableManager context.
For example, the script below retrieves the value of a NeoLoad variable, changes the value, and uses the
new value to create a new variable. This new variable may now be integrated into the virtual user's actions,
for example inserted in a form.
Logger
You may use the logger to record events linked to a script's execution. It will write both to the load
generator's log file ("loadGenerator.log.00x" in the logs folder, accessed via the "Help / Open logs
folder" menu item) and to the NeoLoad interface in the case of an error. There are 5 logging levels:
• FATAL
• ERROR
198
Design
• WARN
• INFO
• DEBUG
You may set the maximum level to be used in the project's preferences:
Error management
When executing a JavaScript script, it is possible both to error-flag the action and stop its execution. The
error is then displayed in the test results. The error contains the error message and the appropriate-level
logs.
Adding a cookie
The API also allows the user to add a cookie for a given server while a virtual user is running.
199
Design
Script example
Java Libraries
NeoLoad allows you to use Java classes and methods in JavaScript actions. To use a Java library, simply
copy the .JAR files into the <neoload-project>/lib/jslib directory. The added files will be
automatically taken into account.
The class names must be fully qualified within the JavaScript, (even for the Java classes like
java.util.List) and preceded by "Packages.".
For example:
Rendezvous
Using rendezvous points
NeoLoad allows you to test your web application's response times under specific loads.
Rendezvous points are used to synchronize a number of virtual users to carry out the same task at precisely
the same moment, in order to create an intense load on the server at a specific point in the application
being tested.
200
Design
About rendezvous
When running a test scenario, it can be useful to ensure that a certain number of virtual users carry out
certain tasks simultaneously. This can be done using rendezvous points. A rendezvous point allows you
to create a specific load spike at a given point in the virtual user's execution.
For example, in a web application for managing bank accounts, you might want to assess its performance
when ten users simultaneously check their account balance. To simulate this functional case, you must
force the virtual users to carry out the task at exactly the same time.
• Users enter the line and wait their turn. While they're in the line, they're not using the other rides.
• When a car arrives, it relieves the line of a number of users equal to the car's capacity. It's what is known
as the release policy.
• If the car takes too long to arrive, users will leave the line. This is a timeout.
Creating a rendezvous
To create a rendezvous, you need to have read and understood the following:
• Logical actions
2. Right-click on the virtual user or container into which you want to insert the rendezvous.
A rendezvous point is identified by its name. Several RendezVous logical actions may use the same
rendezvous point and for that, they must use the same name.
Once the rendezvous points have been configured, you must configure the rendezvous's behavior when
the scenario is run.
201
Design
Overview
A rendezvous' behavior is configured for each scenario. Its attributes are:
• A release policy: defines the condition to be met before the users lined up at the rendezvous
are released
There is a one-to-one relationship between a rendezvous point's name and a rendezvous. Each unique
rendezvous action name corresponds to one specific rendezvous.
Enabling/disabling a rendezvous
To enable or disable a rendezvous:
3. Click "Advanced...".
5. In the list of rendezvous, check or un-check the rendezvous to enable or disable it.
Alternatively:
4. If the project contains several scenarios, select the scenario you want to change and click "OK".
5. In the list of rendezvous, check or un-check the rendezvous to enable or disable it.
202
Design
Note
If NeoLoad displays a warning that the rendezvous is not associated with the selected scenario,
it means that the virtual user containing the rendezvous is not in one of the populations linked
to the scenario.
A scenario contains populations; populations contain virtual users; a virtual user contains
rendezvous points.
• A Release Condition: the condition that must be met before the users lined up at a rendezvous
are released.
• A Timeout: the maximum wait time between two consecutive users arriving at the rendezvous. If
no user arrives at the rendezvous within that time period, all the users lined up at the rendezvous are
released. The timeout is expressed in seconds.
Note
The timeout is local to the load generator. When a rendezvous on a load generator times out,
only the users lined up at the rendezvous on that load generator will be released. Other load
generators with users lined up at the same rendezvous are not affected.
• Release when XX% of the users have arrived at the rendezvous: XX is the ratio
of the number of users lined up at the rendezvous against the number of users currently being executed
and eligible for the rendezvous. A user is eligible for the rendezvous if its execution chain contains a
rendezvous point with the same name as the rendezvous.
• Release manually: When this option is selected, you will need to release the virtual users using
JavaScript actions. For more information, see the documentation on the rendezvous JavaScript API.
Note
Fulfillment of the release condition is based on the overall state of the test's rendezvous
including when several load generators are used.
For example, a test includes a rendezvous that releases when 100 users have arrived, and the
scenario is being run using two load generators, LG1 and LG2. LG1 and LG2 have 30 and 70
lined-up users respectively. The condition is fulfilled, since 30 + 70 = 100. The controller will
send a release order to each of the load generators, thus releasing a total of 100 users spread
between the two load generators.
Frequently-asked questions
How are the released users allocated?
When the controller decides to release users from a rendezvous, it dispatches the number of users to be
released equally between load generators, based on their current load.
203
Design
Several users have the same rendezvous (rendezvous points with the same name). How are the
lined-up users released?
Each load generator maintains an arrivals list of virtual users for each rendezvous. Several rendezvous
points with the same name are considered as being the one and same rendezvous. Therefore, the users are
released in the same order as they arrived at the rendezvous.
Frameworks
Concept
In NeoLoad, "dynamic parameters" refers to parameters that are dynamically generated by the server and
used in several requests within a scenario. For example, this type of parameter may be used to manage user
sessions or preserve the browsing status at any given time. These parameters, calculated by the server, can
be inserted into a hidden form field, or into a URL parameter, without any input from the user.
During a load test on the application, NeoLoad simulates the traffic of hundreds of users and each of these
users must be able to use the value of the parameter generated by the server as opposed to the value of
the parameter recorded during the scenario's creation. Normally, to manage these dynamic parameters,
we need to extract the value generated by the server using a variable extractor, and re-inject it into the
subsequent requests in place of the recorded value. This is not a problem when dealing with a single,
isolated dynamic parameter, but it can become tedious when the dynamic parameter occurs in many
requests (numerous replacements in the request definitions), or when its value changes regularly (numerous
variable extractors need to be created).
To make handling these parameters easier, NeoLoad includes two processes that make configuring the
application's dynamic parameters easier:
A framework dynamic parameter allows you to define rules to automate the extraction and injection of
a dynamic value.
Settings
Before NeoLoad can carry out a search for framework dynamic parameters, you must define the dynamic
parameters generated by your framework. You can do this via the "Edit / Preferences /
Frameworks" menu item.
204
Design
• General information:
# Name: Parameter name. This is for information purposes and must be unique.
• Extraction: Defines how the dynamic value is extracted from the server response.
# Extract from the "Body" or "Headers" in the server's HTTP response. Selects from which part of
the response the parameter's dynamic value is extracted.
# XPath expression (optional): The XPath expression option allows you to restrict the content
extraction to one subsection within the response. XPath can only be used for HTML or XML (HTML,
XML, SOAP, GWT, AMF, RTMP, Oracle Forms and Java Serialization) -type responses.
# Regular expression: Where the response contains text that corresponds to the regular
expression's definition, that text is extracted. The regular expression is applied to the response's header
or body or to the result of the XPath expression where specified.
# Value template: The template used to assemble the value. This is an arbitrary string with specific
elements that refer to the groups within the regular expression (a group is a dynamic part of the regular
expression contained within parentheses): $0$ refers to the entire text matching the expression, $1$
refers to group n°1, $2$ refers to group n°2, etc.
• Replacement: Specifies where and how the dynamic value is injected into the request sent to the
server.
205
Design
# Parameter name: Check the box if the parameter's name is dynamic and contains all or part of
the extracted dynamic value.
# Parameter value: Check the box if the parameter's value is dynamic and contains all or part of
the extracted dynamic value. Where the parameter name is specified, only the parameters with that
name are examined and, if necessary, modified.
# Path: Use this option if the path contains the dynamic value.
# Text content: Use this option if the request's text content contains all or part of the dynamic value.
# "Part of the text": All occurrences of the dynamic value are replaced in the text request.
# "Regular expression": Only replace the values that match the specified regular expression.
The "Regular expression" and "Groups" fields must be filled in. "XPath" is optional.
• Regular expression: The expression corresponding to the string that contains or equals
the extracted dynamic value.
• Groups: The groups in the regular expression applied to the text content that equal the extracted
dynamic value, separated by commas.
Example:
We'll call the dynamic parameter "id" and assume the dynamic value extracted is "12345". The
text request will be "<p>The dynamic value is 12345, and not 12345.</p>".
The regular expression used for replacement will be "(The dynamic value is) (\d+),
(and not) (\d+)".
If Groups equals "2, 4", then the request will be changed to "<p>The dynamic value
is ${id}, and not ${id}.</p>".
If Groups equals "2", then the request will be changed to "<p>The dynamic value is
${id}, and not 12345.</p>".
206
Design
Managing frameworks
Framework dynamic parameters are organized by framework. A framework is a set of dynamic parameters
that are specific to a web application or family of web applications (for example, .NET).
Certain predefined frameworks also contain rules for handling Push-type requests. When a framework
is selected in the interface, NeoLoad displays the support of the different Push technologies, polling or
streaming. These handling rules are neither visible nor editable. See the section called “Push Frameworks”
for more details.
3. Click "OK".
Note
A framework name is unique.
207
Design
Note
If the entered name is the same as an existing framework in the list, the change will not be
accepted.
Note
Deleting a framework also deletes all its associated dynamic parameters.
The simplest way to define a framework dynamic parameter is to set a variable extractor on one of the
requests whose server response contains the dynamic parameter and then convert the extractor into a
framework dynamic parameter:
5. Define a variable extractor to enable the dynamic value's extraction (give the variable the name of
the dynamic parameter).
8. Enter the parameter name and the framework name (you may use an existing framework or enter the
name of a new framework), then click "Next".
9. Configure the replacement settings for the dynamic parameter, then click "Next".
10. Launch a dynamic parameter search for NeoLoad to set the remaining extractors required and to
replace the parameter value with the extracted value
This extractor is now added to the list of framework parameters. When future dynamic parameter searches
are carried out (after the next recording for example), NeoLoad will be able to configure the extractors
automatically and replace the static value in the requests with the extracted variable.
Using a variable extractor to add a dynamic parameter provides an easy way to configure the regular
expression and the template to apply to find the parameter.
208
Design
3. Click on the "+" button to the right of the framework parameters table.
5. When you have finished editing the parameter, click "OK" to confirm.
Importing/Exporting
The "Export..." button can be used to export the required parameters to the selected directory with
an XML file for each framework.
The "Import..." button can be used to import a previously-exported XML file or to import the NeoLoad
3.0 parameters contained in the controller_user.properties file in the user directory.
How it works
When the test scenario is recorded, NeoLoad records all the HTTP/S requests sent by the browser to the
server. During this recording, NeoLoad also records the current value of all the parameters sent by the
browser to the server.
When searching for dynamic parameters, NeoLoad plays back the scenario to find the dynamic parameters
present. In each request played back, NeoLoad looks for the corresponding link or form in the previous
server response. If the link or form exists, it indicates that all the parameters have remained unchanged
between the recording and the moment NeoLoad replayed the scenario, so there are no dynamic parameters
for the request. If the link does not exist, it indicates that a parameter's value probably has changed between
the recording and the time NeoLoad played back the scenario. NeoLoad therefore analyzes the server
response to find which parameter's value has changed and configures the scenario to handle that parameter.
Depending on the case, NeoLoad uses either variable extractors on the dynamic parameters or link/form
extractors to handle dynamic parameters.
Example
Let's take the example of an application containing the dynamic parameter id computed by the server and
added as a parameter to a page's links. The links in the server response look like this:
209
Design
<a href="viewCategory.shtml?categoryId=BIRDS&id=1181639214472">BIRDS</a>
<a href="viewCategory.shtml?categoryId=FISH&id=1181639214472">FISH</a>
<a href="viewCategory.shtml?categoryId=DOGS&id=1181639214472">DOGS</a>
<a href="viewCategory.shtml?categoryId=REPTILES&id=1181639214472">REPTILES</a>
<a href="viewCategory.shtml?categoryId=CATS&id=1181639214472">CATS</a>
As parameter id is dynamic, it has a different value when run by each virtual user. After recording this
page, NeoLoad creates a request that includes the parameter's value at the time of recording:
During a dynamic parameter search, NeoLoad fails to find this exact link in the server response. However,
it will find an identical link with a new value for parameter id. Consequently, NeoLoad offers to manage
this dynamic parameter in your scenario:
Once the suggested changes have been applied to the scenario, the amended definition of the request
concerned by this dynamic parameter will be:
210
Design
In this amended definition, NeoLoad has changed the request's manual definition into a link extractor by
setting the parameter id as a dynamic parameter (value <MUST BE PRESENT>). Furthermore, NeoLoad
will place the value of this dynamic parameter into the variable id when the scenario is run so the variable
can be used later on in the scenario.
This brings up the Dynamic Parameter Search Wizard, which gives you the two dynamic parameter search
type options available in NeoLoad:
211
Design
Push Frameworks
Context
Push frameworks are used when testing applications that use Push technology. This is a type of
communication in which information is "pushed" by the server towards the browser, contrary to the normal
Pull principle whereby the browser initiates the request for information.
Note
The use of Push frameworks requires the Push module, which is licensed.
Definition
Push frameworks can be used to create automatically a virtual user definition that is compatible for use
in a Push environment.
For an application to operate in Push mode, a Push channel is required through which the data is fed from
the server to the client. Handling the Push channel requires special tools and concepts specific to this
particular type of application. Each framework allows you to create virtual user profiles, after recording,
that take into account the Push channel.
Note
As with a normal framework, a Push framework enables the automation of parameter extraction
and replacement. See the section called “Frameworks” for more details.
How it works:
1. During the recording, NeoLoad detects that the recorded application is using a Push framework.
2. At the end of the recording, NeoLoad offers to create a modified copy of the virtual user that has just
been recorded.
212
Design
This copy contains all the changes specific to the detected Push framework and that will serve to make
designing the virtual user more simple and enable a playback that is as realistic as possible.
3. The virtual user profiles tree will now contain two user profiles:
• the original user containing the raw recording data. This is a potential source of data for developing
the user actually used. It may be deleted at any time.
• the NeoLoad-modified user. We strongly recommend using this virtual user as a basis for ongoing
design.
There are two main categories of Push application, those that use polling and those that use streaming. The
modifications NeoLoad makes to a virtual user depend entirely on the type of Push application concerned.
Polling
Description
Polling is a mechanism whereby a request is sent by the client to the server at regular intervals. In return,
the server updates the status of each connected client. Between two polling requests, the server stores the
updates sent to the client in its memory until the next polling request is received.
NeoLoad groups all the polling requests into a single polling request, which is executed several
times. The request is then included in a loop.
NeoLoad inserts a delay between two executions of this same request representing the interval between
two polling requests. This delay is based on the average time interval between two polling requests in the
original virtual user.
Since handling a polling request is a blocking process (loop on the request), NeoLoad inserts a fork action
in order to create a parallel execution thread, which allows the user actions to continue their execution
in parallel.
Lastly, NeoLoad determines the interval between the last non-polling request and the last polling request
and inserts the end of polling delay. It also adds a variable modifier that triggers the exiting of the loop
created earlier, once polling is finished.
For more details on handling polling requests in NeoLoad, see the section called “Polling Requests”.
Streaming
Description
Streaming is a mechanism whereby a holding request is sent by the client to the server. In other words,
the client never completely finishes reading the server's response to the request, the server sending back
several separate response messages. The client is able to read these messages and interpret the instructions
received. Once they have been executed, it waits for new instructions by returning to read the next part
of the response.
213
Design
NeoLoad uses a specific streaming request, which blocks the connection until the server closes the
socket. For each framework that supports streaming, NeoLoad is able to separate the response messages
sent by the server, thus allowing it to handle the actions to be carried out upon the arrival of each message.
Since a call to a streaming request is a blocking process, NeoLoad inserts a fork action in order to create
a parallel execution thread, which allows the user actions to continue their execution in parallel.
For more details on handling streaming requests in NeoLoad, see the section called “Streaming Requests”.
Push messages
Push requests ( polling request -type or streaming request -type) both work on the same
principle: each message sent by the server is processed by the Push Message design element, which
allows you to define the actions to be carried out when a certain type of message is received.
Thus, during recording, NeoLoad detects the different types of message received from the server and
creates the corresponding Push Message elements and places them in a special-purpose Push request.
Frameworks
By default, NeoLoad provides you with a simplified virtual user, based partly on the detected framework
and partly on the type of Push application. Here is a description of the default user provided by NeoLoad
for each of the supported frameworks and for each type of Push application.
AMF Polling
Original user
214
Design
Note
The AMF polling requests are identified as having a name with the POLL_XXX format.
Modified user
• All the AMF polling requests have been grouped into a single polling request (POLL_5 in this example).
This request has been placed in a loop (polling_while in this example), which continues to loop
until the NL-stopPolling variable generated by NeoLoad becomes true. Lastly, the loop itself
has been placed in a secondary execution thread using a fork action (push_fork in this example).
• The polling_delay is the average of the time intervals between two polling requests in the original
virtual user.
• The stop_polling variable modifier triggers the exit from the polling loop by modifying the value
of the NL-stopPolling variable.
AMF Streaming
Original user
215
Design
The AMF streaming requests are identified as having a name with the "<path> open" and "<path>
close" formats.
Modified user
216
Design
• NeoLoad identifies the different types of message returned through the Push channel
during recording. These different objects are modelized by the Push messages
(flex.samples.marketdata.Stock_1 or String for example here).
RTMP
Warning
To be able to record RTMP requests, the Adobe RTMP option must be checked in the recording
window.
Original user
The RTMP Push channel is represented by the RTMPChannel object. Its recorded response contains all
the messages sent by the server through the Push channel.
217
Design
Modified user
• The request representing the Push channel (RTMP_Channel_1 in this example) has been placed in a
secondary execution thread (rtmp_channel_fork).
• NeoLoad identifies the different types of message returned through the Push channel
during recording. These different types of message are modelized by the Push messages (
receive_flex.samples.marketdata.Stock for example here).
RTMPT
Warning
At the end of recording, a dynamic parameter search must be launched for NeoLoad to be able
to handle the RTMP dynamic session id's.
Original user
218
Design
• A large number of HTTP requests with the /idle/ prefix have been recorded. These requests are
polling requests.
• When a container is added during entering, polling requests also are added. This explains the "rem_06",
"remov_06" containers.
Modified user
219
Design
• The request representing the opening of the RTMPT session (/open/1 in this example) has been placed
in a secondary execution thread (push_fork_3) since it's a blocked process. A variable extractor
(RTMPTID in this example) has been configured to extract and re-inject the RTMPT session variable in
each of the following requests: /idle/XXX, /send/XXX or /close/XXX. Execution of the main
thread is put on hold until the RTMPTID session variable is retrieved, using the wait_RTMPTID object.
• All the RTMPT polling requests have been grouped into a single polling request (/idle/
${RTMPTID}/0 in this example), reducing the number of requests considerably. If a container
becomes empty (as is the case with "rem_06" and "remo_06" for example), it is automatically deleted.
• The request representing the RTMPT Push channel (/idle/${RTMPTID}/0 in this example) has
been placed in a loop (polling_while_2), which continues to loop until the NL-stopPolling
variable generated by NeoLoad becomes true. Lastly, the loop itself has been placed in a secondary
execution thread using a fork action (push_fork_4 in this example).
• NeoLoad identifies the different types of message returned through the Push channel
during recording. These different types of message are modelized by the Push messages
(receive_flex.samples.marketdata.Stock for example here).
220
Design
• The polling_delay_2 polling delay is the average of the time intervals between two polling
requests in the original virtual user.
• The stop_polling_2 variable modifier stops the polling loop by modifying the value of the NL-
stopPolling variable.
ICEfaces
NeoLoad supports the open-source ICEfaces server and its commercial version, ICEfaces EE.
Versions 1.8.2a onwards of the ICEfaces server also feature an API that allows you to make use of the
Push messages generated by the server itself as well as their associated timestamps. To be able to use the
NeoLoad Push messages, the names of the ICEfaces beans and the beans' associated timestamps must be
published in the ICEfaces application.
The Java file containing the ICEfaces bean must contain a method publishing the additional information.
For example, the MyBean.java file might contain the following code:
The .jspx file containing the visual part of the content rendered in the browser must send back this
information in the page. One idea is to send back the information in a hidden layer.
...
<div id="hiddenDiv">
...
<ice:outputText value="MyBean #{MyBean.renderInfo}"/>
...
</div>
...
Original user
221
Design
Warning
At the end of recording, a dynamic parameter search must be launched for NeoLoad to be able
to handle the ICEfaces dynamic session id's and the JSF ViewState.
• The ICEfaces polling is divided into two request categories: requests to the /receive-updated-
views servlet and those to the /receive-updates servlet. This explains the large number of this
type of requests.
• When a container is added during entering, polling requests also are added. This explains the "bi",
"connec"... containers.
Modified user
222
Design
• The two categories of polling request have been grouped together: requests with the form XXX/
receive-updated-views on the one hand and those with the form XXX/receive-updates
on the other hand. This reduces the number of requests considerably. If a container becomes empty (as
is the case with "bi" and "connec" here for example), it is automatically deleted.
• The variable extractor viewsToUpdate has been placed on the first polling request (/
auctionMonitor3/block/receive-updated-views in this example), which retrieves the
id's for the ICEfaces views to be updated. This is why the second polling request has been placed in a
loop (loop_update_view in this example), in order to issue an update request for each previously-
extracted view.
• NeoLoad identifies the different types of message returned through the Push channel during recording,
provided that the server being tested is version 1.8.2a or upwards and that the developers have published
the required additional information. These different types of message are modelized by the Push
messages (ClockBean for example here).
• The polling_delay_1 polling delay is the average of the time intervals between two polling
requests in the original virtual user.
• The stop_polling_1 variable modifier stops the polling loop by modifying the value of the NL-
stopPolling variable.
Lightstreamer Polling
Warning
At the end of recording, a dynamic parameter search must be launched for NeoLoad to be able
to handle the Lightstreamer dynamic session id's.
223
Design
Original user
This is an example of a virtual user using polling with the Lightstreamer framework.
• A large number of HTTP requests with the format XXX/bind_session.js have been recorded.
These requests are polling requests.
Modified user
224
Design
• All the Lightstreamer polling requests have been grouped into a single polling request (/
lightstreamer/bind_session.js in this example). This request has been placed in a loop
(polling_while in this example), which continues to loop until the NL-stopPolling variable
generated by NeoLoad becomes true. Lastly, the loop itself has been placed in a secondary execution
thread using a fork action (push_fork in this example).
• NeoLoad identifies the different types of message returned through the Push channel during recording.
These different types of message are modelized by the Push messages (initialSnapshot-1_2 or
update-1_2 for example here).
• For each response returned by the Push channel, NeoLoad cuts up the JavaScript call into messages.
Thus, NeoLoad recognizes three types of Lightstreamer call by default: initialSnapshot-X,
update-X and heartbeat, where X represents the updated HTML component.
• The Lightstreamer LS_phase parameter is handled using the LS_phase variable extractor set
both on the session creation request (creation_session.js in this example) and on the
Push request (/lightstreamer/bind_session.js in this example). A JavaScript action
(LS_phase_update1_1 in this example) increments the value of the LS_phase variable at each
loop iteration to reproduce the browser's behavior.
• The polling_delay polling delay is the average of the time intervals between two polling requests
in the original virtual user.
• The stop_polling variable modifier stops the polling loop by modifying the value of the NL-
stopPolling variable.
Lightstreamer Streaming
Warning
At the end of recording, a dynamic parameter search must be launched for NeoLoad to be able
to handle the Lightstreamer dynamic session id's.
Original user
This is an example of a virtual user using streaming with the Lightstreamer framework.
225
Design
The Lightstreamer streaming request is easily identified, since it ends with the path /
STREAMING_IN_PROGRESS.
Modified user
• NeoLoad identifies the different types of message returned through the Push channel during recording.
These different types of message are modelized by the Push messages (initialSnapshot-2 or
update-2 for example here).
• For each response returned by the Push channel, NeoLoad cuts up the JavaScript call into messages.
Thus, NeoLoad recognizes three types of Lightstreamer call by default: initialSnapshot-X,
update-X and heartbeat, where X represents the updated HTML component.
• The Lightstreamer LS_phase parameter is handled using the LS_phase variable extractor set
on the session creation request (creation_session.js in this example). A JavaScript action
(LS_phase_update_1_1 in this example) increments the value of the LS_phase variable to
reproduce the browser's behavior. Lastly, this variable is used in the "open streaming" request (/
lightstreamer/STREAMING_IN_PROGRESS in this example).
Shared Containers
NeoLoad allows you to share container elements so that they can be re-used in several virtual users. This
allows you to re-use the same business transaction, such as "login" or "logout".
226
Design
Using shared containers also allows usable results to be obtained across several virtual user profiles.
For example, when the same "login" business transaction is shared between the "Viewer", "Buyer" and
"Account Manager" profiles, it allows you to plot the average transaction time whatever the virtual user
profile. This gives a rapid view of the average time for the "login" business transaction whatever the type
of user connected to the application.
The shareable elements are: Container, Random Container, Loop, While and Fork.
When modifying a shared container or one of its child elements, the modifications apply for all the virtual
users containing that element. Note that you may re-use a shared container at several positions within a
same virtual user.
Sharing a Container
There are several ways to share a design element:
• Select the element to be shared, then right-click and check the "Shared" option in the pop-up menu.
• By dragging and dropping the element onto the "Shared containers" node in the virtual users tree.
• By creating the element in the "Shared containers" node: in the pop-up menu, select "Insert",
then the type of element to insert.
When creating from an existing element, this element is added to the "Shared containers" node and
a reference to the shared element is inserted in place of the original element.
• Drag the element from the "Shared containers" node and drop it in place.
• Copy the element from the "Shared containers" node or copy a reference to it in a virtual user
and paste it at the required location.
227
Design
Note
The container remains shared an all other references to it remain unchanged.
2. Delete the element by right-clicking and selecting, or using the "Delete" button.
Procedure 6.25. Delete the shared container and all references to it.
1. Select the element in the "Shared containers" node.
2. Delete the element by right-clicking and selecting "Delete", or by clicking the "Delete" button.
Populations
A Population is a group of Virtual User types. Populations allow the application to be tested using different
business behaviors. For example, the user can test an e-business website with 90% of the users consulting
the catalog and 10% completing a purchase.
228
Design
Percentage
Percentage of the selected Virtual User type within the Population. When running a scenario with a given
number of Virtual Users, this percentage defines the number of Virtual Users of each type to be used. The
percentage total for the four lines must equal 100%.
Bandwidth
NeoLoad can emulate user connections with different bandwidth capacities, such as dial-up modem, DSL
or local network. This parameter is important because different network access methods impact the server
in different ways. For example, dial-up modem users have a greater impact on I/O buffering and thread
pools, whereas local network users have a greater impact on the server's CPU usage.
Browser
Allows centralized modification of the HTTP User-Agent ID. This header is not normally important
in a load test, but it may be useful in cases where the content of the server response changes according
to the browser used.
Choose one of the preset values, or enter a custom setting. For historical reasons, Microsoft's IE browser
ID's all begin with "Mozilla/4.0".
Use cookies
Enables or disables the Virtual Users' cookie management capabilities. Disabling cookies allows the user
to test whether the application supports browsing with cookies disabled, and can force the server to use
URL rewriting to track the session.
Connection
Sets the number of connections a Virtual User can open simultaneously on the remote server. Most
browsers set a maximum of 2 connections per server.
Cache management
The user cache behavior may be simulated in three ways:
• "As recorded": the Virtual User cache behavior is the same as in the scenario recording.
• "New user": simulates a Virtual User who has never visited the application and whose user cache
is empty.
• "Returning user": the Virtual User's cache is up to date, therefore the application will not return
any response which contains information that is already cached. More exactly, the server will respond
a 304 Not Modified code.
Variables
Variables are used to add dynamic content to a scenario. They may be combined with other variables or
with static content (e.g. ${product_${productID}}) and used in a number of places, such as in
form parameter values.
229
Design
Creating a Variable
Open the Variable Editor window by clicking on the "Edit / Variables" menu item, then on the
"New variable" button.
• Counter - A numerical variable having an initial value, a maximum value and an incremental value.
• List - A list or table of values. Use ${<variable Name>.<columnName>}. (e.g.:
${ListVariable_0.col_0})
Tip
Click on the column header to rename the column. This will let you use, for example,
${accounts.login} instead of the default name ${accounts.col_0}.
• File - A list or table of values loaded from a text file. Use ${<variable Name>.<columnName>}.
(e.g.: ${ListVariable_0.col_0}). The first lines only are displayed in the preview pane. You
can use the first line of the file as columns headers name.
Tip
Click on the column header to rename the column. This will let you use, for example,
${accounts.login} instead of the default name ${accounts.col_0}.
• SQL - A list of values loaded from a database request. The SQL variable executes a request to the
database and stores the values in a temporary csv file. The temporary csv file is placed in the project
directory's SqlTemp subdirectory. The contents of the file is updated each time the scenario is launched.
1. Guided mode:
Select the MySQL, Oracle, DB2, PostgreSQL or Microsoft SQL driver. In this mode, the following
fields must be filled in: host, port, name, user name and password for the database. The MySQL,
Oracle and PostgreSQL drivers are available by default.
2. Manual mode:
230
Design
Select the "Other" driver. In this instance, the JDBC driver (Java DataBase Connectivity) usually
takes the form of a file bearing the .jar extension. This file must be installed in the /lib/
jdbcDrivers under the root NeoLoad installation directory.
Example: mysql-connector-java-5.0.4-bin.jar.
The complete URL is used to specify the access path to the database. This URL must include at
least the following information: host name, port, name, user name and password for the database.
Example: jdbc:mysql://localhost:3306/test?
user=neotys&password=neoload
Only "SELECT" type requests are authorized within the SQL request.
A test button allows you to check the validity of the database connection information and SQL request.
# Error details: this field shows the errors returned by the database driver.
• Random Integer - A random numerical value within a value range.
• Random String - A random alphanumerical string defined within a value range.
• Constant String - A string which value can't be modified.
• Date - A date in the desired format. May be incremented.
• CurrentDate - The current date in the desired format.
Variable scope
In NeoLoad, a variable's scope may be either global -across the whole test- or local -restricted to one
Virtual User. The scope depends on the particular variable's use.
• Global variable - The values in a global variable are shared by all Virtual Users. The first Virtual
User uses the first value in the variable, the second user the second, and so on. This type of scope is
particularly useful for a variable that manages, for example, the application's login accounts.
231
Design
• Local variable - The values in a local variable are used within a same Virtual User. Each user starts by
using the first value, then the second, and so on. This type of scope is particularly useful in a Virtual
User loop, where each user is required to use all values in the variable.
# Centralize allocation for optimized distribution of values (Advanced): use this option to influence
the behavior of a global variable.
1. Disabled: Each load generator manages a part of the variable's values. The advantage of this
mode is that it is more efficient. The downside is that the values are not always used uniformly
when using several load generators. Therefore, it is best suited to tests using a single load generator.
2. Enabled: The controller manages all the variable's values. This provides a more uniform
distribution of the variable's values. The downside of this mode is that it increases the controller's
memory and processor usage, as well as network traffic between the controller and each of its load
generators. This mode is best suited to tests using several load generators.
Use the Variable Extractor (accessed from the "Advanced Parameters" window of the request) to
extract the value from a page's content. It can then be used, for example, as a parameter for a subsequent
request or for a content assertion.
Testing a Variable
The variable testing tool may be used to verify a variable's syntax and value change policy:
Click on the "Apply Action and Evaluate" button to simulate and validate the variable's value
change policy.
Using Variables
Variables may be used wherever the Variable Picker is available:
232
Design
Variable names themselves also may be dynamic. For example, if the counter variable's value is 1, then
${product_${counter}} is equivalent to ${product_1}.
Procedure 6.27. Opening the search wizard using the toolbar icon
Search Criteria
The available search criteria are:
• "Search in URLs"
Certain search criteria allow you to specify regular expressions. For more information, see the Guide to
Regular Expressions
233
Design
4. Enter the string to be searched for in the "Search string" text box.
234
Design
6. If the String to search for is a regular expression, check the "String is a regular
expression" check box.
235
Design
Searches in the parameter names and values and replaces the text when found. This is particularly useful
for quickly replacing a same value in a scenario with a NeoLoad variable.
Searches the requests for a particular parameter (identified by its name) and changes the parameter's
value (whatever its initial value).
Searches the requests for a particular parameter (identified by its name) and deletes the parameter.
Useful for bulk deletion of parameters.
6. Enter the string to be searched for in the "String to search for" text box.
7. Enter the replacement string in the "Replace string with" text box.
236
Design
8. If the search string is a regular expression, check the "String is a regular expression"
check box
237
Design
6. Enter the string to be searched for in the "String to search for" text box.
7. Enter the replacement string in the "Replace string with" text box.
8. If the search string is a regular expression, check the "String is a regular expression"
check box.
238
Design
6. Enter the string to be searched for in the "String to search for" text box.
239
Design
7. If the search string is a regular expression, check the "String is a regular expression"
check box.
240
Design
Search in URLs
Allows you to search in the request paths and replace the string.
4. Enter the string to be searched for in the "String to search for" text box.
5. If the search string is a regular expression, check the "String is a regular expression"
check box.
241
Design
Searches in the headers' names and values and replaces the text when found. This is particularly useful
for quickly replacing a same header value in a scenario with a NeoLoad variable.
Searches the requests for a particular header (identified by its name) and changes the header's value
(whatever its initial value).
Searches the requests for a particular header (identified by its name) and deletes the header. Useful for
bulk deletion of headers.
242
Design
6. Enter the string to be searched for in the "String to search for" text box.
7. Enter the replacement string in the "Replace string with" text box.
8. If the search string is a regular expression, check the "String is a regular expression"
check box.
243
Design
6. Enter the string to be searched for in the "String to search for" text box.
7. Enter the replacement string in the "Replace string with" text box.
244
Design
8. If the search string is a regular expression, check the "String is a regular expression"
check box.
245
Design
6. Enter the string to be searched for in the "String to search for" text box.
7. If the search string is a regular expression, check the "String is a regular expression"
check box.
246
Design
247
Design
248
Design
Replacements
If the search fails to return any results, a pop-up window prompts you to modify the search criteria.
If the search does return results, a pop-up window is displayed that lets you browse the results. The
results are flagged in the virtual user profiles tree. The search window automatically shows the first result
occurrence.
• You may scroll through the results using the "Next" and "Previous" buttons. The text to be changed
is highlighted:
• If the current item becomes de-selected due to some unexpected user input, click on the "Current"
button to return to it.
• Clicking the "Replace" button replaces the highlighted string with the value displayed in the pop-up
window. When all the results have been replaced, the pop-up window closes and a dialog box indicates
that there are no more results.
• Clicking the "Replace all" button replaces all the results found. Once completed, a dialog box is
displayed showing the number of replacements made.
Flags
A flags is used to identify a request that fulfills certain criteria. When a request fulfilling the criteria has
been identified, a mark is placed against its icon in the virtual user profile tree. Any container (container,
loop, virtual user...) containing a flagged item is itself flagged.
249
Design
4. The items that fulfill the criteria, as well as their parent items, are flagged.
5. Close the window if required (no halt on the window). Flags stay in place until the "None" criterion
is selected.
Flagging Criteria
The criteria available for flags are:
# "as variable extractor" option: the request contains an extractor that extracts the specified
variable.
# "used in request" option: the variable is used in the request's content (URL parameters, form
parameters...)
• "Whose definition contains": The request contains the specified string. The search is carried
out in:
# request paths
# validations
# HTTP headers
# requests' text content where the request is "Post' -type with a text-type content.
• "Whose recorded response contains": the response to the request made during the recording
contains the specified string.
# "requests": the request contains at least one variable extractor defined on its response.
# "parameters": the request contains at least one variable extractor defined on one of its parameters.
• "Is link/form extractor": The request type is "Follow a link from the previous
request" or "Submit a form from the previous request".
250
Design
# SOAP
# Adobe Flex/AMF
# Adobe RTMP
# Oracle Forms
# Java Serialization
Scope
Flags are restricted in scope to the virtual user in which the item that was right-clicked is located. To carry
out a search in all virtual users, click on the "Virtual User Profiles" root node.
To change the search scope on the fly, click on the desired virtual user or on the root node while the
validation window is visible.
The import takes into account all the Scenario resources. Any linked files (variable source files, linked
JavaScript library files) are automatically copied to the current project. Files specified by an absolute path
on the hard disk and not included in the imported project directory will not be copied.
The imported resources (servers, pages, Virtual Users, Populations ...) must not already exist in the current
project under the same name. If a resource does already exist, NeoLoad will prompt you to rename the
resource to be imported in order to avoid any conflicts.
251
Design
2. Select the project on the hard disk to be imported by clicking on the file with the nlp extension, or
select the zipped archive.
• "All elements": NeoLoad import all the resources, systematically applying the renaming
template (see below). In the event of a conflict, that is to say, if a resource that has been renamed
using the template already exists, NeoLoad prompt you to choose another unused name.
• "Conflicting elements": Only the items with a naming conflict are renamed, in accordance
with the renaming template.
4. Choose the renaming template. You may specify a prefix and/or suffix to be used to form the new
name for the item if it is renamed.
5. Click on "Import".
6. The import begins; in the event of a naming conflict, a pop-up window allows you to change the name
of a resource if the name already exists.
Exporting a Project
NeoLoad's Export Project wizard allows you to do the following:
• Export an entire project to NeoLoad's technical support server; as well as the project itself, the export
may also include the test results, configuration files, log files and one Virtual User validation result. The
exported archive is directly uploaded to a Neotys FTP server.
• Export an entire project for backup or transfer to another workstation; the exported archive is stored
on the destination medium. The archive can be imported in another project, see the section called
“Importing a project”.
252
Design
2. Select which test results to export: all, none, or just the results for the latest test run. Click on
"Next".
# "Export to file": exports the project to an archive on a hard disk. In this case, specify the
destination archive and confirm to complete the procedure.
# "Export to Neotys support": exports the project and any debug items to an archive
that is automatically uploaded to the Neotys support team's FTP server.
# a Virtual User validation result: NeoLoad takes the last validation result for the selected Virtual
User, or launches a validation if the Virtual User yet to be validated.
Enter the ID number supplied by Neotys technical support. If you do not have a number, leave
this box blank.
253
Design
5. When you click on "Finish", NeoLoad creates the archive and uploads it to the FTP site. You
may continue to use NeoLoad normally during the upload process. Once the archive has been
uploaded, the Neotys support team is automatically informed of its reception.
254
Chapter 7. Monitors
Overview
Presentation
Monitors allow you to monitor the performance of the servers used in a test. The servers (or machines)
that can be monitored are:
• web servers,
• application servers,
• database servers,
• operating systems,
• networks components
The monitored machines can be accessed from the "Monitors" tab in the "Design" section.
This tab displays the monitored machines in the form of a tree. Under each monitored machine, you may
define several monitors for each type of system being monitored. You may also define several performance
counters and indicators for each of these monitors. These counters (numeric values) and indicators (text
values) are grouped by category. Several alert thresholds may be set for each performance counter above
which an alert will be triggered during the test. By default, NeoLoad automatically selects the most relevant
counters and indicators when the monitor is configured and sets the corresponding thresholds.
Note
Each monitor type is an optional module that may be purchased separately from Neotys.
A performance counter, represented by the icon, corresponds to a numeric value that varies during the
test. The icon indicates a performance counter for which alert thresholds have been set.
A performance indicator, represented by the icon, corresponds to a text content, across several lines,
that does not vary during the test. Depending on the type of indicator, this content is retrieved from the
monitored system either
• at the start of the test: for example, the JDBC pool configuration.
• at the end of the test: for example, the most resource-hungry SQL requests.
• move,
• delete,
255
Monitors
Procedure 7.1. Opening the New Monitored Machine Wizard from the monitors
tree
1. In the monitors tree, select the "Monitored machines" item.
2. In the panel to the right of the tree, click on the "New monitored machine" button.
Procedure 7.2. Opening the New Monitored Machine Wizard using the pop-up
menu
1. In the monitors tree, select the "Monitored machines" item.
2. Right-click the item. In the pop-up menu, select the "New monitored machine" option.
Once the New Monitored Machine Wizard displays, the procedure for creating a new monitored machine
is as follows:
2. In the monitors tree, select the monitors to be put in place on this server.
256
Monitors
4. NeoLoad displays the documentation for each of the selected monitors. If the monitor requires
an additional, specific configuration the following message is displayed: "This monitor
requires specific configuration". Once this specific configuration has been completed,
click "Next >".
Note
Configuring certain monitors may require NeoLoad to be restarted. In these cases, you will
need to repeat steps 1 through 3 of this procedure.
5. Information for connecting to the monitor must be entered for each selected monitor. Click the
"Test" button to check whether the monitor is correctly configured. Once the configuration is
correct, click "Next >".
6. By default, NeoLoad automatically selects the most common counters. You may also select the
counters manually. To return to the NeoLoad default counters, click on the "Default" button.
Click "Next >" to go to the next monitor, or "Finish" if the last monitor has been configured.
Depending on the type of monitor, NeoLoad displays the following steps (selecting the hard disk,
processes, web applications...). These steps are explained in the section dedicated to each monitor.
257
Monitors
Definition
A monitored machine's definition contains the following information:
• "Hostname": the host name is the machine's physical name (DNS name or IP address).
Note
The monitored machine's "Hostname" is used as the monitor's default "Hostname"when
creating a monitor.
Monitoring
To create a new monitor on the monitored machine, click the "New Monitor" button. Creating a monitor
is explained in the next section.
2. Right-click on the selected monitored machine, then select the "New Monitor" option.
The wizard is identical to the New Monitored Machine Wizard. The name of the monitored machine is
pre-entered in the "Hostname" field.
Configuring a monitor
The role of a monitor is to group all the counters and indicators in place on a given server. It also tells
NeoLoad how to connect to the monitored system.
258
Monitors
Definition
A monitor"s definition contains at least the following information:
• "Hostname": the host name is the machine's physical name (DNS name or IP address).
Note
The monitor's host name may be changed independently of the name of the monitored machine
in which it is located. This may be useful for example where the monitor is only available on
a particular network interface within the monitored machine.
Additional information may be required, depending on the type of monitor. This may include (non-
exhaustive list):
• "Connection URL"
• "Domain"
Properties
Certain properties common to all the counters within a monitor can be set in the monitor's panel:
• Enabled. Allows you to enable or disable the monitor. A disabled monitor will not collect any
information on the next test run. You may also enable or disable a monitor from the tree in the
Monitors panel by right-clicking on one or more monitors, or on a monitored machine.
• Monitoring interval. This refers to the interval between two monitor value readings for that
connection. The recommended default interval is 5 seconds. Too short an interval could have a negative
effect on the server's performance.
259
Monitors
Connection status
The "Test" button allows you to test the connection to the server. If it fails, you will need to check the
monitor's settings. A specific error message helps to identify the possible cause of the connection failure.
Pressing "F1" will give you a list of prerequisites for each type of monitor.
2. Right-click on the selected monitor, then select the "Configure counters" option.
Pressing the button erases the current selection and reinstates the automatically-configured
counters proposed by NeoLoad.
260
Monitors
The button saves the current selection of counters and their corresponding alert thresholds to a file.
The button restores the selection of counters and their corresponding alert thresholds from a file.
A counter returns numeric values. During a test, a counter can be viewed in the Runtime section (its value
changes during the course of the test) as well as in the Results section.
An indicator returns lines of text. During a test, an indicator can only be viewed in the Results section.
Definition
A counter's definition contains the following information:
• "Name": the visual name used to represent the counter or indicator in NeoLoad.
• "Description": a description of the counter or indicator, for the user's information purposes.
261
Monitors
Properties
A counter's properties depends on its type. See the documentation for the specific monitor type for more
information. Contextual help for each counter or indicator can be accessed
Advanced settings
Advanced settings are available for certain monitor types, such as SNMP or HTTP. These determine how
the counter's values are calculated and sampled.
• Value calculation. The value may be absolute or relative. In absolute mode, the value stored is the
value measured by the monitor on the server. In relative mode, the stored value is the variation between
the last two measured values.
For example, absolute mode is used for counters such as the size of a database's connection pool; the
value measured is exactly the value that will be used for subsequent plotting. Relative mode on the other
hand, is used for monitors such as the total count of inbound packets for a network interface; this count
increments regularly throughout the test , the interest lying more in plotting the packet reception rate
than the absolute number of packets.
• Value sampling. Sampling allows the user to select the number of values over which the stored value
is calculated. The monitoring interval is defined in the monitor's server connection. The stored value
may be a per-second average over the entire interval. This type of sampling is used for monitors such as
network interface throughputs, generally expressed in kb/s or mb/s. The stored value may also be based
on values measured throughout the measuring interval rather than on a per-second basis.
3. Select the required counter, then click on the "Alert Thresholds" tab in the right-hand panel.
262
Monitors
Checking the "Enable alert triggering" check box will cause alerts to be triggered when the
alert thresholds defined for the selected counter are exceeded.
Click the button to add a new alert threshold to the selected counter.
Click the button to move the selected alert threshold up the displayed list.
Click the button to move the selected alert threshold down the displayed list.
Click the button to restore the default alert thresholds for the selected counter.
263
Monitors
Thresholds definition
A threshold's definition contains the following information:
Note
The available conditions are: lesser or equal to, greater or equal to, equal to and between two
values.
Note
An alert is triggered when the corresponding condition is met for a period at least equaling the
triggering delay. The triggering delay is set either for a given time or for a number of times
the condition is met.
Note
Only one alert threshold may be exceeded at one time for one given counter. By default,
a critical alert is considered more important than a warning alert. If more than one alert
threshold is exceeded simultaneously on a same counter, the alert threshold taken as having
been exceeded will be the one that is highest placed in the list of thresholds.
264
Monitors
Note
The severity depends on the resources used for the selected counter. A critical-level alert
denotes a critical problem with a given resource that can only be resolved through the user's
intervention. A warning-level alert indicates that a resource is close to its operational limits.
Note
This description appears in the final report.
Operating Systems
Linux Monitor
Supported versions
The Linux monitor has been tested on Fedora, Mandriva, Suse and Debian operating systems.
Connection settings
When creating a new monitor of this type, the protocol must be specified (Telnet or SSH).
Defining a Linux connection to a server requires the name or IP address of the machine to be monitored,
as well as the connection port. The standard access ports are port 23 for the Telnet protocol and port 22
for the SSH protocol.
A valid user account also must be entered to allow NeoLoad to connect to the server and retrieve the
performance counters to be monitored. NeoLoad can open up to three Telnet/SSH connections to the
server, depending on the counters to be monitored.
Warning
With some configurations, repeated connections to the server using the same account (e.g. root
account) may not be possible. If this is the case, and depending on the selected counters, certain
counters may not function.
In SSH mode, NeoLoad supports the following authentication methods: login / password, public key and
Keyboard-Interactive.
Note
On certain systems, the authentication must be configured in the SSH configuration file. If the
connection parameters are correct, and the authentication fails, check the SSH configuration
in the file /etc/ssh/sshd_config. Check to make sure that one of the following
parameters has the value yes: PasswordAuthentication, PubkeyAuthentication
or PAMAuthenticationViaKbdInt. In case of changes, the SSH service need to be
restarted for the change to take effect.
265
Monitors
Depending on the type of counter selected, NeoLoad displays additional steps to select the hard disks
(Disk (per device)category counter) and processes (Process (per process)category
counter) to be monitored.
266
Monitors
Available counters
The counters available on Linux operating system are listed below.
• System.
# CPU User. Time spent running non-kernel code (user time, including nice time). Percentage of
total CPU time.
# CPU System. Time spent running kernel code (system time). Percentage of total CPU time.
# CPU Idle. Time spent idle. Prior to Linux 2.5.41, this includes IO-wait time. Percentage of total
CPU time.
# Interruptions Count. The number of interrupts per second, including the clock.
# Processes Runnable per CPU. The number of processes waiting for run time per CPU.
# Processes Swapped. The number of processes swapped out but otherwise runnable. This field is
calculated; however, Linux never desperation swaps.
Warning
This field is not accessible on all Linux operating systems (w field in the procs section of
the vmstat command).
# CPU wait.
267
Monitors
• Memory.
# Total Memory. Total usable ram (i.e. physical ram minus a few reserved bits and the kernel binary
code)
# User Memory. Memory used, except caches and buffers. (User Memory = Memory Total -
Memory Free - Memory Buffered - Memory Cache)
# % User Memory. Percentage of used memory (% User Memory = User Memory / Memory Total
* 100)
• Disk (per device). The disk section counters are available per device. Outside the wizard, select the
device in the counter definition pane. A device picker is available using the 'Fill devices' button.
All the Disk counters need the iostat command installed on the server system. This command is a part
of the sysstat package. Please make sure that this command is available before using those counters.
# Disk Read Request Merged. The number of read requests merged per second issued to the device.
# Disk Write Request Merged. The number of write requests merged per second issued to the
device.
# Disk Read. The number of read requests issued to the device per second.
# Disk Write. The number of write requests issued to the device per second.
# Disk Read (sector). The number of sectors read from the device per second.
# Disk Write (sector). The number of sectors written to the device per second.
# Disk Read (KB). The number of kilobytes read from the device per second.
# Disk Write (KB). The number of kilobytes written to the device per second.
# Disk Request Size. The average size (in sectors) of the requests issued to the device.
# Queue Length. The average queue length of the requests issued to the device.
# IO Wait. The average time (in milliseconds) for I/O requests issued to the device to be served.
This includes the time spent by requests in a queue and the time spent servicing them.
# Disk Service Time. The average service time (in milliseconds) for I/O requests issued to the device.
268
Monitors
# IO CPU Time. Percentage of CPU time during which I/O requests are issued to the device
(bandwidth utilization for the device). Device saturation occurs when this value is close to 100%.
• Processes (per process). The processes section counters are available per process. Outside the
wizard, select the process identifier in the counter definition pane. A process identifier picker is available
using the '...' button.
# Process Memory Usage. Resident size (kb). The non-swapped physical memory a task has used.
# Process CPU Time. The task's share of the elapsed CPU time since the last update, expressed as
a percentage of total CPU time.
Solaris Monitor
Supported versions
The Solaris monitor has been validated on Solaris 10.
Connection settings
When creating a new monitor of this type, the protocol must be specified (Telnet or SSH).
Defining a Solaris connection to a server requires the name or IP address of the machine to be monitored,
as well as the connection port. The standard access ports are port 23 for the Telnet protocol and port 22
for the SSH protocol.
A valid user account also must be entered to allow NeoLoad to connect to the server and retrieve the
performance counters to be monitored. NeoLoad can open up to three Telnet/SSH connections to the
server, depending on the counters to be monitored.
269
Monitors
Warning
With some configurations, repeated connections to the server using the same account (e.g. root
account) may not be possible . If this is the case, and depending on the counters selected, certain
counters may not function.
In SSH mode, NeoLoad supports the following authentication methods: login / password, public key and
Keyboard-Interactive.
Note
On certain systems, the authentication must be configured in the SSH configuration file. If the
connection parameters are correct, and the authentication fails, check the SSH configuration
in the file /etc/ssh/sshd_config. Check to make sure that one of the following
parameters has the value yes: PasswordAuthentication, PubkeyAuthentication
or PAMAuthenticationViaKbdInt. In case of changes, the SSH service need to be
restarted for the change to take effect.
Depending on the type of counter selected, NeoLoad displays additional steps to select the hard disks
(Disk (per device)category counter) and processes (Process (per process)category
counter) to be monitored.
270
Monitors
Available counters
The counters available on Solaris operating system are listed below.
• System.
# CPU User. Time spent running non-kernel code (user time, including nice time). Percentage of
total CPU time.
# CPU System. Time spent running kernel code (system time). Percentage of total CPU time.
# Interruptions Count. The number of interrupts per second, including the clock.
271
Monitors
# Processes Runnable per CPU. The number of processes waiting for run time per CPU.
# Processes Swapped. The number of processes swapped out but otherwise runnable. This field is
calculated; however, Linux never desperation swaps.
• Memory.
# Pages Reclaims Per Second. Report information about page faults: page reclaims per second.
# Minor Faults Per Second. Report information about page faults: minor faults.
# Anticipated Short - Term Memory Shortfall. Anticipated short-term memory shortfall (Kbytes)
per second.
# Pages Scanned by Clock Algorithm. Pages scanned by clock algorithm per second.
• Disk. The disk section counters are available per device. Outside the wizard, select the device in
the counter definition pane. A device picker is available using the 'Fill devices' button. All the
Disk counters need the iostat command installed on the server system. This command is a part of the
sysstat package. Please make sure that this command is available before using those counters.
# Disk Read. The number of read requests merged per second issued to the device.
# Disk Write. The number of write requests merged per second issued to the device.
# Transaction waiting for service. Average number of transactions waiting for service (queue
length).
# Percent time waiting. Percent of the time there are transactions waiting for service (queue non-
empty).
# Percent time busy. Percent of time the disk is busy (transactions in progress).
272
Monitors
• Processes. The processes section counters are available per process. Select the process identifier in
the counter definition pane. A process identifier picker is available using the '...' button.
# Process Memory Usage. Resident size (kb). The non-swapped physical memory a task has used.
# Process CPU Time. The task's share of the elapsed CPU time since the last update, expressed as
a percentage of total CPU time.
AIX Monitor
Supported versions
The AIX monitor has been validated on AIX 5
Connection settings
When creating a new monitor of this type, the protocol must be specified (Telnet or SSH).
Defining an AIX connection to a server requires the name or IP address of the machine to be monitored,
as well as the connection port. The standard access ports are port 23 for the Telnet protocol and port 22
for the SSH protocol.
A valid user account also must be entered to allow NeoLoad to connect to the server and retrieve the
performance counters to be monitored. NeoLoad can open up to three Telnet/SSH connections to the
server, depending on the counters to be monitored.
Warning
With some configurations, repeated connections to the server using the same account (e.g. root
account) may not be possible . If this is the case, and depending on the counters selected, certain
counters may not function.
In SSH mode, NeoLoad supports the following authentication methods: login / password, public key and
Keyboard-Interactive
273
Monitors
Note
On certain systems, the authentication must be configured in the SSH configuration file. If the
connection parameters are correct, and the authentication fails, check the SSH configuration
in the file /etc/ssh/sshd_config. Check to make sure that one of the following
parameters has the value yes: PasswordAuthentication, PubkeyAuthentication
or PAMAuthenticationViaKbdInt. In case of changes, the SSH service need to be
restarted for the change to take effect.
Depending on the type of counter selected, NeoLoad displays additional steps to select the hard disks
(Disk (per device)category counter) to be monitored.
274
Monitors
Available counters
The counters available on AIX operating system are listed below.
• System.
# CPU Idle. CPU idle time. Breakdown of percentage usage of CPU time.
# CPU Wait. CPU cycles to determine that the current process is wait and there is pending disk
input/output.
# Interruptions Count. Device interrupts. Trap and interrupt rate averages per second over the
sampling interval.
# Context Switch Count. Kernel thread context switches. Trap and interrupt rate averages per
second over the sampling interval.
# Processes Runnable. Average number of runnable kernel threads over the sampling interval.
Runnable refers to threads that are ready but waiting to run and to those threads already running.
# Processes Runnable per CPU. Average number of runnable kernel threads over the sampling
interval per CPU.
# Processes Sleeping. Average number of kernel threads placed in the VMM wait queue (awaiting
resource, awaiting input/output) over the sampling interval.
# Physical CPU. Number of physical processors consumed. Only available if the partition is running
with shared processor. (only available on micro-partitioned environments).
# Entitled consumed. The percentage of entitled capacity consumed. Only available if the partition
is running with shared processor. (Only available on micro-partitioned environments).
275
Monitors
• Memory.
Note
information about the usage of virtual and real memory. Virtual pages are considered active
if they have been accessed. A page is 4096 bytes.
# Pager in/out list. Pager input/output list. Average pages per second over the interval.
# Paged In Per Second. Pages paged in from paging space. Average pages per second over the
interval.
# Paged Out Per Second. Pages paged out to paging space. Average pages per second over the
interval.
# Freed Per Second. Pages freed (page replacement). Average pages per second over the interval.
• Disk. The disk section counters are available per device. Outside the wizard, select the device in
the counter definition pane. A device picker is available using the 'Fill devices' button. All the
Disk counters need the iostat command installed on the server system. This command is a part of the
sysstat package. Please make sure that this command is available before using those counters.
# Data transferred (read/write). Indicates the amount of data transferred (read or written) per
second to the drive. Different suffixes are used to represent the unit of transfer. Default is in bytes
per second.
# Transfers per second. Indicates the number of transfers per second that were issued to the physical
disk. A transfer is an I/O request to the physical disk. Multiple logical requests can be combined into
a single I/O request to the disk. A transfer is of indeterminate size.
# Read transfers per second. Indicates the number of read transfers per second.
# Write transfers per second. Indicates the number of write transfers per second.
# Data read per second. Indicates the amount of data read per second, from the drive. Different
suffixes are used to represent the unit of transfer. Default is in bytes per second.
# Data written per second. Indicates the amount of data written per second, to the drive. Different
suffixes are used to represent the unit of transfer. Default is in bytes per second.
# Disk activity (percent). Indicates the percentage of time the physical disk was active (bandwidth
utilization for the drive).
276
Monitors
HP-UX Monitor
Supported versions
The HP-UX monitor has been validated on HP-UX 11.
Connection settings
When creating a new monitor of this type, the protocol must be specified (Telnet or SSH).
Defining a HP-UX connection to a server requires the name or IP address of the machine to be monitored,
as well as the connection port. The standard access ports are port 23 for the Telnet protocol and port 22
for the SSH protocol.
A valid user account also must be entered to allow NeoLoad to connect to the server and retrieve the
performance counters to be monitored. NeoLoad can open up to three Telnet/SSH connections to the
server, depending on the counters to be monitored.
Warning
With some configurations, repeated connections to the server using the same account (e.g. root
account) may not be possible . If this is the case, and depending on the counters selected, certain
counters may not function.
In SSH mode, NeoLoad supports the following authentication methods: login / password, public key and
Keyboard-Interactive
Note
On certain systems, the authentication must be configured in the SSH configuration file. If the
connection parameters are correct, and the authentication fails, check the SSH configuration
in the file /etc/ssh/sshd_config. Check to make sure that one of the following
parameters has the value yes: PasswordAuthentication, PubkeyAuthentication
277
Monitors
Depending on the type of counter selected, NeoLoad displays additional steps to select the hard disks
(Disk (per device)category counter) to be monitored.
Available counters
The counters available on HP-UX operating system are listed below.
278
Monitors
• System.
# CPU User. User time for normal and low priority processes. Breakdown of percentage usage of
CPU time.
# Processes Runnable per CPU. The numbers of processes in run queue per CPU.
# Processes Sleeping. The numbers of processes blocked for resources (I/O, paging, etc.).
# Processes Swapped. The numbers of processes runnable or short sleeper (< 20 secs) but swapped.
• Memory.
Note
Virtual pages are considered active if they belong to processes that are running or have run
in the last 20 seconds.
# Pages Reclaims Per Second. Report information about page faults: page reclaims per second.
(average each five second).
# Address translation faults. Report information about page faults: Address translation faults per
second. (average each five second).
# Processes swapped in. Processes swapped in per second. (average each five second).
# Processes swapped out. Processes swapped out per second. (average each five second).
# Pages paged in. Pages paged in per second. (average each five second).
# Pages pages out. Pages paged out per second. (average each five second).
# Pages freed per second. Pages freed per second. (average each five second).
# Anticipated short term memory shortfall. Anticipated short term memory shortfall. (average
each five second).
# Pages scanned by clock algorithm. Pages scanned by clock algorithm per second. (average each
five second).
• Disk. The disk section counters are available per device. Outside the wizard, select the device in
the counter definition pane. A device picker is available using the 'Fill devices' button. All the
279
Monitors
Disk counters need the iostat command installed on the server system. This command is a part of the
sysstat package. Please make sure that this command is available before using those counters.
# Kilobytes transferred per second. The number of kilobytes transferred per second.
# Millisecond per average seek. The number of milliseconds per average seek.
Microsoft Monitors
Microsoft monitors allow you to monitor Microsoft servers.
• Windows monitor: monitors the operating system: CPU, memory, disk drives...
• IIS monitor: monitors Microsoft IIS web servers with the exception of dynamic pages.
All these monitors use the same Windows API to list and query the performance counters, namely the
Performance Data Helper (PDH) library used by the Perfmon tool that is part of Windows. The NeoLoad
monitors therefore have the same characteristics and constraints as Perfmon:
• the monitoring is done without an agent, which obviates the installation of a client or agent on the
machine to be monitored.
• the monitoring of Microsoft servers is available only for Windows controllers. It is not possible to
monitor a Microsoft server from a Unix/Linux machine.
• the appropriate user rights and settings are required to connect to the machine to be monitored. See the
section called “Connecting to a remote server”.
280
Monitors
Definition
A Microsoft monitor's definition must include the name or IP address of the machine to be monitored.
The account currently running NeoLoad also must have the appropriate user rights. See the section called
“Connecting to a remote server” for more details.
When defining a counter, and depending on the type of counter, you may also select one or more
instances. One instance corresponds to a certain sub-division of the monitored object. For example, the
Processor / Processor Time % has several instances, one for each processor present in the
monitored machine. Usually, an instance named _Total allows you to retrieve an average value across
all available instances.
If the current user account does not have the appropriate rights, run the Controller using the appropriate
account by right-clicking on NeoLoadGUI.exe and using the "Run as..." option. Alternatively, add the
account used to run the Controller to the "Performance Monitor Users" group on the monitored
server (or to "Administrators" group for Windows XP).
Important
The "Remote Registry" service must be started on the remote monitored machine.
Firewall settings
TCP Port 445 and TCP Port 139 must be open on firewalls. For the Windows Firewall, this can be done
by adding an exception for "File and printer sharing".
See the Microsoft monitors description for more information on how to connect to a remote server.
281
Monitors
Available counters
On a typical Windows server, the main, basic counters are as follows:
• Memory\Pages/sec. Detects the Pages/sec swap rate. The pages/sec rate is the speed at which the
pages are read from or written to the disk when resolving hardware page faults. A hardware page fault
occurs when a process has to access code on a physical disk because it cannot be accessed in the memory.
• Memory\Available Megabytes. Indicates how much physical memory remains after the working
sets of running processes and the cache have been served. Should be greater than 10% of the physical
memory.
• System\Processor Queue Length. This counter displays the number of threads waiting to be
executed in the queue that is shared by all processors on the system. If this counter (divided by the
number of processors) has a sustained value of five or more threads, there is a processor bottleneck.
• Physical disk\Disk Time \%. Percentage of elapsed time spent by the selected physical disk drive
executing read or write requests. More than 55% for continuous periods indicates a bottleneck.
• Network Interface\Packets/s. Rate at which packets are sent and received on the network interface.
282
Monitors
Network
RSTAT Monitor
Connection settings
RSTAT monitors allow you to monitor the rpc.rstatd daemon counters. This daemon is already installed
and running on most Solaris and Linux machines.
This protocol uses RPC calls. Its disadvantage is that it is blocked by most firewalls as it uses port 111,
the RPC port, which generally is blocked by default. This port may need to be opened to allow NeoLoad
to access the rstatd daemon.
The default connection port set by NeoLoad is 0. This setting causes NeoLoad to automatically search for
the RPC port used by the remote machine.
283
Monitors
Available counters
• System.
# CPU Usage. The percentage of CPU time, for all processors globally, taken up executing user
commands, and carrying out system tasks and I/O operations. This counter takes into account the
total number of processors in its calculation of CPU usage.
# User CPU. The percentage of CPU time, for all processors globally, taken up executing user
commands. This counter shows the CPU usage per user globally across all the processors.
# Nice CPU. The percentage of CPU time, for all processors globally, taken up by low-priority
processes. The time taken up by "nice" tasks is already taken into account in the System CPU and
User CPU times.
# System CPU. The percentage of CPU time, for all processors globally, taken up executing system
tasks, including system calls to kernel routines.
# CPU Average 1 mn. The average usage of CPU time during the last minute. This counter shows
the CPU usage globally across all the processors.
# CPU Average 5 mn. The average usage of CPU time during the last 5 minutes. This counter shows
the CPU usage globally across all the processors.
# CPU Average 15 mn. The average usage of CPU time during the last 15 minutes. This counter
shows the CPU usage globally across all the processors.
# Memory Page paged IN. The number of pages moved from the disk into cache memory.
# Memory Page paged OUT. The number of pages moved from cache memory to the disk.
# Memory Page swapped IN. The number of pages moved from swap space to storage space
284
Monitors
# Memory Page swapped OUT. The number of pages moved from storage space to swap space.
# Context switch count. The number of processor context changes per second.
• Network.
# OUT packets count. The number of network packets exiting per second.
# IN errors count. The total number of network errors inbound per second.
# OUT errors count. The total number of network errors outbound per second.
# Collisions count. The number of network collisions occurring during the monitoring interval. A
collision is an undesirable event resulting from competing network packets being transmitted over
a same channel.
SNMP Monitor
Connection settings
Defining an SNMP monitor requires the name or IP address of the machine to be monitored, as well as
the connection port. The standard access port for SNMP parameters is port 161.
The connection is made through an SNMP community. The community name is required for authentication
and to allow NeoLoad to retrieve the SNMP counter values. The default community name is "public".
285
Monitors
Adding counters
Adding SNMP counters is done via a dedicated pane. Each counter is defined by an OID.
To choose the OID, an MIB may be loaded. A MIB is an information base containing all the OIDs defined
for an SNMP component type. For example, router manufacturers such as Cisco provide MIBs containing
the OIDs monitoring open or waiting connections.
To load a MIB, click on the "Load MIB" button, then navigate to the MIB file. The OID tree for the MIB
is then displayed in the left-hand pane. Click on the nodes to obtain a description of the OID.
A MIB may be defined by OIDs present in other MIBs. For the MIB to load correctly, these other MIBs
must be available in the same directory.
Once the OID has been specified, several commands may be executed that send requests to the server:
286
Monitors
• Get next. Returns the value of the next OID implemented on the server after the declared OID. Please
note this OID may be in the selected MIB.
• Get all. Returns the values of all OIDs present, including those under the declared OID
Databases
Oracle DB monitor
Supported versions
NeoLoad supports most commons Oracle Database server versions: 8i, 9i, 10g and 11g.
Connection settings
Oracle monitors allow you to monitor Oracle database servers. The counters are sorted by category:
memory, call rates, cache ratio etc..
This monitor executes SQL requests on the Oracle Views dedicated to performance monitoring: V
$SYSSTAT, V$SYSTEM_EVENT, V$SGA_STAT, V$SESSION , V$LIBRARYCACHE, V$LATCH, V
$WAITSTAT, V$SQLAREA, V$VERSION.
Warning
To carry out the monitoring, NeoLoad requires an account with authorization to connect to the
database and to read all these views.
NeoLoad monitors the Oracle server using the JDBC protocol. The JDBC driver is included in the NeoLoad
software package and requires no particular installation or settings. The default connection port set by
NeoLoad is 1521, the standard JDBC port.
Using a custom JDBC connection. A specific JDBC connection URL may be defined in Advanced
Edit mode. This may be useful to provide extra connection settings to the JDBC driver, such as timeout,
cluster handling etc.
jdbc:oracle:thin:@(description=(address_list=(address=(protocol=TCP)
(port=1521)(host=magnum))(source_route=yes)
(connect_data=(INSTANCE_NAME=PETSTORE)))
287
Monitors
Available counters
• Sessions.
# Active. The number of sessions currently executing SQL on the database. The System sessions
are excluded.
# % Active. The percentage of sessions currently executing SQL on the database compared to the
total ones. The System sessions are excluded.
# Inactive. The number of sessions pending on the database. The System sessions are excluded.
# Idle. The number of sessions that have not executed SQL since the last time the performance
monitor looked at the database.
• Call Rates.
# Parse. The calls per second for Parse (hard and soft). A soft parse is a check on an object already
in the shared pool, to verify that the permissions on the underlying object have not changed. A hard
parse is a very expensive operation in terms of memory use, because it requires Oracle to allocate a
workheap and other memory structures and then build a parse tree.
# Execute. The calls (user and recursive) per second that executed SQL statements.
# Commit. The calls per second for a commit. When a user commits a transaction, the redo generated
that reflects the changes made to database blocks must be written to disk. Commits often represent
the closest thing to a user transaction rate.
# Rollback. The calls per second for rollback. Rollbacks occur when users manually issue the
ROLLBACK statement or an error occurs during a user's transactions.
• Miss Rates.
288
Monitors
# Buffer Cache. Percentage of missed buffer cache. The buffer cache miss ratio is a measure of the
proportion of requests for data which is unsatisfied by data already in the buffer cache. Lower ratios
are better as access to data in memory is speedier than an IO operation to disk.
Tip
There comes a point of diminishing returns when increasing the size of the database buffer.
Also, remember that this is part of the SGA and it may be more important to use additional
memory for other parts of the SGA. It is vital that the whole SGA fits within main memory,
as paging of the SGA is disastrous for performance.
Note
Performance is optimum when this value is low.
Note
Oracle parameters that can be modified to improve this statistic: DB_BLOCK_BUFFER.
# SQL Area. Percentage of missed SQL cache. SQL shared pool reloads occur when Oracle has to
implicitly re-parse SQL or PL/SQL at the point when it attempts to execute it.
Tip
Larger shared pool will reduce the number of times that code needs to be reloaded. Also,
ensuring that similar pieces of SQL are written identically will increase sharing of code. To
take advantage of additional memory available for shared SQL areas, you may also need to
increase the number of cursors permitted for a session.
Note
Performance is optimum when this value is low.
Note
Oracle parameters that can be modified to improve this statistic: SHARED_POOL_SIZE,
OPEN_CURSORS.
# Latch. Percentage of latch get after a wait. Latches are simple, low-level serialization mechanisms
to protect shared data structures in the SGA. When attempting to get a latch, a process may have to
wait and then retry.
Note
Performance is optimum when this value is low.
• Indexed Queries.
289
Monitors
Note
A value of 90 percent or higher for this ratio is recommended. A lower value might be
acceptable in a data-warehousing or decision-support system where the full table scans are
frequently used.
• Logical IO.
# Block Changes. The blocks per second for Block Changes. This statistic counts the total number
of changes that were part of an update or delete operation that were made to all blocks in the SGA.
Such changes generate redo log entries and hence become permanent changes to the database if the
transaction is committed. This approximates total database work.
# Current Reads. The blocks per second for Current Reads. It counts the number of times a
CURRENT block was requested per second.
# Consistent Reads. The blocks per second for Consistent Reads. It counts the number of times a
consistent read was requested for a block. Transactions running alone in a database always see the
same state of data, plus any changes they make themselves. That state is called "consistent read" if
a transaction reads the same record twice, it sees the same data unless it changed the data itself. If
a transaction running alone in a database reads all the records in a table once, it will see exactly the
same number of records with the same contents the next time it reads the table, give or take changes
it makes itself. Write and read locks alone do not produce consistent reads.
• Physical IO.
# Datafile Reads. The blocks of data read from the disk per second. This number equals the value
of reads directly from the disk plus all reads into buffer cache.
Note
In high bandwidth, data-intensive operations such as parallel query, reads of disk blocks
bypass the buffer cache to maximize transfer rates and to prevent the premature aging of
shared data blocks resident in the buffer cache.
# Datafile Writes. The blocks of data written to the disk per second. This number equals the value
of writes directly to the disk plus all writes from buffer cache.
# Redo Writes. The redo blocks written per second by LGWR (Log writer process) to the redo log
files.
• Event Waits. These counters display the seconds waited per second on a particular usage. The waits
can be parallel and this number may exceed 1 second.
# DB File IO.
# SQL*Net.
# Buffer busy.
290
Monitors
• SGA Memory. These counters display the size in kilobytes of SGA (System Global Area) memory
allocated to the pools or buffers.
# Fixed SGA.
# Buffer Cache.
# Log Buffer.
• Miscellaneous.
# Direct Reads Ratio. The ratio of direct physical reads compared to all the direct reads. Direct reads
are performed for parallel scans, and reads from temporary table spaces. Blocks are read directly into
private buffers in the PGA, rather than into the database buffer cache in the SGA. There are no cache
hits, because blocks are not searched for in the cache before being read. And there are no subsequent
cache hits, because the blocks are just discarded after use, rather than cached.
# Library Cache Get Hit Ratio. The proportion of requests for a lock on an object which were
satisfied by finding that object's handle already in memory.
Note
Performance is optimum when this value is high.
Note
Oracle parameters that can be modified to improve this statistic: SHARED_POOL_SIZE,
OPEN_CURSORS.
# Library Cache Pin Hit Ratio. The proportion of attempts to pin an object which were satisfied
by finding all the pieces of that object already in memory.
Note
Performance is optimum when this value is high.
Note
Oracle parameters that can be modified to improve this statistic: SHARED_POOL_SIZE,
OPEN_CURSORS.
# Recursive Calls Ratio. A high ratio of recursive calls to total calls may indicate any of the
following:
291
Monitors
Note
Performance is optimum when this value is low.
# CPU Parse Overhead. The CPU parse overhead is the proportion of database CPU time being
spent in parsing SQL and PL/SQL code. High values of this figure indicate that either a large amount
of once-only code is being used by the database or that the shared SQL area is too small.
Note
Performance is optimum when this value is low.
Note
Oracle parameters that can be modified to improve this statistic: SORT_AREA_SIZE.
# Free List Contention. Free list contention occurs when more than one process is attempting to
insert data into a given table. The table header structure maintains one or more lists of blocks which
have free space for insertion. If more processes are attempting to make insert than there are free lists
some will have to wait for access to a free list.
Note
Performance is optimum when this value is very low.
# Chained Fetch Ratio. This is a proportion of all rows fetched which resulted in a chained row
continuation. Such a continuation means that data for the row is spread across two blocks, which can
occur in either of two ways:
# Row Migration. This occurs when an update to a row cannot fit within the current block. In
this case, the data for the row is migrated to a new block leaving a pointer to the new location in
the original block.
# Row Chaining. This occurs when a row cannot fit into a single data block, e.g. due to having
large or many fields. In this case, the row is spread over two or more blocks.
Note
Performance is optimum when this value is very low.
292
Monitors
• Top SQL Statements. Top 3 SQL Statements related to a resource consumption during the test.
These counters are only available at the end of the test, not in real-time while the test is running. SQL
requests made by the system itself (SYS and SYSTEM based schemas) are excluded.
# CPU. SQL Statements that cause the highest CPU resource consumption.
# Physical Reads. SQL Statements that cause the highest number disk reads.
# Logical Reads. SQL Statements that hits the most the buffer.
# Rows Processed. SQL Statements that causes the highest total number of rows processed.
# Sorts. SQL Statements that causes the highest number of sorts that were done for all the child
cursors.
# Parse Calls. SQL Statements that causes the highest number of parse calls to all the child cursors
under this parent.
# Executed. SQL Statements that causes the highest number of executions, totaled over all the child
cursors.
# CPU per Execution. SQL Statements that cause the highest average of CPU resource consumption
per execution of the statement.
# Physical Reads per Execution. SQL Statements that cause the highest average of disk reads per
execution.
# Logical Reads per Execution. SQL Statements that hits, in average, the most the buffer per
execution.
# Rows Processed per Execution. SQL Statements that causes the highest average number of rows
processed per execution.
# Sorts per Execution. SQL Statements that causes the highest average of sorts that were done for
all the child cursors, per execution.
# Parse Calls per Execution. SQL Statements that causes the highest average of parse calls to all
the child cursors under this parent, per execution.
293
Monitors
Connection settings
The available performance objects are:
• SQL Server
• All objects starting with "MSSQL$SQLEXPRESS:"
See the Microsoft monitors description for more information on how to connect to a remote server.
Note
As the monitor uses the same technology as the Perfmon monitoring tool included with
Windows, NeoLoad is able to access all the counters available for SQL Server.
294
Monitors
Available counters
On a typical Windows server, the main, basic counters are as follows:
• SQL Server\Buffer Management: Buffer cache hit ratio \%. Indicates how often SQL Server goes
to the buffer, not the hard disk, to get data. Should be greater than 85.
• SQL Server\Memory Manager: Total Server Memory (KB). If this reaches the level of the overall
server memory, it means the server needs more RAM.
• SQL Server\general statistics : User connections. Number of users connected to the system.
295
Monitors
MySQL Monitor
Supported versions
NeoLoad supports most common MySQL Database server versions: 4.0, 4.1, 5.x and 6.0.
Connection settings
MySQL monitor allows the user to monitor a MySQL database server. The counters are sorted by category:
connections, read rates, query cache usage etc..
This monitor executes SQL requests on the database to obtain status and system variables. To carry out
the monitoring, NeoLoad requires an account with authorization to connect to the database and to read
and collect global status data and variables.
NeoLoad monitors the MySQL server using the JDBC protocol. The JDBC driver is included in the
NeoLoad software package and requires no particular installation or settings. The default connection port
set by NeoLoad is 3306, the standard JDBC port.
Using a custom JDBC connection. A specific JDBC connection URL may be defined in Advanced
Edit mode. This may be useful to provide extra connection settings to the JDBC driver, such as timeout,
cluster handling etc.
Available counters
• Connections.
296
Monitors
# Attempts. The number of connection attempts (successful or not) to the MySQL server.
# Aborted clients. The number of connections aborted (client died without closing the connection
properly) per second to the MySQL server.
# Aborted connects. The number of failed connections per second to the MySQL server.
# Max used. The maximum number of connections that have been in use simultaneously since the
server started.
# Outstanding connection requests. The number of outstanding connection requests MySQL can
have. This comes into play when the main MySQL thread gets very many connection requests in
a very short time. It then takes some time (although very little) for the main thread to check the
connection and start a new thread. The back_log value indicates how many requests can be stacked
during this short time before MySQL momentarily stops answering new requests. You need to
increase this only if you expect a large number of connections in a short period of time.
# Max allowed. The number of simultaneous client connections allowed. By default, this is 150,
beginning with MySQL 5.1.15. (Previously, the default was 100.)
# Max allowed per user. The maximum number of simultaneous connections allowed to any given
MySQL account. A value of 0 means “no limit.”
# Max threads cached. How many threads the server should cache for reuse. When a client
disconnects, the client's threads are put in the cache if there are fewer than thread_cache_size
threads there. Requests for threads are satisfied by reusing threads taken from the cache if possible,
and only when the cache is empty is a new thread created. This variable can be increased to
improve performance if you have a lot of new connections. (Normally, this doesn't provide a notable
performance improvement if you have a good thread implementation.)
• IO Requests.
• Select Rates.
# Select full join. The number of joins that perform table scans because they do not use indexes. If
this value is not 0, you should carefully check the indexes of your tables.
# Select full range join. The number of joins that used a range search on a reference table.
# Select range. The number of joins that used ranges on the first table. This is normally not a critical
issue even if the value is quite large.
# Select range check. The number of joins without keys that check for key usage after each row. If
this is not 0, you should carefully check the indexes of your tables.
297
Monitors
# Select scan. The number of joins that did a full scan of the first table.
• Read Rates.
# Handler read first. The number of times the first entry was read from an index. If this value is
high, it suggests that the server is doing a lot of full index scans; for example, SELECT col1 FROM
foo, assuming that col1 is indexed.
# Handler read key. The number of requests to read a row based on a key. If this value is high, it is
a good indication that your tables are properly indexed for your queries.
# Handler read next. The number of requests to read the next row in key order. This value is
incremented if you are querying an index column with a range constraint or if you are doing an index
scan.
# Handler read previous. The number of requests to read the previous row in key order. This read
method is mainly used to optimize ORDER BY ... DESC.
# Handler read random. The number of requests to read a row based on a fixed position. This value
is high if you are doing a lot of queries that require sorting of the result. You probably have a lot of
queries that require MySQL to scan entire tables or you have joins that don't use keys properly.
# Handler read random next. The number of requests to read the next row in the data file. This
value is high if you are doing a lot of table scans. Generally this suggests that your tables are not
properly indexed or that your queries are not written to take advantage of the indexes you have.
• Key Rates.
# Key blocks not flushed. The number of key blocks in the key cache that have changed but have
not yet been flushed to disk.
# Key blocks unused. The number of unused blocks in the key cache. You can use this value to
determine how much of the key cache is in use.
# Key blocks used. The number of used blocks in the key cache. This value is a high-water mark
that indicates the maximum number of blocks that have ever been in use at one time.
# Key read requests (cache). The number of requests to read a key block from the cache.
# Key reads (disk). The number of physical reads of a key block from disk. If Key_reads is large,
then your key_buffer_size value is probably too small.
# Key write requests (cache). The number of requests to write a key block to the cache.
# Key writes (disk). The number of physical writes of a key block to disk.
• Commands Rates.
# Handler delete. The number of times that rows have been deleted from tables.
# Handler rollback. The number of requests for a storage engine to perform a rollback operation.
# Handler savepoint. The number of requests for a storage engine to place a savepoint.
298
Monitors
# Handler savepoint rollback. The number of requests for a storage engine to roll back to a
savepoint.
• Query Cache.
# Query cache free blocks. The number of free memory blocks in the query cache.
# Query cache free memory. The amount of free memory for the query cache.
# Query cache inserts. The number of queries added to the query cache.
# Query cache low memory prunes. The number of queries that were deleted from the query cache
because of low memory.
# Not cached queries. The number of non-cached queries (not cacheable, or not cached due to the
query_cache_type setting).
• Tables.
# Opened tables. The number of tables that have been opened. If Opened_tables is big, your
table_open_cache value is probably too small.
# Table locks immediate. The number of times that a table lock was acquired immediately.
# Table locks waited. The number of times that a table lock could not be acquired immediately and
a wait was needed. If this is high and you have performance problems, you should first optimize your
queries, and then either split your table or tables or use replication.
# Table open cache. The number of open tables for all threads. Increasing this value increases the
number of file descriptors that mysqld requires.
# Max heap table size. This variable sets the maximum size to which MEMORY tables are allowed
to grow. The value of the variable is used to calculate MEMORY table MAX_ROWS values. Setting
this variable has no effect on any existing MEMORY table, unless the table is re-created with a
statement such as CREATE TABLE or altered with ALTER TABLE or TRUNCATE TABLE.
• Memory.
# Binlog cache size. The size of the cache to hold the SQL statements for the binary log during a
transaction. A binary log cache is allocated for each client if the server supports any transactional
storage engines and if the server has the binary log enabled (--log-bin option). If you often use large,
multiple-statement transactions, you can increase this cache size to get more performance.
# Bulk insert buffer size. MyISAM uses a special tree-like cache to make bulk inserts faster for
INSERT ... SELECT, INSERT ... VALUES (...), (...), ..., and LOAD DATA INFILE when adding
299
Monitors
data to non-empty tables. This variable limits the size of the cache tree in bytes per thread. Setting it
to 0 disables this optimization. The default value is 8MB.
# Join buffer size. The size of the buffer that is used for joins that do not use indexes and thus
perform full table scans. Normally, the best way to get fast joins is to add indexes. Increase the value
of join_buffer_size to get a faster full join when adding indexes is not possible. One join buffer is
allocated for each full join between two tables. For a complex join between several tables for which
indexes are not used, multiple join buffers might be necessary.
# Key buffer size. Index blocks for MyISAM tables are buffered and are shared by all threads.
key_buffer_size is the size of the buffer used for index blocks. The key buffer is also known as the
key cache. The maximum allowable setting for key_buffer_size is 4GB. The effective maximum size
might be less, depending on your available physical RAM and per-process RAM limits imposed by
your operating system or hardware platform. Increase the value to get better index handling (for all
reads and multiple writes) to as much as you can afford. Using a value that is 25% of total memory
on a machine that mainly runs MySQL is quite common. However, if you make the value too large
(for example, more than 50% of your total memory) your system might start to page and become
extremely slow. MySQL relies on the operating system to perform file system caching for data reads,
so you must leave some room for the file system cache.
Warning: this value is an approximation because some space in the key buffer is be allocated internally
for administrative structures.
# Max binlog size. If a write to the binary log causes the current log file size to exceed the value of
this variable, the server rotates the binary logs (closes the current file and opens the next one). You
cannot set this variable to more than 1GB or to less than 4096 bytes. The default value is 1GB. A
transaction is written in one chunk to the binary log, so it is never split between several binary logs.
# Preload buffer size. The size of the buffer that is allocated when preloading indexes.
# Query alloc block size. The allocation size of memory blocks that are allocated for objects created
during statement parsing and execution. If you have problems with memory fragmentation, it might
help to increase this a bit.
# Read buffer size. Each thread that does a sequential scan allocates a buffer of this size (in bytes)
for each table it scans. If you do many sequential scans, you might want to increase this value, which
defaults to 131072.
# Read random buffer size. When reading rows in sorted order following a key-sorting operation,
the rows are read through this buffer to avoid disk seeks. Setting the variable to a large value can
improve ORDER BY performance by a lot. However, this is a buffer allocated for each client, so
you should not set the global variable to a large value. Instead, change the session variable only from
within those clients that need to run large queries.
# Sort buffer size. Each thread that needs to do a sort allocates a buffer of this size. Increase this
value for faster ORDER BY or GROUP BY operations.
# Transaction alloc block size. The amount in bytes by which to increase a per-transaction memory
pool which needs memory.
# Transaction prealloc size. There is a per-transaction memory pool from which various
transaction-related allocations take memory. The initial size of the pool in bytes is
transaction_prealloc_size. For every allocation that cannot be satisfied from the pool because it has
300
Monitors
insufficient memory available, the pool is increased by transaction_alloc_block_size bytes. When the
transaction ends, the pool is truncated to transaction_prealloc_size bytes.
• Miscellaneous.
# Slow queries. The number of queries that have taken more than long_query_time seconds.
# Long query time. If a query takes longer than this many seconds, the server increments the
Slow_queries status variable. If you are using the --log-slow-queries option, the query is logged to
the slow query log file. This value is measured in real time, not CPU time, so a query that is under
the threshold on a lightly loaded system might be above the threshold on a heavily loaded one. The
minimum value is 1. The default is 10.
# Slow launch threads. The number of threads that have taken more than slow_launch_time seconds
to create.
# Slow launch time. If creating a thread takes longer than this many seconds, the server increments
the Slow_launch_threads status variable.
# Sort merge passes. The number of merge passes that the sort algorithm has had to do. If this value
is large, you should consider increasing the value of the sort_buffer_size system variable.
# Sort range. The number of sorts that were done using ranges.
# Sort scan. The number of sorts that were done by scanning the table.
# Not flushed delayed rows. The number of rows waiting to be written in INSERT DELAY queues.
301
Monitors
DB2 Monitor
Configuration
NeoLoad monitors the DB2 server using the JDBC protocol. To monitor a DB2 server, you must place
the driver and license jars in the NeoLoad's lib/jdbcDrivers folder. You can find these files in the
DB2 Server installation at the following location:
• <DB2 Server>/java/db2jcc.jar
• <DB2 Server>/java/db2jcc_license_xx.jar
or in previous versions:
• <DB2 server>/SQLLIB/java/db2jcc.jar
• <DB2 server>/SQLLIB/java/db2jcc_license_xx.jar
Supported versions
NeoLoad supports most common DB2 Database server versions from 8.1 upwards.
Warning
NeoLoad does not support the DB2 database versions for AS400.
Connection settings
The DB2 monitor allows the user to monitor a DB2 database server. The counters are sorted by category:
connections, catalog cache, IO requests, command rates, tables memory, pool, joins etc.
This monitor executes SQL requests on the database to obtain status data and system variables. To carry
out the monitoring, NeoLoad requires an account with authorization to connect to the database and to read
and collect global status data and variables. The account must belong to the DB2ADMNS system group.
The default connection port set by NeoLoad is 50000, the standard JDBC port.
For NeoLoad to collect the indicators for the most resource-hungry requests (see Top Statements below),
the monitoring switches on the database server must be activated. These are the commands required to
activate the switches:
• All indicators: this switch allows NeoLoad to retrieve the list of SQL requests.
• CPU time indicator: this switch allows NeoLoad to retrieve the CPU time (in milliseconds) for each
SQL request.
• Sort time indicator: this indicator allows NeoLoad to retrieve the sort times for each SQL request.
The database server must be restarted for these changes to take effect.
302
Monitors
Using custom JDBC connection. A specific JDBC connection URL, used to provide extra connection
parameters to the JDBC driver such as timeout, cluster handling etc., may be defined in the Advanced
Edit Mode.
Available counters
• Connections.
# Remote connections. The current number of connections initiated from remote clients to the
instance of the database manager that is being monitored.
# Connections executing requests. The number of remote applications that are currently connected
to a database and are currently processing a unit of work within the database manager instance being
monitored.
Warning
This monitor is not available in versions 9.x and higher.
# Idle agents. The number of agents in the agent pool that are currently unassigned to an application
and therefore "idle".
You can use this element to help set the num_poolagents configuration setting. Having idle agents
available to service requests for agents can improve performance.
• Catalog Cache.
303
Monitors
# Catalog cache lookups. The number of times that the catalog cache was referenced to obtain table
descriptor information or authorization information.
This element includes both successful and unsuccessful accesses to the catalog cache. The catalog
cache is referenced whenever:
# a table, view, or alias name is processed during the compilation of an SQL statement.
# Catalog cache inserts. The number of times that the system tried to insert table descriptor or
authorization information into the catalog cache.
# Catalog cache overflows. The number of times that the catalog cache overflowed the bounds of
its allocated memory.
If cat_cache_overflows is high, the catalog cache may be too small for the workload. Enlarging
the catalog cache may improve its performance.
• IO Requests.
# Direct reads. The number of read operations that do not use the buffer pool.
# Direct writes. The number of write operations that do not use the buffer pool.
# Direct read time. The elapsed time (in milliseconds) required to perform the direct reads.
# Direct write time. The elapsed time (in milliseconds) required to perform the direct writes.
• Command Rates.
# Select statements. The number of SQL SELECT statements that were executed. You can use this
element to determine the level of database activity.
# Commit statements. The total number of SQL COMMIT statements that have been attempted.
A small rate of change in this counter during the monitor period may indicate that applications are
not doing frequent commits, which may lead to problems with logging and data concurrency.
# Rollback statements. The total number of SQL ROLLBACK statements that have been attempted.
You should try to minimize the number of rollbacks, since higher rollback activity results in lower
throughput for the database.
# Overflow accesses. The number of accesses (reads and writes) to overflowed rows of tables.
Overflowed rows indicate that data fragmentation has occurred. If this number is high, you may be
able to improve database performance by reorganizing the database.
304
Monitors
Warning
This monitor is not available in versions 9.x and higher.
• Tables.
# Rows read. This is the number of rows read from the tables.
# Rows inserted. This is the number of row insertions attempted. You can use this element to gain
insight into the current level of activity within the database.
# Rows deleted. This is the number of row deletions attempted. You can use this element to gain
insight into the current level of activity within the database.
# Rows updated. This is the number of row updates attempted. You can use this element to gain
insight into the current level of activity within the database.
• Memory.
# Committed private memory. The amount of private memory that the instance of the database
manager has currently committed.
You can use this element to help set the min_priv_mem configuration parameter to ensure you
have enough private memory available.
# Total log space used. The total amount of active log space (in bytes) currently used in the database.
Use this element in conjunction with Log space available to determine whether you need to
adjust the following configuration parameters to avoid running out of log space:
# logfilsiz
# logprimary
# logsecond
# Log space available. The amount of active log space in the database that is not being used by
uncommitted transactions.
# Log pages read. The number of log pages read from disk by the logger.
You can use this element with an operating system monitor to quantify the amount of I/O on a device
that is attributable to database activity.
# Log pages write. The number of log pages written to disk by the logger.
You may use this element with an operating system monitor to quantify the amount of I/O on a device
that is attributable to database activity.
# Secondary logs allocated. The total number of secondary log files that are currently being used
for the database.
If this value is consistently high, you may need larger log files, or more primary log files, or more
frequent COMMIT statements within your application.
• Pool.
305
Monitors
# Pool data logical reads. Indicates the number of data pages which have been requested from the
buffer pool (logical) for regular and large table spaces.
# % Pool data logical reads. Percentage of data pages which have been requested from the buffer
pool (logical) for regular and large table spaces compared to data pages read in from the table space
containers (physical).
# Pool data physical reads. Indicates the number of data pages read in from the table space
containers (physical) for regular and large table spaces.
# Pool index logical reads. Indicates the number of index pages which have been requested from
the buffer pool (logical) for regular and large table spaces.
# % Pool index logical reads. Percentage of index pages which have been requested from the buffer
pool (logical) for regular and large table spaces compared to index pages read in from the table space
containers (physical).
# Pool index physical reads. Indicates the number of index pages read in from the table space
containers (physical) for regular and large table spaces.
# Pool index writes. Indicates the number of times a buffer pool index page was physically written
to disk.
# Pool read time. Indicates the total amount of time spent reading in data and index pages from the
table space containers (physical) for all types of table spaces. This value is given in microseconds.
# Pool write time. Provides the total amount of time spent physically writing data or index pages
from the buffer pool to disk. Elapsed time is given in microseconds.
• Hash Joins.
# Hash joins overflows. The number of times that hash join data exceeded the available sort heap
space.
# % Hash joins overflows. Percentage of hash join data exceeded the available sort heap space.
• Miscellaneous.
If this number is high, the applications may have concurrency problems; you should therefore identify
applications that are holding locks or exclusive locks for long periods of time.
# Locks held. The number of locks currently held. This is the total number of locks currently held
by all applications in the database.
This element can indicate that applications are experiencing contention problems. These problems
could be caused by the following situations:
306
Monitors
# An application may be locking tables explicitly when system-generated row locks may be
sufficient.
# Applications are getting the same locks in different orders, resulting in deadlock..
You may be able to resolve the problem by determining in which applications (or application
processes) the deadlocks are occurring. You may then be able to modify the application to better
enable it to execute concurrently.
# Active sorts. The number of sorts in the database that currently have a sort heap allocated.
# Total sorts. The total number of sorts that have been executed. This value includes heaps for sorts
of temporary tables that were created during relational operations.
# Sorts overflows. The total number of sorts that ran out of sort heap and may have required disk
space for temporary storage.
When a sort overflows, additional overhead will be incurred because the sort will require a merge
phase and can potentially require more I/O, if data needs to be written to disk.
# % Sorts overflows. Percentage of sorts that ran out of sort heap and may have required disk space
for temporary storage.
When a sort overflows, additional overhead will be incurred because the sort will require a merge
phase and can potentially require more I/O, if data needs to be written to disk.
• Top Statements.
# CPU. The three requests having consumed the most processor time.
# Rows read. The three requests having read the most rows from the database.
# Rows written. The three requests having written the most rows from the database.
# Sort time. The three requests with the longest sort times.
# Sort overflows. The three requests with the highest number of sort overflows.
307
Monitors
PostgreSQL Monitor
Supported versions
NeoLoad supports most common PostgreSQL Database server versions: 6.x, 7.x and 8.x.
Connection settings
PostgreSQL monitors allow you to monitor a PostgreSQL database server. The counters are sorted by
category: connections, read rates, query cache usage etc.
This monitor executes SQL requests on the database to obtain status data and system variables. To carry
out the monitoring, NeoLoad requires an account with authorization to connect to the database and to read
and collect global status data and variables.
NeoLoad monitors the PostgreSQL server using the JDBC protocol. The JDBC driver is included in the
NeoLoad software package and requires no particular installation or settings. The default connection port
set by NeoLoad is 5432, the standard JDBC port.
Using a custom JDBC connection. A specific JDBC connection URL, used to provide extra connection
parameters to the JDBC driver such as timeout, cluster handling etc.,may be defined in the Advanced Edit
Mode.
jdbc:postgresql://myserver:5432/mydatabase?loginTimeout=3000
308
Monitors
Available counters
• Connections.
# Connections executing requests. The number of currently open connections that are executing
requests.
# Max connections. The maximum number of concurrent connections to the database server.
• Buffers.
• IO Requests.
For optimal performance this value should be the smallest possible. If the database has to execute too
many disk accesses, performance will suffer.
309
Monitors
• Cache.
For optimal performance, this value must be as large as possible. If an insufficient number of index
blocks are declared in the table, it could negatively impact the database server's performance.
• Index.
• Command Rates.
This value should be relatively stable, indicating that there are no performance-reducing load peaks.
If applications do not commit often enough, it will lead to an overload on the database server.
• Locks.
• Description.
310
Monitors
Web/EJB Tier
Microsoft IIS Monitor
Supported Versions
IIS monitor allows you to monitor all versions of Microsoft IIS (Internet Information Services).
Connection settings
The available performance objects are:
See the Microsoft monitors description for more information on how to connect to a remote server.
Note
As the monitor uses the same technology as the Perfmon monitoring tool included with
Windows, NeoLoad is able to access all the counters available for IIS.
311
Monitors
Apache Monitor
Configuration
Monitoring an Apache server requires the mod_status module, which publishes a dynamic page
containing the server's performance counters.
Apache monitors allow you to monitor any server that publishes a web page in the compatible format.
Whatever the application or application server (J2EE, PHP, .Net...), you need to develop a specific page
in order to publish the custom counters. See the section called “Using custom counters”.
To restrict access to the status report to machines on the foo.com domain, the following code must be
added to the httpd.conf configuration file:
<Location /server-status>
SetHandler server-status
Order Deny,Allow
Deny from all
Allow from .foo.com
</Location>
Enabling extended statistics is recommended. This is done by editing the ExtendedStatus setting in
the httpd.conf file.
312
Monitors
Example:
nameCounter1: 10
nameCounter2: -23.567
nameCounter2: +17.33
...
During the monitoring phase, NeoLoad queries the server regularly and records the counters' values.
Connection settings
The monitor definition requires a server (defined in the Servers section of the Virtual User profiles) and
a path. You may either create a server in the Servers section, or use one already created during a recording.
Available counters
Advanced settings are available for all HTTP monitors. These settings determine how the monitors' values
are calculated and sampled.
313
Monitors
Connection settings
The available performance objects are:
314
Monitors
See the Microsoft monitors description for more information on how to connect to a remote server.
Note
As the monitor uses the same technology as the Perfmon monitoring tool included with
Windows, NeoLoad is able to access all the counters available for .Net and ASP applications.
Available counters
On a typical Windows server, the main, basic counters are as follows:
• ASP.NET\Requests Queued. The number of queued ASP requests that are waiting to be processed
• ASP.NET\Request Wait Time. The number of milliseconds that the most recent ASP request was
waiting in the queue. Warning, this value can be somewhat misleading because it is not an average.
• ASP.NET\Request Execution Time. The number of milliseconds that the most recent ASP request
took to execute. Warning, this value can be somewhat misleading because it is not an average.
315
Monitors
WebLogic 8 Monitor
Configuration
Before using the WebLogic monitor, the WebLogic server's jar must be installed in NeoLoad's jmxlib/
weblogic8 directory.
Copy the weblogic.jar file from the WebLogic server/lib directory to jmxlib/weblogic8
directory, then re-start NeoLoad for the change to take effect.
Connection settings
Defining a monitor to a WebLogic server requires the name or IP address of the machine to be monitored,
as well as the connection port (the default port is 7001). In addition to these settings, the domain to
be monitored must be provided, together with the valid user account used to connect to the WebLogic
Administration Console.
316
Monitors
NeoLoad displays a list of the EARs (Enterprise Archive) and WARs (Web Application archive) deployed
on the configured server. It then automatically selects the most appropriate counters for each of the selected
applications.
Available counters
The first tree level displays all the servers running within the WebLogic Server domain. For each
WebLogic server, the counters are:
• Server. This section allows the user to monitor the sockets open for each server.
317
Monitors
• Session. This section allows the user to monitor all session counters for each EAR deployed on this
server, and for each WAR contained therein.
# OpenSessionsHighCount. Highest number of open sessions in this module. The count starts at
zero each time the module is activated.
• JDBC Connection Pool. This section allows the user to monitor the JDBC connection pool counters.
The counters are available for each server or connexion pool.
# CurrCapacity. Current number of database connections in this instance of the connection pool.
The number includes available connections, connections in use by applications, and connections
unavailable for testing.
# MaxCapacity. Maximum number of database connections this connection pool can contain.
318
Monitors
• JRockit. This section allows the user to monitor the runtime counters for each server instance on the
JRockit Virtual Machine. The following counters are presented for each server:
Note
This value is between 0 and 1 where 1 represents 100% load (no idle time) and 0 represents
0% load (pure idle time).
# JvmProcessorLoad. The load that this Virtual Machine is placing on all processors in the host
machine. If the host contains multiple processors, this is a snapshot of the average load.
Note
This value is between 0 and 1 where 1 represents 100% load (no idle time) and 0 represents
0% load (pure idle time).
# HeapFreeCurrent. Current amount of memory (in bytes) that is available in this Virtual Machine.
# FreeHeap. Amount (in bytes) of Java heap memory that is currently free in this Virtual Machine.
# UsedHeap. Amount (in bytes) of Java heap memory that is currently being used by the Virtual
Machine.
# % UsedHeap. Percentage of amount of Java heap memory that is currently being used by the
Virtual Machine.
# TotalHeap. Amount (in bytes) of memory currently allocated to this Virtual Machine's Java heap.
# HeapSizeMax. Maximum amount (in bytes) of memory of this Virtual Machine's Java heap.
# FreePhysicalMemory. Amount (in bytes) of physical memory that is currently free on the host
computer.
# UsedPhysicalMemory. Amount (in bytes) of physical memory that is currently being used on the
host computer. The value describes the memory that is being used by all processes on the computer,
not just by this Virtual Machine.
# TotalPhysicalMemory. Amount (in bytes) of physical memory on the host computer. The value
does not include memory that the operating system makes available through swap space on a disk
or other types of virtual memory.
319
Monitors
# TotalGarbageCollectionCount. Number of garbage collection runs that have occurred since this
Virtual Machine was started.
# TotalGarbageCollectionTime. Number of milliseconds that this Virtual Machine has spent on all
garbage collection runs since the Virtual Machine was started.
# TotalNumberOfThreads. Number of Java threads (daemon and non-daemon) that are currently
running in this Virtual Machine across all processors.
# TotalNurserySize. Amount (in bytes) of memory that is currently allocated to the nursery. If you
are not using a generational garbage collector, the nursery size is 0.
• JVM. This section allows the user to collect information for each server on the Java Virtual Machine.
The available counters are:
• JMS Servers. This section allows the user to monitor the JMS runtime counters for all JMS Servers
both globally and for each server instance.
# Total. This section allow the user to monitor JMS counters for all JMS Servers of this WebLogic
server.
# ConnectionsHighCount. Highest number of connections to this server since the last reset.
# ConnectionsTotalCount. Total number of connections made to this server since the last reset.
320
Monitors
# Servers. This section allow the user to monitor each JMS Server of this WebLogic server.
# DestinationsHighCount. Highest number of destinations on this JMS server since the last reset.
# DestinationsTotalCount. Number of destinations instantiated on this JMS server since the last
reset.
# MessagesCurrentCount. Number of messages currently stored on this JMS server. This number
does not include the pending messages.
# MessagesHighCount. Highest number of messages stored in the JMS server since the last reset.
# MessagesReceivedCount. Number of messages received on this destination since the last reset.
# SessionPoolsHighCount. Highest number of session pools instantiated on this JMS server since
the last reset.
# SessionPoolsTotalCount. Number of session pools instantiated on this JMS server since the
last reset.
• JTA. This section allows the user to monitor the transaction counters for this WebLogic server. All
values are calculated per interval.
321
Monitors
• Queue. This section allows the user to monitor counters for each WebLogic Queue of this WebLogic
Server.
• EJB. This section allows the user to monitor all instances, transactions and cache counters for each
EAR deployed on this server, and for each EJB contained therein.
# Pool. Monitors EJB instances for Entity Beans, Message-Driven Beans and Stateless Beans.
# AccessTotalCount. Total number of times an attempt was made to get an instance from the
free pool.
# BeansInUseCurrentCount. Number of bean instances currently being used from the free pool.
# DestroyedTotalCount. Total number of times a bean instance from this pool was destroyed due
to a non-application exception being thrown from it.
# MissTotalCount. Total number of times a failed attempt was made to get an instance from the
free pool. An Attempt to get a bean from the pool will fail if there are no available instances in
the pool.
# TimeoutTotalCount. Total number of threads that have timed out waiting for an available bean
instance from the free pool.
# WaiterCurrentCount. Number of threads currently waiting for an available bean instance from
the free pool.
# Transaction. Monitors transaction counters for Entity Beans, MessageDriven Beans, Stateless
Beans and Stateful Beans.
322
Monitors
# TransactionsTimedOutTotalCount. Total number of transactions that have timed out for this
EJB.
# Cache. Monitors cache counters for Entity Beans and Stateful Beans.
# ActivationCount. Total number of beans from this EJB that have been activated (beans that
have been de-serialized by the application server).
# CachedBeansCurrentCount. Total number of beans from this EJB currently in the EJB cache.
# CacheMissCount. Total number of times an attempt to access a bean from the cache failed.
# PassivationCount. Total number of beans from this EJB that have been passivated (beans that
have been serialized by the application server).
• <weblogic>/server/lib/wlclient.jar
• <weblogic>/server/lib/wljmxclient.jar
Once these files have been copied, restart NeoLoad for the changes to take effect.
323
Monitors
Connection settings
Defining a monitor to a WebLogic Administration Server domain requires the name or IP address of the
machine to be monitored, as well as the connection port of the Weblogic Administration Console (the
default port is 7001). In addition to these settings, a valid user account must be provided with which to
connect to the WebLogic Administration Console.
WebLogic 9/10 monitor connects to WebLogic Administration Server, so please make sure that the
WebLogic Administration Server is running. If there is only one WebLogic Server, it will automatically
act as a WebLogic Administration Server domain. If there are several WebLogic servers (with or without
clustering), please start up the WebLogic Administration Server domain.
NeoLoad displays a list of the EARs (Enterprise Archive) and WARs (Web Application archive) deployed
on the configured server. It then automatically selects the most appropriate counters for each of the selected
applications.
324
Monitors
Available counters
The first tree level displays all the servers running within the WebLogic Server domain. For each
WebLogic server, the counters are:
• Server. This section allows the user to monitor the sockets open for each server.
• Session. This section allows the user to monitor all session counters for each EAR deployed on this
server, and for each WAR contained therein.
# OpenSessionsHighCount. Highest number of open sessions in this module. The count starts at
zero each time the module is activated.
• JDBC Connection Pool. This section allows the user to monitor the JDBC connection pool counters.
The counters are available for each connexion pool of this server.
325
Monitors
# CurrCapacity. Current number of database connections in this instance of the connection pool.
The number includes available connections, connections in use by applications, and connections
unavailable for testing.
# MaxCapacity. Maximum number of database connections this connection pool can contain.
• JRockit. This section allows the user to monitor the runtime counters for each server instance on the
JRockit Virtual Machine. The following counters are presented for each server:
Note
This value is between 0 and 1 where 1 represents 100% load (no idle time) and 0 represents
0% load (pure idle time).
# JvmProcessorLoad. The load that this Virtual Machine is placing on all processors in the host
machine. If the host contains multiple processors, this is a snapshot of the average load.
Note
This value is between 0 and 1 where 1 represents 100% load (no idle time) and 0 represents
0% load (pure idle time).
# HeapFreeCurrent. Current amount of memory (in bytes) that is available in this Virtual Machine.
# FreeHeap. Amount (in bytes) of Java heap memory that is currently free in this Virtual Machine.
326
Monitors
# UsedHeap. Indicates the amount (in bytes) of Java heap memory that is currently being used by
the Virtual Machine.
# % UsedHeap. Percentage of amount of Java heap memory that is currently being used by the
Virtual Machine.
# TotalHeap. Amount (in bytes) of memory currently allocated to this Virtual Machine's Java heap.
# FreePhysicalMemory. Amount (in bytes) of physical memory that is currently free on the host
computer.
# UsedPhysicalMemory. Amount (in bytes) of physical memory that is currently being used on the
host computer. The value describes the memory that is being used by all processes on the computer,
not just by this Virtual Machine.
# TotalPhysicalMemory. Amount (in bytes) of physical memory on the host computer. The value
does not include memory that the operating system makes available through swap space on a disk
or other types of virtual memory.
# TotalGarbageCollectionCount. Number of garbage collection runs that have occurred since this
Virtual Machine was started.
# TotalGarbageCollectionTime. Number of milliseconds that this Virtual Machine has spent on all
garbage collection runs since the Virtual Machine was started.
# TotalNumberOfThreads. Number of Java threads (daemon and non-daemon) that are currently
running in this Virtual Machine across all processors.
# TotalNurserySize. Amount (in bytes) of memory that is currently allocated to the nursery. If you
are not using a generational garbage collector, the nursery size is 0.
• JVM. This section allows the user to collect information for each server on the Java Virtual Machine.
The available counters are:
327
Monitors
• JMS Servers. This section allows the user to monitor the JMS runtime counters for all JMS Servers
both globally and for each server instance.
# Total. This section allow the user to monitor JMS counters for all JMS Servers of this WebLogic
server.
# ConnectionsHighCount. Highest number of connections to this server since the last reset.
# ConnectionsTotalCount. Total number of connections made to this server since the last reset.
# Servers. This section allow the user to monitor each JMS Server of this WebLogic server.
# DestinationsHighCount. Highest number of destinations on this JMS server since the last reset.
# DestinationsTotalCount. Number of destinations instantiated on this JMS server since the last
reset.
# MessagesCurrentCount. Number of messages currently stored on this JMS server. This number
does not include the pending messages.
# MessagesHighCount. Highest number of messages stored in the JMS server since the last reset.
# MessagesReceivedCount. Number of messages received on this destination since the last reset.
# SessionPoolsHighCount. Highest number of session pools instantiated on this JMS server since
the last reset.
# SessionPoolsTotalCount. Number of session pools instantiated on this JMS server since the
last reset.
• JTA. This section allows the user to monitor the transaction counters for this WebLogic server. All
values are calculated per interval.
• Queue. This section allows the user to monitor counters for each WebLogic Queue of this WebLogic
Server.
# PendingRequestCurrentCount. Number of waiting requests in the queue.
• EJB. This section allows the user to monitor all instances, transactions and cache counters for each
EAR deployed on this server, and for each EJB contained therein
# Pool. Monitors EJB instances for Entity Beans, MessageDriven Beans and Stateless Beans.
# AccessTotalCount. Total number of times an attempt was made to get an instance from the
free pool.
# BeansInUseCurrentCount. Number of bean instances currently being used from the free pool.
# DestroyedTotalCount. Total number of times a bean instance from this pool was destroyed due
to a non-application exception being thrown from it.
# MissTotalCount. Total number of times a failed attempt was made to get an instance from the
free pool. An Attempt to get a bean from the pool will fail if there are no available instances in
the pool.
# TimeoutTotalCount. Total number of threads that have timed out waiting for an available bean
instance from the free pool.
# WaiterCurrentCount. Number of threads currently waiting for an available bean instance from
the free pool.
329
Monitors
# Transaction. Monitors transaction counters for Entity Beans, MessageDriven Beans, Stateless
Beans and Stateful Beans
# TransactionsTimedOutTotalCount. Total number of transactions that have timed out for this
EJB.
# Cache. Monitors cache counters for Entity Beans and Stateful Beans.
# ActivationCount. Total number of beans from this EJB that have been activated (beans that
have been de-serialized by the application server).
# CachedBeansCurrentCount. Total number of beans from this EJB currently in the EJB cache.
# CacheMissCount. Total number of times an attempt to access a bean from the cache failed.
# PassivationCount. Total number of beans from this EJB that have been passivated (beans that
have been serialized by the application server).
# ExecuteThreadIdleCount. Number of idle threads in the pool. This count does not include standby
threads and stuck threads. The count indicates threads that are ready to pick up new work when it
arrives.
# HoggingThreadCount. Number of threads that are being hogged by a request right now. These
threads will either be declared as stuck after the configured timeout or will return to the pool before
that. The self-tuning mechanism will backfill if necessary.
# PendingUserRequestCount. Number of pending user requests in the priority queue. The priority
queue contains requests from internal subsystems and users. This is just the count of all user requests.
# QueueLength. Number of pending requests in the priority queue. This is the total of internal system
requests and user requests.
# StandbyThreadCount. Number of threads in the standby pool. Surplus threads that are not needed
to handle the present work load are designated as standby and added to the standby pool. These threads
are activated when more threads are needed.
330
Monitors
• Channel. This section allows the user to monitor the channels (network access points from the
WebLogic Server). The counters are available for each channel.
# AcceptCount. Number of sockets that have been accepted on this channel. This includes sockets
both past and present so gives a good idea of the connection rate to the server.
# ConnectionsCount. Number of active connections and sockets associated with this channel.
# JVM or JRockit.
# Version. Textual description for the Java Runtime running WebLogic server.
WebSphere Monitor
Configuration
Before using the WebSphere monitor, several of the WebSphere server's jars must be installed in
NeoLoad's jmxlib/websphere directory.
331
Monitors
• <websphere>/AppServer/java/jre/lib/ibmcertpathprovider.jar
• <websphere>/AppServer/java/jre/lib/ext/ibmjceprovider.jar
• <websphere>/AppServer/etc/tmx4jTransform.jar
• <websphere>/AppServer/lib/admin.jar
• <websphere>/AppServer/lib/bootstrap.jar
• <websphere>/AppServer/lib/classloader.jar
• <websphere>/AppServer/lib/client.jar
• <websphere>/AppServer/lib/emf.jar
• <websphere>/AppServer/lib/ffdc.jar
• <websphere>/AppServer/lib/idl.jar
• <websphere>/AppServer/lib/iwsorb.jar
• <websphere>/AppServer/lib/j2ee.jar
• <websphere>/AppServer/lib/mail-impl.jar
• <websphere>/AppServer/lib/management.jar
• <websphere>/AppServer/lib/nls.jar
• <websphere>/AppServer/lib/pmi.jar
• <websphere>/AppServer/lib/pmij2ee.jar
• <websphere>/AppServer/lib/ras.jar
• <websphere>/AppServer/lib/runtime.jar
• <websphere>/AppServer/lib/sas.jar
• <websphere>/AppServer/lib/soap.jar
• <websphere>/AppServer/lib/utils.jar
• <websphere>/AppServer/lib/wasjmx.jar
• <websphere>/AppServer/lib/wasproduct.jar
• <websphere>/AppServer/lib/wsexception.jar
• <websphere>/AppServer/lib/wsprofile.jar
• <websphere>/AppServer/lib/wssec.jar
• <websphere>/AppServer/lib/wssoap.jar
• <websphere>/AppServer/lib/security.jar
Once these files have been copied, restart NeoLoad for the changes to take effect.
• <websphere>/AppServer/runtimes/com.ibm.ws.admin.client_6.1.0.jar
• <websphere>/AppServer/runtimes/
com.ibm.ws.webservices.thinclient_6.1.0.jar
• <websphere>/AppServer/plugins/com.ibm.ws.runtime_6.1.0.jar
• <websphere>/AppServer/java/jre/lib/ibmjsseprovider2.jar
• <websphere>/AppServer/lib/webadmin/management.jar
• <websphere>/AppServer/etc/tmx4jTransform.jar
If you are using the FixPack 11 or later, you must also copy the following file:
• AppServer\plugins\org.eclipse.osgi_*.jar
Once these files have been copied, restart NeoLoad for the changes to take effect.
332
Monitors
• <websphere>/AppServer/runtimes/com.ibm.ws.admin.client_7.0.0.jar
• <websphere>/AppServer/runtimes/
com.ibm.ws.webservices.thinclient_7.0.0.jar
• <websphere>/AppServer/plugins/com.ibm.ws.runtime.jar
• <websphere>/AppServer/java/jre/lib/ibmjsseprovider2.jar
• <websphere>/AppServer/java/jre/lib/ibmjgssprovider.jar
• <websphere>/AppServer/lib/webadmin/management.jar
• <websphere>/AppServer/etc/tmx4jTransform.jar
Once these files have been copied, restart NeoLoad for the changes to take effect.
Supported versions
The WebSphere monitor supports WebSphere 6.0.X, WebSphere 6.1.X and WebSphere 7.0.X.
Connection settings
Defining a monitor for a WebSphere server requires the name or IP address of the machine to be monitored,
as well as the connection port (the default port is 8880). The port is the WebSphere server's SOAP
connection port (SOAP_CONNECTOR_ADDRESS in the administration console). In addition to these
settings, a valid user account must be provided with which to connect to the WebSphere Administration
Console.
Warning
NeoLoad requires the PMI interface to be enabled on the monitored WebSphere server. To enable
it from the WebSphere Administration Console, click on the Servers > Applications
servers node, and select the server. Then click on the Configuration tab and check
the Enable Performance Monitoring option. Confirm the changes and re-start the
application server for the new settings to take effect.
333
Monitors
NeoLoad automatically selects the most appropriate counters available on the server, for example, failed
transactions, data pool states...
Available Counters
WebSphere counters are automatically determined, based on all the Manageable Objects available. Since
WebSphere counters are dynamic, retrieving all the counters can take several seconds. Clicking on a
counter displays its description. These are the most common categories.
• JDBC Provider. Data counters for this category contain usage information about the JDBC
connection pools for a database. Examples include the number of managed connections or physical
connections and the total number of connections or connection handles.
• ThreadPool. Data counters for this category contain information about the thread pools for Object
Request Broker (ORB) threads and the Web container pools used to process HTTP requests. Examples
include the number of threads created and destroyed, the maximum number of pooled threads allowed,
and the average number of active threads in the pool.
Note
The % UsedPoolSize/count counter shows the percentage of the current thread pool
used. This figure may exceed 100% if the thread pool has been configured to be extensible:
in this case, the application server allows the maximum number of threads configured to be
exceeded.
• JVM (Java Virtual Machine API). Data counters for this category contain information about the
memory used by a process, as reported by JVM runtime. Examples are the total memory available and
the amount of free memory for the JVM. JVM runtime also includes data from the JVMPI. This data
provides detailed information about the JVM running the application server.
• Session manager. Data counters for this category contain usage information for HTTP sessions.
Examples include the total number of accessed sessions and the average number of concurrently active
HTTP sessions.
334
Monitors
JBoss Monitor
Configuration
Before using a JBoss monitor, several of the JBoss server's jars must be installed in NeoLoad's jmxlib/
jboss directory.
Copy to <neoload>/jmxlib/jboss directory the following files from the JBoss directory :
• <jboss>/client/jbossall-client.jar
• <jboss>/lib/jboss-jmx.jar
• <jboss>/server/<your-jboss-instance>/lib/jboss-management.jar
Once these files have been copied, restart NeoLoad for the changes to take effect.
Copy to <neoload>/jmxlib/jboss directory the following files from the JBoss directory :
• <jboss>/lib/jboss-jmx.jar
• <jboss>/common/lib/jboss-management.jar
• <jboss>/client/jboss-client.jar
• <jboss>/client/jboss-common-core.jar
• <jboss>/client/jboss-integration.jar
• <jboss>/client/jboss-javaee.jar
• <jboss>/client/jboss-logging-spi.jar
• <jboss>/client/jboss-remoting.jar
• <jboss>/client/jboss-security-spi.jar
• <jboss>/client/jboss-serialization.jar
• <jboss>/client/jbosssx-as-client.jar
• <jboss>/client/jbosssx-client.jar
• <jboss>/client/jmx-invoker-adaptor-client.jar
• <jboss>/client/jnp-client.jar
Once these files have been copied, restart NeoLoad for the changes to take effect.
Supported versions
Several JBoss server versions are supported, such as JBoss 4.0.X, JBoss 4.2.X and JBoss 5.X. NeoLoad
automatically hides any counters that are not supported by a particular JBoss version.
Connection settings
Defining a connection to a JBoss server requires the name or IP address of the machine to be monitored, as
well as the connection port (the default port is 1099). The port is your JBoss server's JNP connection port
335
Monitors
For JBoss 4.0.X and 4.2.X, connection port is the Port attribute in the Mbean referenced
by org.jboss.naming.NamingService in the server\<your-jboss-instance>\conf
\jboss-service.xml file.
<mbean code="org.jboss.naming.NamingService"
name="jboss:service=Naming"
xmbean-dd="resource:xmdesc/NamingService-xmbean.xml">
...
<!-- The listening port for the bootstrap JNP service. Set this to -1
to run the NamingService without the JNP invoker listening port.
-->
<attribute name="Port">1099</attribute>
...
For JBoss 5.0.X, connection port is the Port attribute of the service named jboss:service=Naming
in the server\<your-jboss-instance>\conf\bindings.xml file.
For JBoss 5.1.X, connection port is the Port attribute of the service named jboss:service=Naming
in the server\<your-jboss-instance>\conf\bindingservice.beans\META-INF
\bindings-jboss-beans.xml file.
If the JBoss server has been configured for secured JNP, a valid user account must be provided with which
to connect to the JBoss Administration Console.
Note
If the JBoss server is being monitored from behind a firewall, the following ports must be opened:
336
Monitors
NeoLoad displays a list of the EARs (Enterprise Archive) and WARs (Web Application archive) deployed
on the configured server. It then automatically selects the most appropriate counters for each of the selected
applications.
Available counters
All JBoss counters are documented here. Depending on the JBoss version, some counters may be
automatically hidden because they are not supported by this particular JBoss version.
• Cache. This section allows the user to monitor the cache for each application.
337
Monitors
• Session. This section allows the user to monitor the sessions for each application.
# rejectedSessions. Number of sessions rejected since last call due to maxActive being reached.
# % rejectedSessions. Percentage of sessions rejected since last call due to maxActive being
reached.
# expiredSessions. Number of sessions that expired ( doesn't include explicit invalidations ) since
last call.
• DataSource. Provides data source connection pool information for each data source.
# RollbackCount. Number of transactions that have been rolled back since last call.
# % RollbackCount. Percentage of transactions that have been rolled back since last call.
• JMS.
# Queue. The following counters are presented for each JMS queue.
# SubscribersCount. Number of active subscribers for the queue since last call.
# Topic. A JMS Topic allows management of the message flow from publisher to subscribers. The
following counters are shown for each JMS topic.
339
Monitors
• EJB3. Monitors invocation counts for each EJB compatible with EJB3.0. The counters available
depend of the current selected EJB kind.
# CurrentSize. Number of instances allocated and ready to be used (often equals to CacheSize).
# PassivatedCount. Number of instances that have been passivated (beans that have been serialized
by the application server).
# Specification.
# JVM. Textual description for the Java Runtime running JBoss server.
# Version.
340
Monitors
The list of options and how to configure JMX Remote in Java 5 can be found on the Sun website: http://
java.sun.com/j2se/1.5.0/docs/guide/management/agent.html.
On Linux:
set CATALINA_OPTS="-Dcom.sun.management.jmxremote -
Dcom.sun.management.jmxremote.port=9004 -
Dcom.sun.management.jmxremote.ssl=false -
Dcom.sun.management.jmxremote.authenticate=false"
On Windows:
set CATALINA_OPTS=-Dcom.sun.management.jmxremote -
Dcom.sun.management.jmxremote.port=9004 -
Dcom.sun.management.jmxremote.ssl=false -
Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.authenticate=true
-Dcom.sun.management.jmxremote.password.file=../conf/
jmxremote.password -Dcom.sun.management.jmxremote.access.file=../conf/
jmxremote.access \
341
Monitors
monitorRole readonly
controlRole readwrite
Tip
The password file must be read-only and not be accessible to any other user! Remove access
rights to this file for all other users under Windows.
Connection settings
Defining a monitor to a Tomcat server requires the name or IP address of the machine to be monitored,
as well as the connection port (the default port is 9004). In addition to these settings, a valid user account
must be provided if authentication is enabled.
NeoLoad displays a list of the WARs (web application resources) deployed on the configured server. It
then automatically selects the most appropriate counters for each of the selected applications.
342
Monitors
Available counters
• Cache. This section allows the user to monitor the cache for each application.
• Session. This section allows the user to monitor the sessions for each applications.
# rejectedSessions. Number of sessions tomcat rejected since last call due to maxActive being
reached.
# % rejectedSessions. Percentage of tomcat sessions rejected since last call due to maxActive being
reached.
# expiredSessions. Number of sessions that expired ( doesn't include explicit invalidations ) since
last call.
343
Monitors
• DataSource. Data source connection pool information for each data source.
• VM. JVM counters. Since Tomcat 5.5/6.0 is launched in a 1.5 VM, the following VM counters are
provided:
# Memory. The Java virtual machine has a heap that is the runtime data area from which memory
for all class instances and arrays are allocated. It is created at the Java virtual machine start-up. Heap
memory for objects is reclaimed by an automatic memory management system which is known as a
garbage collector. The heap may be of a fixed size or may be expanded and shrunk.
# Committed. Represents the amount of memory (in bytes) that is guaranteed to be available for
use by the Java virtual machine. The amount of committed memory may change over time (increase
or decrease). The Java virtual machine may release memory to the system and committed could be
less than init. committed will always be greater than or equal to used.
# Max. Represents the maximum amount of memory (in bytes) that can be used for memory
management. Its value may be undefined. The maximum amount of memory may change over time
if defined. The amount of used and committed memory will always be less than or equal to max
if max is defined. A memory allocation may fail if it attempts to increase the used memory such
that used > committed even if used <= max would still be true (for example, when the system is
low on virtual memory).
344
Monitors
# Garbage Collector. Garbage collection is the process that the Java virtual machine uses to find
and reclaim unreachable objects to free up memory space. The Sun JVM defines garbage collection in
two modes: Minor 'copy' and major 'MarkSweepCompact', .A minor collection runs relatively quickly
and involves moving live data around the heap in the presence of running threads. A major collection
is a much more intrusive garbage collection that suspends all execution threads while it completes its
task. The following counters are available for both modes:
# CollectionCount. Returns the number of collections that have occurred since last call.
# ThreadCount. Returns the current number of live threads including both daemon and non-
daemon threads.
# PeakThreadCount. Returns the peak live thread count since the Java virtual machine started
or peak was reset.
# JVM. Textual description for the Java Runtime running Tomcat server.
345
Monitors
The following procedure can be used to make sure the server metrics are accessible via the DMS library:
Example: http://oc4jserver.com:8888/dms0/Spy?format=xml
3. Check that the returned content is in XML format. The content should start with <?xml
version='1.0'?>.
In the event of an HTTP 404 (Not Found) error, repeat step 2 using this address: http://
<server>:<port>/dmsoc4j/Spy?format=xml.
For more details on monitoring Oracle Application Server servers via DMS, see the related
documentation in the Oracle Performance Guide [http://download-west.oracle.com/docs/cd/B10464_01/
core.904/b10379/toc.htm].
Supported versions
This monitor supports Oracle Application Server 9 and later.
Connection settings
Defining a connection to an Oracle Application Server server requires a server (defined in the Server
section of the Virtual Users)tab and a path. The server to be used can be created, or you can use a server
created during a recording.
346
Monitors
NeoLoad displays a list of the EARs (Enterprise Archive) and WARs (Web Application archive) deployed
on the configured server. It then automatically selects the most appropriate counters for each of the selected
applications.
Available counters
The counter advanced settings are available for all the HTTP counters.
The Oracle Application Server counters are automatically calculated based on all the available managed
objects. As the list of Oracle Application Server counters is dynamic, calculating the total number of
counters may take several seconds. For certain counters, a description allows access to its documentation.
Here are some of the most common sections.
• JMS. Counters in this category contain information on JDBC connection pools. For example, you
mat retrieve the number of expired messages for each pool.
347
Monitors
• JVM (Java Virtual Machine API). Counters in this category contain information on the Java Virtual
Machine memory usage, including the total available memory and the size of the memory available
for the JVM.
• oc4j. The sub-categories of this category are the EARs deployed on the server. For example, you may
retrieve the number of requests processed for each EAR.
Copy the following files from the Oracle Application Server directory to <neoload>jmxlib/oas
directory:
• <oas>/lib/dms.jar
• <oas>/opmn/lib/optic.jar
• <oas>/j2ee/<your-instance>/oc4jclient.jar
• <oas>/j2ee/<your-instance>/lib\adminclient.jar
• <oas>/j2ee/<your-instance>/lib\ejb.jar
• <oas>/j2ee/<your-instance>/lib\oc4j-internal.jar
Once these files have been copied, restart NeoLoad for the changes to take effect.
Warning
Several versions of the application server (development versions) does not contain these
files. These files are embedded on Companion CD of application server or available for
downloading at : http://www.oracle.com/technology/software/products/
ias/htdocs/utilsoft.html (select then Administrative Client Utility).
348
Monitors
Supported versions
This monitor allows NeoLoad to access Oracle Application Server 10g 10.1.3 and higher.
Connection settings
Defining a connection to an Oracle Application Server server requires the name or IP address of the
machine to be monitored, as well as the connection port (the default port is 6003). The application server
connection port is configured in the file: <Serveur>/opmn/conf/opmn.xml,
A valid user account must be provided in addition to these settings (same as the one used for connecting
to the Oracle Application Server Management Console).
Note
If the Oracle Application Server server is being monitored from behind a firewall, the following
ports must be opened:
NeoLoad displays a list of the EARs (Enterprise Archive) and WARs (Web Application archive) deployed
on the configured server. It then automatically selects the most appropriate counters for each of the selected
applications.
349
Monitors
Available Counters
• DataSource. Provides data source connection pool information for each data source.
# ActiveCount. Total count of active transactions. A consistently high value can indicate a heavy
load on a server.
350
Monitors
# RolledbackDueToAppCount. Total count of transactions that have rolled back due to the
application calling setRollbackOnly or rollback explicitly.
# RolledbackDueToResourceCount. Total count of transactions that have rolled back due to and
error in an enlisted resource.
A high value here suggests that the system or application may not be automated enough; for example,
too much system administration in general or inadequate handling of transaction architecture, or a
particular issue has occurred which required extensive administration.
# HeuristicCount. Total count of all heuristically rolled back and committed transactions. See
comments for HeuristicCommittedCount and HeuristicRolledbackCount.
# AverageCommitTime. Average commit time of all transactions. This is the average of the
jtaresource_performTransaction values. This is a mean average however, so there may be spikes in
the system indicating other issues as well.
• JMS.
351
Monitors
# ResolveServletTime. Total time spent to create/locate servlet instances (within the servlet
context). This includes the time for any required authentication.
• EJB. Monitors the activity for each EJB. EJB's are divided into three types:
StatefulSessionBean, StatelessSessionBean and MessageDrivenBean.
# PassiveCount. Number of instances that have been passivated (beans that have been serialized by
the application server).
JOnAS Monitor
Supported versions
NeoLoad supports all Jonas server versions marked as certified Java Enterprise Edition (J2EE).
Connection settings
Defining a monitor to a Jonas server requires the name or IP address of the machine to be monitored, as
well as the connection port (the default port is 1099). The port is the Jonas server's RMI connection port.
In addition to these settings, a valid user account must be provided if authentication is enabled (same
account than the one used to connect to Jonas Administration Console). By default authentication is not
enabled.
353
Monitors
NeoLoad displays a list of the EARs (Enterprise Archive) and WARs (Web Application archive) deployed
on the configured server. It then automatically selects the most appropriate counters for each of the selected
applications.
Available counters
All Jonas counters are documented here. Depending on the Jonas version, some counters may be
automatically hidden because they are not supported by this particular Jonas version.
• Servlet. This section allows the user to monitor each servlets by application.
354
Monitors
• Sessions. This section allows the user to monitor the sessions for each application:
# Tomcat.
# rejectedSessions. Number of sessions rejected since last call due to maxActive being reached.
# % rejectedSessions. Percentage of sessions rejected since last call due to maxActive being
reached.
# expiredSessions. Number of sessions that expired ( doesn't include explicit invalidations ) since
last call.
# Jetty.
• JCA Resource. This section allows the user to monitor JCA server resources.
355
Monitors
# rejectedFull. Number of open calls that were rejected because too many waiters
• JMS.
# Topic. A JMS Topic allows management of the message flow from publisher to subscribers. The
following counters are shown for each JMS topic.
# Queue. The following counters are presented for each JMS queue.
# PendingMessages. Number of pending messages.
• Server Proxy. This section allows the user to monitor the state of each servers of the domain.
356
Monitors
• DataSource. Provides data source connection pool information for each data source.
# connectionLeaks. Number of connection leaks to the data source. A connection leak is an unused
connection which has not been released.
# totalRolledbackTransactions. Number of transactions that have been rolled back since last call.
357
Monitors
• EJB. Monitors invocation counts for each EJB.. Counters are separated in two categories:
Warning
Those counters are only available since 4.8.x version server.
# StatelessSessionBean.
# StatefulSessionBean.
# EntityBean.
# Server.
# JVM.
358
Monitors
GlassFish Monitor
Supported versions
NeoLoad supports all GlassFish server versions, but some counters may not be available for versions 2.0.x
and earlier.
Connection settings
Defining a monitor on a GlassFish server requires the name or IP address of the machine to be monitored,
as well as the connection port (the default port is 8686). The port is the GlassFish server's JMX connection
port.
In addition to these settings, a valid user account must be provided if authentication is enabled (same
account than the one used to connect to GlassFish Administration Console). The default account is
"admin" and the password "adminadmin".
To retrieve all the selected performance counters, NeoLoad requires the GlassFish server's monitoring
level to be set to "high". To display the server's monitoring levels, enter the following command from the
server's "bin" directory:
server.monitoring-service.module-monitoring-levels.connector-connection-pool = OFF
server.monitoring-service.module-monitoring-levels.connector-service = OFF
server.monitoring-service.module-monitoring-levels.ejb-container = OFF
server.monitoring-service.module-monitoring-levels.http-service = OFF
server.monitoring-service.module-monitoring-levels.jdbc-connection-pool = OFF
server.monitoring-service.module-monitoring-levels.jms-service = OFF
server.monitoring-service.module-monitoring-levels.jvm = OFF
server.monitoring-service.module-monitoring-levels.orb = OFF
server.monitoring-service.module-monitoring-levels.thread-pool = OFF
359
Monitors
server.monitoring-service.module-monitoring-levels.transaction-service = OFF
server.monitoring-service.module-monitoring-levels.web-container = OFF
To change monitoring level, enter the following commands from the server's "bin" directory:
To obtain the names of the monitoring modules, see the list of available counters.
NeoLoad displays a list of the WARs (Web application ARchive) deployed on the configured server. It
then automatically selects the most appropriate counters for each of the selected applications.
360
Monitors
Available counters
All GlassFish counters are documented here. Depending on the GlassFish monitoring level you have set,
some counters may be automatically hidden because they are not offered by the GlassFish server.
• Sessions. This section allows the user to monitor the sessions for each application.
# rejectedSessions. Number of sessions GlassFish rejected since last call due to maxActive being
reached.
# % rejectedSessions. Percentage of sessions GlassFish rejected since last call due to maxActive
being reached.
# expiredSessions. Number of sessions that expired ( doesn't include explicit invalidations ) since
last call.
• Cache. This section allows the user to monitor the cache for each application.
361
Monitors
Warning
For NeoLoad to monitor EJB's, the following monitoring module must be
activated: server.monitoring-service.module-monitoring-levels.ejb-
container
# EJB Pool. Pool usage statistics for the application server's EJB's.
# EJB Method. Method call statistics for the application server's EJB's.
• JDBC Connection Pool. Connection pool information for each data source.
Warning
For NeoLoad to monitor JDBC connection pools, the following monitoring
module must be activated: server.monitoring-service.module-monitoring-
levels.jdbc-connection-pool
362
Monitors
# NumConnCreated_Count. Count value reflecting the number of connections that were created
by the pool.
# NumConnAcquired_Count. Count value reflecting the number of connections acquired from the
pool.
# WaitQueueLength_Count. Count value indicating the number of connection requests in the queue
waiting to be serviced.
Warning
For NeoLoad to monitor message services, the following monitoring module must be activated:
server.monitoring-service.module-monitoring-levels.jms-service
363
Monitors
# NumMsgs. Current number of messages stored in memory and persistent store. Does not include
messages held in transactions.
# NumMsgsRemote. Current number of messages stored in memory and persistent store that
were produced to a remote broker in a cluster. This number does not include messages included
in transactions.
# TotalMsgBytes. Current total size in bytes of messages stored in memory and persistent store.
Does not include messages held in transactions.
# TotalMsgBytesRemote. Current total size in bytes of messages stored in memory and persistent
store that were produced to a remote broker in a cluster. This value does not include messages
included in transactions.
# DiskUtilizationRatio. Ratio of disk space currently in use to disk space reserved for destination.
# Connection Pool. Statistics for connection pools configured on the application server.
# numconnused-current. Count value reflecting the number of connections that are in use.
# numconnfree-current. Count value reflecting the number of connections in the connection pool
that are free.
# waitqueuelength-count. Count value indicating the number of connection requests in the queue
waiting to be serviced.
364
Monitors
# numconnacquired-count. Count value reflecting the number of connections acquired from the
pool.
# numconncreated-count. Count value reflecting the number of connections that were created
by the pool.
Warning
For NeoLoad to monitor transaction services, the following monitoring
module must be activated: server.monitoring-service.module-monitoring-
levels.transaction-service
Warning
For NeoLoad to monitor thread pools, the following monitoring module must be activated:
server.monitoring-service.module-monitoring-levels.thread-pool
365
Monitors
# Memory. The Java Virtual Machine has a heap that is the runtime data area from which memory
for all class instances and arrays are allocated. It is created at the Java Virtual Machine start-up. Heap
memory for objects is reclaimed by an automatic memory management system which is known as a
garbage collector. The heap may be of a fixed size or may be expanded and shrunk.
# Committed. Amount of memory (in bytes) that is guaranteed to be available for use by the Java
Virtual Machine. The amount of committed memory may change over time (increase or decrease).
The Java Virtual Machine may release memory to the system and committed could be less than
init. committed will always be greater than or equal to used.
# Max. Maximum amount of memory (in bytes) that can be used for memory management. Its
value may be undefined. The maximum amount of memory may change over time if defined. The
amount of used and committed memory will always be less than or equal to max if max is defined. A
memory allocation may fail if it attempts to increase the used memory such that used > committed
even if used <= max would still be true (for example, when the system is low on virtual memory).
# Garbage Collector. Garbage collection is the process that the Java Virtual Machine uses to find
and reclaim unreachable objects to free up memory space. The Sun JVM defines garbage collection in
two modes: minor 'copy' and major 'MarkSweepCompact'. A minor collection runs relatively quickly
and involves moving live data around the heap in the presence of running threads. A major collection
is a much more intrusive garbage collection that suspends all execution threads while it completes its
task. The following monitor are available for both modes:
# ThreadCount. Current number of live threads including both daemon and non-daemon threads.
# PeakThreadCount. Peak live thread count since the Java Virtual Machine started or peak was
reset.
366
Monitors
Configuration
Before the SAP NetWeaver monitor can be used, several NetWeaver server jars need to be installed.
Copy the following files from the NetWeaver installation directory to the <neoload>/jmxlib/
netweaver70 directory:
• <netweaver>/<instance>/<java server>/j2ee/admin/lib/admin.jar
• <netweaver>/<instance>/<java server>/j2ee/admin/lib/com_sap_pj_jmx.jar
• <netweaver>/<instance>/<java server>/j2ee/JSPM/lib/exception.jar
• <netweaver>/<instance>/<java server>/j2ee/JSPM/lib/logging.jar
Connection settings
Defining a monitor on a SAP NetWeaver server requires the name or IP address of the machine to be
monitored, as well as the connection port. The port is the SAP NetWeaver's server access point for the
P4 protocol. You can retrieve the port number using the SAP Management Console at: "Management
Console / SAP Systems / <SAP System name> / <SAP Instance name> / Access
Points". The access point is named P4.
In addition to these settings, a valid user account must be provided if authentication is enabled (same
account as the one used to connect to the SAP NetWeaver Administration Console).
367
Monitors
NeoLoad displays a list of the applications deployed on the configured server. It then automatically selects
the most appropriate counters for each of the selected applications.
Available counters
All SAP NetWeaver counters are documented here.
The first-level nodes in the monitors tree show the domain (only for 7.1.x versions), the instance name
and the cluster's node number respectively.
368
Monitors
# OtherConnectionsCount. Number of connections to the server other than HTTP, IIOP, JMS, P4
or Telnet.
• Sessions. This section allows the user to monitor the server sessions.
# LoggedOffSessionsCount. Number of all security sessions for which the user has successfully
logged off.
# ActiveSessionsCount. Number of all active security sessions. Such sessions can be created for
every protocol that has access to the server: HTTP, P4, IIOP, Telnet, RFC.
• EJB. Counters for EJBs deployed on the NetWeaver server. The EJBs are categorized by type
(Entity Bean, Message Driven Bean, Session Stateful Bean or Session
Stateless Bean) and sorted by EAR.
# CurrentPoolSize. Number of bean instances provided by this pool, which are currently used by
the application or are stored in the pool.
370
Monitors
# ThreadsInProcessRate. Ratio between the number of active threads count and the total size of
the pool.
# ActiveThreadsCount. Number of threads from the thread pool that are executing a runnable task.
• JDBC DataSource. Provides data source connection pool information for each data source.
# Free managed connections number. Number of free ManagedConnections for the specified data
source.
# Waiting for connections number. Number of clients waiting for pooled ManagedConnection.
# Portal Runtime.
371
Monitors
• Request Performance. Counters for JARM (Java Application Response Time Measurement)
performance requests.
# UsageRate. Ratio between the used memory and the total memory of the process.
• Thread Pool. Thread pool counters. These counters are divided between application threads and
system thread.
# ActiveThreadsCount. Number of threads from the thread pool that are executing an executable
task pool. It shows how many threads from the thread pool are currently processing custom tasks.
This monitor does not indicate a problem.
The number of used threads depends on the number of configured threads and the value of
the maximum pool size, and whether this size is reached or whether the pool can still be
resized. Even if the pool is resized to maximum and the value of ActiveThreadsCount and
CurrentThreadCount are the same, this does not indicate a problem. The purpose of the threads
pool is to restrict the request load to a point where the engine can still have enough resources to
process these parallel requests fast enough.
372
Monitors
WaitingTasksCount shows the number of custom tasks that are waiting to be processed, which
means that at the moment there are no free threads in the thread pool although the thread pool is
resized to its maximum size. In this case, the tasks that are waiting to be processed start accumulating
in a queue. Even when the load is high, the threads process a custom task for a certain time and take
the next task from the queue. When the size of the queue grows, it mean that either the request rate
is growing and the server node cannot handle such a high load, or there is a blocking situation in the
server and the threads are not released from the tasks they are currently executing.
The monitor is important to detect how effectively the threading system executes the tasks. With
100% usage rate, caller threads are blocked until some of the tasks that are currently executing finish.
This could be a symptom of a deadlock or a bottleneck.
# WaitingTasksUsageRate. The ratio of the current size of the waiting tasks queue to the maximum
configured size. WaitingTasksUsageRate shows the percentage of the waiting tasks queue that
is currently used.
The ratio shows how effectively the threading system executes the tasks. When the usage is 100%, the
caller threads are blocked until any of the currently executing tasks finishes. This can be a symptom
for a deadlock or bottleneck.
This counter is unlikely to change its value from 0 because it means that the capacity of the requests
queue is exhausted. This is a severe performance problem. This can also be a symptom for a locking
situation (blocking back-end calls or Java level deadlock).
# MaxWaitingTasksQueueSize. Capacity of the waiting tasks queue, where tasks waiting for
execution are stored.
# ThreadPoolCapacityRate. The ratio of the current thread pool size to the maximum pool size in
percentages. ThreadPoolCapacityRate shows the percentage of the maximum pool size that
the thread pool has currently reached. This is an informative monitor that does not indicate a problem.
If the percentage is high, it means that soon the ability to resize the pool will be exhausted. If the
ThreadPoolUsageRate is also high, a requests queue will be formed.
# ThreadPoolUsageRate. Ratio of active threads count to maximum pool size. The outcome is
presented as a percentage.
# UsageRate. Ratio between active threads count to maximum pool size in percent.
373
Monitors
Configuration
Before the SAP NetWeaver monitor can be used, several NetWeaver server jars need to be installed.
Copy the following files from the NetWeaver installation directory to the <neoload>/jmxlib/
netweaver71 directory:
• <netweaver>/<instance>/<java server>/j2ee/JSPM/deploy/lib/sap.com~tc~bl~pj_jmx~api.jar
• <netweaver>/<instance>/<java server>/j2ee/JSPM/deploy/lib/sap.com~tc~exception~impl.jar
• <netweaver>/<instance>/<java server>/j2ee/j2eeclient/sap.com~tc~je~clientlib~impl.jar
• <netweaver>/<instance>/<java server>/j2ee/j2eeclient/sap.com~tc~je~leanClient.jar
• <netweaver>/<instance>/<java server>/j2ee/JSPM/deploy/lib/sap.com~tc~logging~java~impl.jar
Connection settings
Defining a monitor on a SAP NetWeaver server requires the name or IP address of the machine to be
monitored, as well as the connection port. The port is the SAP NetWeaver's server access point for the
P4 protocol. You can retrieve the port number using the SAP Management Console at: "Management
Console / SAP Systems / <SAP System name> / <SAP Instance name> / Access
Points". The access point is named P4.
In addition to these settings, a valid user account must be provided if authentication is enabled (same
account as the one used to connect to the SAP NetWeaver Administration Console).
374
Monitors
NeoLoad displays a list of the applications deployed on the configured server. It then automatically selects
the most appropriate counters for each of the selected applications.
Available counters
All SAP NetWeaver counters are documented here.
The first-level nodes in the monitors tree show the domain (only for 7.1.x versions), the instance name
and the cluster's node number respectively.
375
Monitors
• Sessions. This section allows the user to monitor the server sessions.
# LoggedOffSessionsCount. Number of all security sessions for which the user has successfully
logged off.
# ActiveSessionsCount. Number of all active security sessions. Such sessions can be created for
every protocol that has access to the server: HTTP, P4, IIOP, Telnet, RFC.
• EJB. Counters for EJBs deployed on the NetWeaver server. The EJBs are categorized by type
(Entity Bean, Message Driven Bean, Session Stateful Bean or Session
Stateless Bean) and sorted by EAR.
# CurrentPoolSize. Number of bean instances provided by this pool, which are currently used by
the application or are stored in the pool.
# ThreadsInProcessRate. Ratio between the number of active threads count and the total size of
the pool.
# ActiveThreadsCount. Number of threads from the thread pool that are executing a runnable task.
377
Monitors
# SessionContainer.
• JDBC DataSource. Provides data source connection pool information for each data source.
• Table Buffers. Describes the monitored data for Open SQL table buffers.
# Number of displacements. The total number of displacements in the buffer since buffer instance
startup.
378
Monitors
# Portal Runtime.
• Request Performance. Counters for JARM (Java Application Response Time Measurement)
performance requests.
# UsageRate. Ratio between the used memory and the total memory of the process.
• Thread Pool. Thread pool counters. These counters are divided between application threads and
system thread.
# ActiveThreadsCount. Number of threads from the thread pool that are executing an executable
task pool. It shows how many threads from the thread pool are currently processing custom tasks.
This monitor does not indicate a problem.
The number of used threads depends on the number of configured threads and the value of
the maximum pool size, and whether this size is reached or whether the pool can still be
resized. Even if the pool is resized to maximum and the value of ActiveThreadsCount and
CurrentThreadCount are the same, this does not indicate a problem. The purpose of the threads
pool is to restrict the request load to a point where the engine can still have enough resources to
process these parallel requests fast enough.
WaitingTasksCount shows the number of custom tasks that are waiting to be processed, which
means that at the moment there are no free threads in the thread pool although the thread pool is
resized to its maximum size. In this case, the tasks that are waiting to be processed start accumulating
in a queue. Even when the load is high, the threads process a custom task for a certain time and take
the next task from the queue. When the size of the queue grows, it mean that either the request rate
is growing and the server node cannot handle such a high load, or there is a blocking situation in the
server and the threads are not released from the tasks they are currently executing.
The monitor is important to detect how effectively the threading system executes the tasks. With
100% usage rate, caller threads are blocked until some of the tasks that are currently executing finish.
This could be a symptom of a deadlock or a bottleneck.
# WaitingTasksUsageRate. The ratio of the current size of the waiting tasks queue to the maximum
configured size. WaitingTasksUsageRate shows the percentage of the waiting tasks queue that
is currently used.
The ratio shows how effectively the threading system executes the tasks. When the usage is 100%, the
caller threads are blocked until any of the currently executing tasks finishes. This can be a symptom
for a deadlock or bottleneck.
This counter is unlikely to change its value from 0 because it means that the capacity of the requests
queue is exhausted. This is a severe performance problem. This can also be a symptom for a locking
situation (blocking back-end calls or Java level deadlock).
# MaxWaitingTasksQueueSize. Capacity of the waiting tasks queue, where tasks waiting for
execution are stored.
380
Monitors
# ThreadPoolCapacityRate. The ratio of the current thread pool size to the maximum pool size in
percentages. ThreadPoolCapacityRate shows the percentage of the maximum pool size that
the thread pool has currently reached. This is an informative monitor that does not indicate a problem.
If the percentage is high, it means that soon the ability to resize the pool will be exhausted. If the
ThreadPoolUsageRate is also high, a requests queue will be formed.
# ThreadPoolUsageRate. Ratio of active threads count to maximum pool size. The outcome is
presented as a percentage.
# UsageRate. Ratio between active threads count to maximum pool size in percent.
Connection settings
Defining a monitor on a LiveCycle Data Services server requires the name or IP address of the machine
to be monitored, as well as the connection port. The port is the JMX port that is configured to the Java
Virtual Machine.
381
Monitors
If the JMX connection has not been configured, add the following parameters to the application server's
start-up script:
-Dcom.sun.management.jmxremote=true
-Dcom.sun.management.jmxremote.port=9004
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
To enable authentication, or for more information on configuring the JMX connection, please refer to the
relevant Sun documentation: http://java.sun.com/j2se/1.5.0/docs/guide/management/agent.html.
In addition to these settings, a valid user account must be provided if authentication is enabled (see
com.sun.management.jmxremote.authenticate property).
382
Monitors
When selecting an application, NeoLoad displays a list of endpoints configured for this application. It then
automatically selects the most appropriate counters for each of the selected endpoints.
Available counters
All LCDS counters are documented here. The first tree level shows the available message brokers.
• EndPoints. Counters for the defined endpoints on the server. Not all counters are available for all the
end points (e.g.: streaming counters are only available for streaming endpoints).
# BytesDeserialized. Total amount of bytes received by the endpoints since last call.
# BytesSerialized. Total amount of bytes sent by the endpoints since last call.
# ServiceMessageCount. Count of messages decoded by this endpoint and routed to the broker.
383
Monitors
# Data Services.
# Remoting Services.
384
Monitors
• Sequence Manager.
• Throttle Manager. Statistics for messages whose throughput has been throttled.
385
Monitors
386
Chapter 8. Runtime
Test Settings
A scenario contains all the settings required to run a load test:
Scenarios
NeoLoad can generate several scenarios for each project, making it easy to switch from one test
configuration to another: a short test with a ramp-up load, a very long test with load peaks, a test with
a realistic load etc..
The simulated load in a scenario is determined by a duration and a number of virtual users. Each virtual
user plays the pages contained in its profile, then stops. NeoLoad immediately runs another virtual user
with the same profile to maintain the predetermined load.
387
Runtime
Duration Policy
Sets the population duration : unlimited, set time, or iterations. One iteration represents one virtual user
played once, through to its end. When iterations are selected, a population's runtime must be defined by
entering the number of iterations in the "Duration Policy" panel.
In any event, a test can be stopped at any point by clicking on the "Stop" button.
Load Policy
Specifies the number and variety of virtual users to be generated. Select one or more populations to test
and the load policy for each population:
In standard mode:
• Constant - Generates a fixed number of virtual users.
• Ramp-up - Generates a number of virtual users that increases throughout the test. Useful for checking
the server's behavior under an increasing load.
• Peak - Generates a fixed number of virtual users with periodic phases of high load. Useful for checking
whether the server recovers its normal behavior after a load peak.
• Custom - Allows you to set the load to be applied by plotting the virtual user variation curve. You may
import the curve using a CSV file. The file must be in the format Time (seconds) <separator>
Number of users.
In iteration mode:
In this mode, the population is played for the number of iterations specified in the panel. Each simulated
user is run for a predetermined number of iterations without any break between iterations. Towards the
end of the test, some users will have finished their iterations and some others will still be active, which is
why the load decreases until all the users are finished.
For ramp-up or peak load, adding users for a new phase takes place once all existing users have finished
their iterations. Before each new phase therefore, and depending on the virtual user definition, the load
may drop to 0.
• Constant - Defines the number of play iterations for the virtual users.
• Ramp-up - The "Number of iterations" field allows you to set the test duration, since the test ends
once each virtual user launched for a first iteration completes the number of iterations entered in the
"Number of iterations (for each initial user)" field. Subsequent users launched at each increment do not
affect the test duration.
Example: a ramp-up load of 10 users, incremented by 2 users every 5 iterations. Running the test with
the number of iterations set at 20 will give the following load:
# 10 users for 5 iterations
# 12 users for 5 iterations
# 14 users for 5 iterations
# and finally 16 users for 5 iterations. (The test ends once the first 10 users have completed 20 iterations.)
• Peak - The "Number of iterations" field allows you to set the test duration, since the test ends once each
virtual user launched for the first peak stage completes the number of iterations entered in the "Number
of iterations (for each initial user)" field. Subsequent users launched for each peak do not affect the
test duration.
388
Runtime
Example: a minimum peak load of 10 users for 5 iterations and a maximum peak load of 20 users for 3
iterations. Running the test with the number of iterations set at 20 will give the following load:
# 10 users for 5 iterations
# 20 users for 3 iterations
# 10 users for 5 iterations
# 20 users for 3 iterations
# and finally 10 users for 4 iterations.(The test ends once the first 10 users have completed 20 iterations.)
• Custom - The number of virtual users to be launched and the number of iterations are set by plotting
the load curve. You may import the curve using a CSV file. The file must have the following format :
iteration count <séparateur> Number of users.
The Load Generator Hosts list shows the load generators available for use. Each load generator running
on the local network is automatically detected by the controller on start up. Click "Discover" to auto-
discover the load generators currently running (the discovery make take a few seconds). Load generators
may be declared manually by entering the list of host names or IP addresses.
Load generators that are running are indicated by a green light; those that are halted by a red light; and those
that require an update by an orange light (See the section called “Automatically updating load generators”).
Select the load generators to be used for each population. The controller distributes the virtual users among
the selected, running load generators.
This panel lists all the network interfaces detected for the load generator. For those hosts acting as network
routers for several networks, select the network card to be used by the load generator. All the host's IP
addresses are listed on the selected interfaces. By default, a single IP address is selected and all the virtual
users generated by that load generator use that same address.
389
Runtime
Defining several IP addresses allows the user to test applications that use a load balancer based on IP
addresses. In this case, a random IP address is assigned to each virtual user. The IP addresses must be
available, i.e. not used by other machines within the network. Check with a system administrator to make
sure these addresses may be used.
Configure IP spoofing
To define IP addresses in the list, define additional IP addresses in the load generator's operating system
settings.
These parameters will modify the load generator's network settings. Please check with a system
administrator before changing the host's settings. In some documentation, multiple IP address settings are
referred to as virtual IP settings.
• Windows.
3. Select Internet Protocol (TCP/IP) in the list, then click on the Properties button.
4. Multiple IP address configuration is not available in DHCP mode. If DHCP mode is set (i.e.
"Obtain an IP address automatically" is selected), this setting must be changed to
the static IP mode (i.e. "Use the following IP address").
390
Runtime
5. Click on the Advanced button to display the list of defined IP addresses. Click on the Add
button.
6. Enter the new IP address and subnet mask in the appropriate boxes. Then click on the Add button.
• Linux. Multiple IP address configuration is not available in DHCP mode. Change the settings to use
static IP addresses. Use the ifconfig command to add a new IP address.
For example, the command line for adding 2 new IP addresses (say, 192.168.1.10 and 192.168.1.11)
to the eth0 network interface would be:
Load balancing
The virtual users used in the test are spread among all the available load generators. All the load generators
generate the same number of virtual users by default.
Increasing the load factor proportionally increases the number of virtual users created by each load
generator. For example, where NeoLoad needs to creates 5 more virtual users and load generator A has a
load factor of "3" and Load generator B a load factor of "2", A will create 3 virtual users and B will create
2. The more powerful machines may be configured to create a greater number of virtual users.
391
Runtime
4. Click on the "Update" button (twin arrows icon). If the update is unavailable or unnecessary, the
button is grayed-out.
When the test is launched, NeoLoad checks the versions of the load generators being used and prompts
the user to update those that are obsolete. Once the load generators have been updated, the test continues
as normal.
A controller cannot update a load generator handled by a different controller. In this case, perform a manual
update using the standard installer.
If the load generator's agent has been started with an account that does not have privileges required to
update the program, then the load generator cannot be updated automatically. In this case, perform a manual
update using the standard installer.
392
Runtime
Important
If the update fails, or if the load generator fails to function properly after an automatic update,
perform a manual update using the standard installer.
Note
This function is only available for load generators having the same major and minor version
numbers as the controller. For example, the controller version 3.1.2 can update the load generator
3.1.0 but cannot update the version 3.0.9. When the automatic udate is not supported, the load
generators must be updated manually using the standard installer.
393
Runtime
# "Sequential": the population is started once the selected population has finished.
How virtual users start may also be defined: simultaneously or with a preset delay. This policy is used
each time new virtual users are created, either at each load increase for a ramp-up load policy or at each
load peak for a peak load policy.
# "Immediate": the users are stopped at the end of the time set for the population; they do not finish
their actions.
# "Delayed": set a timeout for virtual users to end their actions before they are stopped.
# "Unspecified": the virtual users are given time to finish their actions.
• Advanced Runtime:
# Monitoring settings : enable a monitoring period before and/or after the test. This allows you
to check the stressed server's behavior prior to running the test and the load test's impact upon it.
394
Runtime
• Debug mode: This mode logs the runs (requests and responses) of all the virtual users. See the
documentation on starting a test in debug mode.
Warning
Launching a scenario in debug mode can severely hamper performance, especially when too
many virtual users are started on a single load generator.
To carry out a large-scale test, we recommend you use several load generators with lighter
loads.
Details of the virtual users' runs are available in the test results in the "Debug" tab. See the
documentation on debug mode for more details.
Rendezvous policies
For detailed information on configuring rendezvous policies, see the documentation on configuring a
scenario's rendezvous.
Scheduling a test
NeoLoad allows you to schedule a test at a specified time.
395
Runtime
8. Click "OK".
Note
NeoLoad must be running at specified time to be able to run the tests.
396
Runtime
Runtime supervision
The Runtime section displays real-time information while the test is running.
397
Runtime
In normal mode, the test starts with all the system's resources used to generate the virtual users. Click on
the "Start" button to start a test in normal mode.
Debug mode allows you to validate the various virtual user profiles defined in the scenario. To validate a
test scenario in debug mode, use the following procedure:
1. Set the level of information NeoLoad should retrieve in the scenario's advanced settings.
3. At the end of the test, the "Debug" tab in the "Results" section allows you to validate the virtual
user runtimes.
Warning
Launching a scenario in debug mode can severely hamper performance, especially when too many
virtual users are started on a single load generator.
To carry out a large-scale test, we recommend you use several load generators with lighter loads.
When you click on either of the buttons, a new window opens in which you may add a description for
the test to be launched. This description will be inserted in the test results and will serve to identify the
purpose of the test.
398
Runtime
This window also features a check box that gives you the option of updating the cache. This check box
is enabled where appropriate, that is to say only if a virtual user has been configured with the cache
management set to "Returning user" mode. If this box is checked at the start of the test, a virtual
user is launched in order to retrieve the cache information.
The test then starts and its progress can be followed in real time.
Once these steps have been completed, the Results screen is displayed.
Runtime Overview
The "Runtime overview" tab displays the following statistics:
Name Description
Scenario name Name of the scenario currently running
Start time Scenario start date
Elapsed time Time elapsed since test started
399
Runtime
Name Description
Total hits Total number of hits since test started
Total throughput Total number of megabytes received from server
Total errors Total number of errors since test started
Total alerts Total number of alerts since test started
Total users launched Total number of virtual users launched since test
started, including those currently running.
Average response time (requests) Average response time for HTTP requests since
test started
Average response time (pages) Average response time for web pages since test
started
Average hits/sec. Average hits/sec. since test started
Average throughput Average throughput since test started
Current response time (requests) Average request response time for HTTP requests
over the last second
Current response time (pages) Average request response time for web pages over
the last second
Current hits/sec. Average hits/sec. for HTTP requests over the last
second
Current throughput Average throughput over the last second
Current users count Number of virtual users currently running
Graphs
The main statistics are plotted in real time: number of virtual users currently running, error rate (errors/
sec.), number of alerts, hits/sec. and average request response time.
Load generators
Monitors the load generators' activity:
• Virtual Users - Number of virtual users currently being run by that load generator.
• CPU Load - CPU load for the machine hosting the load generator.
• Memory Used - Memory used, expressed as a percentage of the memory allocated to the load generator
program (the program's default memory allocation is 384Mb).
• Throughput - Throughput in Megabits per second for the network interface used on the load generator.
If the CPU Load or Memory Used figure regularly exceeds 90%, this indicates that the load generator is
overloaded. Run the test with fewer virtual users or a longer think time, or use additional load generators.
400
Runtime
Real-Time Graphs
Statistics and the monitors set on the servers can be plotted on graphs during the test runtime. When the
test is first run, NeoLoad creates default graphs. These can be modified during the test, or new graphs
can be created. When subsequent tests are run, NeoLoad restores the settings of the graphs used in the
previous test.
The legend panel displays the legend for the selected graph.
Note
Depending on the monitor value sampling interval, there may be a delay before the curves are
displayed on the graph (30 seconds using the default parameters).
The statistics can be accessed in the "Repository" tab and monitors in the "Monitors" tab.
Monitors for general statistics are available for plotting by default: number of virtual users, number of
pages per second and their response times, average test throughput, number of alerts etc. Statistics for CPU
and memory usage and throughput, in percentage, are also available for each load generator.
401
Runtime
Filtering by a specific virtual user displays only that virtual user's web pages and actions (containers, loops
etc..).
Likewise, filtering by a specific population displays only that population's virtual users.
Likewise, filtering by a specific load generator displays only that load generator's populations and virtual
users. In that case, the statistics displayed are the one get by the selected load generator.
Note
The load generator filter is disabled by default. It can be enabled in the project's preferences,
section "Runtime parameters". It will be taken in account for the next test. See the section
called “Statistics”.
Graph features
The graphs' features are the same as those for the Runtime and Results views. See the section called
“Graph Features”.
Plotting interval
The graph curves are plotted using a plotting interval (time interval between two points on a same curve)
which is separate from the monitoring interval.
For example, with the default plotting interval of 15 seconds and a monitoring interval of 5 seconds,
NeoLoad will use the average of the 3 recorded monitor values to produce the point on the curve.
A long plotting interval produces a more readable curve, whereas a short plotting interval produces a more
accurate curve.
402
Runtime
Alerts
The icon indicates a performance counter for which one or more alert thresholds have been set.
Current and past alerts are shown by an extra notification against the performance counter's icon: for
a warning alert, for a critical alert.
Alerts are also displayed on graphs as yellow and red zones. The alert thresholds are only shown for the
graph curve selected in the legend bar.
Real-Time Errors
Error details may be obtained while the test is running. Click on the "Refresh" button to display the
latest error occurrences.
403
Runtime
• Code - Error code: the HTTP error code as defined by the HTTP protocol or the NeoLoad error code.
• Page - Link to the definition of the page containing the request with the error.
• Load Generator - Name of the load generator that played the request containing the error.
• Population - Population within which the request containing the error originated.
• Virtual User - Virtual user within which the request containing the error originated.
Server response
Displays the server response. If the server could not be contacted, this contains an error message generated
by NeoLoad.
404
Runtime
Assertions
Displays the assertion results (validations) for the response. Empty if the assertion is validated.
Previous request
Displays details of the previous request (determined by the referrer) to help find the root cause of the
current error. Indeed, an anomaly or error on a page may cause the following page to fail.
Real-Time Alerts
Alert details may be obtained while the test is running. Click on the "Refresh" button to display the
latest alert occurrences.
Alert Table
• Time. Alert start and end time, relative to the test start time.
• Name. Alert name. The name comprises the corresponding performance counter's name plus a text
description of the alert threshold.
Alert details
Select an alert to obtain the following details:
• Monitored Machine. Name of the monitored machine that triggered the alert.
405
Runtime
Alert graphs
When an alert is selected in the table, the graph displays all the alerts relating to the same performance
counter: a red zone for critical alerts and a yellow zone for warning alerts. The zone corresponding
to the selected alert is shown in a slightly darker color.
Tip
Click on an alert zone to select the corresponding entry in the table.
Graph Options
• Critical Alerts. Displays the thresholds and zones indicating critical-level alerts.
• Warning Alerts. Displays the thresholds and zones indicating warning-level alerts.
406
Runtime
• Current Action - Name of the container the instance is currently running. If the virtual user does not
contain any containers, the virtual user's name is displayed.
• Number: by default, only the last hundred users currently running are displayed.
2. The virtual user monitoring window appears. The real-time monitoring will start at the next page
played by that virtual user. Therefore, you may have to wait until the first monitoring information
displays.
Note
Only one virtual user may be monitored at a time.
Virtual user monitoring may take a little time to display as the virtual user may be waiting out a
think time on an action, a delay, container pacing, or it may be waiting at a rendezvous.
Warning
The HTML rendering of pages run by the virtual user may be incomplete in some cases. This
is because certain application resources (e.g. images, CSS, JavaScript) may have been retrieved
from the previous pages before the viewing window was opened, making them unavailable for
the HTML rendering.
407
Chapter 9. Results
General Information
Selecting a Test
Use the Results drop-down list to select which test results to view within the current project. This choice
will be reflected in all subsequent result panels.
Deleting a Test
There are two ways to delete a test result:
• Use the Results Manager, accessed from the "Edit / Results Manager" menu item.
• Right-click on the Results drop-down list, then select the Delete option.
Filtering by a specific virtual user displays only that virtual user's web pages and actions (containers, loops
etc..).
Likewise, filtering by a specific population displays only that population's virtual users.
Likewise again, filtering by a specific load generator displays only that load generator's populations and
virtual users. In this case, the statistics displayed are the ones pertaining to the selected load generator.
Note
The load generator filter is disabled by default. It can be enabled in the project preferences'
"Runtime parameters" section. The change will take effect for the next test. See the section
called “Statistics”.
A container contains one or more web pages and actions (containers, loops etc..).
408
Results
• The response time is the combination of the response times for the requests contained in the page or
container.
• The size is the sum of the sizes of all the requests contained in the page or container.
• A page or container is flagged as containing an error if one of its sub-requests contains an error.
Each time a Push message is executed, it results in a hit on that message. Several messages may be executed
from a same server response via the Push channel.
The response time is taken as the time delay between the moment the server decides to update the client
and the moment the client receives the update. In fact, when using a Push framework, the request response
time (time between sending a request and receiving its response) is virtually meaningless.
NeoLoad calculates the response time using a timestamp embedded in the server response. Depending
on the framework being used, the timestamp extraction needs to be configured manually. See the section
called “Push Messages”.
Important
For the response times for Push message to be coherent, the load generators' and application
server's system clocks need to be synchronized.
Where the server's timestamp cannot be extracted, or the calculated response time is negative (load
injectors and server have not been synchronized), NeoLoad shows a response time of 0. If all the statistics
for message response times show <0.01, make sure the machines are synchronized and check the regular
expression used to extract the timestamp in the Push request's configuration.
409
Results
Select
Click "Select" to display the results of the selected test in the "Results" section of NeoLoad.
Compare
Click "Compare" to compare two tests in the "Results" section of NeoLoad.
A dialog box allows you to select the results to compare and to label them with a short label.
The label length cannot exceed 5 characters. The default labels are 'A' and 'B'.
Tip
Before clicking the Compare button, select two tests in the list (click then ctrl-click) to pre-fill
the comparison dialog box.
See the Comparing Two Test Results chapter for more details.
Filtering
Click the "Filter" button to filter a test result according to various criteria. See the chapter on Filtering
a Test Result for more information.
Test folder
Click the "Test folder..." button to open the directory containing the test results.
Generating a Report
Select the appropriate test results then click on "Generate report" to launch the Generate a Report
Wizard. This wizard allows you to generate either a simple report or a results comparison report.
Deleting a Test
Click on "Delete" to permanently delete a test result. Deleting superfluous test results is recommended
to free up disk space.
Warning
Deleting a test result deletes the files stored on the hard disk. This operation is irreversible.
410
Results
Test Summary
The test summary contains all the main statistics for the test.
The button on the top right-hand side of the tab allows you to generate a report for the selected test.
Selecting a Summary
To display a test result summary, select the test in the "Results" drop-down menu.
Content
Test summary
This tab displays basic details of the test: project and scenario name, test duration, load policy etc..
Statistics summary
Global statistics:
411
Results
• Total throughput - Sum of the sizes of the responses to all the requests played. (does not include
upstream).
• Total users launched - Once a virtual user has finished its run, a new instance of the user is launched to
maintain the desired load. "Total users launched" indicates the total number of user instances
launched.
• Total action errors - Total number of logical actions(e.g. JavaScript actions) with errors
• Total duration alerts - Total duration of alerts as a percentage of total test duration.
Hot spots
Focuses on significant results. The times are expressed in seconds.
Top 5 errors
The five pages having produced the most errors.
Top 5 alerts
The five longest alerts filtered by alert importance (critical alerts first, followed by warning alerts).
The duration is the duration of the different occurrences of an alert as a percentage of the total test duration.
412
Results
Errors
Summary of errors by error type.
Alerts
This section displays the details of alerts triggered at the monitor level. The section only lists monitors that
have at least one performance counter with at least one alert threshold set.
For each monitor type: number of performance counters that triggered at least one critical alert, number
of performance counters that triggered at least one warning alert and number of counters with at least one
alert threshold set.
An icon is shown to indicate the state of each type of monitor with counters that have alert thresholds set:
• The icon indicates that the counters triggered at least one critical alert.
• The icon indicates that the counters triggered at least one warning alert but no critical alerts.
• The icon indicates that the counters triggered no critical or warning alerts.
General statistics
This section displays aggregated statistics for the virtual users, containers, pages and requests. See the
documentation on Virtual user, container, page and request results for more details on the results displayed.
Monitor results
Monitors group together performance counters and indicators. The performance counters and indicators
are grouped by monitored machine and by monitor (Tomcat, MySQL...).
413
Results
Alert results
The alerts are grouped by monitored machine and by monitor (Tomcat, MySQL...).
Scenario
This section shows a summary of the test scenario's configuration, with the following information:
• Results summary
• Rendezvous policies
Main graphs
This section includes a collection of predefined graphs:
• Hits/s
• Errors
• Throughput
Graphs
Graphs allow you to see how the statistics evolve over the test's duration.
414
Results
Important
Please refer to the section called “General Information” for details on various topics affecting
this subject, such as filtering by virtual user.
Graph templates, available under the "Templates" tab, give you an immediate view of the application's
behavior during the load test. You may also define custom graph templates.
Note
The graphs in the "Results" section are saved in the current project and are restored when the
project is opened.
You may also jump to adjacent graphs using the arrow keys.
Plotting a statistic
1. Select the element to be plotted in the tree: web page, container or HTTP request. Use "All pages"
for an average of all pages (for one virtual user or for all virtual users) or "All requests" for an
average of all requests (for one virtual user or for all virtual users).
If the selected node is a child of the "Shared Containers" node, the plotted statistics represent
the aggregated statistics for all the virtual users that contain that element.
Note
For more details on shared elements, see, the section called “Shared Containers”.
415
Results
2. Select the statistic to plot: average time, maximum time, minimum time, hit rate, errors, throughput
(Kb/s)...
4. Use the ">" button or drag and drop the item or statistic onto the graph panel on the right.
Plotting a monitor
1. Click on the Monitors tab.
4. Use the ">" button or drag and drop the item or statistic onto the graph pane on the right.
Deleting a graph
1. Select the graph to be deleted.
Important
When a graph is deleted, it is replaced by a blank graph space. This blank graph can be deleted
if it is not the last remaining graph.
• Select the element in the caption bar and press the "Del" key.
• Select the element in the caption bar, right-click and select "Delete".
• Select the element in the caption bar and click the "<" button in the button toolbar.
• Right-click on the graph and select "Delete a curve".
Important
Deleting the last remaining curve in a graph deletes the graph.
Moving a graph
The layout of the graphs can be changed. To move a graph, drag and drop the graph to be moved to the
new position (existing graph or "Create a new graph" position).
416
Results
To select the graph, either click on the edge of the graph, or press the Shift key and click in the center
of the graph.
Maximizing/minimizing a graph
You may adjust the size of a graph to occupy all the available space, or minimize it.
Graph Features
Zoom
Click and hold on the mouse button to select the rectangular area to zoom in on. The zoom takes effect
when the mouse button is released.
Press and hold the "Ctrl" key to obtain a zoom area that automatically takes in the entire vertical space.
Click on the graph to return to normal view.
Pop-up menu
Right-click on the graph for the following options:
Caption bar
• View - Displays or hides the curve. This does not change the other curves or the scale factors.
417
Results
• Color - Curve color. Can be edited: double-click to display the color picker.
• Scale - Scale factor. All the curve values are multiplied by this factor before being plotted.
• Test - Name of the test associated with the curve.
• Name - Name of the element being plotted (web page, HTTP request, monitor...)
• Statistic - Statistic name. Empty if N/A. (See Filtering).
• Value - Current value pointed by the mouse cursor.
• Unit - Statistic unit. Empty if N/A.
• Virtual User - Virtual user name. Empty if N/A. (See Filtering).
• Population - Population name. Empty if N/A. (See Filtering).
• LG - Load generator name. Empty if N/A. (See Filtering).
Alerts
The icon indicates a performance counter for which one or more alert thresholds have been set.
Alerts are shown by an extra notification against the performance counter's icon: for a warning alert,
for a critical alert.
Alerts are also displayed on graphs as yellow and red zones. The alert thresholds are only shown for the
graph curve selected in the legend bar.
418
Results
Note
Not all test data may be exported at one time.
Options
The Graph Options panel, accessed from the pop-up menu, allows you to modify the following items:
• Graph title,
• Graph description,
• Horizontal axis.
419
Results
Graphs may be plotted using different data for the horizontal axis:
Here is an example of a curve showing the number of hits/sec. for a ramp-up load, using the number of
virtual users as the horizontal axis data:
Percentile graphs
A percentile graph may be created to analyze the spread of a statistic's values during a test. This type of
graph is used to determine the percentage of a test statistic at a set value. This may reveal, for example,
that 80% of the response times for web page P were under 5 seconds.
420
Results
2. Use the ">" button or drag and drop the feature to create a new graph.
The "Templates" tab allows you to save time in plotting default graphs for average page response times,
test throughput etc.
1. Create a graph in the normal way (select the statistics or monitors, colors...).
3. Select a custom template group, or create a new group by right-clicking on the "Custom
templates" node.
421
Results
4. Add the current graph to the template by right-clicking on the group's node or by dragging and dropping
it.
The templates are saved to the project. When a test result cannot be traced on a graph template in its
entirety, the graph shows all the statistics and monitors that can be plotted. A case in point is where the
template includes a statistic for a page that wasn't played during the test.
2. Select the second test, and plot the same statistic on the same graph
Note
The same method may be used to compare the results of several tests.
Scale factor
The scale factor can be edited for each plotted curve in the caption bar of the select graph.
Values
This tab allows you to sort and plot elements quickly.
422
Results
Important
Please refer to the section called “General Information” for details on various topics affecting
this subject, such as filtering by virtual user.
Element Types
The "type" drop-down list allows you to select the type of elements to be shown in the panel: virtual
users, containers, pages, HTTP requests, actions (loop, while etc.), performance counters or indicators.
Results Table
The results table shows the statistics for virtual users, containers, pages or HTTP requests:
Tip
Right-click on an element name, such as a request or page, to switch to its definition in the virtual
user profiles.
• Min - Minimum value for the counter over the entire test duration.
• Avg - Average value for the counter over the entire test duration.
• Max - Maximum value for the counter over the entire test duration.
• Sev - The highest severity level of triggered alerts.
• % critical - Percentage of time spent at critical alert level.
• % warning - Percentage of time spent at warning alert level.
423
Results
Tip
Filter on the Sev column to identify quickly all the counters that triggered an alert.
Advanced statistics
The advanced statistics include standard deviation, median and the average 90%. These statistics are not
computed when a filter is applied on load generators (see the section called “Filtering by Load Generator,
Population or Virtual User”) or when the "Computing statistics" step has been interrupted by the
user at the end of the test.
Advanced statistics computation can be enabled when using filters on load generators. The calculation
is performed during the "Computing statistics" step at the end of the test. The calculation time
depends on the number of load generators and can be very long.
4. Restart NeoLoad.
If the "Computing statistics" step takes too long at the end of the test, advanced statistics
computation can be fully disabled.
4. Restart NeoLoad.
Plotting Curves
Select an HTTP request or web page to display the selected curves. Change the curves displayed for the
selected element by checking or clearing the statistics' check boxes. You may zoom in on the curves as
described in the the section called “Graphs” paragraph.
Right-click on a performance counter's graph to hide/un-hide the alert zones and thresholds.
Indicators
Indicators are performance counters that contain text information. For example, an indicator may contain
text giving details of a database server's version .
424
Results
Exporting Data
Data for the selected element (HTTP request, page or container) may be exported using the Export button.
Errors
This tab contains details of the HTTP request errors.
425
Results
Important
Please refer to the section called “General Information” for details on various topics affecting
this subject, such as filtering by virtual user.
General Information
The number of errors displayed varies depending on the load injector, population and virtual user selected
during filtering. If the "Storage capacity exceeded" warning message displays, it indicates that
the actual number of errors recorded during the test exceeds the number of errors displayed. By default,
the maximum number of error details stored is 20,000.
Note
Increasing the maximum number of stored errors will have an impact on NeoLoad's performance.
Server response
Displays the server response. If the server could not be contacted, this contains an error message generated
by NeoLoad.
426
Results
Note
The details of the response are only stored and displayed for the first few errors in each request. If
the details are not available ("Response not stored" message), go back to the first requests flagged
in error to obtain more details.
Assertions
Displays the assertion results (validations) for the response. Empty if the assertion is validated.
Previous Request
Displays details of the previous request (determined by the referrer) to help find the root cause of the
current error, since an anomaly or error on a page may cause the following page to fail.
Alerts
The Alerts table displays details of the alerts that were triggered on performance counters during the test.
Each line in the table corresponds to a period of time during which the alert threshold was exceeded.
• Time. Alert start and end time, relative to the test start time.
• Severity. Alert severity level.
• Name. Alert name. The name comprises the corresponding performance counter's name plus a text
description of the alert threshold.
General Information
427
Results
• Monitored machine
• Monitor
• Alert severity level
The number of alerts displayed varies depending on the filters used. If the "Storage capacity
exceeded" warning message displays, it indicates that the actual number of alerts recorded during the test
exceeds the number of alerts displayed. By default, the maximum number of alert details stored is 50,000.
Note
Increasing the maximum number of stored alerts will have an impact on NeoLoad's performance.
Alert Information
Select an alert to display the following information:
• Monitored machine. Name of the monitored machine that triggered the alert.
• Monitor. Name of the monitor that triggered the alert.
• Duration. Alert duration.
• Description. Alert description.
• Delay trigger. Trigger delay for the threshold corresponding to the alert.
Alert Graphs
When an alert is selected in the table, the graph displays all the alerts relating to the same performance
counter: a red zone for critical alerts and a yellow zone for warning alerts. The zone corresponding
to the selected alert is shown in a slightly darker color.
Tip
Click on an alert zone to select the corresponding entry in the table.
Graph options
Check the following boxes to display the corresponding elements:
428
Results
Debug
The "Debug" tab is enabled when the scenario has been launched in Debug mode. See the documentation
on starting a test in Debug mode and changing the data logging level.
This tab shows the virtual users run during the test.
Important
This tab is disabled if the test has not been launched in Debug mode.
Only those virtual users fulfilling the scenario's Debug mode criteria are available. By default,
only virtual users containing errors are available.
• Page count: Number of pages executed by the user during the test.
• Request count: Number of requests executed by the user during the test.
429
Results
the "Display virtual user" button (also available via the pop-up menu or by double-clicking on
the virtual user).
The virtual user's runtime is displayed in the validation window (see the section on validating a virtual
user for more information on the validation window).
Binary responses are not recorded in Debug mode for performance reasons.
Reports
NeoLoad allows you to generate reports based on test results containing predefined data, graphs and
statistics. A report may also contain custom graphs and comments.
• Click the "Generate report" button in the "Results" section's "Test Summary" tab.
• Open the Results Manager, select the appropriate test and click the "Generate report" button.
Note
The report setting items are saved in the NeoLoad settings. The report settings are common to
all projects.
Report Type
430
Results
The first step in the wizard allows you to select the type of report:
• Standard Report. A report for a single test. Select the desired test results in the drop-down list.
• Comparison Report. A report that compares two sets of test results. Select the test results you want
to compare in the drop-down lists. The "label" field allows you specify the label to be used to identify
the test in the report, in particular in the table column names.
Report Contents
• Cover Page. Click on the root of the "Content" tree to add a comment to the cover page. Only
PDF and MSWord format reports have cover pages.
• Sections. Check the boxes to select which sections to include in the report. The summary box cannot
be un-checked.
• Main Graphs. Check the boxes to select which predefined graphs to include in the report.
Select the graph in the tree to edit its title and description.
• Custom Graphs. The "Main Graphs" section invites you to include in the report all the custom
graphs in the "Graphs" tab.
Check the boxes to select which custom graphs to include in the report..
Select the graph in the tree to edit its title and description.
Note
Editing the graph title and description changes these items in the graphs in the "Graphs" tab
and vice-versa. Since custom graphs are saved with the project, the titles and descriptions also
are permanent.
431
Results
Output Options
Format
The available formats are:
• Word - Generates a report in RTF format. The report is best viewed in MS Word; this format is not
recommended for OpenOffice.
• PDF - Generates a report in PDF format.
• HTML - Generates a report in HTML format with a menu.
• XML - Generates a report in XML format with its DTD and the graph images by default. This format
is useful when launched from the command line to automatically validate the results as part of the
application's validation process. The report may be customized by using a style sheet (XSL).
Presentation
Click the button to edit the report presentation options (does not apply to XML format reports).
432
Results
Choose the category to edit on the left, then modify the corresponding colors or images.
Only PDF and Word format reports have a cover page and footers. Therefore, these items cannot be edited
for an HTML format report HTML.
Colors
The color picker includes a color preview button and an editable text field that displays the color's
hexadecimal equivalent. Clicking on the colored button opens a visual color picker.
Images
The image picker includes a first button that opens a file selection dialog box. A second button opens
an image preview that displays the actual print size based on the image's print resolution and the screen
resolution.
Important
For optimum rendering, we strongly recommend using images with a high print resolution such
as 300 dpi. See the documentation supplied with Photoshop [http://livedocs.adobe.com/en_US/
Photoshop/10.0/help.html?content=WSfd1234e1c4b69f30ea53e41001031ab64-7936.html] or
Gimp [http://docs.gimp.org/en/gimp-image-print-size.html] for example.
Output
Select the file name for the report to be generated. For HTML and XML format reports, the images
directory containing the images included in the report is created in the same directory as the report file.
Open
When the "Launch generated report" option is selected, the generated report is opened
automatically using the program associated with the report's file extension (Windows only).
Launching a comparison
433
Results
4. Edit the labels of the two tests and click "OK". The default labels are 'A' and 'B'.
In Compare mode, only the statistics for Avg, Max and Err are displayed, together with the value in the
first test, value in the second test, and percentage difference for each item.
Tip
You may display additional stats in the "Values" panel using the column selector in the upper
right-hand corner of the table.
The percentages are displayed in different colors depending on whether the statistic's performance has
improved or deteriorated:
Consequently, a positive percentage (+20%) will be color-coded differently, depending on the context: for
example, red in the case of a time delay or green in the case of Hits/sec.
• Open the Results Manager, select a result and click on the "Select" button.
In Compare mode, only the statistics for Avg, Max and Err are displayed, together with the value in the
first test, value in the second test, and percentage difference for each item.
4. Edit the labels of the two tests and click "OK". The default labels are 'A' and 'B'.
434
Results
Warning
Only results generated by NeoLoad version 3.0.0 and later can be filtered.
The GUI displaying the test results allows you to view a filtered test result in the same way as you would
any other result.
Available Filters
Several filters may be applied, either separately or jointly. Details of the filters and their effects are set
out below.
• Start date sets the start date for the time period to be saved in "hh:mm:ss" format.
• End date sets the end date for the time period to be saved in "hh:mm:ss" format.
Note
The "hh:mm:ss" date format is detailed as follows:
435
Results
The start and end dates for the filtered test results generated are calculated based on the selected time
period.
1. If it is not already enabled, enable time period filtering by checking the appropriate "Enable" box.
The wizard displays a graphic view of the test, including graphs for user load, average response times
and errors.
Set the start or end date for the filtered test as follows:
1. At the bottom of the panel, click either the "Start" or "End" radio button.
2. Place the mouse on the graph at the required start or end point, then click the left mouse button while
holding down the "Ctrl " key.
Application example
In a test with a 'peak' load policy, you may want to concentrate on one particular load peak. This filter will
reduce the time frame to be analyzed to a single peak.
Population filter
This filter specifies which populations to save among those run during the test.
The population filter is considered to be active when at least one of the populations run during the test to
be filtered has been un-checked.
Application example
In a test containing several populations, you may want to concentrate on one particular population. It may
be interesting for example to see what buyers at an on-line store "experience" when, at the same time, a
"simply-browsing" population is browsing through the products on offer.
Prerequisite
The Load Generator Filter is available when the statistics have been saved for each individual load
generator during the test. This can be enabled in the project's preferences, "Runtime parameters"
section. See the section called “Statistics”.
Application example
In a test that uses several load generators located in different geographic locations, you may wish to obtain
generator-specific, and thus location-specific, statistics. This will highlight any performance glitches due
to the user's geographical location with regard to the tested web application.
436
Results
Error filter
This filter specifies whether or not errors should be taken into account in the filtered results' statistics
Application example
When a server returns errors under a high load ( HTTP 500 errors for example), the server may respond
more quickly, since it's quicker to return an HTML page with the HTTP 500 error. In these cases, the
statistics will be distorted: the response times are better than in cases where there is no error. Therefore,
the results returning an error must be excluded in order to obtain more realistic statistics.
2. Select the test results to be filtered in the drop-down list of results, or open the Results Manager and
select the test results to filter.
3. Click the "Filter" button. The Test Results Filter Wizard is displayed.
4. Select and configure the filters you wish to apply to the test results.
5. Check or clear the "Save filtered results" check box. When the box is checked, the filtered
results are saved; if it is cleared, the filtered results are deleted when:
Note
The filters applied to a set of test results are displayed in the test's Results Summary.
437
Part III. User guides
Table of Contents
10. Design User Guide ..................................................................................................... 441
Key Steps .............................................................................................................. 441
To Learn More ....................................................................................................... 444
11. Oracle Forms User Guide ............................................................................................ 445
Overview ............................................................................................................... 445
Prerequisites ................................................................................................... 445
Configuring NeoLoad ...................................................................................... 445
Configuring the Oracle Forms Server .................................................................. 445
Examples of Recordings ........................................................................................... 445
Preview ......................................................................................................... 445
Message Object .............................................................................................. 446
Message Structure ........................................................................................... 446
Request Naming .............................................................................................. 447
Advanced Configuration ........................................................................................... 448
General Settings .............................................................................................. 448
Project Settings ............................................................................................... 448
Advanced Design .................................................................................................... 449
Understanding the Context ................................................................................ 449
A Component's Life cycle ................................................................................ 449
Correlating Dynamic Component Names ............................................................. 450
Limitations ..................................................................................................... 451
Best Practices ......................................................................................................... 451
Design ........................................................................................................... 452
Validation ...................................................................................................... 452
Runtime ......................................................................................................... 452
Troubleshooting ...................................................................................................... 452
Design ........................................................................................................... 452
Runtime ......................................................................................................... 456
12. Best Practices ............................................................................................................ 462
Defining Objectives ................................................................................................. 462
Types of objective ........................................................................................... 462
Defining criteria for success or failure ................................................................ 462
Producing a Realistic Test ........................................................................................ 463
Defining the number of Virtual Users. ................................................................ 463
Defining several types of Virtual Users ............................................................... 463
Using different user accounts and values ............................................................. 463
Testing load balancers ...................................................................................... 463
Simulating actual user bandwidth ....................................................................... 464
Tips .............................................................................................................. 464
Making your Results Talk ........................................................................................ 464
Producing informative results ............................................................................ 464
Using results .................................................................................................. 465
13. Heavy Load Testing Guide .......................................................................................... 467
Introduction ............................................................................................................ 467
NeoLoad Scenarios .................................................................................................. 467
Minimize the Number of Validations .................................................................. 467
Avoid Validations and Extractions on Bulky Inputs ............................................... 467
Optimize Regular Expressions ........................................................................... 468
Optimize Extractions from XML Responses ......................................................... 468
Avoid Multiplication of Virtual Users ................................................................. 468
Minimize the Use of JavaScript Actions .............................................................. 469
439
User guides
440
Chapter 10. Design User Guide
This guide describes how to design Virtual User profiles efficiently. It is a methodological guide, the
points discussed here being detailed further on in the reference guide and in the tutorials. We strongly
recommend that you read this guide before you start your first tests, after having first acquainted yourself
with NeoLoad by reading the Quick Start Guide.
Key Steps
Load testing requires that particular attention be paid to a number of points if meaningful results are to be
obtained. It is important to reproduce the many varied ways a web application can be used and to make
sure that they are played back correctly. This involves the following key steps:
1. Recording the Virtual User. A Virtual User simulates the actions of a real user browsing the web
application. To create a Virtual User, click the "Record" button in the NeoLoad toolbar. This will
launch an Internet browser to allow you to browse the application and record the required user behavior.
NeoLoad acts as a proxy for the Internet browser and therefore records the HTTP requests exchanged
with the server. The requests are grouped into pages that generally correspond to one click in the
application.
While browsing, you may create containers representing the business transactions that are carried out.
These containers group together the requests and pages relating to a same transaction, such as a login or
the purchase of an item in an e-business application for example. You may create business transactions
in a Virtual User after finishing the recording. For more details on this, see the section called “Creating
Business Transactions”.
Once the recording is finished, NeoLoad searches for dynamic parameters, for example session id's,
and automatically manages them so that the recorded user profile can be played back correctly.
For more information on recording, see the section called “Recording a Test Scenario”.
2. Validating the Virtual User's behavior. Simulating users is not just a matter of playing back the
requests sent to the server. Even if most of the dynamic parameters are automatically handled by
NeoLoad, thanks in particular to the dynamic parameter search, some still need special attention. By
validating the Virtual User you ensure that NeoLoad plays back all these parameters correctly.
Validation involves playing out the Virtual User profile and playing the requests on the server. The
graphical interface displays all the requests and the server's responses, their HTML rendering and the
state of the variables within the scenario. This allows you to check the Virtual User's behavior and to
make sure that it does not contain any errors.
Beware, NeoLoad does not detect all errors automatically. Even if HTTP error codes are detected by
NeoLoad as a cause of a failed validation, functional errors (such as the incorrect playback of a business
transaction) can escape detection. This is because applications often return pages in error that contain
valid HTTP codes. Therefore, it is important to make sure that the content or HTML rendering does in
fact correspond to the expected result. For example, an incorrectly played-back login often produces
an HTML page stating that "the login or password is incorrect".
For more information on Virtual User validation see the section called “Checking a Virtual User”.
3. Correcting the Virtual User's behavior. When a check of the Virtual User's behavior reveals a
problem, it is important to understand the cause of the problem, which is often linked to the incorrect
playback of one or more parameters using incorrect values. To be able to correct the problem in an
441
Design User Guide
efficient manner, the parameters involved must be checked one by one, in the order they are used in
the Virtual User profile.
1. Identify the first request that returns an error: typically, this is a server response containing
an HTTP error code or an unexpected HTML content.
2. Identify the parameter that requires attention: this can be any parameter in the pinpointed
request whose value may change at each playback, for example a session ID.
3. Find the request whose response contains that parameter's value: this value must be extracted
by NeoLoad. The Flags function is particularly useful for finding the request in question.
4. Decide on the appropriate method to handle the parameter: NeoLoad provides several tools
for handling dynamic parameters, each adapted to a particular situation. To choose the most
appropriate for the case in question, see the section called “Choosing a Data Extraction Method”.
5. Apply the selected method: depending on the method, the requests that appear after the request
on which the extractor has been placed must be modified to use the extracted variable instead of
inserting the recorded value.
6. Search for dynamic parameters: the error, since corrected, may have prevented the detection
of other, subsequent dynamic parameters. We recommend therefore that you start a new dynamic
parameter search (see the section called “Frameworks”).
7. Validate the Virtual User's behavior: the aim is to check to make sure that the problem in
question as been corrected.
This procedure for handling dynamic parameters is explained in detail in the "Handling an Application's
Dynamic Parameters" tutorial.
4. Changing behavior using logical actions. NeoLoad's logical actions allow you to change a Virtual
User's behavior to adapt to the simulation's requirements:
• Certain actions cause only a slight change to the behavior, for example inserting a pause, grouping
several pages as a business transaction, modifying a variable or stopping a Virtual User.
• Loops can be used to repeat typical user routines, for example a particular business transaction.
• Conditional actions can be inserted to simulate certain actions that are conditional upon feedback
from a server or an error occurrence.
• JavaScript actions can be used to carry out simple functions in order to update variables or carry
out specific tasks.
• Rendez-Vous synchronize selected Virtual Users at a single point before releasing them to complete
their scenarios.
When logical actions are introduced to modify a Virtual User's behavior, we recommend you check the
Virtual User's validity again and make any necessary corrections.
Details of the various logical actions available can be found in the section called “Logical Actions”.
5. Using different login accounts and values. Variables may be used to dynamically change key
values such as user logins or certain form parameters (for example, a productID in an e-business
application).This is useful mainly for getting around the server's use of the cache, since:
442
Design User Guide
• playing the same requests using the same values results in abnormally high performance, due to the
various caches (pre-loading into memory, connection pools, system optimization...)
• completely disabling the caches (where possible) does not give a realistic view of performance either.
As before, when variables are used to modify a Virtual User's behavior, we recommend you check the
Virtual User's validity again and make any necessary corrections.
6. Validating key pages. Under load, it's important to check that the server response is valid to make
sure the scenario is working as predicted and the high load isn't resulting in errors on the application.
NeoLoad automatically detects the requests in error by using the returned HTTP code in particular.
For example, a request that returns a '500 Internal Error' code will be flagged by NeoLoad as an error.
However, many Web applications do not return an appropriate HTTP error code as part of their error
management and NeoLoad is unable to detect the fault automatically.
These cases have to be managed individually by checking the validity of the content returned by the
server at key points in the application. For example, you may verify the presence of an expected text
string such as "The operation was successfully completed", or make sure the response does not contain
"Error".
a. In the Virtual User, click on the request whose response needs to be validated.
d. Select the validation mode: search for the presence or absence of a simple text string, or use a regular
expression.
At the end of the test, select the requests flagged in error or whose validation failed in the Errors pane,
then analyze the content of the corresponding server response in order to find the cause of the problem.
Note that content validation uses up resources on the Load Generator (CPU, memory..), therefore it
can be wiser to concentrate on testing key pages only (for example pages giving access to databases
or those that are more likely to fail).
Setting up request validations is explained in more detail in the "Validating a Server Response" tutorial.
7. Defining several types of Virtual User. As not all users use a web application in the same way, it
is important to define a Virtual User for each user profile, for example "just browsing", "browsing and
editing" and "administrator". The aim is to cover the business transactions that are most common and
the most representative for the application being tested.
These Virtual User profiles must then be grouped into Populations. Populations are used to maintain
a ratio between users during the variation in load. For example, you may decide to maintain a ratio of
90% standard users and 10% administrators whatever the total simulated load.
Populations also allow you to select certain parameters such as maximum bandwidth for a Virtual User
or how the cache is managed.
For more information, see the section called “Populations” in the Reference Guide.
443
Design User Guide
To Learn More
See the Best Practices guide for more information on load testing methodology.
Once the Virtual User profiles have been set up correctly, we recommend you configure the monitors that
will allow you to monitor your server infrastructure during the load tests.
See the tutorials for assistance on specific issues related to designing Virtual Users, analysis and other
miscellaneous subjects.
444
Chapter 11. Oracle Forms User Guide
Overview
This guide describes how to carry out a load test on an application using Oracle Forms under optimum
conditions. We strongly recommend that you read this guide before you start your first tests, after having
first acquainted yourself with NeoLoad by reading the Quick Start Guide and the Design User Guide.
During a test, NeoLoad records the requests and responses exchanged between the Oracle Forms applet
and the server. For these exchanges to be intercepted, both NeoLoad and the Oracle Forms server need
to be configured.
Prerequisites
NeoLoad supports Oracle Forms 9i, 10g and 11g in HTTP mode only.
Configuring NeoLoad
The Oracle Forms applet file must be copied into the <neoload>/lib/plugins/ext directory. By
default, the Oracle Forms applet file can be found in the Oracle Forms installation at: <oracle_home>/
forms/java/frmall.jar. For further information, see the documentation on configuring NeoLoad
for Oracle Forms.
To configure the server, see the documentation on configuring the Oracle Forms server for NeoLoad
You may check to see if the Oracle Forms server is configured correctly.
Procedure 11.1. How to check that the Oracle Forms server is configured correctly
1. Make a recording.
2. In NeoLoad, find the page with the name starting with 1:initial_version.
3. Expand the page, then click on the request with the same name as the page.
5. In the relevant value tag, find the record=names string. If the string is present, then the Oracle
Forms server is correctly configured. If the string is not present, the Oracle Forms server needs to be
configured. See the documentation on configuring the Oracle Forms server for NeoLoad.
Examples of Recordings
Preview
Preview of successfully recorded Oracle Forms requests:
445
Oracle Forms User Guide
Each virtual user may contain several pages that, in turn, may each contain several requests.
An Oracle Forms request is displayed in XML format. It comprises one or more DataMessages, with
one or more Properties.
Message Object
Oracle Forms messages only contain graphical information. The Oracle Forms applet running in the client-
side browser acts as a slave to the server, sending the user's actions and waiting for instructions on the
graphical changes to apply.
Message Structure
An Oracle Forms message is a set of graphical actions, as can be seen in this example of a request:
<Dialog>
<actionType>UPDATE</actionType>
<messages>
<DataMessage>
<actionCode>UPDATE</actionCode>
<handlerName>LOGIN_USERNAME_0</handlerName>
<handlerId>15</handlerId>
<properties>
<Property>
<id>VALUE</id>
<type>STRING</type>
<value objectClass="String">u3</value>
</Property>
<Property>
<id>SELECTION</id>
<type>POINT</type>
<value objectClass="Point">
<x>2</x>
446
Oracle Forms User Guide
<y>2</y>
</value>
</Property>
<Property>
<id>CURSOR_POSITION</id>
<type>INTEGER</type>
<value objectClass="int">2</value>
</Property>
</properties>
</DataMessage>
<TerminalMessage>
<responseCode>1</responseCode>
</TerminalMessage>
</messages>
</Dialog>
The Dialog element indicates the message's principal purpose; in this case, it's an UPDATE -type message
for the applet's graphical interface. It contains several messages, each DataMessage element describing
an action applied to one of the interface's graphical components.
• actionCode: indicates the action applied to the graphical component. Examples: CREATE, UPDATE,
DESTROY.
• handlerId: the component's unique identifier. In requests and responses, graphical components are
referenced using a unique identifier, the handlerId. The handlerId identifier is created and
assigned to a graphical component by the server.
• properties: describes the changes made to the graphical component. Each property has an id, a
type and a value.
Note
Component naming must be enabled prior to recording for the recorded requests'
DataMessages to have a handlerName.
Some Oracle Forms components do not have names. In this case, the DataMessage that
references the component will not have a handlerName.
Request Naming
Oracle Forms requests are named according to the following rule:
<handlerName>:<propertyType>=<propertyValue>
447
Oracle Forms User Guide
• handlerName: name of the graphical component. If no name is found, it is replaced by the appropriate
handlerId.
Advanced Configuration
General Settings
During recording, NeoLoad compares the HTTP headers in the request and response with those configured.
When there is a match, the request is identified as an Oracle Forms request and the encapsulated binary
data is decoded.
By default, the HTTP headers are configured to recognize Oracle Forms 9i and 10g messages.
To change the module's general settings, see the documentation on Oracle Forms General Settings.
Project Settings
During recording, NeoLoad simultaneously uses two mechanisms to prepare the requests for execution :
• NeoLoad adds the component names to the requests, enabling the handlerId's to be handled
dynamically. The component naming option must be configured on the Oracle Forms server for this
mechanism to function.
For each played-back request, NeoLoad searches the previous responses to find the component having the
same name and replaces the Id assigned by the server (its handlerId). This mechanism only functions
if the component has a server-assigned name.
If the component does not have a name, NeoLoad compares the played-back response with the recorded
response and updates the component's handlerId. This mechanism only functions if the response
received during the test playback contains exactly the same number of DataMessages as during
recording.
NeoLoad also checks to make sure the handlerId's used in the requests' DataMessages reference
valid Oracle Forms components. If one or more invalid components are found, an error is returned and
the virtual user is stopped.
Note
The virtual user is stopped to prevent further messages containing invalid components being sent.
To change the module's project settings, see the documentation on Oracle Forms Project Settings.
448
Oracle Forms User Guide
Advanced Design
Understanding the Context
Each Oracle Forms request references a component that has been previously created by the server. If the
request sequence changes, compared with the sequence recorded, then the components' life cycles must
be taken into account:
• The request sequence must take into account the components' graphical state.
For further information, see the Designing an Oracle Forms Scenario with Iterations tutorial.
1. The server sends a response containing a message that creates a component named
LOGIN_USERNAME_0.
<DataMessage>
<actionCode>CREATE</actionCode>
<handlerName>LOGIN_USERNAME_0</handlerName>
<handlerId>15</handlerId>
<handlerClassId>257</handlerClassId>
<properties>
<Property>
<id>TITLE</id>
<type>STRING</type>
<value objectClass="String">LOGIN_USERNAME_0</value>
</Property>
<Property>
<id>MAX_LENGTH</id>
<type>INTEGER</type>
<value objectClass="int">30</value>
</Property>
...
</properties>
</DataMessage>
The LOGIN_USERNAME_0 component is now valid. It can be updated in the subsequent requests.
2. The client sends a request to update the LOGIN_USERNAME_0 component, containing the value u3
in the text field.
<DataMessage>
<actionCode>UPDATE</actionCode>
<handlerName>LOGIN_USERNAME_0</handlerName>
449
Oracle Forms User Guide
<handlerId>15</handlerId>
<properties>
<Property>
<id>VALUE</id>
<type>STRING</type>
<value objectClass="String">u3</value>
</Property>
<Property>
<id>SELECTION</id>
<type>POINT</type>
<value objectClass="Point">
<x>2</x>
<y>2</y>
</value>
</Property>
<Property>
<id>CURSOR_POSITION</id>
<type>INTEGER</type>
<value objectClass="int">2</value>
</Property>
</properties>
</DataMessage>
3. The server sends back a response containing a message that destroys the LOGIN_USERNAME_0
component.
<DataMessage>
<actionCode>DESTROY</actionCode>
<handlerName>LOGIN_USERNAME_0</handlerName>
<handlerId>15</handlerId>
<properties/>
</DataMessage>
The LOGIN_USERNAME_0 component is now invalid. It can no longer be updated, since it no longer
exists.
</Dialog>
<messages>
<DataMessage>
<actionCode>UPDATE</actionCode>
<handlerName>Sales Orders (Vision Operations) - 63850, Business World</handlerNa
<handlerId>289</handlerId>
<properties>
<Property>
<id>EVENT_MENU</id>
<type>INTEGER</type>
<value objectClass="int">11077</value>
450
Oracle Forms User Guide
</Property>
</properties>
</DataMessage>
<TerminalMessage>
<responseCode>1</responseCode>
</TerminalMessage>
</messages>
</Dialog>
When played back, the virtual user fails to run correctly because the server has given the component a
different name. In the above example, the component's name ends with 63850, Business World,
which is its dynamic element. To get around this problem, simply delete the dynamic part of the
component's name to obtain the following XML:
</Dialog>
<messages>
<DataMessage>
<actionCode>UPDATE</actionCode>
<handlerName>Sales Orders (Vision Operations) - </handlerName>
<handlerId>289</handlerId>
<properties>
<Property>
<id>EVENT_MENU</id>
<type>INTEGER</type>
<value objectClass="int">11077</value>
</Property>
</properties>
</DataMessage>
<TerminalMessage>
<responseCode>1</responseCode>
</TerminalMessage>
</messages>
</Dialog>
During runtime, NeoLoad will find the dynamic part of the component's name and replace it in the played
request.
Note
Correlating dynamic component names works only when the dynamic element is at the end of
the component's name.
Limitations
With advanced design, all the components' life cycles must be followed. When adding a loop in a virtual
user, it's vital for the components to be in the same state both at the start and at the end of the iteration.
Loops will only work if this guideline is adhered to. Failure to do so will result in NL-OF-PLUGIN-
ENGINE-03 -type errors when the virtual user is run.
For further information, see the Designing an Oracle Forms Scenario with Iterations HowTo
Best Practices
To get the best out of a load test on an Oracle Forms application, we recommend the following:
451
Oracle Forms User Guide
Design
• Enable the component naming option on the application server.
• Wherever possible, input user actions in the Oracle Forms applet using the keyboard.
• Limit the number of actions carried out by a virtual user. If necessary, create several virtual user profiles
that each carry out a separate series of actions.
• Rename the pages during the recording using names that identify the relevant actions carried out in the
applet.
• Quit the Oracle Forms applet correctly before ending the recording. We recommend clicking on Action
--> Exit in the applet rather than closing the browser.
• Make sure that the Oracle Forms requests are correctly identified and decoded.
• Use as few validations and variable extractors as possible, especially on large-size XML responses.
Validation
• Configure NeoLoad so that it does not error-flag the HTTP 404 response code already present in the
recording.
• Validate all the scenario's virtual users and check that they run correctly with no errors.
Runtime
• Set the scenario's population stop policy as "Indeterminate: allow all virtual users
to end their actions".
• Warm up the server: run a few tests with a small number of simultaneous virtual users to "warm up"
the server before submitting it to a heavy load.
Troubleshooting
Design
1. When I record an Oracle Forms scenario, I get the following message: Java Oracle Forms library
missing.
452
Oracle Forms User Guide
For NeoLoad to function properly, a Java library from the Oracle Forms application server must be
copied in NeoLoad. The library must be placed in the folder specified in the message.
Note
Once the library has been copied into NeoLoad, you must re-start NeoLoad (you don't need
to re-start the machine itself) for the changes to take effect.
2. NeoLoad has not identified the Oracle Forms requests. The Oracle Forms requests in the recording
look like standard POST binary requests.
1. Make sure NeoLoad contains the Oracle Forms library. A pop-up window should have notified
you that the Oracle Forms library was missing. See the Oracle Forms module's general
documentation for information on adding the library to NeoLoad.
At the end of recording, if the Oracle Forms library is missing but NeoLoad has correctly
identified the requests, you should see requests that have the Oracle Forms icon, but which haven't
been decoded.
453
Oracle Forms User Guide
2. The Oracle Forms library has been added, but NeoLoad hasn't identified the Oracle Forms
requests. The Oracle Forms requests do not have the Oracle Forms icon and look like standard
POST binary requests.
2. Manually search the recording and locate the Oracle Forms requests.
A non-identified Oracle Forms request shows up as a POST binary request whose binary
content is unreadable.
3. Click on the "Advanced..." button, then select the Recorded request tab.
4. Copy the contents of the text field into a text file for future reference.
454
Oracle Forms User Guide
6. Copy the contents of the text field into another text file, again for future reference.
8. Click on Edit > Preferences > General settings > Oracle Forms.
9. Compare the request's Content-type and User-Agent headers with the regular
expressions configured.
10. Compare the response's Content-type and Server headers with the regular
expressions configured.
11. If necessary, add new regular expressions by checking the headers in the recording.
12. Repeat the recording run and check to make sure the recorded requests have been decoded
into XML format..
Note
For further information on compiling regular expressions, see the appendix dedicated
to regular expressions.
3. The non-decoded requests in the recording still aren't decoded, even after correcting the HTTP
headers in the Oracle Forms general settings.
The changes are not retroactive, so you need to make further recording. It may require several
recordings until you find a functioning regular expression and the recorded requests are correctly
decoded.
4. When recording an Oracle Forms scenario, some recorded requests aren't properly decoded. Most
of the requests have been decoded normally.
Before starting a new recording, make sure you have closed all browser instances, especially if some
are still open and connected to Oracle Forms applets. Such non-decoded requests captured during
recording usually come from Oracle Forms applets open in other browser instances.
5. When recording an Oracle Forms scenario using WebUtil, the Oracle Forms applet freezes.
NeoLoad does support the WebUtil technology. If WebUtil is used to communicate with dll's, there
may be a conflict between the browser that is automatically launched by NeoLoad for the recording
and the loading of these dll's. The best way to solve this is to launch the browser manually as follows:
3. Manually launch the Internet browser, then manually set the proxy to the NeoLoad proxy
(default: localhost:8090). See the the section called “Manually configuring the recording
proxy settings” for more details.
455
Oracle Forms User Guide
6. Restore the original proxy settings in the browser, then close the browser.
Runtime
1. When I validate a virtual user, it stops on an NL-PLUGIN-ENGINE-03 error.
Oracle Forms requests that have not been decoded correctly cannot be played back; nor can they be
repaired. See the other questions and answers in this section of the documentation and try to identify
the problem you are experiencing.
Note
Once a problem has been solved, we recommend you delete the previous recordings that
did not play back correctly.
2. I have recorded a simple Oracle Forms scenario. I've not modified the recording and have played
it back "as is", using virtual user validation. The "Automatically delete invalid components during
recording" option is disabled. The virtual user fails to execute and an NL-OF-PLUGIN-ENGINE-03
error is returned.
456
Oracle Forms User Guide
The Oracle Forms applet can sometimes send requests that contain components that are invalid at
the time of recording. The problem can be solved in two ways.
2. Enable the "Automatically delete remove invalid components" option for the
Oracle Forms project and make a new recording.
1. Carry out a validation on the virtual user containing the error in question.
2. Select the request that includes the error. In the "Details" pane, click on the Response
button.
3. Note the handlerId's that are shown between square brackets [ ] and labeled as unknown.
4. Click on the blue "Request" link to automatically open the request ion the library.
5. In the XML content, delete the DataMessages whose handlerId's are reported as being
unknown.
6. Re-run the virtual user validation. Repeat steps 1 to 5 for each request showing the same error.
457
Oracle Forms User Guide
2. Check the Automatically remove invalid components check box, then click OK.
4. Run a virtual user validation and make sure there are no more NL-OF-PLUGIN-ENGINE-03
errors.
Note
The changes are not retroactive, so the previous recordings are not affected. Consequently,
if you wish to replay the previous recordings, they will need to be cleaned up by carrying
out the procedure for manually deleting invalid components.
3. I've recorded a simple Oracle Forms scenario and created a virtual user that loops a number of Oracle
Forms requests over n iterations. The virtual user fails to execute and returns an NL-OF-PLUGIN-
ENGINE-03 error. I noticed that the virtual user stopped on this error during the 2nd iteration of the
loop. The "Automatically remove invalid components during recording" option is enabled.
The problem is in the virtual user design. This indicates that the virtual user was not in the same
graphical state in the Oracle Forms applet in the 2nd iteration as it was in the 1st. At the start of each
iteration of the loop, the virtual user must be in the same graphical state, to the nearest click.
The graphical state of an Oracle Forms applet is defined as a set of graphical components existing
at any one time. This example shows a component created in a server response:
<DataMessage>
<actionCode>CREATE</actionCode>
<handlerId>8</handlerId>
<handlerClassId>259</handlerClassId>
<properties>
<Property>
<id>DRAWN_CANVASUSAGE</id>
<type>BYTE</type>
<value objectClass="byte">3</value>
</Property>
</properties>
</DataMessage>
This creates a component with the handlerId 8. The handlerId 8 can now be used in
DataMessage in all subsequent requests. When the following message is encountered in a server
response
<DataMessage>
<actionCode>DESTROY</actionCode>
<handlerId>8</handlerId>
<properties/>
</DataMessage>
458
Oracle Forms User Guide
The component with the handlerId 8 is destroyed. Requests sent after this response can no longer
contain DataMessages that reference the component with the handlerId 8.
Note
It is possible for a handlerId value to be re-used by a completely different type
of graphical component later in the recording. These numerical identifiers are uniquely
assigned by the server to concurrently occurring components, but may be used by several
different components whose life cycles are disjoint.
4. When I validate a virtual user, it stops on an NL-OF-PLUGIN-ENGINE-01 error. The details reveal
an ifError error.
There are several types of ifError, of which the most common are:
• ifError:3
The server indicates that the client does not handle cookies. Enable cookie handling for that virtual
user.
• ifError:4
The server could not create the Oracle Forms process. There is a problem server-side.
• ifError:5
The server could not start the Oracle Forms process. There is a problem server-side.
• ifError:6
The server process used to manage the current Oracle Forms session no longer exists. This can
happen when the server is subjected to a heavy load or if there is a design flaw in the virtual user
being played back. In the latter case, please read through the section entitled Best Practices.
• ifError:7
The server process is currently busy. Re-try the request later. This error indicates that NeoLoad
tried sending the request 5 times but did not receive a valid response from the server.
• ifError:11/xxx
The server is busy, re-try the request in xxx milliseconds. This type of error is handled
automatically by NeoLoad and should not appear during the test.
5. The troubleshooting guide has been helpful, but I still need to know more about the way NeoLoad
works during recording and runtime.
The Oracle Forms module may be used in DEBUG mode, which writes even more data to the log
files. It can be turned on for debugging a specific use case, but never in a real test runtime.
You may quickly access the NeoLoad directory containing the log files by clicking on Help >
Open logs folder.
459
Oracle Forms User Guide
1. Close NeoLoad.
2. Open the <neoload>/conf directory, then open the files logs.xconfig and
lglogs.xconfig.
4. Re-start NeoLoad. The module is in DEBUG mode for both recording and runtime.
When the server responds with ifError:7/500, NeoLoad reproduces the Oracle Forms applet's
behavior: by default, it makes a maximum of 5 attempts to send the request to the server and receive
a valid response, with a 1000 milliseconds interval between attempts. NeoLoad's behavior may be
modified by editing the controller.properties configuration file.
1. Close NeoLoad.
oracle.forms.session.migration.max.retry=5
This key sets the maximum number of attempts before returning an error at 5. By default,
NeoLoad makes a maximum of 5 attempts. The key's value must be an integer more than or
equal to 1.
oracle.forms.session.migration.retry.delay=1000
This key sets the interval between attempts, in milliseconds. By default, NeoLoad applies an
interval of 1000 milliseconds. The value must be an integer more than or equal to 1000.
460
Oracle Forms User Guide
7. Re-start NeoLoad.
7. After an Oracle Forms load test, several frmweb.exe processes remain on the server.
1. Make sure each virtual user quits the Oracle Forms application correctly. If this is the case, the
last Oracle Forms request will be named something like session_close and its HTTP header
should contain ifSession: close.
2. Make sure the stop policy for each population is set to "Indeterminate: allow all
virtual users to end their actions".
461
Chapter 12. Best Practices
Defining Objectives
Types of objective
A load test can be used to test an application's robustness and performance, as well as its hardware and
bandwidth capacities. The requirements should be clearly defined in order to set precise objectives for the
test. These objectives may be of different types:
• Check an application's stability. The number of simultaneous users of the application must be
known already. The test should answer the following questions:
# Is the server capable of handling a certain number of simultaneous users ?
# Is the average response time for pages acceptable under this set load ?
# Does the server revert to normal behavior after a load peak ?
This type of test is called a load test. The simulated load remains constant over a long period.
The meaning of acceptable response time must be defined beforehand as the notion can differ depending
on the application tested and the type of page. A simple page should display faster than a page full of
search results, which takes time and for which the user is prepared to wait.
The CPU and memory usage should be closely monitored throughout the test. The server is considered
overloaded if these usage figures regularly exceed 90%.
It is equally important to test the server's capacity to recover after a load peak. Many applications are
subjected to load peaks, for example an intranet at 8.30 a.m., resulting in a temporary stress on the
application. It is necessary, therefore, to check that no damage is done to the system as a result of these
peaks. This type of test can also pinpoint memory leakage or resource management problems.
• Establish the number of simultaneous users an application can handle. This test can be used
to validate a hardware configuration or targets set for application visits. The test should answer the
following questions:
# How many users can the application handle while maintaining an acceptable response time?
# What is the load threshold above which the server begins to generate errors and/or refuse connections?
# Does the server remain functional under high load or does it crash?
This type of test is called a stress test. The load is progressively increased to discover the different
breaking points.
Use a scenario with a ramp-up load, starting from normal and up to the maximum predicted limit, and
monitor the response times and error rates. A sudden change indicates that a threshold has been passed.
• Validate performance variations after an application or infrastructure update. The test should
answer the following questions:
# Have the implemented upgrades resulted in real performance gains?
# Which pages have seen a loss in performance?
With NeoLoad, a performance comparison may be made between two sets of test results. NeoLoad also
allows you to filter test results using different criteria.
462
Best Practices
In most cases, these criteria are defined in terms of response time, error rate or number of requests per
second:
• Define an average response time per page (may be different from one page to another).
• Define a maximum response time per page (may be different from one page to another).
• Define a maximum error rate.
With NeoLoad, some of these criteria may be checked using request validations.
• The memory burden on the server will be different: Each user session uses a certain amount of memory.
If the number of user sessions is underestimated, the server will be running under more favorable
conditions than in real-life and the results will be distorted.
• The number of sockets open simultaneously on the server will be different. An underestimation of user
numbers means the maximum threshold for open server sockets cannot be tested.
• The resource pools (JDBC connection pools) will not be operating under realistic conditions. An
inappropriate pool size setting might not be detected during the test.
Group these user types into a Population. Populations allow a user ratio to be maintained when the load
varies. For example, a ratio of 90% standard users and 10% system administrators may be selected.
• Playing the same requests with the same values produces an unrealistically high performance, due to
the use of various caches: preloading into memory cache, connection pools, system swap...
• On the other hand, completely disabling the caches (when available) will produce an unrealistically
poor performance.
463
Best Practices
Use the Population bandwidth setting to realistically simulate the users' connection speeds.
Tips
• After a re-start, don't hesitate to "warm up" the server with a few calls before generating a sudden, high
load which, in addition to being unrealistic, may cause the server to crash. Sending a short, light load
beforehand allows certain resources, such as connection pools or thread pools, to be pre-allocated.
NeoLoad allows the user to gradually spread the initial load using a start-up policy. For example, you
can choose to start your 1000 Virtual Users over a two-minute period.
• Run the test for a significant length of time in order to iron out any outliers.
• Make sure the Load Generators are not overloaded; CPU and memory usage are displayed in real time
throughout the test.
Various settings also may be changed, such as the number of sockets a machine may simultaneously
open to the server, or the memory allocated to the Load Generator. Please see the Troubleshooting Guide.
NeoLoad automatically detects requests containing errors, in particular using the HTTP response code.
For example, NeoLoad will log a request error if the response contains '500 internal error'. However, many
web applications do not return the appropriate HTTP error code when handling an error, which means that
for these, NeoLoad cannot automatically detect the fault.
These cases must be processed individually by checking the validity of the content returned by the server
at key points within the application. This may entail checking for the presence of an expected text, for
example "The operation was successful", or making sure the response does not contain "Error".
1. In the Virtual User profiles, click on the request whose server response requires validating.
4. Select a validation method: contains or does not contain a simple text, or use a regular expression.
Once the test is finished, select the requests containing errors, or those where the validation failed, in the
errors panel. The content of the corresponding server response may then be analyzed to determine the
cause of the problem.
464
Best Practices
Note that validation uses up resources (CPU, memory) on the Load generator, and that it is usually wiser
to restrict its use to testing key pages only (for example, those that provide access to a database, or those
more likely to produce errors).
• Use the Check function to validate the scenario for a Virtual User type. This will play the Virtual User
once, displaying the details of the sent request and the server response to each HTTP request.
• Begin with a short test and a light load. Correct any application errors occurring under the light load
before carrying out tests using heavier loads.
Each Virtual User type may be configured to stop running in case of error or failed assertion.
Using Containers
Each transaction (registration, on-line purchase...) may be composed of several web pages. Statistics may
be obtained by transaction by grouping these pages in a Container.
Configuring monitors
NeoLoad allows you to retrieve performance data from most server infrastructures using monitors.
Configure monitors on all your infrastructure's key servers to monitor: CPU, memory, hard disk and
network usage on the web, application and database servers. See Chapter 7, Monitors.
Using results
Comparing results
An efficient way to highlight the performance variations between two sets of test results is to plot the
statistics for a same item (page, request, Container) in both tests simultaneously.
This provides a visual comparison of the application's behavior under different scenarios, or further to its
modification (e.g. update or optimization).
Using filters
An efficient way to pinpoint performance problems is to filter a test's results. The aim is to limit the test
statistics to the items (request, page, container, Virtual User, Population..) that are showing the problems.
For example, you may narrow down the statistics to a specified time period during the test run; this will
display the statistics as if the test had been carried out over that time period only.
465
Best Practices
• Standard deviation - allows the variation in values to be measured, compared to the average. A high
standard deviation indicates that response times vary widely, whereas a low standard variation is a sign
that response times are consistent and even.
• Average 90% - calculated by removing the highest and lowest 5% of values. This eliminates any outliers
and produces values that are close to those that will be obtained by most end users.
These correlations will usually provide an explanation for the performance slowdown and give a clue to
the main cause of the problem, be it merely a server setting or the overload of one of the main resources
(memory for example).
The Results Manager allows the user to delete the results of a previous test session or use them to generate
a report (XML, HTML, PDF).
466
Chapter 13. Heavy Load Testing Guide
Introduction
NeoLoad assists you in building quality Web applications that offer high performance and scalability and
that are far more likely to be used and appreciated than applications that are buggy and slow. However,
building even the best software still requires that your application be tested under heavy loads (regardless
of the specific goals you are pursuing for your application - load tests or stress tests). A heavy load is
generally considered as simulating more than 1,000 users.
The following sections cover the best practices and recommendations for simulating heavy loads on the
application being load tested. Heavy load testing means that you will be putting stress on your testing
environment, so the load level attainable depends on how capable and how well tuned your testing
environment is. Obviously, the testing environment includes NeoLoad, but it also includes network and
other resources such as memory and CPU. The better your testing environment and tools are optimized,
the heavier the load you will be able to simulate.
Most importantly, keep in mind that testing your application under a heavy load only makes sense if all
basic scenarios are effective and your application works under a "normal" load, or at least a light load.
The main tuning and configuration points involved in improving your testing environment's capacity
are divided into the four following topics: NeoLoad scenarios, NeoLoad load generators, the NeoLoad
controller and finally the network.
The first two sections (NeoLoad scenarios and NeoLoad load generators) include best practices and
guidance that mostly refer to elements of NeoLoad's internal configuration. The latter two on the other
hand, pertain more to environment elements.
NeoLoad Scenarios
NeoLoad scenarios are the first place to look for time-consuming mechanisms that can interfere in
achieving heavy loads.
A good practice includes setting up numerous, fine-grained validations during the first phase of your testing
process. Once you have acquired reasonable confidence in your application, and during the heavy load test
phase, you can restrict validations to those strictly necessary.
467
Heavy Load Testing Guide
Avoid, therefore, including validations and variable extractions, particularly when they use bulky inputs.
In some situations, either validation or variable extraction is inevitable, so in that case at least make sure
the technique you are using is optimized. Refer to the following sections to get an idea of applicable
optimizations.
At its heart, the regex engine uses backtracking. Usually, there isn't just one way to apply a regular
expression on a given string, so the pattern-matching engine will try to exhaust all possibilities until
it declares failure. To better understand backtracking, consider the following example: The regular
expression is "sc(ored|ared|oring)x" The input string is "scared". First, the engine will look for "sc" and
find it immediately as the first two characters in the input string. It will then try to match "ored" starting
from the third character in the input string. That won't match, so it will go back to the third character and
try "ared". This will match, so it will go forward and try to match "x". Finding no match there, it will go
back again to the third character and search for "oring". This won't match either, and so it will go back to
the second character in the input string and try to search for another "sc". Upon reaching the end of the
input string, it will declare failure. An important part of optimizing a regular expression is minimizing the
amount of backtracking it does.
Due to backtracking, regular expressions encountered in real-world application scenarios can sometimes
take a long time to completely match. Worse, it takes much longer for the engine to declare that a regular
expression did not match an input string than it does to find a successful match. This is an important fact
to remember.
Understanding and optimizing greedy and reluctant quantifiers in a regular expression are essential. A
greedy quantifier such as "*" or "+" will first try to match as many characters as possible from an input
string, even if this means that the input string will not have sufficient characters left in it to match the rest
of the regular expression. If this happens, the greedy quantifier will backtrack, returning characters until
an overall match is found or until there are no more characters. A reluctant (or lazy) quantifier on the other
hand will first try to match as few characters in the input string as possible.
So, for example, say you want to optimize a sub-expression like ".*a". If the character a is located near
the end of the input string it is better to use the greedy quantifier "*". If the character is located near the
beginning of the input string it would be better to use the reluctant quantifier "*?" and change the sub-
expression to ".*?a".
For more details on how to write regular expressions, you can have a look at our quick reference guide
on regular expressions.
468
Heavy Load Testing Guide
than actually simulating them. It is therefore preferable to artificially lengthen a virtual user's behavior (by
including a few loops for example) to minimize the overhead of virtual user creation.
NeoLoad Controller
The NeoLoad controller orchestrates your test scenarios and is in charge of communicating with the load
generators and aggregating test results. Therefore, the controller needs a certain amount of memory and
CPU resources to carry out its duties. The following paragraphs detail specific points that should be taken
into account prior to heavy load testing.
469
Heavy Load Testing Guide
Defining memory size, specifically the heap size of the Java Virtual Machine, is done by
modifying the two files <NeoLoad>/bin/NeoLoadGUI.vmoptions and <NeoLoad>/bin/
NeoLoadCmd.vmoptions, increasing the number of Mb in a VM argument. For example, to set the
heap size to 1024MB, define a VM argument with -Xmx1024m.
From NeoLoad version 3.0 and up, you can disable NeoLoad's default storing of the previous requests
of the requests that return errors. Once disabled, test results will only show the details of the request that
failed and not the request before. However, this will make it more difficult for you to diagnose problems.
Disabling this default behavior is best done once you have reasonable confidence in your application.
To change NeoLoad's default behavior, select the Preferences/Project Settings/Runtime
parameters menu item and disable the "Store previous response data on error" option.
• For the controller, you will find the details of how to increase available memory in the section called
“Plan for Large Amounts of Memory for the NeoLoad Controller”.
470
Heavy Load Testing Guide
4. If you are working on a stand-alone load generator, restart the load generator process or service. If
it's a load generator integrated into the controller, stop and then re-start NeoLoad.
You must make sure that physical memory on the machines hosting controllers and load generators are
always large enough for the JVM memory never to be swapped by the operating system. This means that
the physical memory of your machine must be larger than the heap size defined for your JVM. For certain
specific environments (LG for instance) setting large values for the -Xmx option interferes with the space
allocated to threads, so the size of the heap must leave enough space for thread allocation.
Generally, prefer 64-bit multiprocessor environments. Neotys provides 64-bit versions of its load generator
and load generator code is optimal on multi-core processors. It all depends of course on how heavy your
test loads need to be. Keep in mind that a 32-bit application cannot use more than 1.5 Gb of memory. If your
tests requires more than 2 Gb you'll need a 64-bit machine. Also keep in mind that a 64-bit load generator
will consume roughly 25% more memory than a 32-bit configuration to manage the address space.
In rare cases where memory problems persist even after having increased the allocated memory, the Neotys
support teams will help you fine-tune specific configuration items. This will usually include defining the
native stack size (-Xss JVM argument) and the garbage collector settings.
For a four-core machine therefore, an appropriate set-up would be 6 Gb physical memory, a 64-bit
operating system, 4 Gb memory allocated to the NeoLoad generator and two network adapters.
471
Heavy Load Testing Guide
To obtain a good trade-off between infrastructure costs and efficiency, you can at least separate the load
generation network from the monitoring network.
As seen in the above figure, keeping load generators physically close to the application servers will
improve network performance. For the same reasons, it's a good idea to keep the controller close to the
load generators. Also avoid having a firewall between load generators and your application servers.
472
Part IV. Tutorials, F.A.Q
and Troubleshooting Guide
Table of Contents
14. F.A.Q ...................................................................................................................... 475
General .................................................................................................................. 475
Design ................................................................................................................... 479
Runtime ................................................................................................................. 482
Analysis ................................................................................................................ 485
Errors .................................................................................................................... 485
15. Troubleshooting Guide ................................................................................................ 487
16. Tutorials ................................................................................................................... 490
Introduction ............................................................................................................ 490
Design - General ..................................................................................................... 490
Creating Business Transactions .......................................................................... 490
Logging in With Multiple Accounts Using a CSV File ........................................... 496
Creating Realistic Populations ........................................................................... 513
Validating a Server Response ............................................................................ 514
Executing Java Code ....................................................................................... 522
Design - Dynamic Parameters ................................................................................... 526
Choosing a Data Extraction Method ................................................................... 526
Handling an Application's Dynamic Parameters .................................................... 528
Creating a Variable Extractor ............................................................................ 544
Submit a Form from the Previous Request ........................................................... 557
Follow a link from the previous request .............................................................. 563
Using Framework Parameters to Automatically Search for Dynamic Parameters .......... 570
Design - Technologies ............................................................................................. 576
SOAP: Testing Web Services ............................................................................ 576
Adobe Flex/AMF: Handling External Libraries ..................................................... 601
Adobe Flex/AMF: Handling Polling and Streaming ............................................... 607
Adobe RTMP : Handling External Libraries ......................................................... 623
Google Web Toolkit: Managing External Libraries ................................................ 628
Java Serialization: Handling External Libraries ..................................................... 634
Oracle Forms: Designing a Scenario with Iterations ............................................... 639
Analysis ................................................................................................................ 648
Analyzing Errors in the Errors Panel .................................................................. 648
Comparing Several Test Results ........................................................................ 656
Miscellaneous Items ................................................................................................ 657
Monitoring an Application Server or Database ...................................................... 657
Using Additional Load Generators ..................................................................... 662
Scheduling a Test ............................................................................................ 666
474
Chapter 14. F.A.Q
General
General Questions
Q: Can NeoLoad carry out functional tests?
A: Although NeoLoad is not a tool for functional testing, it can carry out checks on content returned
by the server. Validations using regular expression-based content assertions allow you to perform
basic functional tests.
A: Neotys offers different types of NeoLoad software license to suit the customer's specific usage
requirements. Each license key gives access to the controller and defines the number of simulated
users and monitors allowed. Load generators are not covered by the license, so you can install as
many of these as you wish.
The standard NeoLoad license allows the controller to be installed on one single machine. The end
user may purchase either a permanent license or a leased license.
There is also the floating license option, which allows you to use the same license for several
machines using a license server (one simultaneous user per license). The license server can manage
several license keys, thereby allowing several simultaneous users.
A: The standard NeoLoad license allows you to install a single controller and as many load generators
as you wish to generate the required load. You may not use more than one controller with each
standard license.
A floating license allows you to install several controllers on different machines and to launch one
controller for each floating license.
1. Open the license management panel via the "Help / License management" menu item.
2. Select the "Use a license file" option in the "License configuration" section.
475
F.A.Q
A: A standard license may be transferred from one workstation to another. This operation de-activates
the key on the first machine, making NeoLoad inoperative with that key on that machine.
1. Launch the License Key Activation Wizard via the "Help / Activate license
key..." menu item.
5. You will receive a confirmation e-mail from Neotys to say that the key has been de-activated
for that machine.
A: This will depend on the application tested, the scenario and its parameters, particularly the think
time between pages: a load generator can generate approximately twice as heavy a load with a think
time of two seconds than with a think time of one second.
Likewise, generating a load using HTTPS (SSL) and using modules such as Flex, GWT, Oracle
Forms, Java Serialization and RTMP use up more machine resources than with HTTP.
As an example, a Pentium IV 2.4GHz can generate up to 1500 Hits/sec. A load generator typically
can generate between 500 and 1500 users on a standard application.
It should be noted that the NeoLoad controller can use as many load generators as is required to
generate the number of users specified in the license, at no additional cost.
A: To carry out tests using heavy loads, it may be necessary to install a load generator on another
machine.
The license does not limit you in the number of load generators you can install.
The installation may be carried out using the special load generator installer. Several versions are
available according to the machine's platform.
This dedicated version of the load generator does not require a license key to be installed. The
program installs automatically via the NeoLoad agent, which detects and controls the load generator
from a NeoLoad controller.
A: Yes. See the section called “Using a Firewall Between the Controller and Load Generator” for further
information.
476
F.A.Q
A: It doesn't matter which web or application server is used. NeoLoad lets you test any HTTP
application: ASP, .Net, J2EE, PHP etc.
Applications using Ajax send HTTP requests to the web servers; NeoLoad will create an HTTP page
containing the request for each action.
You will then be able to vary this request just like any other request and to verify the server response.
A: Yes. NeoLoad can record HTTPS requests and play them back.
What's more, NeoLoad also supports client certificate authentication. It should be noted that the
browser generates a security alert on recording an SSL site. This is normal; ignore the alerts and
continue browsing normally.
A: NeoLoad records and plays back all HTTP traffic between the browser and web server.
NeoLoad therefore can simulate client-side component activity, such as an ActiveX component, as
long as communication with the server is via the HTTP protocol.
If the component send binary data, NeoLoad will only be able to play back what has been recorded,
unmodified. If this data contains session ID data or other parameters requiring dynamic replacement,
the test will not work.
Do not confuse this proxy with NeoLoad's internal recording proxy. During the recording, the
browser sends the requests to the NeoLoad recording proxy; NeoLoad then redirects these requests
to the server, either directly or via a proxy, depending on the above settings.
For further details, see the section called “Recording a Test Scenario”
A: NeoLoad can monitor system information servers without having to install any agents. The protocols
used are: JMX for Java application servers, Telnet/SSH for Unix systems, Perfmon for Windows
servers etc.
477
F.A.Q
• IIS. Supports all versions all Microsoft IIS. Uses Windows Perfmon.
• GlassFish. Supports all versions. Certain counters may not be available for versions 2.x and
earlier.
• MySQL. Uses a JDBC connection. Supported versions: 4.0, 4.1, 5.x and 6.0
Q: What language does NeoLoad use for its scripts, and are they user-accessible?
A: NeoLoad "scripts" can only be designed via the GUI, which provides conditions, loops and
other programming structures. JavaScript may be inserted for more advanced uses, such as password
encryption.
478
F.A.Q
Design
Designing a test
Q: How do I configure a scenario?
A: When recording one of your application's features, NeoLoad creates a virtual user containing all
the recorded actions.
You may change the virtual user's behavior by adding, editing or deleting actions.
You may also build up your virtual user by adding requests from various other recordings. NeoLoad
allows you to add actions, such as loops, delays, condition sets etc. easily.
Once your virtual users have been created, you need to create a population of virtual users. You may
have several types of virtual user in a same population.
Next, in the "Runtime" tab, you need to define a test scenario, which will include the populations
to use, the load policy (constant, ramp-up or peak) and other options such as the think time and the
various monitors.
A: If, during playback, the virtual user behaves in an unexpected manner (no record created in the
database) or contains errors, it's more than likely that some requests are being replayed with faulty
parameters.
NeoLoad detects an error when the response contains an HTTP error code. If the page returned
by the server contains the code 200, NeoLoad will not detect the error. To be able to detect it,
you must add assertions or manually check which pages are returned during the virtual user
validation process (use the "Open in browser" button). For more details on using assertions,
see the section called “Validating a Server Response”.
Usually, the parameters to be changed are ID's. You can repeat the recording, for example, and
compare the requests to see which ID's differ.
To retrieve a variable, use a variable extractor. Next, replace the parameter with the variable
created.
Failure to handle a dynamic parameter causes errors. See the section called “Handling an
Application's Dynamic Parameters”.
Generally speaking, you may need to extract and replace some data. See the section called “Creating
a Variable Extractor”.
479
F.A.Q
A: See the question "Why doesn't the virtual user behave as expected?".
A: NeoLoad automatically manages any cookies returned by the server during the test.
Cookies generated by the browser using script must be managed manually (extraction/replacement
of variables or JavaScript code).
Q: How can I have different simulated actions with several virtual users?
A: NeoLoad allows you to design complex Scenarios in which different users simulate different actions
(for example, one user will browse a web site, while another carries out on-line purchases on the
same site).
All you need to do this is to create several types of virtual user and to group them within a population,
specifying the percentage of each type of user.
A: NeoLoad uses variables to simulate this type of behavior. To use a .csv file containing different login
accounts, see the the section called “Logging in With Multiple Accounts Using a CSV File” section
A: NeoLoad automatically detects requests containing errors using the HTTP return code notably.
For example, a request that returns '500 Internal Error' will be marked as an error by NeoLoad.
However, many web applications do not return an appropriate HTTP error code when managing
their errors, which means that NeoLoad cannot automatically detect the problem . Consequently,
management is on a case by case basis, verifying the validity of the content returned by the server at
key points in the application. For example, you might want to check for the presence of an expected
text "The operation was successfully completed" or check that the response does not contain the
word "Error".
1. In the "Virtual Users" tab, click on the request whose response needs to be validated.
4. Select a validation mode: search for presence or absence of a simple text, or use a regular
expression.
At the end of the test, select the requests containing errors or for which the validation failed in the
Errors panel, then analyze the content of the corresponding server's response to work out the reason
for the problem. You can add other validation types, such as size of the response or its duration.
480
F.A.Q
For further details, see the the section called “Validating a Server Response” section
The parameter is created by the server and it changes each time the scenario is run. To be able to
simulate this behavior perfectly, the dynamic parameter returned by the server needs to be extracted
(usually within a hidden form field or a link) and replaced in the following requests.
The extraction is done using a variable extractor. Select the request, click on the "Advanced" button,
then select "Variable extractor".
See the section called “Advanced Parameters” for more details on defining variable extractors.
A: Create a random variable that corresponds to the variable part of the string to be generated. Then
use the following string structure: "product_${productID}".
A: In the "Design" tab, change server by selecting it in the "Servers" section in virtual user profiles.
You need to edit the "Machine name" and, if need be, the "Port" fields for all the requests to
be redirected to the new address at the next runtime. You may also use the search/replace function.
For more details, see the section called “Search for a server in request definitions”.
A: For IP spoofing (using multiple IP addresses), you need to access an agent's configuration in the
"Runtime/Scenarios" tab and select the IP addresses to use during the test.
You must define the IP addresses on that load generator's network interface.
A: During recording, NeoLoad changes the browser's proxy parameters for the duration of the
recording. It's possible that a problem occurred at the end of the recording due to NeoLoad not
restoring the browser's initial settings. If this is the case, restore the proxy parameters in the browser's
options.
A: This pop-up window appears whenever the server uses NTLM authentication.
When navigating in the application normally (outside NeoLoad), the browser sends the encrypted
authentication information to the server transparently. The account used is the Windows account of
the logged-on user. When recording, NeoLoad asks for an account name so that it can record and
play back the authentication.
481
F.A.Q
A: NeoLoad's link extractor function allows you to extract a link from the last page played before the
extraction's definition. The NL-LINKEXTRACTOR-02 error signifies that the link or form could
not be extracted from the previous request. This generally indicates that there is a page inserted in
your scenario between the link to be extracted and the link extraction request. This can be the case
if, for example, your application includes frames. To make the link extractor work properly, you
must make sure that the request containing the link to be extracted is the one played immediately
before the extraction request. If the requests do not follow each other, you can either move them
within the virtual user, or use the variable extractor to find the dynamic value and insert it in the
request parameter (for details on advanced request configuration, see the section called “Advanced
Parameters”)
A: In this case, you still need to decide how many users you want to simulate. Then, you can set the
pace at which the transactions are executed by using the pacing function.
Let's say you want to generate 3000 "Login" transactions per hour using 1000 simultaneous virtual
users. This means that each virtual user must carry out 3 "Logins" every hour. That is to say, each
virtual user must execute a "Login" transaction every 20 minutes. To do this, just set a pacing of
20 minutes for the "Login" container.
Q: How do I specify the character encoding for the parameters in the query string?
A: The query string of requests contains only ASCII characters. Other characters are encoded using the
%XX notation, where XX is the character code for a given character encoding. For example, the
character LATIN CAPITAL LETTER A WITH GRAVE 'À' would be represented as "%C3%80"
using the 'utf-8' encoding or "%C0" using 'iso-8859-1'.
NeoLoad uses 'UTF-8' by default as specified by the RFC 3986. Nevertheless, the server may
expect a different encoding, typically 'iso-8859-1'. The encoding used by NeoLoad may be
changed in the <NeoLoad>/conf/controller.properties file by editing (or creating)
the [Runtime]http.querystring.encoding=UTF-8 key.
Runtime
Running a test
Q: How do I monitor a remote machine?
A: NeoLoad allows you to monitor different types of remote machine or server during a test.
To add monitors, see the section called “Creating and Configuring a Monitored Machine”.
482
F.A.Q
A: NeoLoad displays the number of errors detected during the test in real time and at a set interval.
An error is detected whenever the HTTP code of a request response indicates an error or when an
assertion fails. In both cases, the request at the root of the problem will not be replayed. If several
assertions fail in the same request, only one error is counted.
A: During a test under a constant load using n virtual users, NeoLoad starts n virtual users. Each user
replays the pages and requests defined in the scenario and then "dies". NeoLoad then launches a
new virtual user in order to maintain the desired load. The total number of users launched is the
total number of users that ran the scenario during the test's duration. For example, for a 5 minute
test with a constant load of 10 users, supposing each iteration lasts for 1 minute, the total number
of users launched would be 50.
A: NeoLoad stores its log files in a directory in the user profile. The user profile used is that of the
user who launched the program.
A: The "hits/ sec" indicator shows the number of requests per second sent to the server. This
indicator allows you to find a system's limits. Usually, it should increase with the number of users.
If this indicator stops increasing, or decreases even though the number of users is increasing, it
probably means that the tested application's limits have been reached.
A: This is an abbreviation of "Time To First Byte", the time in seconds before receiving the first byte
of the response. This is the time taken by the server to start sending its response, excluding the
download time. This indicator is sometimes useful in detecting network bottlenecks. If the TTFB is
short, but the response time long, it would indicate a network delay problem.
A: The main cause of communication problems between the controller and a load generator is the
firewall. The the section called “Using a Firewall Between the Controller and Load Generator”
section details how to open the appropriate ports. Don't forget Windows XP/Vista/Seven's built-in
firewall.
If you can't resolve the problem, contact Neotys Support and include both the controller's and load
generator's log files. See the section called “Log Files”
A: This error means that the load generator could not start because the TCP/IP communication port is
already in use. Another agent, or another instance of NeoLoad, is probably in the course of being
launched. If this is not the case, it means that another program is using the communication ports.
You must therefore change the NeoLoad ports by editing the following configuration files (in the
<Install_dir>/conf directory):
• controller.properties: [Network]agent.port
• agent.properties: [Network]agent.server.port
483
F.A.Q
To stop the agent, use the <NeoLoad>/bin/Agent -stop command. You may also use the Start
menu's "Shut down Agent" item.
A: If you're unable to connect a new load generator, either using auto-detect or by defining it manually,
the problem is usually a firewall.
Instructions on configuring NeoLoad to pass through firewalls can be found in the the section called
“Using a Firewall Between the Controller and Load Generator” section
A: If the load generator frequently uses more than 90% of the available memory during a test, it can
lead to errors such as NL-RUNTIME-XX in the test results. The details of these errors are shown
as "java.lang.OutOfMemoryError: Java heap space". The load generator is a Java program which,
by default, is configured to use a maximum of 384 Mb of memory. For extreme load tests, this limit
may be raised to 512 Mb or even 1024 Mb.
See the section called “Increasing Available Memory for Load Generators”
A: If you notice a very high CPU usage even though the number of virtual users remains small, it may be
that one of the regular expressions used in a variable extractor is too demanding. To find out which
regular expression is causing the problem, you can replay the scenario several times, taking out a
different regexp on each run until a normal CPU usage is restored. A very simple, downloadable
freeware program exists that can help you construct your regular expressions (http://www.weitz.de/
regex-coach/).
You simply need to change the values for the runtime.connection.timeout and
runtime.so.timeout keys. The values are expressed in milliseconds (for example, 30000 for
30 sec.). Settings these key values to 0 will create infinite timeouts (default behavior if no values
inserted).
The error message will probably give the main cause of the problem (bad argument for example).
For security reasons, the ASP.NET default settings do not allow errors to be displayed.
To change the settings, you have to disable the "customErrors" mode, by editing the
Web.config configuration file thus:
484
F.A.Q
Analysis
Analyzing and reporting
Q: How do I analyze the results? (beginners)
A: NeoLoad allows you to measure your web application's performance levels. To check the
application's proper behavior under load, you might want to begin by:
1. Checking the response times for all pages and making sure they meet your performance
requirements
The following documents will help you better understand test performance results: the section called
“Making your Results Talk”, the section called “Producing a Realistic Test”, the section called
“Defining Objectives”
A: Right-click on the curve to be exported, then select "Save as image..." to save the curve
in .png format.
A: NeoLoad can export the raw test results in .csv format. You may export the statistics for a URL,
page or container by clicking on the Export button in the Values tab. You may also export all the
raw data for several curves in a graph by clicking on the Export button in the Graphs tab. Not all
the test data may be exported.
Errors
Understanding errors
Q: Why doesn't my test stop when the "Stop user run when assertions fail" option is selected?
A: This option stops the virtual user, not the test currently being run. The halted user will be replaced
by a new user that will start the scenario from the beginning, in order to maintain the required load.
Q: My system has memory available, so why does NeoLoad say that all available memory is used?
A: The memory displayed in the Runtime panel refers to the Java heap, not to system memory.
To generate heavy loads, increase the memory available to the load generator (see the section called
“Increasing Available Memory for Load Generators”)
A: The virtual user activity has been recorded correctly and you get an NL-NETWORK-03 error with
the message "Failed to connect to the server". This indicates that NeoLoad couldn't connect to the
485
F.A.Q
server when playing the scenario. If the error details are "java.net.ConnectException: Connection
timed out: connect", it probably means that the load generator is using an inappropriate network
interface. Check the load generator's settings in the "Runtime/Scenario" section to make sure that
the selected network interface allows connection to the web server. The most common causes of
other errors are:
• Wrong proxy settings in NeoLoad: check the proxy parameters used to connect to the web server
in the NeoLoad preferences' "Proxy" section.
If the error is not due to one of these points, please carry out a short recording on a public Internet
web site, such as http://www.google.com, create a virtual user and check its validity with NeoLoad.
Then send the log files to Neotys Support (all the files in the <NeoLoad>/logs directory).
A: If, during the test, you get 404 errors on images or JavaScript or CSS files, it indicates that the files
are referenced and used in the HTML page, but are missing on the server.
The final user usually doesn't notice that these files are missing because the browser ignores this
type of error. Either make corrections to the application (add the missing files or delete the reference
to them in the web page), delete the request from the virtual user or set the option to smart-ignore
404 error codes: see the section called “Error handling”.
Q: What is an NL-REDIRECT-03?
A: This means that NeoLoad couldn't follow the redirect directive in the previous request (302 Moved
Temporarily). The previous request did not issue a redirect (not 302 status).
The request is an "HTTP Redirect" type within NeoLoad. This indicates that the request must follow
the redirect directive in the previous request.
The redirect is valid if the previous request contains HTTP return code 301, 302, 303 or 307, and
also contains a response header named "Location".
The NL-REDIRECT-03 error indicates that the previous request (the "referrer") did not contain
HTTP return code 301, 302, 303 or 307.
To begin with, check the validity of the request's referrer: Click on the request's "Advanced..."
button, then on the "Advanced parameters" tab.
Then investigate the reason(s) why the referrer didn't return the expected HTTP code.
Typically, the reason is that the request was played with an invalid parameter and generated an
HTTP 200 error code or generated an unexpected HTML content. See the question "Why doesn't
the virtual user behave as expected?".
Check the load generator's network parameters (see the section called “Load Generator Hosts”)
486
Chapter 15. Troubleshooting Guide
15.1. NeoLoad cannot connect to a load generator running on a Windows XP or Windows Vista host
From Service Pack 2 onwards, Windows XP features a firewall which is enabled by default. If the
load generator is run as a Windows service, Windows Firewall does not prompt the user to add the
program to the exceptions list. In this case, configure the firewall manually.
Another possible issue can be a controller-load generator connection timeout caused by an antivirus.
If the load generator machine's antivirus is scanning all NeoLoad's JAR files, this operation can
take a minute or more to complete. To resolve the problem, add JAR files (.jar extension) to the
antivirus's exclusion list.
15.2. When recording with SSL , I get a "Server Certificate Invalid" message
This is quite normal, since the recording proxy is placed between the browser and the web server.
Consequently, the recorder issues its own server certificate, which may trigger security alerts. Accept
the certificate and continue recording.
This is usually because the load generator cannot create any more sockets on the system. The
system's TCP/IP settings therefore need to be modified. This is often the case with Windows
machines as the default settings do not allow large numbers of sockets to be created.
• Windows NT/2000/2003/XP/Vista
You may also apply these changes to the registry automatically by running the
"WindowsNetworkTuning.reg" file in the <NeoLoad Home>/bin directory.
• Unix
Normally, this problem doesn't occur with Unix machines. However, you may check the
maximum number of files and network connections available per process with the ulimit -n
command. If this number is not high enough for the tests you wish to run, you may change the
value by using the ulimit -n <number> command. We recommend a value of 65534.
Your company's system may require a proxy to connect to the Internet. Please check the NeoLoad
proxy parameters in the "Proxy" section, "Edit/Preferences" panel.
487
Troubleshooting Guide
Refer to the "Installation" chapter for details on increasing available memory for load generators.
Refer to the "Installation" chapter for details on increasing available memory for the controller.
At the end of a test, NeoLoad displays a progress bar for the statistics calculation, indicating that the
standard deviation and average 90% are currently being calculated. These calculations are carried
out for each request and each page, which can be time consuming in the case of long tests.
• To stop the calculations immediately, click on the "Stop" button. Any values not calculated due
to the interruption are set to -1 and the results are displayed.
• To avoid this wait, these statistic calculations may be disabled: Edit the
controller.properties file in the conf directory. In the Results section, change the
compute.advanced.statistics key value from true to false. Then re-start NeoLoad for
the changes to take effect. The advanced statistics will now show a value of 0.
The virtual user's activity has been correctly recorded and you get an NL-NETWORK-03 error with
the message: "Failed to connect to the server". This indicates that NeoLoad cannot
connect to the server when the scenario is played.
• Incorrect proxy settings within NeoLoad. In the "Proxy" section of the NeoLoad Preferences,
check the proxy settings used by NeoLoad to connect to the web server.
If the error is not caused by the above, please carry out a short recording on a public Internet site
such as www.google.com, then create a virtual user and check its validity using NeoLoad. Once
finished, please send all log files (all files in the <neoload>/logs directory) to the NeoLoad
support team.
15.10.The JBoss Application Server monitor test button always fails with the message "Please check
the host and port configuration" or returns an exception containing "Connection
refused to host: 127.0.0.1" with a JBoss Application Server running on a Linux box.
This is a well-known issue on some Linux distributions. Edit the /etc/hosts file.
488
Troubleshooting Guide
15.11.When I configure the Windows server monitoring, the remote connection to my server is refused.
To access a remote machine, you need either to have authorized rights or to modify the remote
machine configuration. Authorized rights are provided to administrators and members of the
"Performance Monitor Users" Windows Server group.
15.12.My Java applet recording is not working. It uses HTTPS to communicate with the web server.
To allow NeoLoad to capture the HTTPS requests, the browser's Java plug-in must be configured
to use the NeoLoad recording proxy as proxy server.
15.13.I use Ubuntu Linux 8.10 and some windows in NeoLoad don't display properly or are empty.
Edit the bin/NeoLoadGUI file, adding the line "export AWT_TOOLKIT=MToolkit" to the
end of the other "export" commands towards the end of the file.
489
Chapter 16. Tutorials
Introduction
The NeoLoad tutorials provide you with a detailed look at specific topics. For more general help on broader
subjects, such as designing a virtual user, see Part III, “User guides”.
Design - General
Table of contents
A business transaction is a set of related pages that achieve a consistent business interaction. A typical
example is the set of pages a user goes through to login to an application. The idea is to assemble those
pages into a container so that NeoLoad can produce precise time consumptions and statistics on those
pages as a whole. These containers will appear separately in test results making analysis easier. In our
login example, you would obtain statistics on the response times users experience from the moment they
start connecting to the application to the moment they're actually logged in.
The first step in using business transactions is to identify recurring behavior, especially behavior that
represents an important functionality in your application. Once this behavior pattern has been identified,
the corresponding pages must be assembled in a container, a Virtual User Container in NeoLoad parlance.
This tutorial details the steps involved in building these containers.
Virtual users are one of the main building blocks NeoLoad provides to create load test scenarios. Virtual
users assemble recorded HTML pages, populations group virtual users and, finally, a load test scenario
assembles populations. This tutorial will briefly describe the steps involved in building a virtual user that
has a container. It will also show the types of results obtained using this technique. For more details on
creating populations and running scenarios, see the reference guide.
Example Overview
We'll base our example on the JPetStore application, an on-line pet store web application.
The application provides typical merchant web site functionalities : creating an account, signing in,
browsing through pets, adding pets to a shopping cart, and finally checking out and purchasing what's
been added to the cart. We identify the purchasing phase as critical because it is resource greedy and time
consuming. We need and want detailed statistics on this phase.
490
Tutorials
We ignore the interactions concerning the actual choice of pets and their quantity, we are only interested
in the pages in which the client confirms and checks out what he or she has purchased. The following
screen shots depict those pages:
1. Whatever the client has ordered, the following page submits a form containing payment and billing
address information (/jpetstore/shop/newOrderForm.shtml):
2. The second step is a page prompting the client for confirmation of previously entered billing address
information (/jpetstore/shop/newOrder.shtml):
491
Tutorials
3. The final step is a page summing up payment, address and order details (/jpetstore/shop/
newOrder.shtml_1):
2. To begin a new business transaction, enter its name in the "Container" text field.
3. Carry out the actions relating to the business transaction in the browser.
4. To finish the business transaction, delete or replace the name in the "Container" text field.
5. To stop the recording, close the browser or click on the "Stop" button in the NeoLoad Recording
Toolbar.
492
Tutorials
Note
Only those business transactions at the virtual user root may be created using the Recording
Toolbar.
In the "Virtual Users" pane, select the last page in the virtual user (/jpetstore/shop/
newOrder.shtml_1) then right-click on the page. In the pop-up menu, select "Insert
after", then "Container".
Select the pages to add to the container, then drag and drop the pages in the container.
Tip
You can select multiple pages by using a left click while holding the CONTROL or
SHIFT keys down.
493
Tutorials
In our example we have added the container as the last element of the virtual user. We have added to
the contents of the container the three HTML pages included in the order interaction:
We know that the interaction involved by these three pages includes possibly time consuming
processing such as account verification and order submission. This is where having fine grained
results on a particular container will become useful.
In Runtime mode, a scenario called Scenario1 has been created and configured so that it only contains
the Buyers population:
494
Tutorials
Results Summary
After having launched the scenario in "Runtime" mode, the first place you will see results specific to
the container is in the "Results Summary" tab, which can be viewed in "Results" mode. A section
called "Containers" summarizes the statistics for all the containers used in the scenario. The summary
provides an overall view of a particular business transaction's (container's) behavior:
Results Values
The "Values" tab in "Results" mode gives more details on the business transaction. Select a particular
virtual user and choose the "Logical Actions" item in the "Filter" list. You can then select
the container representing the business transaction, in our case the Checkout container, as seen in
the following screen shot. You may now work with the various statistical elements to deepen your
understanding of the business transaction's behavior.
495
Tutorials
Results Graph
The "Graph" tab in "Results" mode also provides details on the business transaction. You can select
a particular virtual user and then select the container representing the business transaction, in our case the
Checkout container, as seen in the following screen shot.
Related Links
For more information on how to create realistic populations see the section called “Creating Realistic
Populations”.
For more information on how to analyze results, see the Reference Guide
496
Tutorials
1. manually, see the section called “Creating and Linking a CSV Variable to Login Information”, or
2. using a wizard, see the section called “Multiple Accounts Using the Post-Recording Wizard and a CSV
file”.
Both techniques are described here, the easiest and preferred one being the second, but understanding the
"manual way" will help you fully understand the "wizard way".
1. Creating and correctly configuring a variable that will take its values from a .CSV file.
2. Linking the variable to NeoLoad configuration elements so that the variable is used when logging in
is required.
When working "manually" with variables in NeoLoad, you must always first declare and define the
variable and then link it to the configuration elements.
Declaring and using variables is the usual way of achieving dynamic behavior with NeoLoad. A variable
can be used in place of constant or static values for many configuration elements. In this example we will
use a File Variable, a variable that takes its values from a .CSV (Comma Separated Values) file. An
alternative would be to use a List Variable and explicitly define the values in the Variables dialog
box. We will leave this alternative aside in this example.
497
Tutorials
Use a meaningful name for the variable. In our example we have decided to call our variable
account.
The dialog displays the first lines of the file so that you can check its contents. Our example supposes
that the file has been created beforehand and contains consistent values.
Our file, called accounts.csv, defines two columns: the first contains the login values, the second
contains the associated passwords. The account variable has therefore two values automatically
named account.col_0 and account.col_1. When access to the login values of the account
variable is required, we will use the ${account.col_0} expression. Similarly, when access to
the password values of the account variable is required, we will use the ${account.col_1}
expression.
Tip
Renaming column names . NeoLoad assigns default names to the columns of the CSV file.
In this case the names of the columns are col_0 and col_1 . Columns can be renamed by
clicking on the column header and entering a custom name.
You can specify a column separator other than the default ";" character.
Order can be sequential or random. Using random order can be relevant if, for instance, your
application's behavior varies depending on the access rights of the logged in user. Using random
order, in this case, will better approach a realistic situation. We choose to "Take the values
randomly".
Whether in sequential or random order, once all possible values of a variable have been used, NeoLoad
will repeatedly go through all the values again.
In our case, we want a new value to be used each time a virtual user logs in so we select the "For
each virtual user" option.
Once you have closed the Variables Creation dialog you can test the behavior of the
accounts variable by selecting the "Test" button in the Variables Edition dialog.
498
Tutorials
Testing is achieved by choosing different Actions and evaluating the current expression,
${account.col_0} in this case, by selecting the "Apply Action and Evaluate button".
In our example, choosing the "Change Virtual User" action will result in a new value for the
login column. The value is randomly chosen among the values of the login column. This is consistent
with the way we have defined the accounts variable: we want a new login value each time the
virtual user changes in the scenario. Testing with other actions, such as the "Change Page action",
will not change the value of the variable.
If you wanted to test the password value of the account variable, you would change the expression
to ${account.col_1}.
Important
Required steps to link the CSV variable to login information are similar for the first two types
of authentication: basic and NTLM authentication both involve changing configuration elements
related to the server (The following section covers this topic). The third however, form based
authentication, involves changing configuration elements related to a particular form: See the
section called “Link the CSV Variable for Form Based Authentication” .
Choose the "Virtual Users" tab and select the appropriate server element in the servers tree.
499
Tutorials
c. Choose the ${account.col_0} expression. The first column of the account variable
contains login values.
500
Tutorials
Tip
Rather than using the Variable Picker, a faster alternative, once you have selected
the login column, is to delete the value and start typing ${. NeoLoad displays a pop
up listing all available variable values:
Using the down and up arrow keys and the ENTER key, you can select the appropriate
variable value.
In our example we suppose having already configured our server for Basic or NTLM
authentication. If this had not been the case, we would have added, prior to linking the
account variable, an authorization scheme by selecting the Add ... button and specifying a
Type and a Realm/Domain.
This involves the same steps as linking to the Login configuration element: Selecting the
password column and changing the value to the ${account.col_1} expression.
In the "Virtual Users" tab, choose the virtual user, HTML page and HTTP request where the
actual login and Form based authentication takes place.
In our example:
501
Tutorials
The HTTP request, in our example, defines several request parameters. In this case, the two of interest
are the username and password request parameters. In your case, these request parameters are
probably named differently.
a. In the Definition panel, click twice on the Value column for the username request
parameter.
c. Choose the ${account.col_0} expression. The first column of the account variable
contains login values.
502
Tutorials
Tip
Rather than using the Variable Picker, a faster alternative, once you have selected
the Value column, is to delete the value and start typing ${. NeoLoad displays a pop up
listing all available variable values:
Using the down and up arrow keys and the ENTER key, you can select the appropriate
variable value.
This involves the same steps as linking to the username request parameter element: Selecting
the Value column and, for the password request parameter, changing the value to the
${account.col_1} expression.
The Wizard does most of the job so these steps are simple and few. This is all the more true in comparison
to the "manual" procedure which entails declaring a variable and linking it to login elements in the
configuration. Refer to the first section of this How To to fully understand how using multiple accounts can
be achieved without using the Post-recording Wizard: the section called “Creating and Linking
a CSV Variable to Login Information”.
The steps you need to take boil down to correctly defining the contents of a CSV file. This section will
however precisely show you the login related elements that the wizard creates and configures. It will also
detail how these elements relate to each other. If you want detailed information or a better understanding
of the Post-recording Wizard itself refer to the section called “Post-Recording Wizard”.
Each time you record a set of interactions with your application, the Post-recording Wizard is
launched at the end of the recording. This wizard analyzes and pre-configures login elements for you.
Depending on the type of authentication your server is using, the wizard will create and configure different
elements:
503
Tutorials
1. For Basic authentication or NTLM authentication: the wizard automatically detects these authentication
policies and configures Authorization elements related to the server you are connecting to.
2. For Form based authentication: the wizard automatically detects the HTTP request that
authenticates to your server and configures elements related to that particular request.
The first part of this section goes through the steps of the Post-recording Wizard and describes
the elements related to Basic and NTLM authentication. In most situations the Wizard does the whole job
on its own and you just have to confirm what the Wizard has detected and decided. The second part of
this section details the configuration elements the Wizard has created and the information you will need
to provide.
We skip the first two steps of the Post-recording Wizard and concentrate on step 3. This is
where Basic and NTLM authentication information is used and can be configured through the Wizard.
Our example is based on Basic authentication but the NTLM authentication procedure is identical.
The Wizard automatically detects that Basic authentication has been used. We indicate that multiple
accounts should be used by checking the "Use multiple accounts" option.
504
Tutorials
The wizard needs to determine the type of variable used to store the multiple accounts. We choose
the CSV alternative by checking the "Use the accounts from a CSV file" option.
To be able to replace the recorded parameters with dynamic values, we need to define the file-type
variable that will be used. This step in the wizard allows us to select the variable's parameters. Select
the CSV file to use by clicking on the "..." button. The first few values are displayed to check the
file's content.
Double-click on the column headers to change the names to more meaningful names.
505
Tutorials
The Value change policy selected by the wizard is for Each virtual user. This is
consistent with the behavior we are looking to create, since we want a new value to be used each time
a virtual user connects to the application.
In this last step, the wizard prompts us to specify which column to use for the login, which column
to use for the password and then recaps the created configuration. Here, it has created an Accounts
variable that has been assigned to the login and password authentication parameters. The
Accounts variable has two columns: the first column, ${Accounts.login}, must contain login
values; the second, ${Accounts.password}, must contain password values.
During the recording phase NeoLoad automatically detects Basic or NTLM Authentication and correctly
configures the Authorization elements of the server. As detailed previously, the Post-recording
Wizard configures and links Authorization elements to a variable. The following figure depicts such
a configuration:
In our example, our server uses Basic authentication. The wizard has detected this and has configured
the Authorization panel accordingly by adding a line with type, Realm/Domain, login and
password information. The login and password are both linked to values of a variable called
506
Tutorials
Accounts. More precisely, the login is linked to the ${Accounts.login} expression and the
password to the ${Accounts.password} expression.
The first part of this section goes through the steps of the Post-recording Wizard and describes the
elements related to Form based authentication. In most situations the Wizard does the whole job on its own
and you just have to confirm what the Wizard has detected and decided. The second part of this section
details the configuration elements the Wizard has created and the information you will need to provide.
We skip the first two steps of the Post-recording Wizard and concentrate on step 3. This is where
form based authentication information is used and can be configured through the Wizard.
In our example, we check the accountBean form as being used for authentication. This basically
tells the wizard to look for HTTP authentication related parameters in the associated HTTP request.
507
Tutorials
The wizard automatically detects and identifies the username HTTP parameter as the login field
for the form based authentication.
508
Tutorials
The wizard automatically detects and identifies the password HTTP parameter as the password
field for the form based authentication.
At this stage the wizard needs to determine whether you want to use multiple accounts to login. We
select the Use multiple accounts option accordingly.
509
Tutorials
The wizard now wants to determine if account information (login and password) should be read from
a CSV file, or be entered explicitly in the project configuration. We choose the Use the accounts
from a CSV file option.
510
Tutorials
To be able to replace the recorded parameters with dynamic values, we need to define the file-type
variable that will be used. This step in the wizard allows us to select the variable's parameters. Select
the CSV file to use by clicking on the "..." button. The first few values are displayed to check the
file's content.
Double-click on the column headers to change the names to more meaningful names:
Accounts.login and Accounts.password.
The Value change policy selected by the wizard is for Each virtual user. This is
consistent with the behavior we are looking to create, since we want a new value to be used each time
a virtual user connects to the application.
511
Tutorials
In this last step, the wizard prompts us to specify which column to use for the login, which column
to use for the password and then recaps the created configuration. Here, it has created an Accounts
variable that has been assigned to the login and password HTTP parameters. The Accounts
variable has two columns: the first column, ${Accounts.login}, must contain login values; the
second, ${Accounts.password}, must contain password values.
The Post-recording Wizard has also configured the HTTP request doing the authentication. In our example,
the configuration of the HTTP request associated with the accountBean form is as follows:
The username parameter is associated with the ${Accounts.login} expression and the password
parameter associated with the ${Accounts.password} expression. The Accounts variable is
automatically created and configured by the Post-recording Wizard. The ${Accounts.login} value
will be read from a CSV file and is expected to contain a login value. The ${Accounts.password}
value will be read from the same CSV file and is expected to contain a password value.
512
Tutorials
Users connecting to your application will necessarily have different profiles each behaving
differently. The first step in achieving realistic scenarios is therefore to create different types of Virtual
Users and to include them in a population.
In the previous screen shot, our example population called RegularPopulation includes three
distinct types of users:
RegularUser. Represents a user that often uses our application but spends most of his or her time
just browsing through our catalog.
RegularBuyer. Represents a user that does some browsing too but actually places orders and
payments.
Administrator. Represents in house staff who can remotely administrate our application.
RegularUser. In our example, we have decided that this type of user represents 85% (55%
+ 30%) of the users of our application. This is usually based on statistics or at least consistent
forecasts of user distributions. We also split this type of user into two sets based on the type
of access they use. We estimate that 55% of the users will have a broadband access to our
application and that 30 % will only have limited access (512kbps download and 64kbps upload).
513
Tutorials
Important
The percentage used to define a distribution of Virtual Users in a population will be
interpreted when launching a load scenario using that population. For example, if the
load scenario defines a constant load policy with 100 users then 85 RegularUsers
will be launched, 55 of which will have broadband access and 30 of which will have
limited access.
RegularBuyer. This type of user represents 10% (5% + 5%) of the users accessing our
application : 5% of which have broadband access and another 5% that have limited access
NeoLoad provides additional elements that can be configured per user. These include browser,
cookies and the number of HTTP connections that the browser will use to interact with the server.
Refer to the reference guide for further details.
Finally, from a purely load testing point of view, it is also important to identify pages that are time costly,
we will see in this section how to define HTTP response that exceed a certain amount of time. This is
consistent with non functional requirements that are often expressed by users or clients and that you must
ensure.
NeoLoad's validations are expressed on a per HTTP response basis. The validation mechanism provides
the means to express conditions that must be met by the HTTP response resulting from a particular HTTP
request. NeoLoad provides three types of criteria with which validations can be expressed: time based
criteria, content size based criteria and finally criteria based an the contents of the response. This tutorial
describes how these criteria can be added and configured. It also points out how to test your validations
and where to configure NeoLoad's behavior when validations fail.
<HTML>
<BODY>
514
Tutorials
<H1>Order references</H1>
<P>
Thank you, your order has
been successfully submitted :
<B>#I45-020206-45RT347</B>
</P>
<BODY>
</HTML>
We want our validation to apply to the contents of the HTTP response making sure that an order identifier
has been correctly returned and also checking that the format of the order identifier is correct. Our second
validation will apply to a non functional requirement: confirming and placing the order is a resource greedy
and time consuming operation, we want to make sure the response time does not exceed 2 seconds.
The following procedure details the steps entailed in defining these validations:
1. Select the HTTP request for which the response will be validated
a.
Go to "Design" Mode by selecting the button.
d. Select the HTTP request for which the response will be validated. In our case we choose the /
loadtest/validation request:
Note
An HTML page is most of the time composed of several HTTP requests (images, .css
files, etc). In our example the page only has one request and we will be validating the
response of that request.
At this stage, and before going to the validation steps, it usually is a good idea to take a look at
the contents of the response we are intending to validate:
515
Tutorials
i.
Select the button.
ii. Select the "Response Contents:" tab. In our example, the following screen shot
depicts the contents of the HTTP response we want to validate:
As mentioned previously, we want to apply our validation to the presence and correctness
of the order identifier.
Tip
Searching through the contents: In our example the contents of the response is
simple and short but a realistic response could be much longer. You can search
for some particular text by right clicking in the contents panel and selecting the
"Search..." option or using the CONTROL + F shortcut keys. This will open
a search panel at the bottom of the dialog in which you can enter target text and
search for occurrences of that text.
The Validation dialog present three panels, each defining one of the types of validation NeoLoad
provides: assertions on the duration, the length of the content and assertions on the content itself:
516
Tutorials
As described earlier these are the three criteria that NeoLoad provides to validate a response. In our
case we will leave the size criteria aside. This could be used to validate image contents for instance,
making sure the image returned has the required size.
At this stage we define the Duration criteria and enter 2000 ms. This is consistent with our
requirement.
Note
Duration is the amount of time between the moment the HTTP request is sent and the moment
the whole of the HTTP response is received.
a. Adding an assertion
Important
As we will see later we can tell NeoLoad to stop when this assertion fails. This behavior
is configured on the virtual user containing this HTTP request. NeoLoad will stop
executing those virtual users. In all cases, NeoLoad indicates, during the execution of
a load test, where and why an assertion has failed.
517
Tutorials
An assertion expresses a condition that must be met by the HTTP response. In our case the
contents we want to validate is dynamic: an order identifier generated for each order that has
been confirmed. We therefore choose the "contains the regexp:" option. The default
option "contains:" would have been sufficient had we looked for some constant text.
We will use a regular expression to identify the order identifier and make sure the identifier
is correctly constructed. Using regular expressions is NeoLoad's basic technique to match and
extract dynamic content.
This opens the RegExp picker dialog. The dialog is divided into two parts, the first one
contains the contents of the HTTP response and the second part the regular expression you will
be defining to match part of the contents. While you enter the regular expression or part of
it, NeoLoad dynamically tries to match the expression you've type in with the contents of the
response. This makes it easy to test the regular expression you are defining.
518
Tutorials
In our example we want to match the order id. This identifier is made of three distinct parts:
1. A prefix, such as #I45, always starting with the character "#" sign and followed by a
sequence of exactly three letters or digits.
The parenthesis are used for grouping an expression. The dot character matches any character
other than the new line character. The {3} expression indicates that there are exactly three
characters other than the new line character.
2. A middle part, such as -020206, starting with a dash and followed by a sequence of exactly
six digits.
The \d matches any digit and the {6} says there are exactly 6 digits. We could have refined
this expression to match a date and constrain the month and day parts to match only consistent
values.
3. A suffix, such as -45RT347, starting with a dash and followed by a sequence of exactly
seven letters or digits.
We could obviously improve this regular expression by being much more precise and
constraining our expression to match a set of uppercase characters or digits. In this case
we would use the following expression ([A-Z|0-9]{7}), where the A-Z sub expression
matches any character from A to Z, 0-9 matches all the digits from 0 to 9 and the | between
519
Tutorials
the two sub expressions indicates that one of the sub expression must match. Finally the
square brackets define a character range. For this example we will keep to the simpler form.
As depicted in the previous screen shot NeoLoad has highlighted the contents that matches the
regular expression we have defined.
Tip
Searching through the contents. In our example the contents of response is simple and
short but a realistic response could be much longer. You can search for some particular
text by right clicking in the contents panel and selecting the "Search..." option or
using the CONTROL + F shortcut keys. This will open a search panel at the bottom of
the dialog in which you can enter target text and search for occurrences of that text.
Tip
To quickly and easily spot requests that have associated validations, select your virtual user,
right click on this node and select the "Flag requests..." item.
NeoLoad adds a tick to all the nodes (records, HTML pages and HTTP requests) of the
virtual user profiles using validations:
520
Tutorials
NeoLoad displays all the pages and requests that have been replayed during the test. In this
case all has gone well and no assertions have failed. This doesn't completely guarantee that our
validations have been correctly configured but does give us a good indication.
The following screen shot depicts a situation where we have voluntarily changed our example
application code so that the validations we have defined both fail:
When selecting the failed response and selecting the "Assertion" option NeoLoad displays
the assertions that have failed and the reasons for which they have failed.
521
Tutorials
Although this final step is not about configuring validations, it is directly related to this subject
because it details how and where you configure NeoLoad's behavior when assertions fail.
Virtual Users assemble recorded pages and their associated HTTP requests in the Virtual User
profiles. In turn, Virtual Users are used to build populations and finally, load scenarios are achieved
using populations. Virtual Users are the building blocks on which you can define how NeoLoad
will behave when an assertion fails. You can either tell NeoLoad to ignore the failure and continue
executing the virtual user or force NeoLoad to abort the Virtual User when such a failure occurs. The
second alternative is definitely encouraged. It will ensure that load tests won't run uselessly and will
make it much easier for you to identify and determine the reasons of assertion failures.
In the following example we have decided to abort virtual user execution when both errors
and assertion failures occur. Errors are HTTP errors, such as Page Not Found errors. They are
automatically detected by NeoLoad.
Related Links
For more information on creating virtual users refer to reference guide Virtual Users
For more information on regular expressions refer to the regular expression appendix
This tutorial takes as its example RMI (Remote Method Invocation) calls to a remote Java server. The
server provides two services: one gives the dollar value of a stock on the US Stock Exchange, the other
provides for the conversion of one currency to another. We are going to string together the call to these
two services to obtain a stock price in Euro.
522
Tutorials
For Java classes to be used in JavaScript, the class names must be fully qualified (even for Java classes
such as java.util.List) and preceded by "Packages.".
For example:
In our present example, we'll choose to handle the intermediate result, namely the dollar stock price,
transparently. The aim of this is to simplify as far as possible the succeeding JavaScript calls.
523
Tutorials
The connect() method is used to connect to the remote object, getStockQuoteUSD() retrieves
the specified stock price and stores it internally, and getStockQuoteEur() returns the stock price
converted into Euro.
Configuring NeoLoad
Generally speaking, NeoLoad must have access to the Java classes used.
Copy the code to be called, and the libraries used, into the <neoload-project>/lib/jslib/. You
may place either JAR files or .class files in the directory.
symbol;description
IBM;IBM
MSFT;Microsoft
AAPL;Apple
ORCL;Oracle
JAVA;Sun
GOOG;Google
7. Leave the value change policies to their default setting: each line of the file corresponds to a Virtual
User instance.
8. Click "Ok".
1. Place three "JavaScript" logical actions in the Virtual User. Let's name them
"connect" ,"getStockQuoteUSD" and "getStockQuoteEur".
524
Tutorials
3. Modify the wait time for each delay. This must correspond to the time between the two calls in the
simulated application.
4. Replace the default code for each action with the following.
connect
The script creates an instance of the SampleClient class described above and makes the connection to the
server. The sampleClient instance is stored within the Virtual User instance, for use by the subsequent
requests. Thus, we have one instance of SampleClient per Virtual User instance throughout the test.
getStockQuoteUSD
The script retrieves the sampleClient instance stored by the previous script, then interprets the
"stockSymbols" variable created previously. The getStockQuoteUSD method makes the RMI call
that retrieves the price for the stock whose symbol is taken from the CSV file. The dollar value is stored
within the SampleClient, to be used as an argument in the following call.
getStockQuoteEuro
var sampleClient=context.currentVU.get("sampleClient");
var stockValueEuro = sampleClient.getStockQuoteEUR();
logger.debug("Stock price €" + stockValueEuro);
context.variableManager.setValue("stockPriceEUR",stockValueEuro);
The script retrieves the sampleClient instance stored by the first script, then makes the call to the
RMI method that allows the previously-stored dollar value to be converted into Euro. The call to the
VariableManager allows the value retrieved by RMI to be injected into a NeoLoad variable. This
value may then be used in NeoLoad, for example as a classic HTTP request parameter. This is outside
the scope of this example however.
525
Tutorials
1. Open the validation pane via the "Run / Start checking" menu item.
Error Handling
The "JS-OK" return code denotes that the JavaScript code was correctly executed. In the case of a
JavaScript error, or if the Java code produces an exception, the "JavaScript" action is flagged as containing
an error, accompanied by the JS-ERROR-EVAL or JS-FAIL error code.
The logger.debug() method provides for the logging of useful information for checking that the
scenario runs correctly during the validation. In our example, we're displaying the result of the last RMI
call. By default, DEBUG-level logs are only displayed during the validation process. See the Reference
Guide for more information on logs.
In NeoLoad, the "JavaScript" logical action is not considered a request. Therefore, most of the NeoLoad
statistics, such as average pages/sec, average hits/sec, average request response times... all return zero.
This is true during test monitoring, in the test summary and in the generated reports.
Thus, the only place the JavaScript statistics can be found is in NeoLoad's "Values" and "Graphs" tabs.
The information available in these tabs is the same as for an HTTP request.
Related Links
For more information about using JavaScript in NeoLoad, see the section called “JavaScript”.
526
Tutorials
Unless the test designer decides otherwise, during the test run the recorded values are submitted "as is".
Therefore, these values need to be re-worked using a process of data extraction and re-insertion. The
Search for dynamic parameters function, included in the Post-recording Wizard, allows you to
identify the dynamic parameters and automatically configures the virtual user profile to allow the extraction
and insertion of the appropriate data.
The Search for dynamic parameters function automatically handles dynamic parameters in
the vast majority of cases. For more complex cases, the parameter must be managed manually using one
of the extraction methods described below.
Extraction Methods
NeoLoad provides various data extraction methods to extract and insert link or form parameters. The
methods are used automatically by the Search for dynamic parameters function and can be
used explicitly for manual extraction.
The following section briefly outlines each method and provides guidance on choosing the appropriate
method for each particular case.
• Link extractors. To use a link extractor, select the "Follow a link from the previous
request" request type.
In this mode, NeoLoad searches for a link in the previous response according to the criteria entered in
the request definition pane and submits the link it finds.
# it can search for a link using its "id" or "name" attribute, its label or its path. For example, you can
search for a link whose id attribute is "search-tab" or whose (text) is "Next";
# because it extracts the link as a whole, there is no risk of extracting in error a parameter from one link
and another parameter from another link or from another part of the HTML page.
This type of extractor only works with standard links declared in HTML code and cannot be used where
the link is created dynamically using JavaScript calls.
For more information, see the section called “Follow a link from the previous request” in the Reference
Guide, or the "Follow a link from the previous request" tutorial.
• Form extractors. To use a link extractor, select the "Submit a form in the previous
request" request type.
In this mode, NeoLoad searches for a form in the previous response according to the criteria entered in
the request definition pane and submits the form it finds. Custom values can be inserted in the extracted
form.
# it can search for a form using its "id" or "name" attribute, its label or its path. For example, you can
search for a form whose id attribute is "search-form";
# it can search for a form according to its occurrence within a page. For example, you can search for
the first form in a page without being more specific;
# because it extracts the form as a whole, there is no risk of extracting in error a parameter from one
form and another parameter from another form or from another part of the HTML page.
527
Tutorials
For more information, see the section called “Submit a form from the previous request” in the Reference
Guide, or the "Submit a Form from the Previous Request" tutorial.
• Variable extractors on parameters. To use a variable extractor defined on a parameter, select the
"Manually define the request" request type. Edit the parameter and select the "Use an
extracted value" option.
In this mode, NeoLoad extracts the data using a regular expression. You may fine-tune the extraction
for extracting multiple values.
# it can extract data from the entire response body, it is not limited to links and forms;
• Variable extractors on requests. To define a variable extractor on a request, first select the request
whose response contains the data to be extracted. Next, click on the "Advanced..." button, select
the "Variable Extractors" tab and click on the '+' button.
In this mode, NeoLoad extracts the data using a regular expression. You may fine-tune the extraction
for extracting multiple values.
# it can extract data from the entire response body, it is not limited to links and forms;
# the value may be changed prior to its use. As the extractor is placed on a request that precedes the
request that inserts the value, you may use JavaScript to format the value, do a calculation and re-
insert the modified value.
For more information, see the section called “Variable Extractors” in the Reference Guide.
Framework Parameters
Thanks to its "Search for Dynamic Parameters" function, NeoLoad can detect and automatically configure
dynamic parameters.
The "Search for Generic Parameters" section allows you to automatically detect an application's custom
dynamic parameters without having to declare them in advance. When this detection fails, the parameter
needs to be handled using a variable extractor. NeoLoad allows you to add this variable extractor to a
list of pre-defined rules so that the search for framework dynamic parameters automatically handles this
custom parameter at each new recording.
For more information, see the section called “Framework Dynamic Parameter Handling” in the Reference
Guide.
528
Tutorials
• requests may return an error (typically, Error 500) when validating the Virtual User;
• the Virtual User displays an unexpected behavior (entries not created in the database for example).
NeoLoad automatically handles the most common parameters, such as the framework .Net
__VIEWSTATE parameter. However, NeoLoad cannot automatically handle some parameters that are
specific to an application. These need to be handled individually, that is to say by placing an extractor on
the value returned by the server and injecting the extracted value into the appropriate requests.
This tutorial will show how search for, and handle, a dynamic parameter. The steps are as follows:
3. Search for the request whose response contains the value to be extracted.
The example used throughout this tutorial is taken from an e-commerce demo application. The recorded
scenario concerns the purchasing of an animal on the website.
529
Tutorials
In many cases however, the error is handled at the application level and the page returned by the server
shows a '200 OK' error code. In this case, NeoLoad cannot detect the error automatically, and the error
must be searched for manually.
2. Scan all the requests with HTML responses. Typically, these will be the first or second response in
each page.
b. Make sure the "Response" radio button is checked in the "Details" section.
c. Examine the server response displayed in the text area for any error message or inappropriate
content. Click on "Open in browser" to display the response in a more readable format, then
click on "Compare with recording" to highlight the discrepancies between the replayed
request and the response received during the recording.
In our example, the '500 Internal Error' code clearly identifies the request containing the error.
530
Tutorials
Important
When an error occurs, it usually triggers a cascade of subsequent errors. To correct the problem
therefore, it's important to work on the first request containing an error. Once this has been fixed,
run the Virtual User validation again and correct any other errors that may be flagged.
1. categoryID. This parameter provides the category of animal selected during the scenario recording
(in our case a dog). The "categoryId" field is not generated by the server, but is a direct result of the
user's choice. Consequently, it can be safely assumed that this parameter is not the source of the error.
2. id. The id parameter is a suspect, however, due both to its name and its value. We can assume that
the value is generated by the server and that this parameter is the source of the error reported during
validation.
If in doubt over a parameter, continue the process for each parameter. The next step will allow you to check
whether the parameter should be processed, or whether the recorded value can be submitted unaltered.
531
Tutorials
4. Click on the "Automatic Configuration" button (NeoLoad will then configure the extractor
to be used for you).
5. If you get the message "NeoLoad could not find the parameter", you will have to
configure the extractor manually (see the section called “Making the Parameter Dynamic Manually”).
Start the wizard using the "Edit / Search and replace" menu item:
532
Tutorials
The wizard allows you to automate the replacement of the "id" parameter's value with the
"nl_extracted_param" variable. Select the first option "Search request parameters", then
click "Next" to go to the next step.
533
Tutorials
Select "Search names and values and replace", then click "Next" to enter the search criteria.
534
Tutorials
In the first field, we'll enter the value for the "id" parameter, that is to say "1241078526424",
which was previously non-editable. In the second field, we'll enter the replacement value
"${nl_extracted_param}". If necessary, we can use the variable picker :
Once the variable has been selected, click "Next", then "Finish". A dialog box allows you to replace
each occurrence of the value "1241078526424". When all of the replacements have been made in the
scenario, the dynamic parameter's management is finished.
535
Tutorials
The request that was previously flagged as containing an error is now correctly handled. The HTTP code
returned is 200, proof that the client-server transaction has been successfully completed.
Searching for the Request whose Response Contains the Value to be Extracted
We have already found the parameter whose replayed value is invalid. We now have to find the request
whose response contains the server-generated value to be extracted.
In our example, the id parameter was submitted with a value of "1193061773021" during the recording.
Let's search for the request whose response contains this value.
1. In the Virtual User profiles tab, click on the node that corresponds to the virtual user profile.
2. In the "Flags" section, select the last option "whose recorded response contains:"
and enter the value: 1193061773021.
3. NeoLoad places a check mark against the requests whose responses contain the entered value, in our
example it's the request /jpetstore/shop/index.html : .
536
Tutorials
We have now located the request whose response contains the value for the parameter to be processed.
Let's check to make sure it's the value we want and whether the parameter really needs to be processed.
Tip
Right-click on the request in the Virtual User profile, and use the "Select in
validation window" menu item to automatically open the validation window with the
selected request displayed.
2. Compare the response obtained during the validation with the one obtained during the recording:
537
Tutorials
a. Make sure the "Response" radio button is checked in the "Details" section.
The comparison tool reveals that the id parameter's value is generated in this response and that
the value has changed. Therefore, this parameter must be handled individually.
We now need to extract the value of the "id" parameter from the "/jpetstore/shop/
index.shtml" request. To do this, we'll need to use a variable extractor.
4. Click "+".
In our example, let's extract the "myId" variable from the server response body. Extract the content starting
with "id=" and ending with "" shape":
538
Tutorials
Note
See the tutorial Extracting Data from an HTTP Request and Using it Later in the Scenario for
more information on extracting and injecting variables.
Once we've completed the extraction and placed the parameter value in a variable, named "myId" for
example, we'll then look at how to replace the value recorded in the scenario with the created variable.
Run the wizard using NeoLoad's "Edit / Search and replace" menu item:
539
Tutorials
This wizard allows you to automatically replace the value of the "id" parameter with the "myId" variable.
Select the first option "Search in request parameters", then click "Next" to go to the next step.
540
Tutorials
Select "Search names and values and replace", then click "Next" to enter the search
parameters.
Fill in the first field with the value previously used for the "id" parameter, "1193061773021". Put the
replacement value "${myId}" in the second field. Use the variable picker if necessary :
541
Tutorials
Once you've selected the variable, click "Next", then "Finish". A dialog box allows you to replace each
occurrence of the value "1193061773021". The replacement process looks like this:
542
Tutorials
The window in the top left-hand corner allows you to navigate through each occurrence and indicate
whether or not the replacement should apply. The pages containing the parameter in question are marked
in the scenario tree. Moreover, the parameter found is highlighted in yellow in the request's parameters.
Click the "Replace" or "Replace all" buttons to replace the value:
543
Tutorials
You can see that the "id" parameter's value has been replaced by the "myId" variable. Replace each
occurrence of the "id" parameter to make the entire scenario dynamic.
To successfully conclude the procedure, we need to check the validity of the newly-modified Virtual User.
Click the button to display the validation window. Run the validation to show the following result:
The request that was previously flagged as containing an error is now correctly handled. The HTTP code
returned is 200, proof that the client-server transaction has been successfully completed.
Additional Links
To follow up this subject, you may want to read the tutorial "Using Framework Parameters to
Automatically Search for Dynamic Parameters."
For more information on extracting dynamic values from an HTML page, see the tutorial "Extracting Data
from an HTTP Request and Using it Later in the Scenario".
To ensure that this tutorial applies to your case, we recommend that you first read and understand Choosing
a Data Extraction Method. See the Chapter 10, Design User Guide for an overview of creating a virtual
user.
544
Tutorials
<HTML>
<BODY>
<H2>Create an account</H2>
<P>
<B>Error registering account:</B>
<I>The user name you have chosen is already in use.</I>
</P>
<P>The following suggestions are available:</P>
<UL>
<LI>Suggestion 1: <I>WBrown</I>
<LI>Suggestion 2: <I>WilliamBrown_1</I>
</UL>
<P>Enter another user name and retry</P>
<FORM action="index.jsp" method="post">
<INPUT type="text" name="username" /><BR/>
<INPUT type="submit" value="Send">
</FORM>
</BODY>
</HTML>
The HTML page contains text explaining that account registration has failed because the user name
provided by the user already existed. The page then suggests alternative user names that the user could
use. It finally provides an HTML form for the user to retry creating an account using a different user name,
possibly one of the suggested alternatives. If we wanted to define a scenario where the Virtual User selects
one of the suggested alternatives, let's say the first one in the list for instance, we need to extract WBrown
to re-inject it into the request that submits the form.
In our case, we are going to use a mechanism called the Variable Extractor which extracts arbitrary
contents from an HTTP response and assigns the contents to a variable.The variable can then be used
anywhere NeoLoad accepts variable values. The extracting mechanism and the way to use the extracted
value are the subjects this tutorial mainly addresses.
545
Tutorials
The following procedure describes the steps involved in creating a variable extractor to extract the first
name proposed.
a. Go to "Design" mode.
546
Tutorials
d. Select the HTTP request whose response contains the content to be extracted:
a.
Click on the button to open the "Advanced" settings dialog box.
547
Tutorials
Click on the "+" button to add a new variable. This opens the "Variables Extractor"
dialog box:
548
Tutorials
This dialog box helps you define how to extract the value that will be assigned to the variable.
Extracting the value will be based on regular expressions. Most of the time this task will be
greatly eased by the "Variables Extractor" dialog.
Note
In some situations it might be necessary for you to manually work with regular
expressions to extract the contents of the variable. In this case, NeoLoad provides an
advanced mode.
You can switch to the advanced mode by selecting the "Switch to advanced
mode" button.
The advanced mode involves manually manipulating and defining regular expressions,
for more information refer to the Reference Guide and the regular expression appendix.
Enter the name of the variable in the Variable Name text box, in our example we call it
SuggestedUsername.
Enter the text that will unambiguously identify where the content you want to extract starts.
This step is important because the extracting mechanism depends on it to succeed in correctly
extracting the value of the variable.
549
Tutorials
i.
Select the button associated with the Starting with: text box. This opens a
"Response Text Picker" dialog. The dialog presents the contents of the HTTP
response from which the contents of the variable will be extracted.
ii. Select in the response the text that will always be placed before the text you want to extract.
This portion of text must unambiguously identify the starting position of the text you are
targeting. In our example we select the following sentence <LI>Suggestion 1: <I>.
Selecting only <LI> would have been insufficient because in the response, there already
is an <LI> preceding the text we want to identify.
iii. Select the "Pick Selected Text" button to confirm the text you have selected.
Define the expression that will match the contents you want to extract. The "Followed by"
panel displays a set of expressions that the text we are targeting should meet. A default expression
is provided: it matches "Any character" that occurs "Zero or more times".
Important
Any character matches all characters except newline characters.
550
Tutorials
In our case this suits us perfectly, we want to extract any text following the <LI>Suggestion
1: <I> sentence. There are no particular constraints on the text we are targeting. Another way
of seeing the configuration at this stage is to state that we are extracting a value that matches
the following regular expression <LI>Suggestion 1: <I>(.*). The (.*) means any
number of characters except the newline character.
Tip
The "Test" panel at the bottom of the Variable Extractor Dialog displays the text that
will be extracted according to the current state of your configuration. This is handy to
get an idea of what the result will be while configuring the extraction.
In our case the dialog displays WBrown</I>. This is consistent with the fact that the
expression any number of characters except new line matches all the text including </
I>. The "Define Ending with:" step will finalize the configuration so that </
I> is not included in the text we want to extract.
Had we wanted to define additional constraints on the text to extract, we could have added other
expressions and configured them using the "Followed by" and "Occurs" elements. For
example, if we had wanted to identify the suggested user name value more precisely and more
robustly (making sure there really are no ambiguities on the identification) we could define the
following elements:
551
Tutorials
The "Starting with" text is no longer <LI>Suggestion 1: <I>, but is now reduced
to <LI>Suggestion. The first expression we define is a "Numeric Character" "Zero
or more times". The second is a literal sentence, : <I>, that occurs only once, the third
is "Any character" "Zero or more times".
The contents to extract has not changed: the extracted value in the Test panel is still
WBrown</I>. This configuration is equivalent to matching the following regular expression
<LI>Suggestion (\d*)(: <I>)(.*) and extracting the text that only matches the
third expression (.*). These expressions are called "value templates". Advanced mode,
reserved for users who are at ease working with regular expressions, allows you to view and edit
the regular expression generated in standard mode.
For the rest of the tutorial we will keep to our first and simpler configuration.
Define the text that will unambiguously identify where the contents you want to extract ends.
You can use the "Response text" picker as previously detailed for the "Starting
with:" item if you want to select the text from the HTTP response. In our case the ending text
is quite simple, we know the suggested user name ends with the </I> HTML element. This is
what we enter in the "Ending with:" item.
552
Tutorials
The "Test"tab provides an easy to use feature to test the variable you've configured in the previous
steps. It allows us to test the variable extractor on the recorded HTTP response. If required, the HTTP
response may be edited.
The screen shot that follows depicts a situation where we have changed the first suggested value to
Will Brown, we want to make sure extraction correctly takes white spaces into account:
553
Tutorials
Select the Error tab to configure NeoLoad's behavior when the extracting process fails to find the
value for the variable. NeoLoad provides two items to configure its behavior, the value to assign to
the variable if the extraction fails, an error value, and the fact that an assertion error is thrown if the
extraction fails. For more details on assertions refer to the reference guide.
Depending on your application, several strategies are possible. If it makes no sense for your scenario
to not find the extracted value then throwing an assertion error is important. On the other hand, if in
some situations it is acceptable and consistent not to find the extracted value, an error value can be
assigned to the variable. In this case, Virtual User actions such as the if ... then ... else
construct can be used to adapt the behavior of the scenario to this situation.
Close the Variable Extractor dialog by selection the OK button: the creation and configuration steps
are completed. The "Variable extractors" tab of the "Advanced" panel displays all the
defined variables. It presents variable names, the associated regular expression and the template
expression that will be used to extract the value and assign it to the variable.
In our case the first template value, $1$, of the <LI>Suggestion 1: <I>(.*) regular
expression will be assigned to the SuggestedUsername variable. The $1$ template value
corresponds to the (.*) of the regular expression.
554
Tutorials
Tip
To quickly and easily spot requests that use Variable Extractors, select any node in the
virtual user profiles, right click on this node and select the "Flag requests...", then
"Variables extractors defined on".
NeoLoad adds a tick to all the nodes (virtual users, HTML pages and HTTP requests) of the
virtual user profiles using Variable extractors:
1. Select the HTML page that follows the one receiving the form.
NeoLoad has automatically identified and listed the form parameters: in our case the username
parameter.
555
Tutorials
2. Set the value of the form parameter with the extracted variable.
Double-click on the Value cell and set the value to the SuggestedUsername variable, either by
using the variable picker or by manually entering the expression ${SuggestedUsername}, in
the "Expression"field. Click "OK" to validate.
Once extracted variables have been defined, it is a good idea to test them before using them in
operational scenarios. Checking the validity of the virtual user created is an easy way to test their
behavior and check the contents of the requests and related HTTP responses. See the procedure
detailed in the section Validating a Virtual User.
556
Tutorials
Related Links
For more information on regular expressions, refer to the regular expression appendix.
The tutorial describes one of the steps in the methodology relating to designing a virtual user. See the
Chapter 10, Design User Guide for an overview of designing a virtual user.
In certain situations however, the control elements contain values generated by your application each
time the HTML form is called. These dynamic values are sent back to the application when the form is
submitted. The dynamic values may be hidden, to prevent them being modified by the user. In the example
below, we can see that the dynamicID element contains a value generated by the application that varies
each time the form is called:
In this type of situation, simply playing back what was recorded will not work, since the dynamic value
sent to the application will not be the expected value. Here, the HTML value needs to be extracted in order
to inject the appropriate value. This is what we'll be looking at in this tutorial.
To deal with dynamic values, NeoLoad provides a mechanism called a form extractor , which extracts the
dynamic value from the preceding HTTP response and re-injects it in the request containing the HTML
form.
557
Tutorials
Note
To be precise, the value is not extracted from the preceding HTTP request, but from the
referrer of the HTTP request that contains the form's parameters.
The screenshot below shows the source code for the form used in our example (the HTTP response's
content). The response sets out a text box control lastname, a hidden control dynamicID and a select
control country. We have recorded the pages that call the form and have completed and submitted the
form during the recording.
558
Tutorials
This screenshot was obtained by selecting the page preceding the page that submits the form. We selected
the HTTP request , clicked on the button and selected the "Recorded Response" tab.
The following procedure explains the steps required to tell NeoLoad how the dynamicID parameter
should be extracted and injected in the played-back form.
c. Unfold the nodes of the HTML page and the appropriate recording; this is the HTML page that
follows the page that calls the form.
d. Select the HTTP request containing the HTML form's parameters, the request that will submit
the form:
559
Tutorials
During the recording phases, NeoLoad identifies the fields in the HTML form and therefore the
parameters of the HTTP request that will be sent when the form is submitted. In our example,
these parameters are lastname, dynamicID and country.
Tip
To identify those HTTP requests that submit forms, select the current request's or virtual
user's node, right-click on the node and select "Flag requests...". Select the
"POST form type" option.
In the "Type"drop-down list, change the HTTP request type from "Manually define the
request" to "Submit a form from the previous request".
In the "Form to extract" section, click on the "..." button to display the form's extraction
criteria.
560
Tutorials
This dialog box is used to specify how NeoLoad should search the preceding HTML response for the
form whose values are to be extracted. The default settings are usually OK to use. Use other, more
appropriate criteria if necessary. In our case, the criteria are appropriate.
In our example, double-click on the dynamicID parameter to display the parameter's editing pane.
561
Tutorials
Select the "Use value from extracted form" option. This way, when a virtual user that
uses this request is played back, NeoLoad will submit the form with the value extracted from the
server's preceding HTML response instead of submitting the recorded value.
As with all parameters that use extracted values, the dynamicID parameter is displayed with a
distinctive icon and label.
562
Tutorials
You could have used a variable listing all the country options to obtain a similar behavior by setting the
parameter's value field to a variable. However, by using data extraction, you avoid having to keep variables
synchronized with your application. Also, if other country options are added, you do not have to change
the configuration or definition.
The Reference Guide gives more details of the various options and panes shown here. See the section
called “Submit a form from the previous request”.
Related Links
Just as you an extract dynamic data from a form, you can also follow a dynamic link. See the "Follow a
link from the previous request" tutorial.
For more information on extracting arbitrary content, see the section on the variable extractor in the
Reference Guide and the "Creating a Variable Extractor" tutorial.
563
Tutorials
This extraction method can be used when a request is the result of a standard HTML link of the type <a
href=""...>. The aim is to play back a link and its parameters as returned by the server during the
test instead of playing back the recorded link. This tutorial will show you two ways of telling NeoLoad
how to follow the link: either to search for an attribute containing a specific value, or to search for one
or more values in the link's parameters.
The tutorial describes one of the steps in the methodology relating to designing a virtual user. See the
Chapter 10, Design User Guide for an overview of designing a virtual user.
<HTML>
<BODY>
...
<A href="index.jsp?searchID=24257622&page=2">Next Page</A>
</BODY>
</HTML>
The HTML page displays a link called Next Page that refers to the index.jsp page with two dynamic
parameters: searchID and page. If this link is followed during the recording phase and replayed in a
scenario, NeoLoad will use the recorded values. This is definitely not the desired behavior and this tutorial
mainly addresses this issue.
To deal with dynamic URLs, NeoLoad provides a mechanism that automatically finds a URL in the
previous HTTP response and injects it in the following HTTP request.
564
Tutorials
The screenshot below shows the content of the HTTP response for this HTML page. As explained above, it
contains a link that refers to the page index.jsp, with two dynamic parameters: searchID and page.
We obtained this screenshot by selecting the page containing the Next page link. We then selected the
HTTP request, clicked on the button and selected the "Recorded response" tab.
This tutorial will show you several ways of telling NeoLoad how to find and follow the HTML link "Next
Page".
565
Tutorials
1. Select the HTTP request containing the URL with dynamic parameters
d. Select the HTTP request containing the dynamic URL; this request belongs to the HTML page
that that follows the page containing the HTTP request described earlier.
During the recording phases, NeoLoad identifies the URL parameters that will be sent when the
link is followed. In our example, these parameters are searchID and page.
In the "Type"drop-down list, change the HTTP request type from "Manually define the
request" to "Follow a link from the previous request".
In the "Extract and follow a link from" field, make sure that the request shown is the
one containing the href HTML tag. If this is not the case, click on the "Change the referrer"
button and select the correct referrer.
Click on the "Link whose" radio button, then select the attribute to search for. For our example,
select "link text" to tell NeoLoad to search for a link content of the type
<a href=..>[content_to_be_searched_for]</a>.
566
Tutorials
In the "is" field, enter the attribute value to search for, in our case "Next Page". This tells NeoLoad
to search for a link whose form is:
The following screenshot shows what your screen should look like at this stage:
This will instruct NeoLoad to extract any link whose label is "Next Page" and dynamically inject it
during the test.
567
Tutorials
1. Select the HTTP request containing the URL with dynamic parameters
a.
Click on the button to go into "Design" mode.
d. Select the HTTP request containing the dynamic URL; this request belongs to the HTML page
that that follows the page containing the HTTP request described earlier.
During the recording phases, NeoLoad identifies the URL parameters that will be sent when the
link is followed. In our example, these parameters are searchID and page.
In the "Type"drop-down list, change the HTTP request type from "Manually define the
request" to "Follow a link from the previous request".
In the "Extract and follow a link from" field, make sure that the request shown is the
one containing the href HTML tag. If this is not the case, click on the "Change the referrer"
button and select the correct referrer.
Make sure that the "Server" and "Path" combination points to the link in question.
Here, we're telling NeoLoad to search for a link whose URL points to the selected server and specified
path, such as:
<a href="http://jack:9090/loadtest/simple-search/index.jsp"..>..</
a>.
568
Tutorials
Here, we're telling NeoLoad to refine its search for the link , such as:
<a href="http://jack:9090/loadtest/simple-search/index.jsp?
page=2&searchID=.."..>..</a>.
The following screenshot shows what your screen should look like at this stage:
This will instruct NeoLoad to extract any link whose URL starts with "http://<jack>/
loadtest/simple-search/index.jsp", whose "page" attribute is "2" and having a
"searchID" attribute (whatever its value), and dynamically inject it during the test.
Tip
Dynamic path value: The Path expression, /loadtest/simple-search/
index.jsp in our example, also may be dynamic, its value being generated by your
application each time the link is requested. In this case, you must tell NeoLoad to extract
the value from the response and re-inject it before requesting the URL. If the link path is
dynamic, click on "Regular expression" and use the appropriate regular expression
to indicate which path to extract. This may simply be .* if there are no other links with
the same parameters.
Dynamic server value: The Server used by the request may also be dynamically
generated by your application. In this case you must create a server manually, configuring
the server host name with a regular expression that matches the server's name. Then, you
must set the server for this request to the server you have just created.
569
Tutorials
To get the most out of this tutorial, it is recommended to have read the following tutorials beforehand :
• Handling an Application's Dynamic Parameters, in order to understand the steps involved in defining
a variable extractor.
• requests may show an error (typically, Error 500) when checking the virtual user's validity;
• the Virtual User displays an unexpected behavior (entries not created in the database for example).
NeoLoad automatically handles the most common parameters, such as the framework .Net
__VIEWSTATE parameter. However, NeoLoad cannot automatically handle parameters that are specific
to an application. These need to be handled individually, that is to say by placing an extractor on the value
returned by the server and injecting the extracted value into the appropriate requests.
NeoLoad provides the necessary tools to handle a dynamic parameter manually. See the section called
“Handling an Application's Dynamic Parameters”.
Example
Handling a dynamic parameter manually involves extracting the value from the server response using a
variable extractor and replacing it in the appropriate requests. In our example, we'll use the extractor to
declare a framework parameter.
Here, we can use the variable extractor to extract the "id" parameter from the server response.
570
Tutorials
The parameter we're looking for appears in numerous requests, which is why the search must be
systematized. The multiple occurrences of the "id" parameter in the scenario (identified by the blue flags
) can be seen in the following screenshot.
571
Tutorials
When searching for dynamic parameters NeoLoad uses the rules defined for the framework parameter to
automatically create variable extractors in the appropriate requests. Furthermore, NeoLoad automatically
injects the corresponding variables into the parameters of the requests that require the variables.
• using the virtual user's Dynamic Parameter Search Wizard. Select the appropriate virtual user in the
"Design / Virtual Users" tab, then click on the "Search" button to launch the wizard.
In this example, we'll explain how to create a framework parameter using a variable extractor set on a
request.
1. Create and validate a variable extractor for the parameter to be handled. Then go to the list of variable
extractors for the request by clicking on the "Advanced..." button and selecting the "Variable
extractors" tab.
2. Click the "Move as framework parameter" button to launch the Framework Parameter
Creation Wizard.
572
Tutorials
3. Enter the name of the framework parameter ("id" in this example) and select the framework name
(existing or specify a new framework name). Click "Next".
4. Set the dynamic parameter's replacement policy (automatically preconfigured by default). In our
example, NeoLoad has detected that the extracted dynamic parameter is used later on only for the
value of the "id" parameter. Click "Next".
5. This window allows you to apply the parameters to the requests in the current recording. Click
"Finish" to validate and start the search. The result of the scenario analysis is displayed after the
search step shown below.
573
Tutorials
6. Apply the changes (default option): this will set the variable extractors and inject the variables into
the parameters of the appropriate requests
You can see here the list of existing parameters containing the default .NET framework parameters and
the recently-created "id" parameter.
574
Tutorials
575
Tutorials
Remember that you may start a new automatic dynamic parameter search by clicking on the "Search"
button in the "Virtual Users" tab. Select the virtual user in the virtual user profiles tree. This makes
NeoLoad carry out a new search, including the new framework parameters.
Design - Technologies
Table of contents
To gain the most from this tutorial, it is recommended to have read the section on section "SOAP requests"
beforehand.
1. SOAP requests may not be associated to an HTML page the way HTTP requests are. If you record an
HTML page containing SOAP requests, these requests will be recorded and associated to the page. On
the other hand, if you record only SOAP requests, they will appear as standalone requests. More on this
subject in the section called “Recording a SOAP Request”.
2. Not belonging to an HTML page, independent SOAP requests have no associated Think Time. If you
want to test a sequence of SOAP calls, it is up to you to define delay actions to simulate latencies. For
more details on delay actions see the reference guide.
3. The way NeoLoad displays results differ from HTML pages and HTTP requests. More on this subject
in the section called “A Quick Tour on Analyzing SOAP Results”.
NeoLoad provides three ways of defining a SOAP request and are covered by one of the following sections:
1. the section called “Manually Defining a SOAP Request Based on a WSDL Definition”
2. the section called “Manually Defining a SOAP Request From Ground up”
3. the section called “Recording a SOAP Request”
576
Tutorials
register your email you'll be allowed to freely test the service. The WSDL is available at http://
ws.strikeiron.com/textdisguise/CaptchaService?WSDL.
A CAPTCHA ("Completely Automated Public Turing test to tell Computers and Humans Apart") is a
program that can generate images that most humans can see, but current computer programs can't. Many
applications need the security of knowing that the "thing" interacting with them is, in fact, a real live
person capable of thinking who is responsible for the interaction. Text Disguise solves this problem by
embedding a word into an image, distorted and is then shown to the user. The user has to confirm the value
entered into the box to continue.
The Text Disguise CAPTCHA-Image service defines two basic methods called GetNewWord and
ValidateImageWord. The first method, GetNewWord, expects no direct arguments. It returns a
captcha image identifier and a link to that image. The image can be displayed and the user prompted to
enter the text he or she sees in the image.
The second method, ValidateImageWord, expects two arguments, the text entered by the user and
the image identifier. The method returns true if the text is consistent with the image identifier and false
otherwise.
The HTTP request containing a call to the GetNewWord method looks like the following:
POST http://ws.strikeiron.com/textdisguise/CaptchaService
Content-Type: text/xml; charset=utf-8
SOAPAction: "http://www.textdisguise.com/TextDisguise/CaptchaService/GetNewWord"
User-Agent: Jakarta Commons-HttpClient/3.0
Host: ws.strikeiron.com
Content-Length: 723
577
Tutorials
xmlns="http://www.textdisguise.com/TextDisguise/CaptchaService/">
<GetNewWord/>
</GetNewWord>
</soapenv:Body>
</soapenv:Envelope>
• The HTTP request header defines the end point of the method, the address where the service resides, in
our example this is http://ws.strikeiron.com/textdisguise/CaptchaService.
• The HTTP request header contains a SOAPAction item.
• The HTTP request defines a text/xml content type.
• The SOAP header, soapenv:Header element, expects an nsl:unregisteredUser element that
must contain your email address.
• The SOAP body, soapenv:Body element only contains a reference to the invoked method
GetNewWord and has no parameters.
The previous points are noteworthy because most of these elements are generated by NeoLoad and based
on the WSDL definition, but as detailed in the following section, NeoLoad's user interface will let you
customize and configure all of them.
The following procedure describes the steps involved in creating a new SOAP request:
Right-click on the Virtual User profiles node and select New Virtual User.
Enter "VirtualUser", then click "OK".
Right-click on the virtual user just created and select "Insert into", then "SOAP
request".
Check the Generate request using a WSDL file option and enter the URL of
that file. In our example the URL is: http://ws.strikeiron.com/textdisguise/
CaptchaService?WSDL. NeoLoad analyzes the WSDL and extracts the methods that can
be called.
578
Tutorials
Click Next.
Based on the WSDL's definition, NeoLoad lists the methods that you can choose from. Here,
we'll select the CaptchaServiceSoap.GetNewWord method.
Click Next.
579
Tutorials
NeoLoad provides a default request name which it usually derives from the method name defined
in the WSDL. Most of the time you won't need to change this name. You might want to change
it if you use this call several times with different parameter and configuration values.
Click Next.
This steps lets you define the address for invoking the specified service. The WSDL includes
this URL and most of the time you won't need to change this address. You might want to change
the endpoint to switch from a test environment to a production one.
Click Finish.
580
Tutorials
NeoLoad's right panel displays the main configuration elements of the SOAP request. This
includes the end point URL which is defined by both the Server and Path elements. These
elements, as mentioned earlier, have been extracted from the WSDL but can be changed to
custom values. As with HTTP requests, the Path element can been defined using NeoLoad
variables.
The WSDL element can equally be changed or reloaded. Reloading is particularly useful when
the SOAP request and it's associated WSDL are out of sync.
Warning
Reloading WSDL will re-initialize all previous configuration elements. All previously
defined parameters will be lost.
Most SOAP request require at least two HTTP header elements when SOAP is tunneled through
HTTP. Always make sure that these elements are correctly set. They are available in the
Advanced parameters dialog and are accessed by selecting the button:
In our example these elements are ContentType and SOAPAction. If your web service
framework requires additional HTTP header elements you can set them in the Advanced
parameters dialog.
581
Tutorials
Before actually testing the SOAP request, additional elements including parameter values and
encoding types must be configured. Select the button to access the SOAP
configuration dialog.
The Parameters tab let's you define the structure of the SOAP body. The tree structure in
the left most panel of the SOAP Parameters dialog displays the structure and content of
the SOAP body.
As mentioned earlier, the GetNewWord method expects no parameters or an empty so the tree
only has one root element called GetNewWord (an empty element as defined in the WSDL).
Had there been several elements or several possible elements, NeoLoad would have displayed
them in the tree. In our example no further configuration for the body is necessary.
Select the Headers tab to define and configure elements related to the SOAP header. The
SOAP header elements are presented in exactly the same way as the SOAP body elements are.
The left most panel contains an XML tree displaying the structure and contents of the header of
the SOAP envelope. Adding and removing elements is achieved using the and, buttons.
Moving elements around is achieved using the and buttons
The structure contains either container elements, such as UnregisteredUser in our case, or
leaf elements such as EmailAddress. Container elements are meant to contain other elements.
Right clicking on them will pop up a menu from which you can choose to move the selected
element or add and remove child elements. NeoLoad will only suggest child elements that are
consistent with the WSDL definition.
Leaf elements on the other hand cannot contain other elements but have an associated value. In
our example you must enter a valid email address for the EmailAddress element.
582
Tutorials
For both container and leaf elements, you can define attribute names and attribute values. Again
attributes must be consistent with WSDL definition. Encoding allows special characters such
as '>', '<' or '&' to be encoded.
The Advanced Settings panel let's you configure the binding styles of the SOAP request
and the format of attachments. This information has been extracted from the WSDL and you
should definitely be familiar with the types of bindings if you decide to change this setting.
d. View XML
The last tab of the SOAP Parameters dialog displays the actual XML content that will be
sent. NeoLoad generates its content on the fly using the XML elements and attributes you have
defined. Right clicking on the XML and selecting the Format as Pretty XML item will
display a neatly indented XML.
583
Tutorials
Tip
You can search the generated XML for a particular expression by right clicking on the
XML and selecting the Search ... item (or using the CONTROL + F shortcut keys).
By creating a temporary virtual user, NeoLoad provides an easy and quick method to check your
SOAP request. Select the button to open the Check Virtual User dialog.
• Start checking
If you have already tested Virtual Users using NeoLoad you will be familiar with the following
dialog. By selecting the Start checking button, NeoLoad will generate the SOAP request
and send it to the specified end point. NeoLoad displays the associated response code and the
number of failed assertions for the sent request. When the line associated to the request is selected
the dialog displays further details in the lower part of the dialog. You can choose to display the
SOAP request that was sent or the XML response.
584
Tutorials
Tip
You can search the SOAP request or the XML response for a particular expression by
right clicking on the XML and selecting the Search ... item (or using the CONTROL
+ F shortcut keys).
Tip
You can neatly format SOAP request or the XML response by right clicking on the
XML and selecting the Format as pretty XML item.
If you are following our example and testing it, the first time you'll send the request the response
will look like the following (the HTTP header has been omitted):
585
Tutorials
<faultactor/>
</soap:Fault>
</soap:Body>
</soap:Envelope>
As indicated in the faultstring element, all you need to do to use the service a limited
amount of times is to validate the email address you sent by following the link that StrikeIron
has sent to you. Once your address is validated invoking the service should get you a response
such as the one that follows (the HTML header has been omitted):
From this point on you can use the link defined by the URL element in an HTML page. As
detailed in the following section you can then use the ValidateImageWord method and the
CaptchaImageGuid to validate a text entered by the user.
This will be illustrated by continuing our previous example and by invoking the ValidateImageWord
method. This method expects two parameters, an image identifier, the CaptchaImageGuid, returned
by the GetNewWord method and the text entered by a user. The ValidateImageWord method will
586
Tutorials
return true if the text entered by the user and the captcha image are consistent. The XML we will be
building our SOAP request on follows:
Right-click on the Virtual User profiles node and select New Virtual User.
Enter "VirtualUser", then click "OK".
Right-click on the virtual user just created and select "Insert into", then "SOAP
request".
587
Tutorials
Click Next.
Click Next.
This is the URL where the service is located. You can also change this later on. In our
example the service end point is http://ws.strikeiron.com:80/textdisguise/
CaptchaService.
588
Tutorials
Click Finish.
At this stage the SOAP request is added to the virtual user. You can rename this node to your
convenience. In our example a ValidateImageWord node has been added at the end of the
existing SOAP requests.
NeoLoad's right panel displays the main configuration elements of the SOAP request. This
includes the end point URL which is defined by both the Server and Path elements. These
elements can be changed to custom values. As with HTTP requests, the Path element can been
defined using NeoLoad variables.
Most SOAP request require at least two HTTP header elements when SOAP is tunneled through
HTTP. Always make sure that these elements are correctly set. They are available in the
Advanced parameters dialog and are accessed by selecting the button:
589
Tutorials
To configure the XML content, select the Edit XML Content button.
At this stage you must define the XML request either by copying and pasting a request you have
tested or by manually defining each element and attribute of the request. We will be using the first
method in our example.
Copying and pasting an existing XML request using the Flat XML panel is the easiest way to define
the XML content of the request. In our example we have copied and pasted the XML containing the
call to the ValidateImageWord method:
You could also use the XML Tree panel to manually define or to edit the XML using elements and
attributes. NeoLoad automatically constructs one view from the other (the XML tree view from the
flat view and vice versa). Selecting the XML Tree tab would look like the following:
590
Tutorials
At this stage the request is completely defined and configured, you can immediately start testing it.
By creating a temporary virtual user, NeoLoad provides an easy and quick method to check your
SOAP request. Select the button to open the Check Virtual User dialog.
• Start checking
If you have already tested Virtual Users using NeoLoad you will be familiar with the following
dialog. By selecting the Start checking button, NeoLoad will send the SOAP request to
the specified end point. NeoLoad displays the associated response code and the number of failed
assertions for the sent request. When the line associated to the request is selected the dialog
displays further details in the lower part of the dialog. You can choose to display the SOAP
request that was sent or the XML response.
591
Tutorials
Tip
You can search the SOAP request or the XML response for a particular expression by
right clicking on the XML and selecting the Search ... item (or using the CONTROL
+ F shortcut keys).
Tip
You can neatly format SOAP request or the XML response by right clicking on the
XML and selecting the Format as pretty XML item.
592
Tutorials
1. extract into a variable the image identifier, in other words the CaptchaImageGuid, from
GetNewWord's response
2. and then, re-inject the value of the variable when invoking the ValidateImageWord request.
a.
Go to Design Mode by selecting the button
d. Select the GetNewWord request from which the image identifier value will be extracted:
i.
Open the Advanced settings dialog by selecting the button.
593
Tutorials
Select the button to add a new variable. This opens a Variables Extractor dialog.
In our example we will define the captchaImageGuid variable . The way the value is
identified and extracted is quite straightforward since the XML response is simple. We want
to extract anything appearing between the starting <captchaImageGuid> and ending </
captchaImageGuid> XML tags. The following screen shot reflects these decisions:
594
Tutorials
At this stage the extraction part of the process is complete. Each time the GetNewWord
is invoked NeoLoad will extract the value of the image identifier and set the
captchaImageGuid variable with it.
For more details on extracting variables refer to the section called “Creating a Variable
Extractor” and to the reference guide.
a. Select the ValidateImageWord request in which the image identifier value will be injected.
b. Select the Edit XML Content button to configure the XML content.
e. Select the Variable Picker dialog using the ... button. You can also start typing
something like ${c and NeoLoad will suggest variable name completions.
595
Tutorials
With such a configuration NeoLoad will extract the image identifier from the GetNewWord
response and inject it in the ValidateImageWord request. This sequence can be replayed
multiple times.
Example Description
The example is basic and really simple so that the underlying mechanisms are made clear:
596
Tutorials
The HTML page we will be recording consists of a Test button and a textarea containing the request
to send. Hitting the Test button sends the request to the correct end point, the response is then displayed
in the textarea. The request contains an invocation to the Google search API. The body of the request
contains among others, an XML key element which you will have to obtain from Google. The XML q
element is the text we are actually searching for. In our very basic interface we can change this by editing
the textarea content before invoking the request.
The JavaScript code that manages the request opens the service end point, consistently sets the HTTP
headers and sends the content of the textarea. When the response is received it's content is copied to
the textarea. Note the code only works with Microsoft Internet Explorer. Other browsers will in any
case refuse to connect to a URL not belonging to the same domain as the test page.
The following listing contains the SOAPTest.html code and the code of the function called when the Test
button is hit:
<html>
<body>
<h1>Google</h1>
<script type="text/javascript">
function doIEGoogle() {
textarea = document.getElementById("debugbox");
xhr = new ActiveXObject("Microsoft.XMLHTTP");
xhr.open('POST', "http://api.google.com/search/beta2");
xhr.setRequestHeader("SOAPAction", "urn:GoogleSearchAction");
xhr.setRequestHeader("Content-Type", "text/xml; charset=utf-8");
xhr.onreadystatechange =
function() {
if(xhr.readyState != 4) return;
597
Tutorials
if(xhr.status != 200) {
textarea.value = xhr.status + " " + xhr.statusText
+ "\n" + xhr.responseText;
return;
}
textarea.value = xhr.responseText;
};
xhr.send(textarea.value);
}
</script>
<ns1:doGoogleSearch
xmlns:ns1="urn:GoogleSearch"
SOAPENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<key xsi:type="xsd:string">ABQIAAAA-YwsmHQspwIU9OcKL4b5rhTd9gLE95ZWCg
lQjFVS1XYlL9GwFBSIRS2y1JQBK8NE1ktm1oJWkWiTZQ</key>
<q xsi:type="xsd:string">load testing web applications</q>
<start xsi:type="xsd:int">0</start>
<maxResults xsi:type="xsd:int">3</maxResults>
<filter xsi:type="xsd:boolean">false</filter>
<restrict xsi:type="xsd:string"/>
<safeSearch xsi:type="xsd:boolean">false</safeSearch>
<lr xsi:type="xsd:string"/>
<ie xsi:type="xsd:string"/>
<oe xsi:type="xsd:string"/>
</ns1:doGoogleSearch>
</SOAPENV:Body>
</SOAPENV:Envelope>
</textarea>
</body>
</html>
598
Tutorials
To record this test page we follow exactly the same procedure as when recording an HTML page. From
there we selected the Test button and waited for the results from the Google search API. We ended the
recording at this stage. The following screen shot depicts what the result of the recording looks like:
Important
As they do not belong to an HTML page, independent SOAP requests have no associated Think
Time. If you want to test a sequence of SOAP calls, it is up to you to define delay actions to
simulate latencies. For more details on delay actions see the reference guide.
NeoLoad has correctly identified the request as a being a SOAP request: the URL, Server, Path and
Method properties of the request are consistently set.
If you select the Edit XML Content button and choose the XML Tree Tab, you can easily browse
through the SOAP request elements. This is typically where you could use variables, changing for instance
the search text for the q parameter:
599
Tutorials
As for any SOAP request, you can test the recorded request by selecting the button to open
the Check Virtual User dialog:
In our simple example, the Java script code just fills in the textarea with the received XML. In a real world
scenario, the HTML page would obviously do otherwise, it would probably analyze the results, display
them neatly in HTML and then let the user navigate on those results. Keep in mind that NeoLoad, just as
for HTML requests, will let you extract information from the SOAP response and inject that information
in further requests.
The previous sample shows how to record the request using a web browser. Please report to the reference
guide to see how recording from your existing SOAP client.
600
Tutorials
In our case the scenario only contains the HTML test page called SOAPTest.html. If you take a look
at the Test Summary this is what you will get:
As depicted in the following screen shot, it is only in the Values tab that you will see statistics on the
SOAP request, in our example the /search/beta2 request. Of course all graphing functionalities are
equally available for SOAP requests (Graphs tab).
601
Tutorials
AMF requests. If you do not have all the required files during the recording, this tutorial explains how to
repair Adobe Flex/AMF requests that could not be decoded.
To gain the most from this tutorial, it is recommended to have read the following sections beforehand:
Note
• The AMF requests are marked in the virtual user by a icon that resembles the Adobe Flash
logo.
• The protocol version used by the AMF request can be seen in the request itself.
<version>0</version> indicates an AMF0 message.
602
Tutorials
For the record, the AMF3 protocol enables the carrying of customized objects. If the Java object classes
are missing, the request's binary data cannot be decoded for conversion to XML. The following procedure
explains how to solve the problem of missing Java classes.
Note
In Java, an object is termed externalizable when it implements the
java.io.Externalizable interface. These objects are particular, in that they manage the
saving and restoring of their attribute values themselves. Declaring these Java classes using
Adobe Flex/AMF libraries manager is mandatory.
603
Tutorials
Once all the necessary JAR/XML files have been loaded successfully, the following screen is shown:
For further details of the next steps in the wizard, please refer to the documentation on the Post-Recording
Wizard.
604
Tutorials
Here, the request selected in the virtual user requires Java classes that haven't been declared yet. This fact
is revealed by several indicators:
•
The request's icon in the virtual user .
• A link (in blue) indicates that the AMF Java libraries for this request are missing.
Click on the link (or use the "Edit / Preferences", "Project settings" and "Libraries
Manager" and the "Adobe Flex/AMF" tab) to declare the required AMF Java libraries: the following
screen is displayed.
605
Tutorials
Click the "+" button to open the file explorer. Select the JAR file to declare.
If the JAR/XML file loads correctly, a dialog box confirms that the AMF library has been successfully
declared:
606
Tutorials
The loaded JAR/XML file appears in the list and a message informs you that the process was successfully
completed. If the request is correctly converted to XML format, it should appear as follows:
If the request still hasn't been converted to XML format, it means that some required JAR files still have
not been declared. Repeat the operation as many times as is necessary.
607
Tutorials
end of the tutorial, you will also find an example of advanced design, with details on how to extract and
interpret data returned by a server via a streaming channel.
To gain the most from this tutorial, it is recommended to have read the "Adobe Flex/AMF: Handling
External Libraries" tutorial beforehand.
Flex servers using the AMF protocol update client data in two ways:
1. the polling method: This involves the browser querying the server at regular intervals. Technically
simple in its implementation, the method's downside is that it needlessly overloads the server and it
is not very reactive.
2. the streaming, or "push" method: In this case, the client sends a single request to the server, and
the server responds when pertinent information is available, without closing the request. Thus, the
server can again send information to the client using the same connection, without having to wait for
a new request. Using this method, client data can be rapidly updated while the network traffic is kept
minimized.
Polling and streaming require the use of specific NeoLoad requests to be able to handle these transaction
modes. See the section called “Defining a virtual user using streaming-type AMF Requests”.
The steps involved in creating a virtual user that uses AMF polling are:
a. Start recording
In the NeoLoad main window, click the button in the toolbar. Enter UserPolling in the
"Name" field.
608
Tutorials
By default, the operating mode selected is my-rtmp . This corresponds to an operating mode
using the RTMP protocol. Currently NeoLoad does not support this protocol.
e. Stop recording
Close the browser, then click "Stop". The Post-Recording Wizard displays the "Push
Application" window:
609
Tutorials
NeoLoad has detected that the recorded virtual user has used Push "AMF polling". Click
"Finish".
The Post-Recording Wizard creates the "UserPolling_AMF" virtual user from the recorded
virtual user.
Select the "UserPolling_AMF" virtual user, right-click, then select "Show all". The
polling request appears in the "polling_loop" loop under the "push_fork" fork.
610
Tutorials
The Push messages are located in the "POLL_3" polling request. The
"flex.samples.marketdata.Stock" message is a Push message executed each time a
response message contains a "flex.samples.marketdata.Stock" -type object.
First, we need to set a variable extractor on the Push message to extract the symbol:
4. Check the "XPath Expression" box and enter "//symbol" in the corresponding field.
611
Tutorials
The JavaScript action will display the stock symbol extracted from the message.
Click the "Advanced..." button in the validation window. Check the "Play think time"
box, then click OK.
Several polling requests and Push messages have been executed. Click on any one of them
to check its contents. With a Push message selected, click "Response".
612
Tutorials
The speed of execution in the validation check playback is real; this avoids submitting the server
to too high a polling rate. In testing, 3 seconds minimum separate each polling request.
NeoLoad allows you to work on an XML representation of the objects passing through the
server. In this example, we can see the XML representation of an instance of the example class
flex.samples.marketdata.Stock returned by the server.
package flex.samples.marketdata;
import java.util.Date;
613
Tutorials
return open;
}
public void setOpen(double open) {
this.open = open;
}
Click
Enter 10 in the "Simulated users" field. NeoLoad will launch 10 virtual users using
polling.
Click the button in the toolbar. Then click "OK". The test starts. Wait 2 minutes.
f. Results
The test results allow you to check the server's performance for each Push message.
614
Tutorials
The steps involved in creating a virtual user that uses AMF streaming are:
615
Tutorials
a. Start recording
In the NeoLoad main window, click the button in the toolbar. Enter "UserStreaming"
in the "Name" field and click "OK".
The my-rtmp operating mode is selected by default. Change the mode to my-nio-amf-
stream in the list to apply the operating mode for streaming requests. This corresponds to an
operating mode with streaming requests through NIO sockets . NIO sockets are used to break the
relationship between the number of streaming channels opened and the number of used threads
on the server side.
In streaming mode, the server refreshes the displayed data when it decides it is necessary. You
can see the difference in refreshment rate compared with polling mode. Please wait ten
seconds or so.
Change back to the my-rtmp mode in order to shut down the streaming. Close the browser,
then click on "Finish".
616
Tutorials
Click on the "UNSUBSCRIBE..." page and set the think time for the page to 10000ms. In an
advanced scenario, you could make the think time dynamic using a random variable, setting a
maximum and minimum think time.
Unlike polling mode, just one request is sent to the server in this mode. The server sends
data back in a response when it decides it's appropriate, until it closes the connection when
streaming is finished. These different response data groups are stored by NeoLoad as several
responses.
617
Tutorials
First, we need to set a variable extractor on the Push message to extract the symbol:
4. Check the "XPath Expression" box and enter "//symbol" in the corresponding field.
Create a JavaScript action in "messageFork_2". Delete the existing JavaScript code and
enter the following:
The JavaScript action will display the stock symbol extracted from the message.
618
Tutorials
This virtual user is only interested in the stock symbols received. Delete the
"flex.messaging.messages.AcknowledgeMessageExt", "String" and
"DefaultMessage" Push messages.
Click the button in the validation window. Check the "Play think
time" box, then click OK..
The same streaming request appears several times. Only one request was issued for this virtual
user, but the server regularly sends back partial responses. When each partial response is
received, a line is added to the list of played requests, together with its content. Click on one to
check the contents. When the request is selected, click on "Response".
619
Tutorials
Click
Enter 10 in the "Simulated users" field. NeoLoad will launch 10 virtual users using
streaming.
Click the button in the toolbar. Then click "OK". The test starts. Wait 2 minutes.
f. Results
As the test proceeds, NeoLoad clearly shows the speed of this architecture, with a considerable
number of responses being received by each virtual user. Streaming also provides very fast
response times. However, its use implies greater server-side resources than are required for
polling and, therefore, a reduced capacity in handling simultaneous users.
We shall continue with the previous example, this time focusing on the content of the response to the
streaming request. We shall see how NeoLoad extracts part of the content sent by the server and help
620
Tutorials
us make decisions. Here is the proposed scenario: when the value of the General Electric (symbol
GE) stock rises above 31, a log is displayed and the virtual user stops.
The Push message is now configured to execute only when an update for the "GE" stock is
received.
2. Check the "XPath Expression" box and enter "//last" in the corresponding field.
Lastly, check the extraction results. The "Value extracted from the recorded
page" field at the bottom of the variable extractor definition window must contain a number.
621
Tutorials
In the "Then" condition, drag and drop the JavaScript logical action. Erase the default
code and replace it with:
context.variableManager.setValue("end","true");
Drag and drop the "Wait until" logical action just before the "UNSUBSCRIBE..." page.
Set the maximum delay to 60000ms and set the action's "${end}" "is equal to" "true"
condition to "wait until".
Set the think time for the "UNSUBSCRIBE..." and "/nioamfstream close_1" pages to
0ms.
Click on the button in the NeoLoad toolbar. Select "UserStreaming" in the "Virtual
Users" list. Next, click on the button in the validation window. The
validation process is run until the GE stock reaches 31, or until the "wait until" action
times out (think time for the UNSUBSCRIBE page). In the above example, the GE stock has
reached 34, triggering the JavaScript and ending the virtual user.
622
Tutorials
To gain the most from this tutorial, it is recommended to have read the following sections beforehand:
Warning
There are certain limitations regarding the recording of RTMP applications in NeoLoad. See the
recording limitations for more information.
623
Tutorials
For the record, the RTMP protocol enables the carrying of data including customized objects (encoded
using AMF protocol), audio and/or video. If the Java object classes are missing, the request's binary data
cannot be decoded for conversion to XML. The following procedure explains how to solve the problem
of missing Java classes.
Note
In Java, an object is termed externalizable when it implements the
java.io.Externalizable interface. These objects are particular, in that they manage the
saving and restoring of their attribute values themselves. Declaring these Java classes using
Adobe RTMP libraries manager is mandatory.
624
Tutorials
Once all the necessary JAR files have been loaded successfully, the following screen is shown:
During recording, NeoLoad detects that RTMP channels have been created and offers to create a copy of
the virtual user that will allow the scenario to be run. The RTMP channels are blocking actions pending
reception of the server's messages. To be able to simulate a user using RTMP, we need to create this
simplified virtual user. See the documentation on RTMP channels for more information.
When copying the virtual user, NeoLoad inserts the RTMP channels in Fork actions and creates the various
types of Push message received during the recording.
625
Tutorials
For further details of the next steps in the wizard, please refer to the documentation on the Post-Recording
Wizard.
Here, the request selected in the virtual user requires Java classes that haven't been declared yet. This fact
is revealed by several indicators:
•
The request's icon in the virtual user .
626
Tutorials
• A link (in blue) indicates that the RTMP Java libraries for this request are missing.
Click on the link (or use the "Edit / Preferences", "Project settings" and "Libraries
Manager" and the "Adobe RTMP" tab) to declare the required RTMP Java libraries: the following screen
is displayed.
Click the "+" button to open the file explorer. Select the JAR file to declare.
627
Tutorials
If the JAR file loads correctly, a dialog box confirms that the AMF library has been successfully declared:
The loaded JAR file appears in the list and a message informs you that the process was successfully
completed. If the request is correctly converted to XML format, it should look like this:
If the request still hasn't been converted to XML format, it means that some required JAR files still have
not been declared. Repeat the operation as many times as is necessary.
628
Tutorials
If you do not have all the required files during the recording, this tutorial explains how to repair GWT
requests that could not be decoded.
To gain the most from this tutorial, it is recommended to have read the following sections beforehand:
To recap, the GWT-RPC protocol allows the exchange of custom Java objects. If the classes are missing for
the sent Java objects, the request's binary data cannot be decoded for conversion to XML. The following
procedure explains how to resolve the problem of missing Java classes.
Note
With GWT, an object is said to be serializable when it implements
the java.io.Serializable interface (from GWT 1.5 onwards) or the
com.google.gwt.user.client.rpc.IsSerializable interface (for earlier
versions).
Note
For NeoLoad to be able to decode the GWT requests and responses, the following elements are
required: the RPC services' client interfaces, the objects exchanged between the server and client
and the other referenced classes.
629
Tutorials
Select the JAR files containing the missing serializable Java classes. Repeat the operation as many times
as is necessary.
When all the required JAR files have been declared, the following screen is displayed:
630
Tutorials
For further details of the next steps in the wizard, please refer to the documentation on the Post-Recording
Wizard.
Here, the request selected in the virtual user requires Java classes that are not available. This fact is revealed
by several indicators:
•
The request's icon in the virtual user .
• A link (in blue) indicates that the GWT Java libraries for this request are missing.
631
Tutorials
Click on the link prompting you to declare the required GWT Java libraries. This takes you to the following
screen (you may also use the "Edit / Preferences"menu item, then select "Project Settings",
"Libraries Manager" and the "Google Web Toolkit" tab).
Click the "+" button to open the file explorer. Select the JAR file to declare.
632
Tutorials
If the JAR file loads correctly, a dialog box confirms that the GWT library has been successfully declared.
The loaded JAR files appears in the list and a message informs you that the process was successfully
completed. Once the request is correctly decoded into XML , it appears in XML format.
633
Tutorials
If the request still hasn't been converted to XML format, it means that some required JAR files still have
not been declared. Repeat the operation as many times as is necessary.
To gain the most from this tutorial, it is recommended to have read the following sections beforehand:
Specific frameworks such as Spring Remoting (Spring's HTTP Invoker) allow to transport customized Java
objects encapsulated in the HTTP protocol. If the Java object classes are missing, the request's binary data
cannot be decoded for conversion to XML. The following procedure explains how to solve the problem
of missing Java classes.
Note
For Java Serialization, an object is said to be serializable when it implements the
java.io.Serializable interface or the java.io.Externalizable interface.
634
Tutorials
Note
For NeoLoad to be able to decode the Java Serialization requests and responses, the following
items are required: the JARs for the framework used to transport the customized Java objects, the
customized Java objects exchanged between the server an client and the other referenced classes.
Select the JAR for the framework used to transport the customized Java objects.
635
Tutorials
Select the JAR files containing the missing serializable Java classes. Repeat the operation as many times
as is necessary.
When all the required JAR files have been declared, the following screen is displayed:
636
Tutorials
For further details of the next steps in the wizard, please refer to the documentation on the Post-Recording
Wizard.
Here, the request selected in the virtual user requires Java classes that are not available. This fact is revealed
by several indicators:
•
The request's icon in the virtual user .
• A link (in blue) indicates that the Java Serialization libraries for this request are missing.
637
Tutorials
Click on the link prompting you to declare the required Java Serialization libraries. This takes you to the
following screen (you may also use the "Edit / Preferences"menu item, then select "Project
Settings", "Libraries Manager" and the "Java Serialization" tab).
Click the "+" button to open the file explorer. Select the JAR file to declare.
If the JAR file loads correctly, a dialog box confirms that the Java Serialization library has been
successfully declared.
638
Tutorials
The loaded JAR files appears in the list and a message informs you that the process was successfully
completed. Once the request is correctly decoded into XML , it appears in XML format.
If the request still hasn't been converted to XML format, it means that some required JAR files still have
not been declared. Repeat the operation as many times as is necessary.
To gain the most from this tutorial, it is recommended to have read the "Oracle Forms User Guide".
639
Tutorials
With an Oracle Forms application, it is vital to take this requirement into account in the initial phases of
the scenario design. In the next sections, we shall look in detail at the best practices to be observed, using
iOrganizer, a demo application for the Oracle Forms 10g server.
Prerequisites
Installing the Demo Applications
In this case, we're going to use the iOrganizer application, one of the demo applications for the Oracle
Forms 10g server.
640
Tutorials
Creating a User
To be able to connect to the iOrganizer application, you need to create a user account.
2. Click on Register.
3. A new page entitled New User Page is displayed. Fill in the following information:
• Password: NEOLOAD
• Phone: 0123456789
• Email: [email protected]
641
Tutorials
4.
Click Save ( icon ) then on Return to main page ( icon ).
5. In the iOrganizer application's login screen, enter DUSER in the Login field and NEOLOAD in
the Password field.
6. Click Enter. If the connection is successful, the application's main screen should be displayed.
7.
Click on the Exit Calendar button ( icon ).
Configuring NeoLoad
Before you can record the Oracle Forms scenario, NeoLoad needs the file containing the Oracle Forms
applet. See the procedure for configuring NeoLoad.
NeoLoad supports Oracle Forms component naming. Component naming must be configured on the Oracle
Forms server itself.
You can check to see if the server is correctly configured by referring to the procedure for checking the
Oracle Forms server.
If the server is not configured correctly, please follow the procedure for configuring the Oracle Forms
server.
642
Tutorials
6. In the iOrganizer application's login screen, enter DUSER in the Login field and NEOLOAD in
the Password field.
7. Click Enter.
8.
In the toolbar,click on Address Book ( icon).
10.
Still in the toolbar, click on Create ( icon).
12.
Click Save ( icon), then on Return to Main Page ( icon).
14. Return to the application and click on the letter D (at the bottom). The new entry created in the address
book should now be displayed.
643
Tutorials
16.
Click on Return to Main Page ( icon), then click the Exit Calendar button ( icon).
Note
The input is case-sensitive. Failure to input the correct case may cause the Oracle Forms
application to block the creation of the entry in the database.
9. In the Value change policy section, select For each virtual user.
10. In the Variable scope section, select Local, each virtual user instance
iterates on each value.
644
Tutorials
12. In the Virtual Users tree, expand the container AddressCreator_Create then the page
named address_book_first_name_0:value=dfirst. Click on the request with the same
name.
13. In the request's XML editor, replace DFirst with ${Contacts.FirstName}. Then click on
Apply.
2. In the actions (bottom left, expand if necessary), drag and drop the Loop logical action to a position
just before the AddressCreator_Create container.
645
Tutorials
4. Click on loop. Enter the value 3 in the Execute the loop field.
5. In the actions, drag and drop the Variable Modifier logical action to a position just after the
AddressCreator_Validate container.
4. Check the option Do not mark the specified HTTP error code when the same
error occurs during the record.
646
Tutorials
6. Click the Start checking button. The virtual user executes with the same think times as in the
recording.
Once the virtual user has stopped, you may re-connect to the iOrganizer application to check that the
contacts have been created (search the 'D' entries for DOE, and 'S' for SPARROW and SCOTT).
647
Tutorials
To Learn More
Using this scenario, you can add substance to the test by:
• Adding clicks on the entries created then configuring a validation on the response. This will make sure
that the entries are always created correctly during the load test.
Analysis
Table of contents
To gain the most from this tutorial, it is recommended to have read the Chapter 10, Design User Guide
beforehand.
648
Tutorials
occurring during a scenario run. In some situations understanding the source of a problem can be a
relatively complex task. To help you analyze causes of an error, NeoLoad provides extensive information
on the context in which the error occurred. This tutorial details where and how NeoLoad provides this
information.
The two main places NeoLoad indicates that errors have occurred and details them are in the Virtual User
Check dialog and in the Errors tab of the Results mode. The following section presents the Virtual
User Check dialog and goes into the details of understanding the information provided by NeoLoad.
Because the information provided by NeoLoad and the way that information is presented are very similar,
if not identical in both cases, the third section only details the slight differences and the information specific
to the Results mode.
In our example, the virtual user called SimpleUser navigates through three pages that logs the user
on to the application. The first page /loadtest/welcome is the welcome page of the application,
the /loadtest/signOn page is where the user will enter his or her identifier and password, finally
the /loadtest/signedOn page is the page following the sign on and confirming that the user has
successfully signed on. The example is simple and rather unrealistic, a Virtual User would obviously
simulate a more complex behavior, but we'll keep it simple to illustrate error situations.
Checking a Virtual User is achieved by selecting the Check button. NeoLoad displays the Check
Virtual User dialog. Launching the check, in other words executing the Virtual User, is achieved by
selecting the Start checking button.
649
Tutorials
NeoLoad plays the pages contained in the Virtual User and displays a sequence of lines, one for each
HTML page and one for each HTTP request defined for that HTML page. For instance the HTML page
/loadtest/signedOn is defined by a unique HTTP request to /loadtest/signon.shtml
using the GET method. The Check Virtual User dialog displays two lines, one for the HTML
page and, immediately after it, another for the request. Had the page contained several requests, the
Check Virtual User dialog box would have displayed a line for each request.
Errors, response codes and assertion evaluations are only meaningful for HTTP requests, this is why
only those lines corresponding to requests display information relative to those elements. When a
request has a response code (see below) associated to an error or has a failed assertion, NeoLoad tags
the associated line with the icon rather than the check mark. If any one request has failed, the
dialog box displays a header with something like following: The Virtual User SimpleUser
contains 2 error(s).
An assertion validates a server response during a test by defining or asserting a condition that must be
met. We will detail a little further in this section how essential assertions can prove to be.
In our example, the HTTP request to /loadtest/error has failed. It has a 500 response code but
no failed assertions. By selecting that line, we can display detailed information on the failed request.
650
Tutorials
When a failed request (or a successful request for that matter) is selected, the dialog box displays the
following elements:
This is a link ; NeoLoad will jump to the specified page in the virtual user
profile if you follow the link.
• HTTP request: The HTTP request that has failed.
Again, this is a link and NeoLoad will jump to the specified request in the virtual user profile if you
follow the link. This feature is particularly useful when you want to check how the request is defined,
especially with regard to dynamic values such as dynamic URLs or dynamic form parameters.
Tip
Navigating back from the virtual user profiles to the request in the Check Virtual
User dialog is easily achieved by right clicking on the request in the Virtual User profiles
and selecting the Select in "Check Virtual User" Dialog item.
This makes it easy to navigate back and forth between the definition of the recorded page
and the error details.
• Response details: Details include the time at which the response was received, the response code,
the response duration and the number of bytes of the response.
The response code is equally a hyper link , NeoLoad will bring up a pop up
displaying the description of that particular response code.
HTTP response codes are standard codes, in the range of 400 and 500 they indicate error conditions
and are automatically detected by NeoLoad. HTTP response codes give you a good indication of
the type of error involved.
651
Tutorials
NeoLoad status codes are always prefixed by NL and are generated by NeoLoad because
some client mechanism has prevented NeoLoad from actually sending a request. Errors due to
connection failures or networking issues are typical examples of such situations.
• Request, response and assertion contents: the Details group box lets you select which contents
you want the dialog to display.
This feature is often essential when trying to understand the cause of an error. Viewing the request
will, for instance, make it clear what is wrong (a dynamic parameter, an erroneous URL, ...). The
response will contain the detailed reason of the error in the case of a server error, the description
associated to the code in the case of a NeoLoad error.
In our example, the returned response code is 500, an internal server error, the contents of the response
clearly describes the cause of the error. It is due in this case to a compilation error on the requested
JSP page:
Tip
You can easily search for some specific text in the pane containing the error description or
the actual request or response by right clicking in the pane and selecting the Search...
item.
The following screen shot depicts a situation where something in the network layer has gone wrong.
In this case rather than an HTTP response code, a NeoLoad status code is associated to the error and
the HTTP response contains the description of the NeoLoad error:
652
Tutorials
A word on assertions
In our example, when the login process fails, the application returns a page indicating that the operation has
failed. This implies that no error, whether it be a server error or a NeoLoad error, has been detected. And
yet, this situation is surely an error situation. Had our Virtual User contained additional pages depending on
the fact that the login had succeeded, an error would most probably occur later on in one of those pages. It is
therefore essential to use assertions to detect such situations. Assertions will help you identifying an error
situation early in the scenario and avoid analyzing incomprehensible errors due to earlier misbehaviors.
The following screen shot illustrates how an assertion can be used to detect that the login process has
failed. Note that the HTTP response code is 200, thus indicating a perfectly correct HTTP response.
For more details on using assertions, refer to the section called “Validating a Server Response”.
653
Tutorials
Errors are also displayed by NeoLoad in Runtime mode during a scenario run, in the Runtime Errors
tab.
The following points are where the Check Virtual User dialog box and the Errors tab differ:
1. The Errors tab lists lines for HTTP requests only, contrary to the dialog box which presents a line
for the HTML page a request belongs to. This is mainly because the Errors tab displays an error line
for each type and each instance of a virtual user played during the scenario.
2. The Errors tab displays errors for each Virtual User played during the scenario, contrary to the
dialog box which, by definition, concerns a unique user. A scenario defines a number of virtual users
to be played. These users belong to different populations and include different types of users. Hence,
errors can occur for multiple users and multiple types of users.
In our example, the scenario has errors concerning two types of users, SimpleUser and
OccasionnalUser. NeoLoad numbers the users in the order they ran.
3. The Errors tab provides the response and request preceding the request causing the error. In
some situations, an error occurring on a request may be caused by the previous request or response, so
easy access to those elements greatly helps in understanding an error's cause.
The rest of this section details how the new elements provided by the Errors tab can be used.
In our example, we want to analyze the 500 error generated on the OccasionnalUser virtual user, we
also want to concentrate on a particular user of this type, the OccasionalUser#5.
• Filtering: To only work with a particular type of user, the easiest way is to filter out the display of errors
by selecting the type of user in the Virtual Users drop down list box.
654
Tutorials
• Sorting: Working with a particular user is easily achieved by sorting errors by Virtual User: clicking
on the Virtual User column header.
The following screen shot depicts the result of having filtered on OccasionnalUser and sorted by
Virtual User:
In our example, the GET request /loadtest/error has returned an HTTP 500 return code. This is
the following error code : Internal Servlet error.
If we take a look at the previous request by selecting the previous request radio button , we understand
that the loadtest/redirect/simple.jsp page has been requested:
We now push our investigation a little further and display the response returned by the previous request
by selecting the previous response radio button:
The response contains a 302 Moved Temporarily code redirecting the client agent to the page called
loadtest/error. Our problem is therefore in the loadtest/redirect/simple.jsp which
redirects to a an error page. This simple example shows you how to meaningfully use the information
NeoLoad provides concerning the context in which an error occurs.
655
Tutorials
Related Links
For more information on using assertions and validating server responses refer to the section called
“Validating a Server Response”.
For more information on HTTP response codes and NeoLoad status codes refer to the appendix.
To gain the most from this tutorial, it is recommended to have read the reference documentation
beforehand.
3. Changing and improving the pages, or the code called by those pages
2. In the table, select the two results to compare (click the first row, and 'Ctrl+click' the second row)
4. Edit the labels of the two tests and click "OK". The defaults are "A" and "B".
656
Tutorials
2. In the table, select the two results to compare (simple click for the first row, and 'Ctrl+click' for the
second row)
4. Edit the labels of the two tests and click "Next". The default labels are "A" and "B".
5. Configure the format, the report's content and the report file's directory, then click "OK".
Miscellaneous Items
Table of contents
To gain the most from this tutorial, it is recommended to have read the reference documentation on
"Monitors".
657
Tutorials
To add a monitor, we first need to specify which machine we want to monitor. To do this, click on the
"New Monitored Machine" button.
NeoLoad displays a dialog box that allows you to define the monitors to be placed on the machine:
The dialog box lists the types of components and/or protocols that NeoLoad is able to monitor. These
monitors are optional modules; if you are interested in a particular monitor type, please contact Neotys
for more information.
Enter the machine's host name or the server's IP address and select the monitors you wish to place on the
machine. For our example, we'll select the Linux monitor.
Click "Next >" to configure the monitors you have selected. The following panel displays the monitor
information.
Click "Next >" once more to enter the monitor's details. For more information on the specific settings
for each monitor, see the Reference Guide.
658
Tutorials
To make sure the monitor is working properly and that NeoLoad can connect to your server, you may
test the connection by clicking on the "Test" button. If the monitor is working, the message "The
connection settings are correct" is displayed. If not, details of the error are displayed.
Monitor information
Click "Next >" to define the performance counters you wish to put in place on your server. Depending on
the type of monitor selected (in our case, Linux), NeoLoad will automatically define the most appropriate
counters to be monitored and the associated alert thresholds. Check or clear a box to add or remove a
counter from the monitor.
Here, we have added the CPU User, CPU System and CPU Idle counters, among others, to the
Linux SSH monitor.
659
Tutorials
Click on the "Alert thresholds" tab to set the alert thresholds for the desired performance counters.
In this example, two thresholds have been set for the "CPU Idle" counter:
• a warning-level alert will be triggered if the counter's value falls to or below 50 for more than 5 seconds.
• a critical-level alert will be triggered if the counter's value falls to or below 10 for more than 5 seconds.
Then click "Finish" to create the monitored machine, monitor and associated performance counters.
660
Tutorials
While the scenario is running, you may select the "Runtime Monitors" tab in the "Runtime" section
and add any monitor information you wish to the display area.
The "Results" section allows you to view the graphs representing the various items monitored during
Runtime. The screenshot below shows a graph obtained by combining user load and the Linux SSH
monitor's CPU Idle counter.
661
Tutorials
In this example, the value of the CPU Idle counter regularly exceeds the alert threshold <= 50% at a
user load greater than 120 simultaneous virtual users.
The Load Generator actually comes with an additional executable called the Agent. The Agent is
responsible for launching the Load Generator executable and for informing the Controller that
a Load Generator is present on the machine.
662
Tutorials
The installation process closely resembles that of the Controller, the main difference being that you do
not need to enter a license key. The NeoLoad license key operates on a per-Controller basis. You can
have one Controller and as many Load Generators as you need. Refer to the diagram above for a better
understanding of NeoLoad's deployment and license key requirements.
Also, keep in mind that a Load Generator is never launched manually. As shown above, it is always started
via the agent.
During the Load Generator installation process, the wizard asks you whether the agent should be run as a
service and if it should be run on start up. NeoLoad's default setting is to both install the agent as a service
and run it on start up. This default setting is usually the most appropriate.
If you decide otherwise, you will need to start the agent. Refer to the Reference Guide section on manually
launching the agent.
Firewalls
Since the Controller and Agent communicate with each other, any intervening firewall must be
correctly configured. Three ports need to be opened: one for the Agent (default: 7100), one for theLoad
Generator (default: 7101), and one for the Controller (default: 4569). One UDP port must
be defined for the Agent to allow the Controller to discover the Load Generators on the
network (default: 1369). The above diagram shows the default configuration. You may change all these
663
Tutorials
default settings by editing the Controller or Agent configurations. For more information, see the
documentation on configuring the firewall between the Controller and Load Generator.
Warning
If you're using Windows Firewall with the Agent installed as a service, the firewall will not
prompt you to open the ports used by NeoLoad. In this case, you will need to specifically configure
Windows Firewall to keep these ports open.
If you select a Load Generator and then click on the button, NeoLoad displays the Advanced Host
Configuration dialog box. In the Network tab you may select the specific network interfaces, (i.e.
the interfaces to the server hosting the application to be tested) the Load Generator should use to replay
a scenario. Likewise, you can specify which IP address the Load Generator should show to the tested
application when sending HTTP requests.
664
Tutorials
The Load Balancing tab lets you define how much load to generate on that particular Load Generator. If
all the Load Generators have a load factor of 1, they will all generate the same load. Conversely, if one
Load Generator has a load factor of 2, while all the others have a load factor of 1, then first Load Generator
will generate twice as heavy a load as the others.
665
Tutorials
Consequently, Generator 1 will generate 1/(1+3) = 1/4 = 25% of the load and Generator 2 will generate
3/(1+3) = 3/4 = 75% of the load.
Related Links
For more information on installing Load Generators see the Reference Guide .
Scheduling a Test
This tutorial details the two methods that can be used to schedule the launching of a test at any given time.
666
Tutorials
Note
NeoLoad must be running for the test to start at the specified time.
667
Part V. Appendix
Table of Contents
A. Regular Expressions .................................................................................................... 672
Overview ............................................................................................................... 672
Introduction .................................................................................................... 672
Using regular expressions ................................................................................. 672
Quick Reference ..................................................................................................... 672
Special character definitions .............................................................................. 672
Character classes ............................................................................................. 673
Pre-defined character classes ............................................................................. 673
Examples ............................................................................................................... 673
Extracting a URL parameter value ..................................................................... 673
Extracting a Form Parameter Value .................................................................... 674
Extracting HTTP headers .................................................................................. 676
Extracting miscellaneous values ......................................................................... 676
Common Errors & Tips ............................................................................................ 676
Use of the question mark '?' .............................................................................. 676
Brackets ........................................................................................................ 677
Spaces ........................................................................................................... 677
Multi-Line ..................................................................................................... 677
Links to Regex Resources ........................................................................................ 677
Links to Regex Testers ............................................................................................ 677
B. Status Code Definitions ................................................................................................ 678
Informational 1xx .................................................................................................... 678
100 Continue .................................................................................................. 678
101 Switching Protocols ................................................................................... 678
Successful 2xx ........................................................................................................ 678
200 OK ......................................................................................................... 678
201 Created .................................................................................................... 679
202 Accepted ................................................................................................. 679
203 Non-Authoritative Information ..................................................................... 679
204 No Content .............................................................................................. 679
205 Reset Content ........................................................................................... 680
206 Partial Content .......................................................................................... 680
Redirection 3xx ...................................................................................................... 680
300 Multiple Choices ....................................................................................... 681
301 Moved Permanently ................................................................................... 681
302 Found ..................................................................................................... 681
303 See Other ................................................................................................ 682
304 Not Modified ........................................................................................... 682
305 Use Proxy ................................................................................................ 682
306 (Unused) .................................................................................................. 683
307 Temporary Redirect ................................................................................... 683
Client Error 4xx ...................................................................................................... 683
400 Bad Request ............................................................................................. 683
401 Unauthorized ............................................................................................ 683
402 Payment Required ..................................................................................... 683
403 Forbidden ................................................................................................ 684
404 Not Found ............................................................................................... 684
405 Method Not Allowed ................................................................................. 684
406 Not Acceptable ......................................................................................... 684
407 Proxy Authentication Required .................................................................... 684
408 Request Timeout ....................................................................................... 684
669
Appendix
670
Appendix
671
Appendix A. Regular Expressions
Overview
Introduction
NeoLoad includes the Apache Jakarta ORO [http://jakarta.apache.org/oro/] regular expressionsoftware for
handling Perl5-compatible regular expressions.
• content assertions: the request is valid if the content matches or contains the regex,
• variable extractors: extracts a value from a request's response and assigns the value to a variable,
The Quick Reference and Examples sections should provide enough information for most cases. Please
see the Links to Regex Resources section for links to fuller documentation and tutorials. You may also
test your regexes with the tools listed in the Links to Regex Testers section.
Let's consider the following text as an example: The value is: 45675
• test whether the text contains "The value is: <a number>" , as when defining a content assertion.
In this case, the regex would be: The value is: \d*
• extract the numerical value from the text, as when defining a variable extractor. In this case, the regex
would be: The value is: (\d*)
The brackets define a group. Here, we refer to this group value using "$1$", as the expression only
contains one bracketed group. When several groups are defined, use "$index$", where index id the
group number in order of appearance from left to right.
Quick Reference
Special character definitions
672
Regular Expressions
? Match 0 or 1 times
{n} Match exactly n times
{n,} Match at least n times
{n,m} Match at least n but no more than m times
Character classes
Examples
Extracting a URL parameter value
Content: <a href="/page.jsp?kind=1¶m1=value1¶m2=value2">
<a href="/page.jsp\?kind=1¶m1=(.*?)¶m2=value2">
<a href="/page.jsp\?.*?param1=([^&"]*)
Regex to extract value1 (where only the kind=1 links are to be taken into account):
<a href="/page.jsp\?kind=1.*?param1=([^&"]*)
Comments:
• The first dynamic part, ".*?" , means "any character followed by 'param1='" in this instance. The
question mark "?" means that the first occurrence matched must be used.
• ([^&"]*) means "any character except '&' and '"', several times". The brackets are required to define
the group. The first group ($1$ in NeoLoad), refers to this matching part.
673
Regular Expressions
Comment: In each case, the brackets define the group whose value may be extracted in NeoLoad using
$1$.
Advanced case: Where the web page contains several forms with text fields of the same name, the regex
must contain the following:
Comments:
• (.|\s)*? means "any character, including the new line character". "?" means that the first "<input"
must be used.
• ([^"]*) means "any character except the quotation mark character '"' ". The brackets are required to
define a group. The first group ($1$ in NeoLoad), refers to ''(.|\s)*". However, the second group
($2$ in NeoLoad) also needs to be taken into account.
674
Regular Expressions
Comments:
• The radio button selected is the one with the checked attribute set to "checked".
• ([^"]*) means "any character except the quotation mark character '"' ".
• ([^<\n]*)means "any character except '<' and the new line character ".
• The brackets are required to define a group. The first group refers to the value and the second refers to
the radio button's label. Therefore, use $1$ in NeoLoad to extract the value and $2$ to extract the label.
Comments:
• The checkbox selected is the one with the checked attribute set to "checked".
• ([^"]*)means "any character except the quotation mark character '"' ".
• ([^<\n]*)means "any character except '<' and the new line character ".
• The brackets are required to define a group. The first group refers to the value and the second refers to
the checkbox's label. Therefore, use $1$ in NeoLoad to extract the value and $2$ to extract the label.
<select name="dropDownList">
<option value="val1">list choice 1
<option value="val2" selected>list choice 2
<option value="val3">list choice 3
</select>
675
Regular Expressions
Comments:
• The list item selected is the one with the selected attribute set.
• [^"]*) means "any character except the quotation mark character '"' ".
• ([^<\n]*)means "any character except '<' and the new line character ".
• The brackets are required to define a group. The first group in the regex is redundant; the second refers
to the value and the third to the list item's label. Therefore, use $2$ in NeoLoad to extract the value
and $3$ to extract the label.
Content-Type: text/html
Content-Length: 163
myHeader: myValue
Date: Thu, 03 Feb 2005 16:44:33 GMT
Server: Apache-Coyote/1.1
Comment: (.*) means "any character, except the newline character". The brackets are required to define
a group. Extract the header value in NeoLoad using $1$.
Comments:
• (\w* \w*) means "two words separated by a space". The brackets are required to define a group.
The first and unique group refers to ''(\w* \w*)". Therefore, use $1$ in NeoLoad to extract both
first and last names.
• Using "(\w*) (\w*)" instead of "(\w* \w*)" may be used to extract the first and last name
separately. In this case, use $1$ to extract the first name and $2$ the last name.
676
Regular Expressions
Brackets
When using regexes in Variable Extractors, do not forget to use brackets to define the various groups. The
" .*" and "(.*)" patterns may both match an expression, but only the pattern enclosed in brackets will
extract the value by referring to the group using $groupNumber$. In certain cases, brackets need to be
used to isolate part of a regex pattern, regardless of any group definition requirements. This must be taken
into account when defining the groups whose values are to be extracted.
Spaces
A space is a normal character that must be taken into account in regexes. Check to make sure there are no
extra spaces at the start or end of the regex, especially after cutting and pasting.
Multi-Line
The characters ".*" mean "matching any string of characters except line breaks". If the expression is tested
over several lines, use "([^^]*?)", which includes line breaks.
• http://www.zvon.org/other/PerlTutorial/Output/regexps.html - Examples.
677
Appendix B. Status Code Definitions
Each Status-Code is described below, including a description of which method(s) it can follow and any
metainformation required in the response.
Informational 1xx
This class of status code indicates a provisional response, consisting only in the Status-Line and optional
headers and terminated by an empty line. There are no required headers for this class of status code. Since
HTTP/1.0 did not define any 1xx status codes, servers MUST NOT send a 1xx response to an HTTP/1.0
client except under experimental conditions.
A client MUST be prepared to accept one or more 1xx status responses prior to a regular response, even
if the client does not expect a 100 (Continue) status message. Unexpected 1xx status responses MAY be
ignored by a user agent.
Proxies MUST forward 1xx responses, unless the connection between the proxy and its client has been
closed, or unless the proxy itself has requested the generation of the 1xx response. (For example, if a
proxy adds a "Expect: 100-continue" field when it forwards a request, then it does not need to forward the
corresponding 100 (Continue) response(s).)
100 Continue
The client SHOULD continue with its request. This interim response is used to inform the client that the
initial part of the request has been received and that it has not been rejected by the server yet. The client
SHOULD continue by sending the remainder of the request or, if the request has already been completed,
ignore this response. The server MUST send a final response after the request has been completed. See
[RFC 2068], section 8.2.3 for detailed discussion of the use and handling of this status code.
The protocol SHOULD be switched only when it is advantageous to do so. For example, switching to a
newer version of HTTP is advantageous over older versions, and switching to a real-time, synchronous
protocol might be advantageous when delivering resources that use such features.
Successful 2xx
This class of status code indicates that the client's request was successfully received, understood, and
accepted.
200 OK
The request has succeeded. The information returned with the response depends on the method used in
the request, for example:
678
Status Code Definitions
HEAD the entity-header fields corresponding to the requested resource are sent in the response without
any message-body;
TRACE an entity containing the request message as received by the end server.
201 Created
The request has been fulfilled and recorded in a new resource. The created resource can be referenced by
the URI(s) returned in the entity of the response, with the most specific URI for the resource given by a
Location header field. The response SHOULD include an entity containing a list of resource characteristics
and location(s) from which the user or user agent can choose the most appropriate. The entity format is
specified by the type of the media given in the Content-Type header field. The original server MUST
create the resource before returning the 201 status code. If the action cannot be carried out immediately,
the server SHOULD respond with 202 (Accepted) response instead.
A 201 response MAY contain an ETag response header field indicating the current value of the entity tag
for the requested variant just created, see [RFC 2068], section 14.19.
202 Accepted
The request has been accepted for processing, but the processing has not been completed. The request
might or might not be eventually acted upon, as it might be disallowed when processing actually takes
place. There is no facility for re-sending a status code from an asynchronous operation such as this.
The 202 response is intentionally non-committal. Its purpose is to allow a server to accept a request for
some other process (perhaps a batch-oriented process that is only run once per day).The user agent does
not have to be connected to the server till the end of the process. The entity returned with this response
SHOULD include an indication of the current status of the request and whether a pointer to a status monitor
or an estimation of when the user can expect the implementing of the request to be over.
204 No Content
The server has fulfilled the request but does not need to return an entity-body and might want to return
updated metainformation. The response MAY include new or updated metainformation in the form of
entity-headers, which if found SHOULD be associated with the requested variant.
If the client is a user agent, it SHOULD NOT change its document view into the one that caused the
sending of the request. This response is primarily intended to allow input for actions to take place without
causing a change of the user agent's active document view, although any new or updated metainformation
SHOULD be applied to the document currently in the user agent's active view.
The 204 response MUST NOT include a message-body,and is thus always terminated by the first empty
line after the header fields.
679
Status Code Definitions
- Date
If the 206 response is the result of an If-Range request that used a strong cache validator (see [RFC 2068],
section 13.3.3), the response SHOULD NOT include other entity-headers. If the response is the result of
an If-Range request that used a weak validator, the response MUST NOT include other entity-headers;
this prevents inconsistencies between cached entity-bodies and updated headers. Otherwise, the response
MUST include all of the entity-headers that would have been returned with a 200 (OK) response to the
same request.
A cache MUST NOT combine a 206 response with other previously cached content if the ETag or Last-
Modified headers do not match exactly, see 13.5.4.
A cache that does not support the Range and Content-Range headers MUST NOT cache 206 (Partial)
responses.
Redirection 3xx
This class of status code indicates that further actions need to be taken by the user agent in order to fulfill
the request. The action required MAY be carried out by the user agent without interaction with the user
if, and only if, the method used in the second request is GET or HEAD. A client SHOULD detect infinite
redirection loops, since such loops generate network traffic for each redirection.
Note: previous versions of this specification recommended a maximum of five redirections. Content
developers should be aware that there might be clients that implement such a fixed limitation.
680
Status Code Definitions
Unless it was a HEAD request, the response SHOULD include an entity containing a list of resource
characteristics and location(s) from which the user or user agent can choose the most appropriate. The
entity format is specified by the media type given in the Content- Type header field. Depending upon the
format and the capabilities of the user agent, selection of the most appropriate choice MAY be performed
automatically. However, this specification does not define any standard for such automatic selection.
If the server has a preferred choice of representation, it SHOULD include the specific URI for that
representation in the Location field; user agents MAY use the Location field value for automatic
redirection. This response is cacheable unless indicated otherwise.
The new permanent URI SHOULD be given by the Location field in the response. Unless the request
method was HEAD, the entity of the response SHOULD contain a short hypertext note with a hyperlink
to the new URI(s).
If the 301 status code is received in response to a request other than GET or HEAD, the user agent MUST
NOT automatically redirect the request unless it can be confirmed by the user, since this might change the
conditions under which the request was issued.
Note: When automatically redirecting a POST request after receiving a 301 status code, some existing
HTTP/1.0 user agents will erroneously change it into a GET request.
302 Found
The server has performed a sendRedirect. A browser should automatically request the URL indicated by
the Location header.
The requested resource resides temporarily under a different URI. Since the redirection might be
occasionally altered, the client SHOULD continue to use the Request-URI for future requests. This
response is only cacheable if indicated by a Cache-Control or Expires header field.
The temporary URI SHOULD be given by the Location field in the response. Unless the request method
was HEAD, the entity of the response SHOULD contain a short hypertext note with a hyperlink to the
new URI(s).
If the 302 status code is received in response to a request other than GET or HEAD, the user agent MUST
NOT automatically redirect the request unless it can be confirmed by the user, since this might change the
conditions under which the request was issued.
Note: RFC 1945 and RFC 2068 specify that the client is not allowed to change the method on the
redirected request. However, most existing user agent implementations treat 302 as if it was a 303 response,
performing a GET on the Location field-value regardless of the original request method. The status codes
681
Status Code Definitions
303 and 307 have been added for servers that wish to make unambiguously clear the expercted reaction
of the client.
The different URI SHOULD be given by the Location field in the response. Unless the request method
was HEAD, the entity of the response SHOULD contain a short hypertext note with a hyperlink to the
new URI(s).
Note: Many pre-HTTP/1.1 user agents do not understand the 303 status. When interoperability with such
clients is a concern, the 302 status code may be used instead, since most user agents react to a 302 response
as described here for 303.
- Date, unless its omission is required by [RFC 2068], section 14.18.1 If a clockless origin server obeys
these rules and proxies and if clients add their own Date to any response received without one (as already
specified by [RFC 2068], section 14.19), caches will operate correctly.
- ETag and/or Content-Location, if the header would have been sent in a 200 response to the same request
- Expires, Cache-Control, and/or Vary, if the field-value might differ from that sent in any previous
response for the same variant
If the conditional GET used a strong cache validator (see [RFC 2068], section 13.3.3), the response
SHOULD NOT include other entity-headers. Otherwise (i.e., the conditional GET used a weak validator),
the response MUST NOT include other entity-headers; this prevents inconsistencies between cached
entity-bodies and updated headers.
If a 304 response indicates an entity not currently cached, then the cache MUST disregard the response
and repeat the request without the conditional.
If a cache uses a received 304 response to update a cache entry, the cache MUST update the entry to reflect
any new field values given in the response.
Note: RFC 2068 was not clear that 305 was intended to redirect a single request, and to be generated by
origin servers only. Not observing these limitations has significant security consequences.
682
Status Code Definitions
306 (Unused)
The 306 status code, which was used in a previous version of the specification , is no longer used and
the code is reserved.
The temporary URI SHOULD be given by the Location field in the response. Unless the request method
was HEAD, the entity of the response SHOULD contain a short hypertext note with a hyperlink to the
new URI(s) , since many pre-HTTP/1.1 user agents do not understand the 307 status. Therefore, the note
SHOULD contain the information necessary for a user to repeat the original request on the new URI.
If the 307 status code is received in response to a request other than GET or HEAD, the user agent MUST
NOT automatically redirect the request unless it can be confirmed by the user, since this might change the
conditions under which the request was issued.
If the client is sending data, a server implementation using TCP SHOULD be careful to ensure that the
client acknowledges the receipt of the packet(s) containing the response, before the server closes the input
connection. If the client continues sending data to the server after the close, the server's TCP stack will
send a reset packet to the client, which may erase the client's unacknowledged input buffers before they
can be read and interpreted by the HTTP application.
401 Unauthorized
The request requires user authentication. The response MUST include a WWW-Authenticate header
field ([RFC 2068], section 14.47) containing a challenge applicable to the requested resource. The client
MAY repeat the request with a suitable Authorization header field ([RFC 2068], section 14.8). If the
request already included Authorization credentials, then the 401 response indicates that authorization
has been refused for those credentials. If the 401 response contains the same challenge as the prior
response, and the user agent has already, at least once, attempted authentication, then the user SHOULD
be presented the entity that was given in the response, since that entity might include relevant diagnostic
information. HTTP access authentication is explained in "HTTP Authentication: Basic and Digest Access
Authentication" [43].
683
Status Code Definitions
403 Forbidden
The server understood the request but is refusing to fulfill it. Authorization will not help and the request
SHOULD NOT be repeated. If the request method was not HEAD and the server wishes to make public
the reason why the request has not been fulfilled, it SHOULD describe the reason for the refusal in the
entity. If the server does not wish to make this information available to the client, the status code 404 (Not
Found) can be used instead.
Unless it was a HEAD request, the response SHOULD include an entity containing a list of available entity
characteristics and location(s) from which the user or user agent can choose the one most appropriate. The
entity format is specified by the media type given in the Content-Type header field. Depending upon the
format and the capabilities of the user agent, selection of the most appropriate choice MAY be performed
automatically. However, this specification does not define any standard for such automatic selection.
Note: HTTP/1.1 servers are allowed to return responses which are not acceptable according to the accept
headers sent in the request. In some cases, this may even be preferable to sending a 406 response. User
agents are encouraged to inspect the headers of an incoming response to determine if it is acceptable. If
the response is unacceptable, a user agent SHOULD temporarily stop the receipt of more data and query
the user for a decision on further actions.
684
Status Code Definitions
409 Conflict
The request could not be completed due to a conflict with the current state of the resource. This code is only
allowed in situations where it is expected that the user might be able to resolve the conflict and resubmit
the request. The response body SHOULD include enough information for the user to recognize the source
of the conflict. Ideally, the response entity would include enough information for the user or user agent to
fix the problem; however, that might not be possible and is not required.
Conflicts are most likely to occur in response to a PUT request. For example, if versioning was being used
and the entity being PUT included changes to a resource which conflicts with those made by an earlier
(third-party) request, the server might use the 409 response to indicate that it can't complete the request.
In this case, the response entity would likely contain a list of the differences between the two versions in
a format defined by the response Content-Type.
410 Gone
The requested resource is no longer available at the server and no forwarding address is known. This
condition is expected to be considered permanent. Clients with link editing capabilities SHOULD delete
references to the Request-URI after user approval. If the server does not know, or has no facility to
determine, whether or not the condition is permanent, the status code 404 (Not Found) SHOULD be used
instead. This response is cacheable unless indicated otherwise.
The 410 response is primarily intended to assist the task of web maintenance by notifying the recipient that
the resource is intentionally unavailable and that the server owners desire the removal of the remote links to
that resource. Such an event is common for limited-time, promotional services and for resources belonging
to individuals no longer working at the site of the server. It is not necessary to mark all permanently
unavailable resources as "gone" or to keep the mark for any length of time -- that is left to the discretion
of the server owner.
685
Status Code Definitions
request to a GET request with long queried information, when the client has descended into a URI "black
hole" of redirection (e.g., a redirected URI prefix that points to a suffix of itself), or when the server is
under attack by a client attempting to exploit security holes present in some servers using fixed-length
buffers for reading or manipulating the Request-URI.
When this status code is returned for a byte-range request, the response SHOULD include a Content-Range
entity-header field specifying the current length of the selected resource (see [RFC 2068], section 14.16).
This response MUST NOT use the multipart/byteranges content- type.
686
Status Code Definitions
Note: The existence of the 503 status code does not imply that a server must use it when becoming
overloaded. Some servers may wish to simply refuse the connection.
Note: Note to implementors: some deployed proxies are known to return 400 or 500 when DNS lookups
time out.
687
Appendix C. NeoLoad Status Codes
• NL-REDIRECT-01. NeoLoad could not follow the sendRedirect directive for the previous request
(302 Moved Temporarily)
Explanation:
The request that failed has the "HTTP redirect" type in NeoLoad. This means that the request must
follow the redirection directive of the previous request. The redirection is valid when the previous
requests returns the HTTP status code 301, 302, 303 or 307, and headers containing the header named
"Location".
NL-REDIRECT-01 means that the previous request (designated by the 'referrer') has not been played.
Please check the referrer of the request that failed (click the "Advanced..." button and select the
"Advanced settings" tab) and check in your virtual user that the 'referrer' request is being played before
the request that fails.
• NL-REDIRECT-02. NeoLoad could not follow the sendRedirect directive for the previous request
(302 Moved Temporarily)
Explanation:
The request that failed has the "HTTP redirect" type in NeoLoad. This means that the request must
follow the redirection directive of the previous request. The redirection is valid when the previous
requests returns the HTTP status code 301, 302, 303 or 307, and headers containing the header named
"Location".
NL-REDIRECT-02 means that the previous request (designated by the 'referrer') had an HTTP status
code of 301, 302, 303 or 307 but no header named "Location" when played back. The web application
should be fixed.
• NL-REDIRECT-03. NeoLoad could not follow the sendRedirect directive for the previous request
(302 Moved Temporarily)
Cause: The previous request did not issue a redirection (no 302 status)
Explanation:
The request that failed has the "HTTP redirect" type in NeoLoad. This means that the request must
follow the redirection directive of the previous request. The redirection is valid when the previous
requests returns the HTTP status code 301, 302, 303 or 307, and headers containing the header named
"Location".
NL-REDIRECT-03 means that the previous request (designated by the 'referrer') did not have an HTTP
status code of 301, 302, 303 or 307 when played back. First, please verify that the referrer of the
request that failed is in fact the appropriate request (click "Advanced..." button and select the "Advanced
settings" tab). Next, investigate why the previous request did not return the expected status code.
Typically, an invalid parameter has been sent and the previous request has failed with '200' as the HTTP
status code.
688
NeoLoad Status Codes
• NL-REDIRECT-04. NeoLoad could not follow the sendRedirect directive for the previous request
(302 Moved Temporarily)
Explanation:
The request that failed has the "HTTP redirect" type in NeoLoad. This means that the request must follow
the redirection directive of the previous request. The redirection is valid when the previous requests
returns the HTTP status code 301, 302, 303 or 307, and headers containing the header named "Location".
NL-REDIRECT-04 means that the previous request (designated by the 'referrer') failed.
• NL-LINKEXTRACTOR-01. The link or form could not be extracted from the previous request.
Explanation:
The request that failed has the "Link/Form extractor" type in NeoLoad. This means that the request must
extract its dynamic information from the previous page (designated by the 'referrer').
• NL-LINKEXTRACTOR-02. The link or form could not be extracted from the previous request.
Cause: The definition does not match any link or form in the previous request.
Explanation:
The request that failed has the "Link/Form extractor" type in NeoLoad. This means that the request must
extract its dynamic information from the previous page (designated by the 'referrer').
NL-LINKEXTRACTOR-02 means that the NeoLoad definition of the request is not properly designed
to extract its dynamic information from the previous page. Please check the request definition and
validate the regular expressions that may have been used.
• NL-LINKEXTRACTOR-03. The link or form could not be extracted from the previous request.
Explanation:
The request that failed has the "Link/Form extractor" type in NeoLoad. It means that the request must
extract its dynamic information from the previous page (designated by the 'referrer').
The NL-LINKEXTRACTOR-03 error means that the preceding request (designated by the "referrer")
was not played. This usually indicates a problem with the virtual user's configuration or that a previous
error prevented the referrer being played.
689
NeoLoad Status Codes
The "java.net.SocketException: Connection reset" error may occur when the server
is overloaded.
Indicates an error occurring locally when attempting to bind a socket. This is usually due to the
load generator not being able to open any more sockets on the local system. Please refer to the
Troubleshooting Guide for details on which system settings to check.
• NL-NETWORK-03. Error when connecting to the server. Indicates a server-side error occurring
when attempting to bind a socket. This is usually due to the server being shut down or not being able
to open any more sockets.
• NL-RUNTIME-01. Unexpected load generator error when connecting to the server. This is a
NeoLoad bug, please contact support.
• NL-RUNTIME-02. Unexpected load generator error when playing the request. This is a NeoLoad
bug, please contact support.
• NL-RUNTIME-03. Unexpected load generator error when playing the request. This error can
occur when the client request body and/or the server response body does not contain any data. Some
applications may not strictly respect the HTTP protocol, so it's not necessarily an error.
• JS-FAIL. The script flagged the JavaScript Action as having failed (Call to
context.fail()method)
• JS-ERROR-EVAL. JavaScript execution failed. Typically, the script used a variable or a function
that does not exist.
• NL-PLUGIN-ENGINE-01. Generator internal error while processing the XML request. This error
relates to problems that may arise in the generator while preparing the XML request prior to sending.
The error details will pinpoint whether the problem is due to the replacement of variables or to the
conversion from XML to binary format.
• NL-PLUGIN-ENGINE-02. Generator internal error while processing the XML request. This error
relates to problems that may arise in the generator while preparing the binary response after its reception.
The error details will pinpoint whether the problem is due to the conversion from binary format to XML.
• NL-PLUGIN-ENGINE-03. XML HTTP requests whose conversion to XML has failed cannot be
played back. During recording, certain XML requests may not have been converted to the XML format
correctly. These requests are notified visually in the virtual user profiles. This kind of request sometimes
can be produced by the Adobe Flex/AMF module. The requests flagged as containing an error must be
repaired according to the instructions in the documentation supplied with the XML module generating
the request.
• NL-AMF-PLUGIN-ENGINE-01. Generator internal error while processing the Adobe Flex / AMF
request. This error code covers all the errors that may occur while preparing an Adobe Flex / AMF
690
NeoLoad Status Codes
request prior to it being sent to the server. The most common error is caused when NeoLoad attempts to
play back an Adobe Flex / AMF request that was incorrectly converted to XML format during recording,
and has not been repaired. To fix the problem, see the tutorial entitled XML Adobe Flex/AMF Module:
Advanced Use.
• NL-AMF-PLUGIN-ENGINE-02. Generator internal error while processing the AMF response. This
error code covers all the errors that may occur while decoding an Adobe Flex / AMF response after
reception. The most common error is caused by a response containing Adobe Flex/AMF externalizable
objects (see the AMF Post-recording Wizard for more details on these objects) that could not be decoded.
• NL-AMF-PLUGIN-ENGINE-03. An AMF error message was returned by the server and the error
code contained in the message does not appear in the AMF error message exclusion list. See the AMF
General Preferences for more information on Adobe Flex/AMF error codes and their handling.
• NL-RTMP-PLUGIN-TIMEOUT-01. The server took too long to respond to the client connection
or RTMP request. The default maximum connection and response times are 60 seconds. These
settings may be changed in the "<NeoLoad>\conf\controller.properties" file. Locate the
"[RTMP]" category (create it if it does not already exist) and the "socket.read.timeout" and
"socket.connection.timeout" parameters (the values are in milliseconds: 60000 equals 60
seconds).
• NL-OF-PLUGIN-ENGINE-01. An error occurred while encrypting the Oracle Forms request. This
error may have a number of causes: the error details will give more indications as to the error's probable
source. Generally, the error arises when the virtual user tries to encrypt an Oracle Forms request where
the dynamic encryption key negotiation with the server has previously failed.
• NL-OF-PLUGIN-ENGINE-02. An error has occurred while decrypting the Oracle Forms response.
The Oracle Forms server returned an error indicating that it did not understand the request, or that the
response sent back by the server could not be decrypted correctly.
• NL-GWT-PLUGIN-ENGINE-01. Generator internal error while processing the GWT request. This
error code covers all the errors that may occur while preparing a GWT request prior to it being sent to
the server. The most common error is caused when NeoLoad attempts to play back a GWT request that
691
NeoLoad Status Codes
has been incorrectly converted to XML format during recording and has not been repaired. To fix the
problem, see the tutorial entitled XML Google Web Toolkit Module: Advanced Use.
• NL-ASSERTION-FAILED. At least one assertion failed on the server response of the request.
692
Appendix D. NeoLoad Javascript API
Class Logger
The Logger object is used to log messages.
• in the Load Generator log file in any case ("loadGenerator.log.00x" of the logs folder. Open the logs
folder with the menu "Help / open logs folder").
The different methods of this class log the message with different log levels: FATAL, ERROR, WARN,
INFO, DEBUG. If the level used to log the message is lower than the log level defined in the runtime
policy, then the message will be ignored.
The runtime log level can be set in NeoLoad GUI, in the project's preferences: menu "Edit / Preferences".
The default is ERROR, it will ignore any message at WARN, INFO and DEBUG level. Warning, as it can
be very verbose, the runtime log level should be decreased to debug small tests only (few users for a few
time). Don't forget to switch back to ERROR level for normal tests.
Note that the log level is forced to DEBUG when validating your Virtual Users using the Check dialog.
Warning, logging at ERROR level will not flag the JSAction as failed. If you want to flag the JSAction
as failed, use fail(java.lang.String) method.
Example
logger.error("Unexpected value:"+var1);
Synopsis
public class Logger {
// Public Methods
693
NeoLoad Javascript API
debug(String)
public void debug(String message);
Parameters
message the message.
error(String)
public void error(String message);
Parameters
message the message.
Log a message at ERROR level, will be logged if runtime level is lower or equal to ERROR.
Warning, logging at ERROR level will not flag the JSAction as failed. If you want to flag the JSAction
as failed, use fail(java.lang.String) method.
fatal(String)
public void fatal(String message);
Parameters
message the message.
info(String)
public void info(String message);
694
NeoLoad Javascript API
Parameters
message the message.
Log a message at INFO level, will be logged if runtime level is lower or equal to INFO.
isDebugEnabled()
public boolean isDebugEnabled();
Parameters
return true if this logger is debug enabled, false otherwise.
This function is intended to lessen the computational cost of disabled log debug statements.
You incur the cost constructing the message, concatenation in this case, regardless of whether the message
is logged or not. You should write
if(logger.isDebugEnabled()) {
logger.debug("This is entry number: " + i );
}
This way you will not incur the cost of parameter construction if debugging is disabled for the session.
isErrorEnabled()
public boolean isErrorEnabled();
Parameters
return true if this logger is error enabled, false otherwise.
isFatalEnabled()
public boolean isFatalEnabled();
Parameters
return true if this logger is fatal enabled, false otherwise.
695
NeoLoad Javascript API
isInfoEnabled()
public boolean isInfoEnabled();
Parameters
return true if this logger is info enabled, false otherwise.
isWarnEnabled()
public boolean isWarnEnabled();
Parameters
return true if this logger is warn enabled, false otherwise.
warn(String)
public void warn(String message);
Parameters
message the message.
Log a message at WARN level, will be logged if runtime level is lower or equal to WARN.
Class RendezvousManager
Rendezvous Management
696
NeoLoad Javascript API
• Find out if a specific rendezvous point exists in one of the virtual users played.
The rendezvous Manager acts on the test runtime globally, however many Load Generators are in use.
Please note the following points on the way rendezvous function:
• An order issued by the rendezvous Manager is disseminated to all the Load Generators involved in
running the scenario.
• When concurrent orders are issued, the last order issued takes precedence over the others.
Example: Given that there are 3 Load Generators, (G1, G2 and G3). On G1, a virtual user's JavaScript
action calls the following code:
context.RendezvousManager.setEnabled("rendezvous",false);
G1, G2 and G3 will then disable the rendezvous named "rendezvous": all the generators obey the order
issued by G1.
Synopsis
public class RendezvousManager {
// Public Constructors
public RendezvousManager();
// Public Methods
hasRendezvous(String)
public Boolean hasRendezvous(String RDVName);
Parameters
RDVName rendezvous name
697
NeoLoad Javascript API
isEnabled(String)
public Boolean isEnabled(String RDVName);
Parameters
RDVName
When the specified rendezvous does not exist, an error is thrown and the script execution is stopped.
setEnabled(String, Boolean)
public void setEnabled(String RDVName,
Boolean isEnabled);
Parameters
RDVName rendezvous name
• Virtual users arriving at the rendezvous after it has been disabled are not detained.
• The virtual users that were previously detained at the rendezvous remain detained until their release (by
the rendezvous policy or after timeout).
When the specified rendezvous does not exist, an error is thrown and the script execution is stopped.
698
NeoLoad Javascript API
unblock(String)
public void unblock(String RDVName);
Parameters
RDVName rendezvous name
Releases all the virtual users detained at the specified rendezvous at that precise moment in time.
Any virtual users arriving at the rendezvous after the method is called are detained.
When the specified rendezvous does not exist, an error is thrown and the script execution is stopped.
unblock(String, int)
public void unblock(String RDVName,
int virtualUserCount);
Parameters
RDVName rendezvous name
Releases a set number of virtual users detained at the specified rendezvous . The virtual users are released
on a FIFO (first in - first out) basis: the first virtual user to arrive at the rendezvous is the first to be released.
The number of virtual users released is spread among the generators according to their load.
• The specified rendezvous doesn't exist: an error is thrown and the script execution is stopped.
• The number of virtual users to be released is greater than the number of virtual users detained: NeoLoad
releases the number of virtual users detained
• The number of users specified is less or equal to 0: an error is thrown and the script execution is stopped.
unblockAll()
public void unblockAll();
Releases all the virtual users detained at that precise moment in time, whatever the rendezvous at which
they are detained.
Any virtual users arriving at the rendezvous after the method is called are detained.
Class RuntimeContext
This class represents the execution context of the script.
It is accessible from the pre-defined variable: "context" and should not be created directly.
699
NeoLoad Javascript API
Example:
Synopsis
public class RuntimeContext {
// Public Fields
// Public Methods
currentVU
variableManager
The VariableManager
fail()
public void fail();
Mark the current script as failed and stops the execution of the script. A default error message will be
logged at ERROR level.
Note that the script exits, but the Virtual User keeps running and go to the next action.
700
NeoLoad Javascript API
fail(String)
public void fail(String message);
Parameters
message The message
Mark the current script as failed and stops the execution of the script. The specified message will be logged
at ERROR level.
Note that the script exits, but the Virtual User keeps running and go to the next action.
fail(String, String)
public void fail(String errorCode,
String message);
Parameters
errorCode the error code for the NeoLoad action
Mark the current script as failed and stops the execution of the script. The specified message will be logged
at ERROR level.
Note that the script exits, but the Virtual User keeps running and go to the next action.
Class VariableManager
Manages NeoLoad variables.
These variables are explicitly declared in the Variables Panel of NeoLoad. They have a "Value change
policy" that defines when they should take a new value.
These variables are set at runtime, by Variable Extractors for example. Their values must be explicitly
changed to another value.
Synopsis
public class VariableManager {
701
NeoLoad Javascript API
// Public Methods
changeValue(String)
public void changeValue(String variableName);
Parameters
variableName the variable name.
Change the value of a declared variable like a File variable or a Counter variable.
Note that the variable name should be used, not the variable expression: use 'varname' and NOT
'${varname}'. Nevertheless, name can be composed: for example "data_for_${login}" if variable
"data_for_jsmith" is defined.
getValue(String)
public String getValue(String variableName);
Parameters
variableName the variable name.
Returns the value of a variable or null if the variable does not exist.
Note that the variable name should be used, not the variable expression: use 'varname' and NOT
'${varname}'. Nevertheless, name can be composed: for example "data_for_${login}" if variable
"data_for_jsmith" is defined.
Warning, the result is always a String. If the variable value represents a number, you may need to explicitly
convert it to a number before using it. Use parseInt(varname) or parseFloat(varname) for example.
702
NeoLoad Javascript API
parseString(String)
public String parseString(String text);
Parameters
text the String
return the parsed text. Returns the same text if it contains no variables,
never returns null.
Evaluate a String that contains variables. For example, "the counter value is: ${counter}" will return "the
counter value is: 7".
setValue(String, String)
public void setValue(String variableName,
String value);
Parameters
variableName the variable name.
Assign a value to a runtime variable. It creates the variable if it does not exist. Note that the variable name
should be used, not the variable expression: use 'varname' and NOT '${varname}'.Nevertheless, name can
be composed: for example "data_for_${login}" if variable "data_for_jsmith" is defined.
When using the name of a declared variable, a runtime variable will be created that will override the
declared variable. It is not recommended to override declared variables.
Class VirtualUser
VirtualUser represents a Virtual User instance.
Typically, you have several instances of a Virtual User running at the same time.
Usually, for debugging purpose, you can get the id of the current Virtual User (e.g., "UserA#3") with
context.currentVU.id
Synopsis
public class VirtualUser {
// Public Fields
public String id ;
703
NeoLoad Javascript API
// Public Methods
id
public String id ;
The id of the Virtual User (e.g., "User1#3"). This id is only valid if the Virtual User is context.currentVU.
In all other cases, this id will be null
name
get(Object)
public Object get(Object key);
Parameters
key the key whose associated value is to be returned
return the value to which the specified key is mapped, or null if the current
Virtual User instance contains no mapping for the key.
Returns the value to which the specified key is mapped, or null if there's no mapping for the key.
put(Object, Object)
public void put(Object key,
Object value);
704
NeoLoad Javascript API
Parameters
key key with which the specified value is to be associated
Stores a user-defined object in the Virtual User instance. It associates the specified value with the specified
key.
remove(Object)
public Object remove(Object key);
Parameters
key the key whose associated value is to be returned
return the value to which the specified key is mapped, or null if the current
Virtual User instance contains no mapping for the key.
Returns the value previously associated with the key, or null if there's no mapping for the key.
setCookieForServer(String, String)
public void setCookieForServer(String serverName,
String cookie);
Parameters
serverName the NeoLoad name of the server.
Sets a Cookie for the Virtual User instance. The cookie is associated with the specified server so that the
cookie will be sent in all following requests to the specified server according to the cookies settings: the
cookie will be sent if the cookie path matches the request path and if the expiration date is not reached.
The cookie must have the standard format: e.g., "name=value; expires=Thu, 2 Aug 2007 20:47:11 UTC;
path=/".
Sample:
Sets a cookie that expires in 7 days, and that will be sent in requests which paths are under /app on the
server jack_80
705
NeoLoad Javascript API
path=/app";
context.currentVU.setCookieForServer("jack_80",cookie);
Important
The serverName parameters designs the NeoLoad name of the server, not the physical one. Check you
server names in the repository panel of NeoLoad.
To clear a Cookie
Set a Cookie with an expired date to remove the Cookie for the Virtual User instance. Note that the
cookie header should be removed from the request headers of the appropriate requests in the repository:
the requests that come after the Javascript and which URL match the server and path of the cookie.
Sample:
stop()
public void stop();
Stops the execution of this Virtual User instance. Note that it stops only the current instance, the other
Virtual Users keep running. This action does not log anything, it is your responsability to log an error
message if needed.
706
Glossary
Action See Logical Action.
Assertion Validates a server response during a test by defining, asserting, a condition that
must be met. Validation can be based on the response content, size or duration.
NeoLoad can be configured to throw assertion errors when the conditions defined
by an assertion are not met. Other than clearly pointing out unexpected or faulty
behavior in load scenarios, assertions and assertion errors also reveal functional
issues.
Average 90% The average 90% is calculated for response times by removing the lowest and
highest 5% of values to iron out any outliers. The resulting figure is close to the
one obtained by the majority of end-users.
Basic Authentication Within the context of an HTTP transaction, basic authentication is an operation
whereby the browser includes user account information (login and password) in
a request. The information is sent as plain text (merely base64 encoded) in the
Authorization header .
See Also NTLM Authentication.
Container A virtual user container groups the different web pages that make up a "business
transaction". In other words, a container is a set of web pages that carry out a
business exchange. A typical example of this type of container is the set of pages
used to connect to the application. These containers are clearly marked in the test
results to make analyzing download times easier.
File Variable A file variable takes its values from a file with a format such as a comma separated
values (CSV) file. To use a file variable, the file from which the values will be
read has to be configured.
See Also Variable.
Form Extractor The form extractor is used in a "Submit a form in the previous
request" -type request. This process extracts a form in the server response's
HTML code so that its values can be injected into the current request.
See Also Variable Extractor.
HTTP Request The HTTP request sent to the server to retrieve an HTML page, image or CSS file.
Requests are grouped within pages.
HTTP Response The HTTP response is the Web server's answer to an HTTP request.
Link Extractor The link extractor is used in a "Follow a link from the previous
request" -type request. This process extracts a link in the server response's
HTML code so that it can be used in the scenario.
See Also Variable Extractor.
List Variable A list variable is a variable whose values are sourced from a specific list within
NeoLoad.
See Also Variable.
Load Generator The load generator is a program controlled by the controller, which plays a
scenario while simulating a predefined number of users. A load generator is run
707
Glossary
by its load generator agent for each test. This term may refer either to the program
simulating the users, or to the machine on which it is installed.
Load Generator Agent The load generator agent responds to the NeoLoad controller's instructions to start
and stop the load generator for each test. The NeoLoad controller has an agent
and load generator built in for ease of use. Additional agents may be installed on
other machines if required.
Logical Action A logical action is used to enrich the content of a virtual user's behavior pattern.
Typical examples of logical actions are loops, to repeat a sub-series of web
pages, pauses, to represent a user's waiting time, and containers, which can
group several pages within a business transaction.
See Also Container.
Long Polling Long polling is a method used by the Push technology and is a hybrid of polling
and streaming. As with polling, it uses a mechanism whereby a request is sent by
the client to the server at regular intervals. As with streaming, the server keeps
the connection open to send messages in real time. The connection is periodically
interrupted in order to generate a new request.
See Also Polling, Streaming.
Monitored Machine A monitored machine is a server, or other device in the infrastructure, that is to be
monitored. A monitored machine may be a physical machine or a network device.
A monitored machine groups together several monitors.
See Also Monitor.
NTLM Authentication NTLM (NT LAN Manager) is an authentication protocol used by many Microsoft
servers. The protocol uses encryption to securely transmit passwords. See the
Microsoft [http://www.microsoft.com] website for further details.
See Also Basic Authentication.
Performance Counter A performance counter is a numeric value that shows the state of one of the
monitor's elements.
See Also Performance Indicator.
Performance Indicator A performance indicator is a text value, comprising several lines of text, that shows
the state of one of the monitor's elements.
Polling Polling is a mechanism used by the Push technology whereby a request is sent by
the client to the server at regular intervals. In return, the server updates the status of
each connected client. Between two polling requests, the server stores the updates
sent to the client in its memory until the next polling request is received.
See Also Push.
Population A population is a group of virtual user types which allows the application to be
tested using different business actions. One typical example is when testing a e-
business website with 90% of users browsing the catalog and 10% making an on-
line purchase.
708
Glossary
initiates the request for information. There are several Push methods: polling, long
polling or streaming.
See Also Polling, Streaming.
Push Message In Push technology, a Push message is a container of actions that defines the
actions or business transactions to be executed when a message is received. A Push
message is defined by a list of conditions that must be met for it to be executed.
See Also Push.
Recording Proxy The NeoLoad component which records the requests. It is seen as a proxy by the
browser and may connect to the server via a user proxy if required.
See Also User Proxy.
Regular Expression Regular expressions are used to find sub-strings that match a specified pattern.
In NeoLoad, they are used to define character strings for extraction (see Variable
Extractor) or rules for validating text (see Assertion).
Scenario A scenario sets out all the test parameters: duration, load policy (constant, ramp-
up, peak or custom), number of virtual users to be generated etc. NeoLoad can
manage several scenarios for each project.
See Also Virtual User.
SOAP SOAP (Simple Object Access Protocol) is a lightweight protocol for the exchange
of information in a decentralized, distributed environment. It is an XML-based
protocol that consists of three parts: an envelope that defines a framework for
describing what is in a message and how to process it, a set of encoding rules
for expressing instances of application-defined data types, and a convention for
representing remote procedure calls and responses. See W3C [http://www.w3.org/
TR/soap/] for more details.
See Also WSDL.
Standard Deviation Standard deviation is a measure of the variation in response times compared to
the average. A high value indicates wildly fluctuating response times, whereas a
low value indicates that the response times are consistent and stable.
Streaming Streaming is a mechanism used by the Push technology whereby a blocked request
is sent by the client to the server. In other words, the client never completely
finishes reading the server's response to the request, the server sending back
several separate response packets in the same flow.
See Also Push.
Think Time The think time is the time specified to simulate the time taken by a real user to
read one page before clicking to the next.
It's possible to use a global think time for all pages (use a variable to obtain a
dynamic value within an interval), or define a think time for each separate page.
See Also Variable.
TTFB (Time to First Byte) The time taken, in seconds, to receive the first byte of the server response.
Equivalent to the time taken by the server to start sending the response, excluding
download time.
709
Glossary
User Proxy A proxy in the usual sense: a proxy server used to connect to the web server.
See Also Recording Proxy.
Variable Variables are used to add dynamic content to a scenario, for example, by
submitting dynamic form parameters or connecting to the server using different
user accounts. The different types of variables include: counter, list, random
integer, random string, date....
See Also File Variable, List Variable.
Variable Extractor A variable extractor is used to extract content from a server response during a test
and assign the extracted content to a variable. This variable can then be used for
the rest of the scenario.
See Also Variable, Link Extractor.
Virtual User A virtual user simulates the browsing actions of an application's real user. It
consists of a series of web pages and may contain logical actions such as
containers, loops and think times in order to simulate more complex behavior
patterns.
Web Page A page or Web page is the web page as displayed by the web browser. It consists
of an HTML request and its sub-components, such as images or CSS files.
XPath XPath is a non-XML language used to describe one part of an XML document.
710
isFatalEnabled, 695
Index isInfoEnabled, 696
isWarnEnabled, 696
A L
Assertion, 517, 554, 650
List Variable, 497
Load Generator, 389, 408
C Load generator, 402
changeValue, 702 Load Scenario, 513
Classes Logger, 693
Logger, 693
RendezvousManager, 696 M
RuntimeContext, 699
marqueur, 571
VariableManager, 701
Methods
VirtualUser, 703
changeValue, 702
Container, 83, 402, 408, 408, 415, 465
debug, 694
currentVU, 700
error, 694
fail, 700, 701, 701
D fatal, 694
debug, 694 get, 704
getValue, 702
E hasRendezvous, 697
info, 694
error, 694
isDebugEnabled, 695
isEnabled, 698
F isErrorEnabled, 695
fail, 700, 701, 701 isFatalEnabled, 695
fatal, 694 isInfoEnabled, 696
Fields isWarnEnabled, 696
currentVU, 700 parseString, 703
id, 704 put, 704
name, 704 remove, 705
variableManager, 700 setCookieForServer, 705
File Variable, 497 setEnabled, 698
Form Extractor, 557 setValue, 703
stop, 706
G unblock, 699, 699
get, 704 unblockAll, 699
getValue, 702 warn, 696
H N
hasRendezvous, 697 name, 704
HTTP Request, 501, 504, 514, 558
HTTP Response, 514, 545, 557, 564 P
paramètre de framework, 576
I parseString, 703
id, 704 Population, 228, 388, 402, 408, 513
info, 694 put, 704
IP spoofing, 390
isDebugEnabled, 695 R
isEnabled, 698 Recording Proxy, 37
isErrorEnabled, 695 Regular Expression, 179, 518, 549, 672
711
Index
remove, 705
RendezvousManager, 696
RuntimeContext, 699
S
Scenario, 387
setCookieForServer, 705
setEnabled, 698
setValue, 703
SOAP, 111
SSL, 67, 487
stop, 706
T
Think time, 5
Think Time, 94, 463
U
unblock, 699, 699
unblockAll, 699
User proxy, 38
V
Variable, 545
Variable Extractor, 179, 545
variableManager, 700
VariableManager, 701
Variables, 186, 229
VirtualUser, 703
Virtual User, 498, 499, 506, 511, 513, 517, 649
Virtual User Container, 490
W
warn, 696
Web Service, 111
712