I

Section List

[Part I]

1. Introduction o 1.1 History o 1.2 The Future 2. Getting Started o 2.1 Requirements  2.1.1 Java Version  2.1.2 Operating Systems o 2.2 Optional  2.2.1 Java Compiler  2.2.2 SAX XML Parser  2.2.3 Email Support  2.2.4 SSL Encryption  2.2.5 JDBC Driver  2.2.6 Apache SOAP  2.2.7 BeanShell  2.2.8 Libraries for ActiveMQ 3.0 o 2.3 Installation  2.3.1 Downloading the Latest Release  2.3.2 Downloading Nightly Builds o 2.4 Running JMeter  2.4.1 JMeter's Classpath  2.4.2 Using a Proxy Server  2.4.3 Non-GUI Mode  2.4.4 Distributed Mode  2.4.5 Overriding Properties Via The Command Line  2.4.6 Logging and Error Messages  2.4.7 Full list of command-line options o 2.5 Configuring JMeter 3. Building a Test Plan o 3.1 Adding and Removing Elements o 3.2 Loading and Saving Elements o 3.3 Configuring Tree Elements o 3.4 Saving the Test Plan o 3.5 Running a Test Plan o 3.6 Error reporting 4. Elements of a Test Plan o 4.1 Thread Group o 4.2 Controllers  4.2.1 Samplers  4.2.2 Logic Controllers o 4.3 Listeners

      

4.4 Timers 4.5 Assertions 4.6 Configuration Elements 4.7 Pre-Processor Elements 4.8 Post-Processor Elements 4.9 Execution order 4.10 Scoping Rules 4.11 Properties and Variables 4.12 Using Variables to parameterise tests 5. Building a Web Test Plan o 5.1 Adding Users o 5.2 Adding Default HTTP Request Properties o 5.3 Adding Cookie Support o 5.4 Adding HTTP Requests o 5.5 Adding a Listener to View/Store the Test Results o 5.6 Logging in to a web-site 6. Building an Advanced Web Test Plan o 6.1 Handling User Sessions With URL Rewriting o 6.2 Using a Header Manager 7. Building a Database Test Plan o 7.1 Adding Users o 7.2 Adding JDBC Requests o 7.3 Adding a Listener to View/Store the Test Results 8. Building an FTP Test Plan o 8.1 Adding Users o 8.2 Adding Default FTP Request Properties o 8.3 Adding FTP Requests o 8.4 Adding a Listener to View/Store the Test Results 9a. Building an LDAP Test Plan o 9a.1 Adding Users o 9a.2 Adding Login Config Element o 9a.3 Adding LDAP Request Defaults o 9a.4 Adding LDAP Requests o 9a.5 Adding a Listener to View/Store the Test Results 9b. Building an Extended LDAP Test Plan o 9b.1 Adding Users o 9b.2 Adding LDAP Extended Request Defaults o 9b.3 Adding LDAP Requests o 9b.4 Adding a Listener to View/Store the Test Results 10. Building a Webservice Test Plan 11. Building a JMS Point to point Test Plan 12. Building a JMS topic Test Plan 13. Building a Monitor Test Plan 14. Listeners 15. Remote Testing 16. Best Practices o 16.1 Limit the Number of Threads o 16.2 Where to Put the Cookie Manager

o o o o o o o o o

16.3 Where to Put the Authorization Manager 16.4 Using the Proxy Server to record test scripts 16.5 User variables 16.6 Reducing resource requirements 16.7 BeanShell server 16.8 BeanShell scripting 16.9 Developing script functions in BeanShell, Javascript or Jexl etc. 16.10 Parameterising tests 17. Help! My boss wants me to load test our web app!

o o o o o o o o

[Part II]
    

18. Component Reference 19. Functions 20. Regular Expressions 21. Hints and Tips 22. Glossary

1. Introduction Apache JMeter is a 100% pure Java desktop application designed to load test client/server software (such as a web application ). It may be used to test performance both on static and dynamic resources such as static files, Java Servlets, CGI scripts, Java objects, databases , FTP servers , and more. JMeter can be used to simulate a heavy load on a server, network or object to test its strength or to analyze overall performance under different load types. Additionally, JMeter can help you regression test your application by letting you create test scripts with assertions to validate that your application is returning the results you expect. For maximum flexibility, JMeter lets you create these assertions using regular expressions. But please note that JMeter is not a browser. 1.1 History Stefano Mazzocchi of the Apache Software Foundation was the original developer of JMeter. He wrote it primarily to test the performance of Apache JServ (a project that has since been replaced by the Apache Tomcat project). We redesigned JMeter to enhance the GUI and to add functional-testing capabilities. 1.2 The Future We hope to see JMeter's capabilities rapidly expand as developers take advantage of its pluggable architecture. The primary goal of further development is to make JMeter the most useful regression testing tool as possible, without compromising JMeter's load-testing capabilities.

Java. FTP. The release contains all of the files you need to build and run most types of tests. of course. If you want to run JMS tests.g.2. you will need to download the appropriate jars from the JMS provider. and others) which give you more control over your Test Plans. if you are interested in testing a Web application.5 or higher. Finally. and JUnit. but does not include a JMS client implementation. Next. go through the appropriate section on how to build a specific type of Test Plan. JDBC. If you want to perform JDBC testing. JMeter does not come with any JDBC drivers. need the appropriate JDBC driver from your vendor. you can look into the various configuration elements (timers. please do not file bug reports if your JRE fails to run JMeter because of JRE implementation issues. assertions.1. start JMeter and go through the Building a Test Plan section of the User Guide to familiarize yourself with JMeter basics (for example.1 Requirements JMeter requires your computing environment meets some minimum requirements. . The other specific Test Plan sections are:         Advanced Web Test Plan JDBC FTP JMS Point-to-Point JMS Topic LDAP LDAP Extended WebServices (SOAP) Once you are comfortable with building and running JMeter Test Plans. For example. 2. e. See the JMeter Classpath section for details on installing additional jars. JMeter includes the JMS API jar. Because JMeter uses only standard Java APIs. 2. Web (HTTP/HTTPS). adding and removing elements). listeners. LDAP. then see the section Building a Web Test Plan .1 Java Version JMeter requires a fully compliant JVM 1. then you will.0 Getting Started The easiest way to begin using JMeter is to first download the latest production release and install it.

1 Java Compiler If you want to build the JMeter source or develop JMeter plugins. 2.default. JMeter requires that an implementation of SSL be provided. etc) Windows (98. 2.protocol" in jmeter.2 Optional If you plan on doing JMeter development.2. XP. If your version of Java does not include SSL support. whether trusted or not. Include the necessary encryption packages in JMeter's classpath .1.3 Email Support JMeter has extensive Email capabilities. JMeter has been tested and works under:    Unix (Solaris. You have the option of telling JMeter to use a different XML parser. regardless of validity periods etc.2. 2.2 SAX XML Parser JMeter comes with Apache's Xerces XML parser .4 and above. JMeter HTTP defaults to protocol level TLS. as is the case with Sun Java 1. Linux.properties or user. This can be changed by editting the JMeter property "https.2.properties file with the full classname of the parser implementation. It also has an SMTP sampler. This is to allow the maximum flexibility in testing servers.2 Operating Systems JMeter is a 100% Java application and should run correctly on any system that has a compliant Java implementation. 2. NT. It can send email based on test results.5 or higher. then it is possible to add an external implementation. The JMeter HTTP samplers are configured to accept all certificates.properties. To do so. Also.4 SSL Encryption To test a web server using SSL encryption (HTTPS). include the classes for the third-party parser in JMeter's classpath . and update the jmeter. .properties to register the SSL Provider. then you will need one or more optional packages listed below.2. then you will need a fully compliant JDK 1.3+ 2. this can be provided. update system.2. If the server requires a client certificate. and has a POP3(S)/IMAP(S) sampler. etc) OpenVMS Alpha 7.

Note: there can be problems (especially with client-server mode) if the directory path contains any spaces. The JMeter proxy server (see below) supports recording HTTPS (SSL) in versions after 2. Provided that you have a JRE/JDK correctly installed and the JAVA_HOME environment variable set. There may also be some information on the JMeter Wiki . The other required jars (such as commons-logging) are already included with JMeter.1/docs jakarta-jmeter-2. 2.3. Please refer to their documentation for details.3.3.There is also the SSL Manager . Make sure the file is a jar file.apache. 2.1): jakarta-jmeter-2.4 The SMTP sampler can optionally use a local trust store or trust all certificates. for greater control of certificates. the current version of ActiveMQ is 5.3 Installation We recommend that most users run the latest release .0_spec-1.3. so you just need to add the appropriate JMS Client implementation jar(s) from the JMS provider.3.2. Alternatively. not a zip.5 JDBC Driver You will need to add your database vendor's JDBC driver to the classpath if you want to do JDBC testing.2.1/lib/ .3.3.1/bin jakarta-jmeter-2.2. See http://activemq.2. The installation directory structure should look something like this (for version 2. e. See the JMeter Classpath section for more details on installing additional jars.1/extras jakarta-jmeter-2.g. You will need to add the jar activemq-all-5.7 Libraries for ActiveMQ JMS At the time of writing. add the jar activemq-core-5. 2.org/initial-configuration.jar. 2.2.1 jakarta-jmeter-2.3. there is nothing more for you to do.6 JMS client JMeter now includes the JMS API from Apache Geronimo.3. simply unzip the zip/tar file into the directory where you want JMeter to be installed.html for details.jar to your classpath. To install a release build.2.jar to the classpath. this requires the javax/management/j2ee classes which can be found in the Apache Geronimo jar geronimo-j2eemanagement_1.3.0. by storing it in the lib/ directory.

jakarta-jmeter-2.cmd . For example: set JVM_ARGS="-Xms1024m -Xmx1024m -Dpropname=propvalue" jmeter -t test.1/printable_docs You can rename the parent directory (i. the JMeter GUI should appear.bat (for Windows) or jmeter (for Unix) file.run JMeter (in GUI mode by default) jmeter-n.cmd .1) if you want.1/lib/ext jakarta-jmeter-2.cmd .start JMeter in server mode (calls jmeter script with appropriate parameters) jmeter.jmx . jakarta-jmeter-2.cmd and jmeter-n-r.. jmeter-server .sh .cmd .cmd .cmd.drop a JMX file on this to run a non-GUI test remotely jmeter-t.Run the Shutdown client to stop a non-GUI instance abruptly Note: the special name LAST can be used with jmeter-n.sh .3. should work on most Linux/Unix systems:       jmeter .CMD files require Win2K or later):         jmeter.4 Running JMeter To run JMeter. These files are found in the bin directory. mirror-server. Defines some JVM settings which may not work for all JVMs.drop a JMX file on this to run a non-GUI test jmeter-n-r.3.cmd .bat script.drop a JMX file on this to load it in GUI mode jmeter-server.1/lib/junit jakarta-jmeter-2.sh . Un*x script files.very basic JMeter script with no JVM options specified. 2.3.sh .bat .runs the JMeter Mirror Server in non-GUI mode shutdown.run JMeter (in GUI mode by default).runs the JMeter Mirror Server in non-GUI mode shutdown.Run the Shutdown client to stop a non-GUI instance gracefully stoptest. After a short pause. The environment variable JVM_ARGS can be used to override JVM settings in the jmeter.start JMeter in server mode mirror-server.Run the Shutdown client to stop a non-GUI instance abruptly It may be necessary to edit the jmeter shell script if some of the JVM options are not supported . Windows script files (the .Run the Shutdown client to stop a non-GUI instance gracefully stoptest.3.bat . but do not change any of the sub-directory names. jmeter-t.cmd and means the last test plan that was run interactively..e. run the jmeter. There are some additional scripts in the bin directory that you may find useful.

not just JMeter. Support jars (libraries etc) should be placed in the lib directory.1.used for JMeter components and add-ons If you have developed new JMeter components. or (since 2. then define the property search_paths in jmeter. for example: JVM_ARGS="-Xms1024m -Xmx1024m" jmeter -t test.apache.properties Note that setting the CLASSPATH environment variable will have no effect.] will override the HEAP settings in the script.properties. then you should jar them and copy the jar into JMeter's lib/ext directory.not the lib/ext directory Note: JMeter will only find . it is only intended for JMeter components.used for utility jars JMETER_HOME/lib/ext .jar files. The JVM_ARGS environment variable can be used to override or set additional JVM options. Do not use lib/ext for utility jars.org|localhost) . run the jmeter. You can also install utility Jar files in $JAVA_HOME/jre/lib/ext.4. To do so.g.2 Using a Proxy Server If you are testing from behind a firewall/proxy server. and the java command silently ignores the CLASSPATH variable. If you don't want to put JMeter extension jars in the lib/ext directory.classpath in jmeter.by the JVM you are using. Other jars (such as JDBC. [This occurs with all Java programs.4. *.zip. JMS implementations and any other support libaries needed by the JMeter code) should be placed in the lib directory .bat/jmeter file from a command line with the following parameters: -H [proxy server hostname or ip address] -P [proxy server port] -N [nonproxy hosts] (e.jmx [etc. and the -classpath/-cp options when -jar is used. 2. This is because JMeter is started with "java -jar".1 JMeter's Classpath JMeter automatically finds classes from jars in the following directories:   JMETER_HOME/lib . not .1) you can set the property user.] 2. JMeter will automatically find JMeter components in any jars found here. you may need to provide JMeter with the firewall/proxy server hostname and port number.

3 Non-GUI Mode (Command Line mode) For non-interactive testing.proxy.bat on each server host.if required] Example : jmeter -H my.4. which can be used for recording HTTP or HTTPS browser sessions. and --password JMeter also has its own in-built HTTP Proxy Server . . --proxyPort. 2.4 Server Mode For distributed testing . You can also use non-GUI mode to run remote tests. use the following command options -n This specifies JMeter is to run in non-gui mode -t [name of JMX file that contains the Test Plan].4.jtl -H my. This is not to be confused with the proxy settings described above. To do so. To start the server(s). run JMeter in server mode on the remote node(s). and then control the server(s) from the GUI.server -P 8000 -u username -a password -N localhost Alternatively.jmx -l log.server -P 8000 2. you can use --proxyHost.-u [username for proxy authentication .if required] -a [password for proxy authentication .proxy. -l [name of JTL file to log sample results to]. you may choose to run JMeter without the GUI. -j [name of JMeter run log file]. -r Run the test in the servers specified by the JMeter property "remote_hosts" -R [list of remote servers] Run the test in the specified remote servers The script also lets you specify the optional firewall/proxy server information: -H [proxy server hostname or ip address] -P [proxy server port] Example : jmeter -n -t my_test. --username. which are used when JMeter makes HTTP or HTTPS requests itself. run jmeter-server/jmeter-server.

The script also lets you specify the optional firewall/proxy server information: -H [proxy server hostname or ip address] -P [proxy server port]

Example : jmeter-server -H my.proxy.server -P 8000 If you want the server to exit after a single test has been run, then define the JMeter property server.exitaftertest=true. To run the test from the client in non-GUI mode, use the following command:
jmeter -n -t testplan.jmx -r [-Gprop=val] [-Gglobal.properties] [-Z] where: -G is used to define JMeter properties to be set in the servers -X means exit the servers at the end of the test -Rserver1,server2 - can be used instead of -r to provide a list of servers to start Overrides remote_hosts, but does not define the property.

2.4.5 Overriding Properties Via The Command Line Java system properties, JMeter properties, and logging properties can be overriden directly on the command line (instead of modifying jmeter.properties). To do so, use the following options: -D[prop_name]=[value] - defines a java system property value. -J[prop name]=[value] - defines a local JMeter property. -G[prop name]=[value] - defines a JMeter property to be sent to all remote servers. -G[propertyfile] - defines a file containing JMeter properties to be sent to all remote servers. -L[category]=[priority] - overrides a logging setting, setting a particular category to the given priority level. The -L flag can also be used without the category name to set the root logging level. Examples :
jmeter -Duser.dir=/home/mstover/jmeter_stuff \ -Jremote_hosts=127.0.0.1 -Ljmeter.engine=DEBUG jmeter -LDEBUG

N.B. The command line properties are processed early in startup, but after the logging system has been set up. Attempts to use the -J flag to update log_level or log_file properties will have no effect. 2.4.6 Logging and error messages JMeter does not generally use pop-up dialog boxes for errors, as these would interfere with running tests. Nor does it report any error for a mis-spelt variable or function; instead the reference is just used as is. See Functions and Variables for more information . If JMeter detects an error during a test, a message will be written to the log file. The log file name is defined in the jmeter.properties file (or using the -j option, see below). It defaults to jmeter.log , and will be found in the directory from which JMeter was launched. JMeter versions after 2.2 added a new command-line option, -j jmeterlogfile. This is processed after the initial properties file is read, and before any further properties are processed. It therefore allows the default of jmeter.log to be overridden. The jmeter scripts that take a test plan name as a parameter (e.g. jmeter-n.cmd) have been updated to define the log file using the test plan name, e.g. for the test plan Test27.jmx the log file is set to Test27.log. When running on Windows, the file may appear as just jmeter unless you have set Windows to show file extensions. [Which you should do anyway, to make it easier to detect viruses and other nasties that pretend to be text files...] As well as recording errors, the jmeter.log file records some information about the test run. For example:

Contents
No table of contents entries found.
10/17/2003 12:19:20 PM 10/17/2003 12:19:45 PM c:\mytestfiles\BSH.jmx 10/17/2003 12:19:52 PM the test! 10/17/2003 12:19:52 PM threads for group BSH. 10/17/2003 12:19:52 PM on error 10/17/2003 12:19:52 PM INFO INFO INFO - jmeter.JMeter: Version 1.9.20031002 - jmeter.gui.action.Load: Loading file: - jmeter.engine.StandardJMeterEngine: Running

INFO - jmeter.engine.StandardJMeterEngine: Starting 1 Ramp up = 1. INFO - jmeter.engine.StandardJMeterEngine: Continue INFO - jmeter.threads.JMeterThread: Thread BSH1-1

started 10/17/2003 12:19:52 PM INFO done 10/17/2003 12:19:52 PM INFO ended

- jmeter.threads.JMeterThread: Thread BSH1-1 is - jmeter.engine.StandardJMeterEngine: Test has

The log file can be helpful in determining the cause of an error, as JMeter does not interrupt a test to display an error dialogue. 2.4.7 Full list of command-line options Invoking JMeter as "jmeter -?" will print a list of all the command-line options. These are shown below.
-h, --help print usage information and exit -v, --version print the version information and exit -p, --propfile {argument} the jmeter property file to use -q, --addprop {argument} additional property file(s) -t, --testfile {argument} the jmeter test(.jmx) file to run -j, --jmeterlogfile {argument} the jmeter log file -l, --logfile {argument} the file to log samples to -n, --nongui run JMeter in nongui mode -s, --server run the JMeter server -H, --proxyHost {argument} Set a proxy server for JMeter to use -P, --proxyPort {argument} Set proxy server port for JMeter to use -u, --username {argument} Set username for proxy server that JMeter is to use -a, --password {argument} Set password for proxy server that JMeter is to use -J, --jmeterproperty {argument}={value} Define additional JMeter properties -G, --globalproperty (argument)[=(value)] Define Global properties (sent to servers) e.g. -Gport=123 or -Gglobal.properties -D, --systemproperty {argument}={value} Define additional System properties -S, --systemPropertyFile {filename} a property file to be added as System properties -L, --loglevel {argument}={value} Define loglevel: [category=]level e.g. jorphan=INFO or jmeter.util=DEBUG -r, --runremote (non-GUI only)

properties which has the default value user.SAXParser Required No No remote_hosts Comma-delimited list of remote JMeter hosts (or host:port if required)... 2.properties in the /bin directory or create your own copy of the jmeter.log' If the special name LAST is used for the -t.g. You can specify an implementation as your XML parser. (non-GUI only) Start these remote servers (overrides remote_hosts) -d. . No This will allow you to control those servers from this machine's GUI A list of components you do not want to see in JMeter's menus. --homedir {argument} the jmeter home directory to use -X.e.2. The file will be automatically loaded if it is found in the current directory or if it is found in the JMeter bin directory.provider xml. The default value is: org.apache.Start remote servers (as defined by the jmeter property remote_hosts) -R. system.parser Description You can specify the class for your SSL implementation if you don't want to use the built-in Java implementation. you can define additional JMeter properties in the file defined by the JMeter property user. then JMeter takes that to mean the last test plan that was run in interactive mode. You may list their classname or their class label (the not_in_menu . Note: since 2. 'jmeter_'yyyyMMddHHmmss'.xerces.properties . Parameters Attribute ssl. Similarly.parsers.5 Configuring JMeter If you wish to modify the properties with which JMeter runs you need to either modify the jmeter. you may wish to No customize your JMeter to show only those components you are interested in. If you are running JMeter in a distributed environment. As JMeter has more and more components added. --remotestart server1. -j or -l flags.properties and specify it in the command line.. --remoteexit Exit the remote servers at end of test (non-GUI) Note: the JMeter log file name is formatted as a SimpleDateFormat (applied to the current date) if it contains paired single-quotes. list the machines where you have JMeter remote servers running.properties is used to update system properties.

A complete test plan will consist of one or more Thread Groups.properties. This is in addition to any jars found in the lib/ext directory.2 Loading and Saving Elements . No No Name of file containing additional JMeter properties.string that appears in JMeter's UI) here. Building a Test Plan A test plan describes a series of steps JMeter will execute when run.properties files for further information on other settings you can change. sample generating controllers. logic conrollers. No The command line options and properties files are processed in the following order:        -p propfile jmeter.properties List of paths (separated by . timers. Name of file containing additional system properties. Alternatively.properties is loaded all other command-line options are processed See also the comments in the jmeter.properties (or the file from the -p option) is then loaded -j logfile Logging is initialised user. To remove an element. 3. and choose the "remove" option. 3. make sure the element is selected. elements can be loaded from file and added by choosing the "merge" or "open" option. 3. listeners. and choosing a new element from the "add" list. These are added after the initial property file.properties and system.) that JMeter will search for JMeter add-on classes.classpath user. and configuration elements. right-click on the element. and they will no longer appear in the menus. user.1 Adding and Removing Elements Adding elements to a test plan can be done by right-clicking on an element in the tree. for example additional samplers. but before the -q and -J options No are processed.properties system. assertions. This is in addition to any jars found in the lib directory. search_paths user. These are added before the -S and -D options are processed.properties is loaded system. List of paths that JMeter will search for utility classes.

it is no longer necessary to select the Test Plan element first).. you can save test tree fragments and individual elements for later use. To save the Test Plan. When JMeter is running.To load an element from file. but it can be saved separately as above. Alternatively. then JMeter is . and select the "merge" option.4 Saving the Test Plan Although it is not required. and then click your right mouse button to access the "Save Selection As . You can also check the "Run" menu. To save only the elements located in a particular "branch" of the Test Plan tree. it shows a small green box at the right hand end of the section just under the menu bar. To save tree elements." from the File menu (with the latest release.. we recommend that you save the Test Plan to a file before running it." option. The workbench is not automatically saved with the test plan. 3. Choose the file where your elements are saved.5 Running a Test Plan To run your test plan. select the Test Plan element in the tree from which to start the "branch". select "Save" or "Save Test Plan As . These controls allow you to configure the behavior of that particular test element. and "Stop" is enabled." from the Edit menu.. 3. plus all child elements beneath it... JMeter allows you to save the entire Test Plan tree or only a portion of it. choose "Start" (Control + r) from the "Run" menu item..3 Configuring Tree Elements Any element in the test tree will present controls in JMeter's right-hand frame. right click on an element and choose the "Save Selection As . In this way.. JMeter will save the element selected.. JMeter will merge the elements into the tree. 3. The Test Tree itself can be manipulated by dragging and dropping components around the test tree. select the appropriate Test Plan element and then select "Save Selection As . right click on the existing tree element to which you want to add the loaded element. If "Start" is disabled. What can be configured for an element depends on what type of element it is." menu item.

they do not include any threads started on remote systems when using client-server mode. So in versions after 2. These only apply to a locally run test. please check the log file in case any errors have been reported (e. The numbers to the left of the green box are the number of active threads / total number of threads. Instead these are stored as attributes of the sample result.stops the threads immediately if possible. these will appear on the command console.').') . [This can be changed using the JMeter propertyjmeterengine. but if it fails.6 Stopping a Test There are two types of stop command available from the menu:   Stop (Control + '.2. JMeter non-GUI mode will listen for commands on a specific port (default 4445.graceful shutdown StopTestNow .running your test plan (or. If a test is not behaving as you expect. The Stop command can be retried.file not found) are not normally reported in the log file.threadstop.'. perhaps a syntax error in a function call). HTTP 404 . The stop command will check that all threads have stopped within the default timeout.requests the threads to stop at the end of any current work.7 Error reporting JMeter reports warnings and errors to the jmeter. 3.log file.port ).cmd|.cmd|. Close the Shutdown dialog box and select Run/Stop. it thinks it is). In Versions of JMeter after 2. which is 5000 ms = 5 seconds. there is no Menu. Shutdown (Control + '. then a message is displayed.immediate shutdown These commands can be sent by using the shutdown[.3. When running JMeter in non-GUI mode. Versions of JMeter after 2.g.sh] or stoptest[.nongui. or just press Control + '. The status of a sample result can be seen in the various different Listeners. Sampling errors (e. The scripts are to be found in the JMeter bin directory. as well as some information on the test run itself. see the JMeter propertyjmeterengine. .3.wait ] If the threads have not stopped.3. Just occasionally there may be some errors that JMeter is unable to trap and log. then it is necessary to exit JMeter to clean up.sh] script respectively. Will not interrupt any active samples. and JMeter does not react to keystrokes such as Control + '.'.2. at least. The modal shutdown dialog box will remain active until all threads have stopped. many samplers are now Interruptible which means that active samples can be terminated early.2 allow a Stop to be initiated if Shutdown is taking too long.g. The commands currently supported are:   Shutdown . 3.

4. Elements of a Test Plan

The Test Plan object has a checkbox called "Functional Testing". If selected, it will cause JMeter to record the data returned from the server for each sample. If you have selected a file in your test listeners, this data will be written to file. This can be useful if you are doing a small run to ensure that JMeter is configured correctly, and that your server is returning the expected results. The consequence is that the file will grow huge quickly, and JMeter's performance will suffer. This option should be off if you are doing stress-testing (it is off by default). If you are not recording the data to file, this option makes no difference. You can also use the Configuration button on a listener to decide what fields to save.
4.1 ThreadGroup

Thread group elements are the beginning points of any test plan. All controllers and samplers must be under a thread group. Other elements, e.g. Listeners, may be placed directly under the test plan, in which case they will apply to all the thread groups. As the name implies, the thread group element controls the number of threads JMeter will use to execute your test. The controls for a thread group allow you to:
  

Set the number of threads Set the ramp-up period Set the number of times to execute the test

Each thread will execute the test plan in its entirety and completely independently of other test threads. Multiple threads are used to simulate concurrent connections to your server application. The ramp-up period tells JMeter how long to take to "ramp-up" to the full number of threads chosen. If 10 threads are used, and the ramp-up period is 100 seconds, then JMeter will take 100 seconds to get all 10 threads up and running. Each thread will start 10 (100/10) seconds after the previous thread was begun. If there are 30 threads and a ramp-up period of 120 seconds, then each successive thread will be delayed by 4 seconds. Ramp-up needs to be long enough to avoid too large a work-load at the start of a test, and short enough that the last threads start running before the first ones finish (unless one wants that to happen). Start with Ramp-up = number of threads and adjust up or down as needed. By default, the thread group is configured to loop once through its elements. Version 1.9 introduces a test run scheduler . Click the checkbox at the bottom of the Thread Group panel to reveal extra fields in which you can enter the start and end times of the run.

When the test is started, JMeter will wait if necessary until the start-time has been reached. At the end of each cycle, JMeter checks if the end-time has been reached, and if so, the run is stopped, otherwise the test is allowed to continue until the iteration limit is reached. Alternatively, one can use the relative delay and duration fields. Note that delay overrides starttime, and duration over-rides end-time.
4.2 Controllers

JMeter has two types of Controllers: Samplers and Logical Controllers. These drive the processing of a test. Samplers tell JMeter to send requests to a server. For example, add an HTTP Request Sampler if you want JMeter to send an HTTP request. You can also customize a request by adding one or more Configuration Elements to a Sampler. For more information, seeSamplers . Logical Controllers let you customize the logic that JMeter uses to decide when to send requests. For example, you can add an Interleave Logic Controller to alternate between two HTTP Request Samplers. For more information, see Logical Controllers .
4.2.1 Samplers

Samplers tell JMeter to send requests to a server and wait for a response. They are processed in the order they appear in the tree. Controllers can be used to modify the number of repetitions of a sampler. JMeter samplers include:
      

FTP Request HTTP Request JDBC Request Java object request LDAP Request SOAP/XML-RPC Request WebService (SOAP) Request

Each sampler has several properties you can set. You can further customize a sampler by adding one or more Configuration Elements to the Test Plan.

If you are going to send multiple requests of the same type (for example, HTTP Request) to the same server, consider using a Defaults Configuration Element. Each controller has one or more Defaults elements (see below). Remember to add a Listener to your test plan to view and/or store the results of your requests to disk. If you are interested in having JMeter perform basic validation on the response of your request,

add an Assertion to the sampler. For example, in stress testing a web application, the server may return a successful "HTTP Response" code, but the page may have errors on it or may be missing sections. You could add assertions to check for certain HTML tags, common error strings, and so on. JMeter lets you create these assertions using regular expressions. JMeter's built-in samplers
4.2.2 Logic Controllers

Logic Controllers let you customize the logic that JMeter uses to decide when to send requests. Logic Controllers can change the order of requests coming from their child elements. They can modify the requests themselves, cause JMeter to repeat requests, etc. To understand the effect of Logic Controllers on a test plan, consider the following test tree:

Test Plan o Thread Group  Once Only Controller  Login Request (an HTTP Request )  Load Search Page (HTTP Sampler)  Interleave Controller  Search "A" (HTTP Sampler)  Search "B" (HTTP Sampler)  HTTP default request (Configuration Element)  HTTP default request (Configuration Element)  Cookie Manager (Configuration Element)

The first thing about this test is that the login request will be executed only the first time through. Subsequent iterations will skip it. This is due to the effects of the Once Only Controller . After the login, the next Sampler loads the search page (imagine a web application where the user logs in, and then goes to a search page to do a search). This is just a simple request, not filtered through any Logic Controller. After loading the search page, we want to do a search. Actually, we want to do two different searches. However, we want to re-load the search page itself between each search. We could do this by having 4 simple HTTP request elements (load search, search "A", load search, search "B"). Instead, we use the Interleave Controller which passes on one child request each time through the test. It keeps the ordering (ie - it doesn't pass one on at random, but "remembers" its place) of its child elements. Interleaving 2 child requests may be overkill, but there could easily have been 8, or 20 child requests. Note the HTTP Request Defaults that belongs to the Interleave Controller. Imagine that "Search A" and "Search B" share the same PATH info (an HTTP request specification includes domain, port, method, protocol, path, and arguments, plus other optional items). This makes sense - both are search requests, hitting the same back-end search engine (a servlet or cgi-script, let's say).

but it demonstrates the feature. added to the Thread Group. this is a minor benefit at best. We recommend that you specify a delay by adding one of the available timers to your Thread Group. Otherwise. we can abstract that information out to a single Configuration Element. and whether to use CSV or XML format. you can test your application on a different server simply by changing one field in your Test Plan. Other listeners provide summary or aggregation information. and put that information into the Configuration Element. JMeter could overwhelm your server by making too many .3 Listeners Listeners provide access to the information JMeter gathers about the test cases while JMeter runs. If you do not add a delay. and thus. The last element is a HTTP Cookie Manager . a JMeter thread sends requests without pausing between each request.otherwise JMeter will ignore cookies. There is also a Configuration button which can be used to choose which fields to save. See the list of built-in Logic Controllers . we leave the PATH field blank for those requests. including directly under the test plan. you'd have to edit each and every Sampler. When the Interleave Controller "passes on" requests from "Search A" or "Search B". we ensure that all HTTP requests will share the same cookies. and instead. It is extremely useful in web testing to leave the DOMAIN field blank in all your HTTP Sampler elements. the only difference is in the way the data is presented on the screen.4 Timers By default. By adding it at the Thread Group level. and can display basic HTML and XML representations of the response. So. Every listener in JMeter provides a field to indicate the file to store data to.Note that all Listeners save the same data. Logic Controllers can be combined to achieve various results. 4. listeners can direct the data to a file for later use. They will collect data only from elements at or below their level. The Graph Results listener plots the response times on a graph. A Cookie Manager should be added to all web tests . It fills in the blanks of any Request that passes through. it uses this Configuration Element exactly as described above. put that information into an HTTP default request element. 4. In this case. this time added to the Thread Group itself. By doing so.Rather than configure both HTTP Samplers with the same information in their PATH field. There are several listeners that come with JMeter. Additionally. The next element in the tree is another HTTP default request. The Thread Group has a built-in Logic Controller. Listeners can be added anywhere in the test. it will fill in the blanks with values from the HTTP default request Configuration Element. The "View Results Tree" Listener shows details of sampler requests and responses.

Timers can be added as children of samplers or controllers in order to restrict the samplers to which they are applied. Using an assertion. To provide a pause at a single place in a test plan. Although it does not send requests (except for HTTP Proxy Server ). 4. "</HTML>". Note that assertions apply to all samplers which are in its scope . For example. and will count towards the error %age for example in the Aggregate and Summary reports. add an Assertion Listener to the Thread Group. Also. For example. You can add an assertion to any Sampler. The Cookie Manager is accessible to the HTTP requests "Web Page 1" and "Web Page 2". For instance. If you choose to add more than one timer to a Thread Group. then it will mark this as a failed request. Since we placed "Web Defaults 1" inside a Loop Controller. . the Cookie Manager will only be accessible to HTTP Request Controllers you place inside the Simple Logic Controller (see figure 1). you can essentially "test" that your application is returning the results you expect it to. and you can indicate that the response is to contain the text. The timer will cause JMeter to delay a certain amount of time before each sampler which is in its scope .5 Assertions Assertions allow you to assert facts about responses received from the server being tested. we defined two HTTP Request Defaults elements. you can add an assertion to a HTTP Request that checks for the text. A configuration element is accessible from only inside the tree branch where you place the element.6 Configuration Elements A configuration element works closely with a Sampler. The text you specify can be a Perl-style regular expression. it can add to or modify requests. if you place an HTTP Cookie Manager inside a Simple Logic Controller. "Web Defaults 1" and "Web Defaults 2". Failed Assertions will also show up in the Tree View and Table Listeners. 4. or that it should match the whole response. To view the assertion results. For example.requests in a very short amount of time. one can use the Test Action Sampler. To restrict the assertion to a single sampler. a configuration element inside a tree branch has higher precedence than the same element in a "parent" branch. JMeter will then check that the text is present in the HTTP response. If JMeter cannot find the text. you can assert that the response to a query will contain some particular text. but not "Web Page 3". JMeter takes the sum of the timers and pauses for that amount of time before executing the samplers to which the timers apply. add the assertion as a child of the sampler.

7 Pre-Processor Elements A Pre-Processor executes some action prior to a Sampler Request being made. A Pre-Processor is most often used to modify the settings of a Sample Request just before it runs. no matter where it is placed.Test Plan Showing Accessability of Configuration Elements The User Defined Variables Configuration element is different.only "Web Page 2" can access it. then it will execute just prior to that sampler element running.8 Post-Processor Elements A Post-Processor executes some action after a Sampler Request has been made. 2.9 Execution order 1. If a PostProcessor is attached to a Sampler element. often to extract values from it. The other HTTP requests will use "Web Defaults 2". 6. 4. A Post-Processor is most often used to process the response data. then it will execute just after that sampler element runs. 3. 4. 4. See the scoping rules for more details on when Post-Processors are executed. Figure 1 . Configuration elements Pre-Processors Timers Sampler Post-Processors (unless SampleResult is null) Assertions (unless SampleResult is null) . It is processed at the start of a test. 4. See the scoping rules for more details on when Pre-Processors are executed. If a PreProcessor is attached to a Sampler element. or to update variables that aren't extracted from response text. For simplicity. since we placed it in the Thread Group (the "parent" of all other branches). 5. it is suggested that the element is placed only at the start of a Thread Group.

[Within a type. Assertions.10 Scoping Rules The JMeter test tree contains elements that are both hierarchical and ordered. Config Elements.7. and the type of test element. Pre- . Listeners (unless SampleResult is null) Please note that Timers. Logic Controllers and Samplers are processed in the order in which they appear in the tree. For example. in the following test plan:  Controller o Post-Processor 1 o Sampler 1 o Sampler 2 o Timer 1 o Assertion 1 o Pre-Processor 1 o Timer 2 o Post-Processor 2 The order of execution would be: Pre-Processor 1 Timer 1 Timer 2 Sampler 1 Post-Processor 1 Post-Processor 2 Assertion 1 Pre-Processor 1 Timer 1 Timer 2 Sampler 2 Post-Processor 1 Post-Processor 2 Assertion 1 4. Some elements in the test trees are strictly hierarchical (Listeners. Pre. Other test elements are processed according to the scope in which they are found. Post-Procesors. elements are processed in the order in which they appear in the tree].and PostProcessors are only processed if there is a sampler to which they apply.

An Assertion. Assertions. this time using Timers: . Other elements are hierarchical. If its parent is a Controller. Two. One. samplers). you will create an ordered list of sample request (via Samplers) that represent a set of steps to be executed. When you create your test plan. then it affects all requests that are descendants of that Controller. Four. Three. In the following test tree: Hierarchy example Assertion #1 is applied only to Request One. If its parent is a request. while Assertion #2 is applied to Requests Two and Three. and you can read about these specific controllers in the component reference .Processors. is hierarchical in the test tree. Some controllers affect the order of their subelements. then it is applied to that request. Timers). These requests are often organized within controllers that are also ordered. and some are primarily ordered (controllers. Another example. Given the following test tree: Example test tree The order of requests will be. for instance.

JMeter variables are local to each thread. and are mostly used to define some of the defaults JMeter uses. only one Manager is used. For example the property remote_hosts defines the servers that JMeter will try to run remotely. Timer #2 will affect all the requests. Assertion #1 will apply only to Request Three. Properties are global to jmeter. Properties can be referenced in test plans . then you will see how it works. and each time collecting all the configuration elements of that parent. However. If more than one Manager is in the scope of a Sampler. the requests are named to reflect the order in which they will be executed.properties (see Gettting Started . If a variable is updated by a thread. The settings from the Configuration Default elements are merged into a set of values that the Sampler has access to. the settings from the Managers are not merged. to its parent.see Functions . The Configuration elements Header Manager.read a property .11 Properties and Variables JMeter properties are defined in jmeter.but cannot be used for thread-specific values. For example . Timer #1 will apply to Requests Two. Three. or they may be different. only the thread copy of the variable is changed.complex example In this example. If you imagine each Request being passed up the tree branches. but there is currently no way to specify which is used. 4.Configuring JMeter for more details). Hopefully these examples make it clear how configuration (hierarchical) elements are applied. and Four (notice how order is irrelevant for hierarchical elements). Cookie Manager and Authorization manager are treated differently from the Configuration Default elements. then to its parent's parent. etc. The values may be the same for each thread.

you might define the following on the Test Plan: HOST THREADS LOOPS www. or the number of threads in a thread group. Other elements such as the User Parameters Pre-Processor or Regular Expression Extractor Post-Processor may be used to redefine the same variables (or create new ones). Both variables and properties are case-sensitive. and if left alone. You may wish to use a different naming convention for these.example. then the last one takes effect. The setProperty function can be used to define a JMeter property. Also consider which items need to be local to a thread .com 10 20 You can refer to these in the test plan as ${HOST} ${THREADS} etc.20)} .10)} ${__P(loops. 4. the name of a host. When deciding how to structure a Test Plan. These redefinitions only apply to the current thread.for example counters or values extracted with the Regular Expression Post-Processor. make a note of which items are constant for the run. Decide on some variable names for these . see Functions and Variables Note that the values defined by the Test Plan and the User Defined Variables configuration element are made available to the whole test plan at startup. just change the value of the HOST variable. Once a thread has started. but becomes tedious when testing lots of different combinations.example. So you can use them as short-hand for expressions that appear frequently in a test plan. will not change value.www. For example.12 Using Variables to parameterise tests Variables don't have to vary . and these can be used later by the same thread.perhaps use a naming convention such as prefixing them with C_ or K_ or using uppercase only to distinguish them from variables that need to change during the test.should that be needed. but which may vary between runs. but which may change between runs.the Regular Expression ExtractorPost-Processor will set its variables according to the sample that its thread has read. One solution is to use a property to define the value of the variables. If the same variable is defined by multiple UDV elements. Or for items which are constant during a run. This works fine for small numbers of tests. If you later want to change the host. for example: HOST THREADS LOOPS ${__P(host. the initial set of variables is copied to each thread. For example. These are global to the test plan.they can be defined once. For details of how to reference variables and functions. so can be used to pass information between threads .com)} ${__P(threads.

Also. Building a Web Test Plan In this section.1 Adding Users The first step you want to do with every JMeter Test Plan is to add a Thread Group element. you will use the following elements: Thread Group . you need to modify the default properties.. You should now see the Thread Group element under Test Plan. Go ahead and add the ThreadGroup element by first selecting the Test Plan. and the how many requests they should send.. and then select Add --> ThreadGroup. Next. If you do not see the element. You will create five users that send requests to two pages on the Jakarta Web site.You can then change some or all of the values on the command-line as follows: jmeter . then "expand" the Test Plan tree by clicking on the Test Plan element. -Jhost=www3. You should now see the Thread Group Control Panel in the right section of the JMeter window (see Figure 5.org -Jloops=13 5. To construct the Test Plan. if you have not already selected it. andGraph Results . 5. see Building an Advanced Web Test Plan . you will learn how to create a basic Test Plan to test a Web site. So. clicking your right mouse button to get the Add menu. The Thread Group tells JMeter the number of users you want to simulate.1 below) . you will tell the users to run their tests twice. HTTP Request . the total number of requests is (5 users) x (2 requests) x (repeat 2 times) = 20 HTTP requests. Select the Thread Group element in the tree. HTTP Request Defaults . For a more advanced Test Plan.example. how often the users should send requests.

enter Jakarta Users. then JMeter will run your test only once. the Ramp-Up Period. In the name field. the Control Panel automatically accepts your changes as you make them. you have to manually accept changes you make in a Control Panel. However.2 for the completed Jakarta Users Thread Group. . select the Forever checkbox. To have JMeter repeatedly run your Test Plan. For example. If you enter a loop count value of 1. then the delay between starting users would be 1 second (5 users / 5 seconds = 1 user per second). the tree will be updated with the new text after you leave the Control Panel (for example. If you change the name of an element. This property tells JMeter how many times to repeat your test. leave the the default value of 1 seconds. In most applications. if you enter a Ramp-Up Period of 5 seconds. In the next field. See Figure 5.Figure 5.1. if we have 5 users and a 5 second Ramp-Up Period. Finally enter a value of 2 in the Loop Count field. If you set the value to 0. Thread Group with Default Values Start by providing a more descriptive name for our Thread Group. when selecting another tree element). in JMeter. JMeter will finish starting all of your users by the end of the 5 seconds. then JMeter will immediately start all of your users. So. Next. This property tells JMeter how long to delay between starting each user. increase the number of users (called threads) to 5.

it is time to define the tasks that they will be performing. you will specify the default settings for your HTTP requests. you will add HTTP Request elements which use some of the default settings you specified here. Jakarta Users Thread Group 5.3. And then.2 Adding Default HTTP Request Properties Now that we have defined our users. Begin by selecting the Jakarta Users (Thread Group) element. select this new element to view its Control Panel (see Figure 5. In this section. .2. Click your right mouse button to get the Add menu. Then.3).Figure 5. and then select Add --> Config Element --> HTTP Request Defaults. in section 5.

org. HTTP Request Defaults Like most JMeter elements. leave this field with the default value.3. It simply defines the default values that the HTTP Request elements use. jakarta. This is the only field that we will specify a default. all HTTP requests will be sent to the same Web server. For the Test Plan that you are building. The HTTP Request Defaults element does not tell JMeter to send an HTTP request. Enter this domain name into the field. In this example. Skip to the next field.4 for the completed HTTP Request Defaults element . the HTTP Request Defaults Control Panel has a name field that you can modify. See Figure 5. so leave the remaining fields with their default values. which is the Web Server's Server Name/IP.Figure 5.apache.

simply add anHTTP Cookie Manager to each Thread Group in your test plan. Start by adding the first HTTP Request to the Jakarta Users element (Add --> Sampler --> HTTP Request).org/site/guidelines. or from the right-click pop-up menu.html).4. HTTP Defaults for our Test Plan 5. To add the HTTP Cookie Manager . simply select the Thread Group .3 Adding Cookie Support Nearly all web testing should use cookie support. This will ensure that each thread gets its own cookies. select the HTTP Request element in the tree and edit the following properties (see Figure 5.apache. but shared across all HTTP Request objects. The first one is for the Jakarta home page (http://jakarta. Then.5): . we need to make two HTTP requests. unless your application specifically doesn't use cookies.4 Adding HTTP Requests In our Test Plan. To add cookie support.apache. and choose Add --> Config Element --> HTTP Cookie Manager.Figure 5. either from the Edit Menu.org/). JMeter sends requests in the order that they appear in the tree. and the second one is for the Project Guidelines page (http://jakarta. 5.

5. HTTP Request for Jakarta Home Page Next. . Figure 5. add the second HTTP Request and edit the following properties (see Figure 5. Remember that you do not have to set the Server Name field because you already specified this value in the HTTP Request Defaults element. Set the Path field to "/".6: 1.html". Change the Name field to "Home Page". 2. Set the Path field to "/site/guidelines.1. 2. Change the Name field to "Project Guidelines".

or select the Browse button and browse to a directory and then enter a filename. Select the Jakarta Users element and add a Graph Results listener (Add --> Listener --> Graph Results).5 Adding a Listener to View Store the Test Results The final element you need to add to your Test Plan is a Listener . This element is responsible for storing all of the results of your HTTP requests in a file and presenting a visual model of the data. You can either type it into the filename field. HTTP Request for Jakarta Project Guidelines Page 5.6. you need to specify a directory and filename of the output file. Next. .Figure 5.

Graph Results Listener 5. You'll need to know the names of the fields used by the form. Click the Add button twice and enter the username and password details. and a button to submit the form. add an HTTP Request. passing the values of the form items as parameters. To do this in JMeter. [If this is difficult to do. . These can be found out by inspecting the code of the login page. you can use the JMeter Proxy Recorder to record the login sequence. Sometimes the login form contains additional hidden fields. In a web-browser.Figure 5. and the target page. the login will be shown as a form for the user name and password.7.6 Logging in to a web-site It's not the case here. The button generates a POST request. and set the method to POST. These will need to be added as well.] Set the path to the target of the submit button. but some web-sites require you to login before permitting you to perform certain actions.

8. . Building an Advanced Web Test Plan In this section. Sample HTTP login request 6. see Building a Web Test Plan .Figure 5. you will learn how to create advanced Test Plans to test a Web site. For an example of a basic Test Plan.

If the request already has a value. To respond correctly to URL rewriting. then you'll need to do a bit of extra work to test your site. thus assuring that it will only affect requests under that SimpleController. rather than a request parameter . it will be replaced. JMeter needs to parse the HTML received from the server and retrieve the unique session ID. and it will find it and add it to each request.1 Handling User Sessions With URL Rewriting If your web application uses URL rewriting rather than cookies to save session information. Note that the URL Re-writing modifier is added to the SimpleController.Test Tree In Figure 2. then the last found session id will be saved. Figure 1 .6. In Figure 1 is shown a test plan using URL rewriting. Use the appropriate HTTP URL Re-writing Modifier to accomplish this. we see the URL Re-writing modifier GUI. and will be used if the previous HTTP sample does not contain a session id. Simply enter the name of your session ID parameter into the modifier. There is also a checkbox for indicating that the session ID should be part of the path (separated by a ". If "Cache Session Id?" is checked. which just has a field for the user to specify the name of the session ID parameter. URL Rewriting Example Download this example .").

you will tell the users to run their tests three times. You will create ten users that send five SQL requests to the database server.Request parameters 6.2 Using a Header Manager The HTTP Header Manager lets you customize what information JMeter sends in the HTTP request header. you will learn how to create a basic Test Plan to test a database server. Also. "Referer". This header includes properties like "User-Agent".jar file must be copied to the JMeter lib directory (seeJMeter's Classpath for more details). To construct the Test Plan. The . So. you will use the following elements: Thread Group . Building a Database Test Plan In this section. 7. like the HTTP Cookie Manager . etc. This example uses the MySQL database driver. its containing . 7. Graph Results . unless for some reason you wish to specify different headers for the different HTTP Request objects in your test. JDBC Request . the total number of requests is (10 users) x (2 requests) x (repeat 3 times) = 60 JDBC requests. should probably be added at the Thread Group level. The HTTP Header Manager . "Pragma".Figure 2 . To use this driver.1 Adding Users The first step you want to do with every JMeter Test Plan is to add a Thread Group element.

In the name field. For example. if you have not already selected it. Next. You should now see the Thread Group Control Panel in the right section of the JMeter window (see Figure 7. In the example shown here. then "expand" the Test Plan tree by clicking on the Test Plan element. database table.1.1 below) Figure 7. the database is 'mydb' and the table name is 'Stocks'. Go ahead and add the ThreadGroup element by first selecting the Test Plan.Thread Group tells JMeter the number of users you want to simulate. and user-level access to that table. enter JDBC Users. increase the number of users to 10. you need to modify the default properties. If you do not see the element. Next. In the next field. Select the Thread Group element in the tree. if you enter a Ramp-Up . and then select Add --> ThreadGroup. clicking your right mouse button to get the Add menu. You will need a valid database. and the how many requests they should send. You should now see the Thread Group element under Test Plan. how often the users should send requests. leave the the default value of 0 seconds. This property tells JMeter how long to delay between starting each user. the Ramp-Up Period. Thread Group with Default Values Start by providing a more descriptive name for our Thread Group.

2. then JMeter will immediately start all of your users. in JMeter. In most applications. when selecting another tree element). Begin by selecting the JDBC Users element. Click your right mouse button to get the Add menu. the Control Panel automatically accepts your changes as you make them. select this . See Figure 7. To have JMeter repeatedly run your Test Plan. However. JMeter will finish starting all of your users by the end of the 5 seconds. Figure 7. if we have 5 users and a 5 second Ramp-Up Period.2 for the completed JDBC Users Thread Group. you have to manually accept changes you make in a Control Panel.Period of 5 seconds. So. This property tells JMeter how many times to repeat your test. If you set the value to 0. Then. enter a value of 3 in the Loop Count field. and then select Add --> Config Element --> JDBC Connection Configuration. Finally. select the Forever checkbox. the tree will be updated with the new text after you leave the Control Panel (for example. you will specify the JDBC requests to perform. If you change the name of an element. it is time to define the tasks that they will be performing. JDBC Users Thread Group 7.2 Adding JDBC Requests Now that we have defined our users. In this section. then the delay between starting users would be 1 second (5 users / 5 seconds = 1 user per second).

jdbc. More than one JDBC Request can refer to the same pool. Database URL: jdbc:mysql://localhost:3306/test JDBC Driver class: com.mysql.Driver Username: guest Password: password for guest The other fields on the screen can be left as the defaults. Every JDBC Request must refer to a JDBC Configuration pool.3). Figure 7.3. Click your right mouse button to get the Add menu. JDBC Configuration Selecting the JDBC Users element again. but they must have unique names.new element to view its Control Panel (see Figure 7. Set up the following fields (these assume we will be using a local MySQL database called test):      Variable name bound to pool. Several different JDBC Configuration elements can be used. This needs to uniquely identify the configuration. . It is used by the JDBC Sampler to identify the configuration to be used. JMeter creates a database connection pool with the configuration settings as specified in the Control Panel. The pool is referred to in JDBC Requests in the 'Variable Name' field.

and the second is Pfizer stock (obviously you should change these to examples appropriate for your particular database). Enter the Pool Name: MySQL (same as in the configuration element) Enter the SQL Query String field. Figure 7. JDBC Request In our Test Plan. These are illustrated below.4). Start by editing the following properties (see Figure 7. JMeter sends requests in the order that you add them to the tree. . Then.and then select Add --> Sampler --> JDBC Request.5):    Change the Name to "Kodak". we will make two JDBC requests.4. select this new element to view its Control Panel (see Figure 7. The first one is for Eastman Kodak stock.

Enter the SQL Query String field.6. add the second JDBC Request and edit the following properties (see Figure 7.3 Adding a Listener to View/Store the Test Results The final element you need to add to your Test Plan is a Listener .5.6):   Change the Name to "Pfizer". JDBC Request for Eastman Kodak stock Next. This element is responsible for .Figure 7. Figure 7. JDBC Request for Pfizer stock 7.

you will learn how to create a basic Test Plan to test an FTP site. Also. Please be considerate when running this example. Select the JDBC Users element and add a Graph Results listener (Add --> Listener --> Graph Results). Graph results Listener 8. you will use the following elements: Thread Group .com. FTP Request Defaults . To construct the Test Plan.7. you will tell the users to run their tests twice. So.oro. You will create four users that send requests for two files on the O'Reilly FTP site. Building an FTP Test Plan In this section. the total number of requests is (4 users) x (2 requests) x (repeat 2 times) = 16 FTP requests. and (if possible) consider . www. Figure 7. This example uses the O'Reilly FTP site. and Spline Visualizer . FTP Request .storing all of the results of your JDBC requests in a file and presenting a visual model of the data.

enter O'Reilly Users. Go ahead and add the ThreadGroup element by first selecting the Test Plan. if you have not already selected it. JMeter will finish starting all of your users by the end of the 5 seconds.1 Adding Users The first step you want to do with every JMeter Test Plan is to add a Thread Group element. So. and then select Add --> ThreadGroup. then "expand" the Test Plan tree by clicking on the Test Plan element. If you do not see the element. you need to modify the default properties. Next. clicking your right mouse button to get the Add menu. if we have 5 users and a 5 second Ramp-Up Period. For example. how often the users should send requests. leave the the default value of 0 seconds. then the delay between starting users would .1. Thread Group with Default Values Start by providing a more descriptive name for our Thread Group. In the next field.running against another FTP site. Select the Thread Group element in the tree. and the how many requests they should send.1 below) Figure 8. You should now see the Thread Group element under Test Plan. the Ramp-Up Period. The Thread Group tells JMeter the number of users you want to simulate. 8. This property tells JMeter how long to delay between starting each user. In the name field. if you enter a Ramp-Up Period of 5 seconds. You should now see the Thread Group Control Panel in the right section of the JMeter window (see Figure 8. increase the number of users to 4. Next.

2 Adding Default FTP Request Properties Now that we have defined our users. However. when selecting another tree element). . Finally. O'Reilly Users Thread Group 8.2 for the completed O'Reilly Users Thread Group. then JMeter will immediately start all of your users. enter a value of 2 in the Loop Count field. you will add FTP Request elements which use some of the default settings you specified here. the Control Panel automatically accepts your changes as you make them. In this section. If you change the name of an element. In most applications. select the Forever checkbox.2. in JMeter.be 1 second (5 users / 5 seconds = 1 user per second). you will specify the default settings for your FTP requests. the tree will be updated with the new text after you leave the Control Panel (for example. And then. in section 8. If you set the value to 0. Figure 8. you have to manually accept changes you make in a Control Panel. it is time define the tasks that they will be performing. This property tells JMeter how many times to repeat your test.3. See Figure 8. To have JMeter repeatedly run your Test Plan.

FTP Request Defaults Like most JMeter elements. select this new element to view its Control Panel (see Figure 8.3). Figure 8. Skip to the next field. This is the only field that we will specify a default. Enter this domain name into the field. In this example. See Figure 8.com.3. all FTP requests will be sent to the same FTP server. the FTP Request Defaults Control Panel has a name field that you can modify. It simply defines the default values that the FTP Request elements use.4 for the completed FTP Request Defaults element . ftp. leave this field with the default value.Begin by selecting the O'Reilly Users element. The FTP Request Defaults element does not tell JMeter to send an FTP request. which is the FTP Server's Server Name/IP.oro. so leave the remaining fields with their default values. Click your right mouse button to get the Add menu. For the Test Plan that you are building. and then select Add --> Config Element --> FTP Request Defaults. Then.

The first one is for the O'Reilly mSQL Java README file (ftp://ftp. Change the Name to "README".3 Adding FTP Requests In our Test Plan. Start by adding the first FTP Request to the O'Reilly Users element (Add --> Sampler --> FTP Request). 3. FTP Defaults for our Test Plan 8. Then. and the second is for the tutorial file (ftp://ftp. .4.com/pub/msql/java/README). Change the File to Retrieve From Server field to "pub/msql/java/README".txt). 4.Figure 8. Change the Password field to "anonymous". Change the Username field to "anonymous". we need to make two FTP requests.oro.oro. 2.com/pub/msql/java/tutorial. select the FTP Request element in the tree and edit the following properties (see Figure 8.5): 1. JMeter sends requests in the order that they appear in the tree.

3. 4. . Change the Username field to "anonymous". Change the File to Retrieve From Server field to "pub/msql/java/tutorial.txt". Figure 8. Change the Password field to "anonymous". add the second FTP Request and edit the following properties (see Figure 8. FTP Request for O'Reilly mSQL Java README file Next.6: 1.You do not have to set the Server Name field because you already specified this value in the FTP Request Defaults element. Change the Name to "tutorial". 2.5.

FTP Request for O'Reilly mSQL Java tutorial file 8. Select the O'Reilly Users element and add a Spline Visualizer listener (Add --> Listener --> Spline Visualizer).6.4 Adding a Listener to View/Store the Test Results The final element you need to add to your Test Plan is a Listener .Figure 8. . This element is responsible for storing all of the results of your FTP requests in a file and presenting a visual model of the data.

Figure 8. you will tell the users to run their tests twice. Thread Group with Default Values 9a.1 Adding Users The first step you want to do with every JMeter Test Plan is to add a Thread Group element.Also. Building an LDAP Test Plan In this section. the total number of requests is (4 users) x (4 requests) x repeat 2 times) = 32 LDAP requests. You should now see the Thread Group element under Test Plan. If you do not see the element. you will learn how to create a basic Test Plan to test an LDAP server.1. To construct the Test Plan. Go ahead and add the ThreadGroup element by first selecting the Test Plan. So. how often the users should send requests.2 Adding Login Config Element . then "expand" the Test Plan tree by clicking on the Test Plan element. You will create four users that send requests for four tests on the LDAP server. you will use the following elements: Thread Group . clicking your right mouse button to get the Add menu. Spline Visualizer Listener 9a. and then select Add-->ThreadGroup. LDAP Request . LDAP Request Defaults .7. The Thread Group tells JMeter the number of users you want to simulate. and the how many requests they should send. This example assumes that the LDAP Server is installed in your Local machine. Figure 9a. and View Results in Table . 9a.

In this example. Click your right mouse button to get the Add menu. and then select Add --> Config Element --> Login Config Element.3 Adding LDAP Request Defaults Begin by selecting the Siptech Users element. . select this new element to view its Control Panel.2 Login Config Element for our Test Plan Enter Username field to "your Server Username". the LDAP Request Defaults Control Panel has a name field that you can modify. The password field to "your Server Passowrd" These values are default for the LDAP Requests. Like most JMeter elements. the Login Config Element Control Panel has a name field that you can modify. and then select Add --> Config Element -->LDAP Request Defaults. select this new element to view its Control Panel.Begin by selecting the Siptech Users element. Then. Figure 9a. leave this field with the default value. In this example. Like most JMeter elements. Click your right mouse button to get the Add menu. Then. leave this field with the default value. 9a.

Inbuilt Add Test Inbuilt Modify Test Inbuilt Delete Test Inbuilt Search Test JMeter sends requests in the order that you add them to the tree. 3. 2.4 Adding LDAP Requests In our Test Plan.Figure 9a. Select the Add test Radio button . 9a. 1. The port to 389. 4. Then.3 LDAP Defaults for our Test Plan Enter DN field to "your Server Root Dn". 2. Start by adding the first LDAP Request to the Siptech Users element (Add --> Sampler --> LDAP Request). we need to make four LDAP requests. These values are default for the LDAP Requests. Enter LDAP Server's Servername field to "localhost". select the LDAP Request element in the tree and edit the following properties 1. Change the Name to "Inbuilt-Add Test".

1 LDAP Request for Inbuilt Add test You do not have to set the Server Name field. Select the Modify test Radio button . port field.4. add the second LDAP Request and edit the following properties 1. Change the Name to "Inbuilt-Modify Test". 2.Figure 9a. Username. Password and DN because you already specified this value in the Login Config Element and LDAP Request Defaults. Next.

Select the Delete test Radio button Figure 9a. Change the Name to "Inbuilt-Delete Test".4.Figure 9a.3 LDAP Request for Inbuilt Delete test 1. .2 LDAP Request for Inbuilt Modify test 1.4. 2. Change the Name to "Inbuilt-Search Test".

4. Select the Search test Radio button Figure 9a. This element is responsible for storing all of the results of your LDAP requests in a file and presenting a visual model of the data.Select the Siptech Users element and add a View Results in Table (Add --> Listener ->View Results in Table) .4 LDAP Request for Inbuilt Search test 9a.2.5 Adding a Listener to View/Store the Test Results The final element you need to add to your Test Plan is a Listener.

and then select Add-->ThreadGroup. then "expand" the . If you do not see the element. how often the users should send requests. You should now see the Thread Group element under Test Plan. and Adding a Listener to View/Store the Test Results This example assumes that the LDAP Server is installed in your Local machine. you will use the following elements: Thread Group .txt 9b. The Thread Group tells JMeter the number of users you want to simulate. you want to use a + sign in a distinghuished name) you need to escape the character by adding an "\" sign before that character. You can however tune it exactly up to your needs. you need to use 4 backslashes. in that case (eg.1 Adding Users The first step you want to do with every JMeter Test Plan is to add a Thread Group element. To construct the Test Plan. So. Take care when using LDAP special characters in the distinghuished name.Figure 9a. extra exeption: if you want to add a \ character in a distinguished name (in an add or rename operation).5 View result in Table Listener 9b. examples: cn=dolf\+smits to add/search an entry with the name like cn=dolf+smits cn=dolf \\ smits to search an entry with the name cn=dolf \ smits cn=c:\\\\log. clicking your right mouse button to get the Add menu.Also. Adding LDAP Requests . Adding LDAP Extended Request Defaults . As the Extended LDAP Sampler is highly configurable. Go ahead and add the ThreadGroup element by first selecting the Test Plan. the total number of requests is (4 users) x (4 requests) x repeat 2 times) = 32 LDAP requests. and the how many requests they should send. You will create four users that send requests for four tests on the LDAP server. you will tell the users to run their tests twice.txt to add an entry with a name like cn=c:\log. Building an Extended LDAP Test Plan In this section. For the less experienced LDAP users. you will learn how to create a basic Test Plan to test an LDAP server. I build a small LDAP tutorial which shortly explains the several LDAP operations that can be used in building a complex testplan. this also means that it takes some time to build a correct testplan.

select this new element to view its Control Panel. Click your right mouse button to get the Add menu. and then select Add --> Config Element -->LDAP Extended Request Defaults.2 Adding LDAP Extended Request Defaults Begin by selecting the Thread Group element. Then. Like most JMeter elements. In this example. Thread Group with Default Values 9b. .1. leave this field with the default value. Figure 9b. the LDAP Extended Request Defaults Control Panel has a name field that you can modify.Test Plan tree by clicking on the Test Plan element.

this is used for the LDAP extended requests. 3. 9. For each requst. 8.2 LDAP Defaults for our Test Plan For each of the different operations. 2. 4. dc=com. 7. some default values can be filled in. In All cases. You cannot search or rename anymore in the subtree ou=users. Then. this baseDN will be used as thestarting point for searches. the test will fail in an unpredictable way! 9b. dc=siemens. 4. eg When all information is stored under ou=people.1 Adding a Thread bind Request 1. deletes etc. we want to use all 8 LDAP requests. enter the hostname value from the LDAP server in the Servername field Enter the portnumber from the LDAP server (389) in the port field (optional) enter the baseDN in the DN field.3. when a default is filled in. use the common denominator . Adding a requests always start by: Adding the LDAP Extended Request to the Thread Group element (Add --> Sampler --> LDAP Ext Request). 1. 5. 3. Thread bind Search Test Compare Test Single bind/unbind Test Add Test Modify Test Delete Test Rename entry (moddn) Thread unbind JMeter sends requests in the order that you add them to the tree. 9b.Figure 9b. add. 2. Select the "Thread bind" button. select the LDAP Ext Request element in the tree and edit the following properties.3 Adding LDAP Requests In our Test Plan. take care that this must be the uppermost shared level for all your request.dc=com! If you need to search or rename objects in both subtrees.dc=siemens. When no valueis entered which is necesarry for a test. you can use this value in the basedn. you can override the defaults by filling in the values in the LDAP extended request sampler. 6.

3. used in the thread bind request. only for checking attributes or existence. relative to the basedn. Figure 9b.dc=com) as the baseDN. (Optional) enter the distinghuised name from the user you want to use for authentication. this files is important if you want to use a "base-entry" or "one-level" search (see below) 3. When left empty.3. Base level. it has three options: 1. 2. Subtree. any decent LDAP serach filter will do. 6. (Optional) enter the searchbase under which you want to perform the search. an anonymous bind will be established.1. Enter the searchfilter. like cn=john doe 4. (optional) Enter the password for the user you want to authenticate with.2 Adding a search Request 1. use something simple. Enter the value 2 Searches for object at any point below the given basedn . the basedn is used as a search base. 2. Thread Bind example 9b. Select the "Search Test" button. but for now. Enter the value 0 only the given searchbase is used. One level. an empty password will also lead to an anonymous bind. When this field is kept empty.(dc=siemens. (optional) enter the scope in the scope field. 5. Enter the value 1 Only search in one level below given searchbase is used 3.

but this parameter will not influence this. possible values are "true" and "false".5. specifies the maximun number of returned entries. especially when an onject has very large attributes (like jpegPhoto).2. True will mean it will follow references. possible values "true" and "false". (optional) Timelimit. psecifies the maximum number of miliseconds. True will return all java-object attributes. (Optional) Return object. it will add these to the requested attributes. Put in the attributes. it will request a non-existent attributes.3. (Optional) Sizelimit. the SERVER can use for performing the search. (Optional) Attributes you want in the search answer. 7. It will return only the requested attributes 8. Leave empty (the default setting must also be empty) This will return all attributes. 9. Figure 9b. so in reality it returns no attributes 3. false says it will not. 6. search request example . There are three possibilities: 1. (Optional) Dereference aliases. it is NOT the maximun time the application will wait! When a very large returnset is returned. 2. This can be used to limit the size of the answer. Put in one empty value (""). as specified above. you may have to wait for ages for the completion of the search request. seperated by a semi-colon. from a very fast server. over a very slow line. false will mean no java-object attributes will be returned.

3. Enter the FULL distinghuised name from the user you want to use for authentication. enter the entryname form the object on which you want the compare operation to work.9b. cn=john doe.dc=com When this field is kept empty. an anonymous bind will be established.3. 2. an empty password will also lead to an anonymous bind. Compare example 9b. 2. Select the "Single bind/unbind" button.3 Adding a Compare Request 1. 3.4 Adding a Single bind/unbind 1. eg "mail=John. this must be in the form "attribute=value".com" Figure 9b.3. eg "cn=john doe.doe@siemens.3. 4.ou=people. eg. relative to the basedn.ou=people" 3. Select the "Compare" button.dc=siemens. Enter the password for the user you want to authenticate with. Take care: This single bind/unbind is in reality two seperate operations but cannot easily be split! . Enter the compare filter.

2. Select the "Add" button. When you need the same attribute more than once. relative to the basedn.Figure 9b. 3. Enter the distinghuised name for the object to add. and a different value. just add a new line.3.3. Add a line in the "add test" table. All necessary attributes and values must be specified to pass the test.4. add the attribute again. . see picture! (sometimes the server adds the attribute "objectClass=top".5 Adding an Add Request 1. Single bind/unbind example 9b. this might give a problem. fill in the attribute and value.

Enter the distinghuised name for the object to modify. Add request example 9b.Figure 9b. but single valued. Add a line in the "modify test" table. 3. 2. the new value is added. When the attribute is not existing. 4.3. replace This will overwrite the attribute with the given new value (not optional here) When the attribute is not existing. You need to enter the attribute you want to modify. it will fail. add this will mean that the attribute value (not optional in this case) willbe added to the attribute. with the "add" button.3. it will be created and the value added When it is existing. when it is existing. it will be created and the value added . and defined multi-valued. relative to the basedn. (optional) a value.5. The meaning of this opcode: 1.6 Adding a Modify Request 1. Select the "Modify test" button. 2. and the opcode.

dc=com".dc=siemens. all values will be removed When a value is given. in the Delete-Field. relative to the baseDN.6. that is. enter the name of the entry. NO modifications at all will be made and the entry will remain unchanged. if you want to remove "cn=john doe. Modify example 9b.3. you need to enter "cn=john doe. (Optional) Add more modifications in the "modify test" table.ou=people" in the Delete- . only that value will be removed when the given value is not existing. 2.7 Adding a Delete Request 1. delete When no value is given. the test will fail 5.3. When one modification fails.ou=people.dc=com". the new value is added. and you set the baseDN to "dc=siemens. Select the "Delete" button. old values are removed. Figure 9b.When it is existing. to let the modification test pass. 3. All modifications which are specified must succeed.

Figure 9b. plus all retired people in the subtree to the new place in the tree. eg you change from cn=john doe. enter the name of the entry.3. whne you only change the RDN.field. relative to the baseDN.3. to ou=oldusers. if you want to rename "cn=john doe.8 Adding a Rename Request (moddn) 1. it will move the entry. relative to the baseDN. .ou=retired.ou=users. it will simply rename the entry when you also add a differten subtree. and you set the baseDN to "dc=siemens. eg ou=people.dc=com". in the "new distinghuised nameField". 3.ou=people to cn=john doe. Delete example 9b. 2.ou=people.ou=users. that is.dc=com". enter the new name of the entry. Select the "Rename Entry" button. You can also move a complete subtree (If your LDAP server supports this!!!!). in the "old entry name-Field".7. you need to enter "cn=john doe.ou=people" in the old entry name-field. this will move the complete subtee.dc=siemens.

Figure 9b.3. Select the "Thread unbind" button.3. The information which is needed is already known by the system Figure 9b. Unbind example .8. This will be enough as it just closes the current connection.3.9 Adding an unbind Request 1. Rename example 9b.9.

1. the sampler result. this is given in a (self defined) xml-style. The full description can be found .Select the Thread group element and add a View Results Tree (Add --> Listener -->View Results Tree) Figure 9b.4 Adding a Listener to View/Store the Test Results The final element you need to add to your Test Plan is a Listener.9b. View result Tree Listener In this listener you have three tabs to view. the returncode and return message 2.4. in practice no relevant information is contained here. the request and the response data. as well the full details of the received answer. The response data contains the full details of the sent request. The request gives a short description of the request that was made. The sampler result just contains the response time. 3. This element is responsible for storing all of the results of your LDAP requests in a file and presenting a visual model of the data.

the total number of requests is (5 users) x (1 requests) x (repeat 2 times) = 10 HTTP requests. Go ahead and add the ThreadGroup element by first selecting the Test Plan. The current implementation uses Apache SOAP driver. General notes on the webservices sampler.here. If you do not see the element. 10. and the how many requests they should send. If the sampler appears to be getting an error from the webservice. If the xml namespace is different. how often the users should send requests. you need to modify the default properties. JMeter does not include the jar files in the binary distribution. the webservice will likely return an error. Building a WebService Test Plan In this section. You should now see the Thread Group Control Panel in the right section of the JMeter window (see Figure 10. Due to license restrictions. Also. To construct the Test Plan.Xmethods contains a list of public webservice for those who want to test their test plan. The Thread Group tells JMeter the number of users you want to simulate. clicking your right mouse button to get the Add menu. you will tell the users to run their tests twice. Next. which requires activation. if you have not already selected it. Select the Thread Group element in the tree. WebService(SOAP) Request (Beta Code) . you will learn how to create a Test Plan to test a WebService. In particular. make sure the xmlns attributes are exactly the same as the WSDL. You will create five users that send requests to One page. double check the SOAP message and make sure the format is correct. and then select Add --> ThreadGroup.1 Adding Users The first step you want to do with every JMeter Test Plan is to add a Thread Group element. then "expand" the Test Plan tree by clicking on the Test Plan element.1 below) .jar from SUN. 10. and Graph Results .jar and mail. you will use the following elements: Thread Group . You should now see the Thread Group element under Test Plan. So.

clear the checkbox labeled "Forever". and enter a value of 2 in the Loop Count field. To have JMeter repeatedly run your Test Plan. the tree will be updated with the new text after you leave the Control Panel (for example. For example. So. Thread Group with Default Values Start by providing a more descriptive name for our Thread Group. the Ramp-Up Period. select the Forever checkbox. In the name field. increase the number of users (called threads) to 10. enter Jakarta Users. In the next field.1. then the delay between starting users would be 1 second (5 users / 5 seconds = 1 user per second). Finally. Next. when selecting another tree element). if we have 5 users and a 5 second Ramp-Up Period. then JMeter will immediately start all of your users. This property tells JMeter how long to delay between starting each user. In most applications.Figure 10. the Control Panel automatically accepts your changes as you make them. you have to manually accept changes you make in a Control Panel. However. then JMeter will run your test only once. . in JMeter. This property tells JMeter how many times to repeat your test. If you change the name of an element. leave the the default value of 0 seconds. JMeter will finish starting all of your users by the end of the 5 seconds. If you enter a loop count value of 0. if you enter a Ramp-Up Period of 5 seconds. If you set the value to 0.

See Figure 10.2 Adding WebService Requests In our Test Plan. The topic is too broad to cover in the user manual. we will use a . Enter the WSDL URL and click "Load WSDL".2. If you don't know how to write a webservice. select the webservice Request element in the tree and edit the following properties (see Figure 10. Figure 10. Please refer to other sources to get a better idea of the differences. Jakarta Users Thread Group 10. Start by adding the sampler WebService(SOAP) Request (Beta Code) to the Jakarta Users element (Add --> Sampler --> WebService(SOAP) Request (Beta Code) ). Then. google for webservice and familiarize yourself with writing webservices for Java and . JMeter sends requests in the order that they appear in the tree. . Since you're using the webservice sampler.NET and Java implement webservices. 2. we won't go into the details of writing a webservice.5): 1.NET. Change the Name field to "WebService(SOAP) Request (Beta Code)".2 for the completed Jakarta Users Thread Group.NET webservice. It should be noted there is a significant difference between how .

3. Webservice Request .Figure 10.

. Next.7. Graph Results Listener 11.3 Adding a Listener to View Store the Test Results The final element you need to add to your Test Plan is a Listener . Figure 10.10. See Getting Started for details. You can either type it into the filename field. shutdown JMeter. you need to specify a directory and filename of the output file. This element is responsible for storing all of the results of your HTTP requests in a file and presenting a visual model of the data. Select the Jakarta Users element and add a Graph Results listener (Add --> Listener --> Graph Results). or select the Browse button and browse to a directory and then enter a filename. If they are not. copy the jar files over and restart JMeter. Building a JMS Point-to-Point Test Plan Make sure the required jar files are in JMeter's lib directory.

A fixed reply queue will be used for monitoring the reply messages. You should now see the Thread Group Control Panel in the right section of the JMeter window (see Figure 11.In this section. clicking your right mouse button to get the Add menu. 11. then "expand" the Test Plan tree by clicking on the Test Plan element. for example.1. you will use the following elements:Thread Group . if you have not already selected it.1 below) Figure 11. you will learn how to create a Test Plan to test a JMS Point-to-Point messaging solution. Go ahead and add the ThreadGroup element by first selecting the Test Plan. Select the Thread Group element in the tree. and then select Add --> ThreadGroup. Topic messaging is generally used in cases where a message is published by a producer and consumed by multiple subscribers. You should now see the Thread Group element under Test Plan. Thread Group with Default Values .0. To construct the Test Plan.1 Adding a Thread Group The first step you want to do with every JMeter Test Plan is to add a Thread Group element. See here for the list of jars provided by ActiveMQ 3. One uses JMS topics and the other uses queues. The Thread Group tells JMeter the number of users you want to simulate. Topic messages are commonly known as pub/sub messaging. how often the users should send requests. and the how many requests they should send. General notes on JMS: There are currently two JMS samplers. The setup of the test is 1 threadgroup with 5 threads sending 4 messages each through a request queue. JMS Point-to-Point . Next. from Apache ActiveMQ. If you do not see the element. you need to modify the default properties. and Graph Results . A JMS sampler needs the JMS implementation jar files.

select the Forever checkbox. In most applications. the tree will be updated with the new text after you leave the Control Panel (for example. if we have 5 users and a 5 second Ramp-Up Period. JMeter will finish starting all of your users by the end of the 5 seconds. in JMeter. This is equal to the JNDI name defined in the JNDI properties. In the name field. In building the example a configuration will be provided that works with ActiveMQ 3. Then. To have JMeter repeatedly run your Test Plan. leave set the value to 0 seconds. Value Description JNDI Name Request Queue Q. 11.0. If you change the name of an element. the Control Panel automatically accepts your changes as you make them. However. then JMeter will run your test only once. In the next field. Next. If you set the value to 0. increase the number of users (called threads) to 5. Name JMS Resources QueueuConnectionFactory ConnectionFactory This is the default JNDI entry for the connection factory within active mq. This property tells JMeter how many times to repeat your test.REQ . if you enter a Ramp-Up Period of 5 seconds. then the delay between starting users would be 1 second (5 users / 5 seconds = 1 user per second). If you enter a loop count value of 0. For example.2 Adding JMS Point-to-Point Sampler Start by adding the sampler JMS Point-to-Point to the Point-to-Point element (Add --> Sampler -> JMS Point-to-Point). you have to manually accept changes you make in a Control Panel. Clear the checkbox labeled "Forever". then JMeter will immediately start all of your users. and enter a value of 4 in the Loop Count field. So. This property tells JMeter how long to delay between starting each user. the Ramp-Up Period. enter Pointto-Point. select the JMS Point-to-Point sampler element in the tree. when selecting another tree element).Start by providing a more descriptive name for our Thread Group.

Message Properties Communication Style Request Response This means that you need at least a service that responds to the requests.A queue.RPL for the reply queue that points to the queue example.ActiveMQInitialContextFactory The standard InitialContextFactory for Active MQ Properties providerURL tcp://localhost:61616 This defines the URL of the active mq messaging system.REQ example.JNDI Name Reply Queue Q.RPL example.jndi. Nothing needed for active mq.Q.REQ for the request queue that points to the queue example. Content test JMS Properties JNDI Properties InitialContextFactory org.activemq. This is just the content of the message. or select the Browse button and browse to a directory and then .3 Adding a Listener to View Store the Test Results The final element you need to add to your Test Plan is a Listener .B 11.A This defines a JNDI name Q.Q.RPL This is equal to the JNDI name defined in the JNDI properties.B queue. Select the Thread Group element and add a Graph Results listener (Add --> Listener --> Graph Results). This element is responsible for storing all of the results of your JMS requests in a file and presenting a visual model of the data. you need to specify a directory and filename of the output file. Next. You can either type it into the filename field. This defines a JNDI name Q.

enter a filename. and Graph Results . To construct the Test Plan. Please refer to Getting Started for full details. Graph Results Listener 12. JMS Publisher . The total messages is (6 threads) x (1 message) x (repeat 10 times) = 60 messages. you will use the following elements: Thread Group . JMS Subscriber . One uses JMS topics and the . You will create five subscribers and one publisher.2. you will learn how to create a Test Plan to test JMS Providers. You will create 2 thread groups and set each one to 10 iterations. Building a JMS Topic Test Plan JMS requires some optional jars to be downloaded. Figure 11. General notes on JMS: There are currently two JMS samplers. In this section.

Select the Thread Group element in the tree. In HTTP. and then select Add --> ThreadGroup. then "expand" the Test Plan tree by clicking on the Test Plan element. 12. See here for the list of jars provided by ActiveMQ 3.1 below) Figure 12. Next. You should now see the Thread Group element under Test Plan. if you have not already selected it.1. and how many requests they should send. Queue messaging is generally used for transactions where the sender expects a response. a single user sends a request and gets a response. The Thread Group tells JMeter the number of users you want to simulate.other uses queues. how often the users should send requests. Topic messaging is generally used in cases where a message is published by a producer and consumed by multiple subscribers. Messaging systems are quite different from normal HTTP requests. clicking your right mouse button to get the Add menu.0. you need to modify the default properties. You should now see the Thread Group Control Panel in the right section of the JMeter window (see Figure 12. . Thread Group with Default Values Start by providing a more descriptive name for our Thread Group. from Apache ActiveMQ. for example. Go ahead and add the ThreadGroup element by first selecting the Test Plan. In the name field. enter Subscribers. Topic messages are commonly known as pub/sub messaging. If you do not see the element. Messaging system can work in sychronous and asynchronous mode.1 Adding Users The first step is add a Thread Group element. A JMS sampler needs the JMS implementation jar files.

Next. and enter a value of 10 in the Loop Count field. and set the iteration to 10. then JMeter will run your test only once. Clear the checkbox labeled "Forever". 5. So. if there is one Enter the name of the connection factory. JMeter will immediately start all users. To have JMeter repeatedly run your Test Plan. Enter the name of the message topic 7. select the JMS Subscriber element in the tree and edit the following properties: 1. Change the Name field to "sample subscriber" If the JMS provider uses the jndi.2 Adding JMS Subscriber and Publisher Make sure the required jar files are in JMeter's lib directory. In the next field. JMeter will finish starting all of your users by the end of the 5 seconds. For performance reasons. Please refer to the documentation of the JMS provider for the information 6. check the box Enter the name of the InitialContextFactory class Enter the provider URL. If you enter a loop count value of 0. If the JMS provider requires authentication. check "required" and enter the username and password. set the value to 0 seconds. 3. For example. However. in JMeter. enter "Publisher" in the name field. set the number of threads to 1. If you change the name of an element. 4. copy the jar files over and restart JMeter. This property tells JMeter how many times to repeat your test. shutdown JMeter. In most applications. if you enter a Ramp-Up Period of 5 seconds. if we have 5 users and a 5 second Ramp-Up Period. the Control Panel automatically accepts your changes as you make them. This is the URL for the JNDI server. Repeat the process and add another thread group. This property tells JMeter how long to delay between starting each user. For example. the sampler will . increase the number of users (called threads) to 5. 12. the tree will be updated with the new text after you leave the Control Panel (for example. If you set the value to 0. when selecting another tree element). select the Forever checkbox.properties file. while ActiveMQ and MQSeries does not 8. you have to manually accept changes you make in a Control Panel. Start by adding the sampler JMS Subscriber to the Subscribers element (Add --> Sampler --> JMS Subscriber). the Ramp-Up Period. Then. 2. Orion JMS requires authentication. then the delay between starting users would be 1 second (5 users / 5 seconds = 1 user per second). Enter 10 in "Number of samples to aggregate". For the second thread group. If they are not.

If the JMS provider requires authentication.aggregate messages.2. If the sampler didn't aggregate the messages. while ActiveMQ and MQSeries does not 8. 9. Change the Name field to "sample publisher". 5. select the JMS Publisher element in the tree and edit the following properties: 1. If you want to read the response. For performance reasons. Please refer to the documentation of the JMS provider for the information 6. If the sampler didn't . 3. check the box 10. since small messages will arrive very quickly. Orion JMS requires authentication. Enter the name of the message topic 7. Then. since small messages will arrive very quickly. There are two client implementations for subscribers. Enter 10 in "Number of samples to aggregate". If the JMS provider uses the jndi. JMeter wouldn't be able to keep up. JMS Subscriber Next add the sampler JMS Publisher to the Publisher element (Add --> Sampler --> JMS Subscriber). the sampler will aggregate messages. For example. 4. Enter the provider URL. check "required" and enter the username and password. check the box Enter the name of the InitialContextFactory class. try the other.properties file. Figure 12. if there is one Enter the name of the connection factory. 2. This is the URL for the JNDI server. If the JMS provider exhibits zombie threads with one client.

make sure the message is generated correctly. 10. If you want the sampler to randomly select the message. JMeter wouldn't be able to keep up. Select the appropriate configuration for getting the message to publish. . 9.aggregate the messages. Select the message type. If the message is in object format. place the messages in a directory and select the directory using browse.

Figure 12. JMS Publisher 12.3. This element is responsible for storing all of the results of your HTTP requests in a file and presenting a visual model of the .3 Adding a Listener to View Store the Test Results The final element you need to add to your Test Plan is a Listener .

4. Used with stress testing. or select the Browse button and browse to a directory and then enter a filename. The monitor was designed to work with the status servlet in Tomcat 5. any servlet container that supports JMX (Java Management Extension) can port the status servlet to provide . you need to specify a directory and filename of the output file. In theory. Next. the monitor provides additional information about server performance. As a system administration tool.data. Graph Results Listener 13. You can either type it into the filename field. Monitors are useful for a stress testing and system management. It also makes it easier to see the relationship between server performance and response time on the client side. you will learn how to create a Test Plan to monitor webservers. Select the Test Plan element and add a Graph Results listener (Add --> Listener --> Graph Results). the monitor provides an easy way to monitor multiple servers from one console. Figure 12. Building a Monitor Test Plan In this section.

This is very important for those not familiar with server monitors.1 Adding A Server The first step is to add a Thread Group element.1. You should now see the Thread Group element under Test Plan.19 and newer. using multiple threads for a single server is bad and can create significant stress. since we are using JMeter as a monitor. Go ahead and add the ThreadGroup element by first selecting the Test Plan. For instructions . Important note: the monitor only works with Tomcat5 build 5. Always use 1. For those who want to use the monitor with other servlet or EJB containers. 13. and then select Add --> ThreadGroup. Figure 13.0. The Thread Group tells JMeter the number of threads you want. clicking your right mouse button to get the Add menu. 13.the same information. Thread Group with Default Values Change the loop count to forever (or some large number) so that enough samples are generated. you will need to change the MBeanServer lookup to retrieve the correct MBeans. If you do not see the element. Enter the username and password for your webserver.2 HTTP Auth Manager Add the HTTP Authorization Manager to the Thread Group element (Add --> Config element -> HTTP Authorization Manager). Tomcat's status servlet should work with other containers for the memory statistics without any modifications. To get thread information. As a general rule. "expand" the Test Plan tree by clicking on the Test Plan element.

3 Adding HTTP Request Add the HTTP Request to the Thread Group element (Add --> Sampler --> HTTP Request). Check "Use as Monitor" at the bottom of the sampler 13. Select the thread group element and add a Simple Data Writer listener (Add --> Listener --> Simple Data Writer). enter the username 3. By default. If specified. you need to specify a directory and filename of the output file. Then. the Listener will select the results from the first connector in the sample response. please refer to tomcat 5 documentation. There are two tabs in the monitor results listener. Enter the IP address or Hostname Enter the port number Set the Path field to "/manager/status" if you're using Tomcat. Enter 5000 milliseconds in the "Thread Delay" box.on how to setup Tomcat. enter the password 13. using intervals shorter than 5 seconds will add stress to your server. 1. 13. In general. which displays the status of the last sample the monitor received. Add a request parameter named "XML" in uppercase. 13. If you want to save both the raw data and statistics. leave the base URL blank 2. If you want to save the calculated statistics. the Listener will choose the first connector which matches the prefix. 3. Give it a value of "true" in lowercase. The first is the "Health". Next.4 Adding Constant Timer Add a timer to this thread group (Add --> Timer --> Constant Timer). make sure you use different filenames. 6. Find out what is an acceptable interval before you deploy the monitor in your production environment. select the HTTP Request element in the tree and edit the following properties): 1. You can either type it into the filename field. 5. If no match is found.6 Adding Monitor Results Add the Listener by selecting the test plan element (Add --> Listener -. then the first connector is selected.> Monitor Results). 4. enter a filename in the listener. Change the Name field to "Server Status". or select the Browse button and browse to a directory and then enter a filename. which shows a . The second tab is "Performance".5 Adding a Listener to Store the Results If you want to save the raw results from the server. 2. The Connector prefix field can be used to select a different connector. add a simple data Listener .

A container that is more efficient with thread management might not see any performance degradation. The relative importance of threads vary between containers. . so the current implementation uses 50/50 to be conservative. In the case of Tomcat 5. A quick note about how health is calculated.historical view of the server's performance. but the used memory definitely will show an impact. once the threads are maxed out. or reached the maximum number of threads. Typically. requests are placed in a queue until a thread is available. a server will crash if it runs out of memory.

it could indicate memory thrashing. What you want to see is a regular pattern for load. In those situations. but it is not graphed. If the memory line spikes up and down rapidly. Note the graph has captions on both sides of the graph. Any erratic behavior usually indicates poor performance or a bug of some sort. In a well tuned environment. The free memory line shows how much free memory is left in the current allocated block.The performance graph shows for different lines. On the left is percent and the right is dead/healthy. the server should never reach the maximum memory. memory and threads. Tomcat 5 returns the maximum memory. it is a good idea to profile the application with Borland OptimizeIt or JProbe. .

spline results or distribution graph. all information. Different listeners display the response information in different ways. The results can be shown in a tree. and code.saveservice. the label. Introduction to listeners A listener is a component that shows the results of the samples. January 1. the thread name. message. including the full response data will be logged.properties: jmeter.properties (or user. The following example indicates how to set properties to get a vertical bar ("|") delimited format that will output results like:. To view the response time graphically.if one is specified. and a success indicator. The same filename can be used by multiple samplers . and add the Listener to that. the response time. and whether to write it as CSV or XML. the data type. If checked. CSV files are much smaller than XML files. To view the contents of a response from any given sampler. they all write the same raw data to the output file .output_format= The information to be saved is configurable. The listeners section of the components page has full descriptions of all the listeners. add either of the Listeners "View Results Tree" or "View Results in table" to a test plan. and are also used for the log file specified by the -l command-line flag (commonly used for non-GUI test runs).1 Default Configuration The default items to be saved can be defined in the jmeter. so use CSV if you are generating lots of samples. Or you can use a Simple Controller to group a set of samplers. timeStamp|time|label|responseCode|threadName|dataType|success|failureMessage 02/06/03 08:21:42|1187|Home|200|Thread Group-1|text|true| . the default saved data includes a time stamp (the number of milliseconds since midnight.14.properties) file. 1970 UTC). For maximum information. The "Configure" button can be used to specify which fields to write to the file. graphs or simply written to a log file. find the following line in jmeter. If you only wish to record certain samples. However. add the Listener as a child of the sampler.but make sure they all use the same configuration! 14.save. To change the default format. If this box is not checked. tables. choose "xml" as the format and specify "Functional Test Mode" on the Test Plan element. add graph results. The properties are used as the initial settings for the Listener Config pop-up.

samplerData=false #jmeter.save.saveservice. #jmeter. Only xml and csv are currently supported.data_type=true #jmeter. One oddity in this example is that the output_format is set to csv.saveservice.successful=true #jmeter.url=false .save.default_delimiter=| The full set of properties that affect result file output is shown below.label=true #jmeter. so the csv tag is a misnomer in this case.saveservice. false otherwise # assertion_results_failure_message only affects CSV output #jmeter.saveservice.assertions=true #jmeter. #--------------------------------------------------------------------------# Results file configuration #--------------------------------------------------------------------------# This section helps determine how result data will be saved.save.save.output_format=xml # true when field should be saved.save.subresults=true #jmeter.saveservice.saveservice. # The commented out values are the defaults. The corresponding jmeter.encoding=false #jmeter.save.time=true #jmeter.save.save. However.output_format=csv jmeter.saveservice.saveservice.response_data=false # Save ResponseData for failed samples #jmeter.save.save.save.save.save.saveservice.properties that need to be set are shown below.responseHeaders=false #jmeter.save.assertion_results_failure_message=true jmeter.response_code=true # response_data is not currently supported for CSV output #jmeter.saveservice.on_error=false #jmeter.save.save. csv.thread_name=true #jmeter.save.save.saveservice. db. (Think of CSV as meaning character separated values) jmeter.saveservice.requestHeaders=false #jmeter.response_message=true #jmeter.saveservice.saveservice.saveservice.saveservice.save.saveservice.response_data.saveservice.saveservice. which typically indicates comma-separated values.save.save.bytes=true #jmeter.saveservice.latency=true #jmeter.saveservice.02/06/03 08:21:42|47|Login|200|Thread Group-1|text|false|Test Failed: expected to contain: password etc. # legitimate values: xml.saveservice. the default_delimiter was set to be a vertical bar instead of a comma.save.assertion_results_failure_message=false # #jmeter.saveservice.save.

saveservice.idle_time=false # Timestamp format # legitimate values: none.print_field_names=false # Optional list of JMeter variable names whose values result data files.1 Sample Variables Versions of JMeter after 2.save.save. For example: #sample_variables=SESSION_ID.sample_count=false #jmeter. # Use commas to separate the names. The values are written to CSV files as additional columns.default_delimiter=\t #jmeter.thread_counts=false #jmeter.saveservice. # Optional xml processing instruction for line 2 of the file: #jmeter.save.save.saveservice.2 send the variable to # to ensure that the correct data is available at the are to be saved in the XML as attributes.timestamp.saveservice.xsl"?> The date format to be used for the timestamp_format is described in SimpleDateFormat . # Versions of JMeter after 2.save. since JMeter 2. # For TAB.REFERENCE # N.saveservice.#jmeter. 14.1 allow one to use the sample_variables property to define a list of additional JMeter variables which are to be saved with each sample in the JTL files.timestamp_format=MM/dd/yy HH:mm:ss # Put the start time stamp in logs instead of the end sampleresult.save.saveservice.3 one can use: #jmeter. ms.1.saveservice.save. Bear in mind that choosing a date format other than "ms" is likely to make it impossible for JMeter to interpret the value when it is read in later for viewing purposes.B.3. # Default: #jmeter.save. The current implementation saves the values in # so the names must be valid XML names.saveservice. 14.save.2 Sample Result Save Configuration .assertion_results=none # For use with Comma-separated value (CSV) files or other formats # where the fields' values are separated by specified delimiters.1. and as additional attributes in XML files.xml_pi=<?xml-stylesheet type="text/xsl" href="sample.timestamp_format=ms #jmeter. all #jmeter. See above for an example.save.3. first. or a format suitable for SimpleDateFormat #jmeter.start=true # legitimate values: none.filename=false #jmeter.save.save.saveservice.saveservice. all servers client.saveservice.default_delimiter=.saveservice.hostname=false #jmeter.

log by default. you will need to rename it using the -j option as above. The -j option was added in version 2.log Note that JMeter logging messages are written to the file jmeter. the -l flag can be used to create a top-level listener for the test run.Listeners can be configured to save different items to the result log files (JTL) by using the Config popup as shown below.jmx -l testplan_02. The configuration of this listener is controlled by entries in the file jmeter. This feature can be used to specify different data and log files for each test run. items with (XML) only apply to XML format. Items with (CSV) after the name only apply to the CSV format.jtl -j testplan_01. method and the query string are saved as part of the "Sampler Data" option. for example: jmeter -n -t testplan. . 14. CSV format cannot currently be used to save any items that include line-breaks.properties as described in the previous section.jmx -l testplan_01. This is in addition to any Listeners defined in the test plan. so if you want to keep the log files for each run. Configuration dialogue Note that cookies. The defaults are defined as described in the Listener Default Configuration section above.jtl -j testplan_02.2 non-GUI (batch) test runs When running in non-GUI mode. This file is recreated each time.log jmeter -n -t testplan.3.

and is as follows:                timeStamp . 14. The order of appearance of columns is fixed.true or false failureMessage .g.3 Resource usage Listeners can use a lot of memory if there are a lot of samples. 200.Versions of JMeter after 2. text success . 14. OK threadName dataType . If the filename contains paired single-quotes.in milliseconds since 1/1/1970 elapsed . 404 responseMessage . samples with the same elapsed time are aggregated. then the name is processed as a SimpleDateFormat format applied to the current date.e.    Aggregate Report Aggregate Graph Distribution Graph To minimise the amount of memory needed. especially if most samples only take a second or two at most.in milliseconds label . use the Simple Data Writer.e. apart from:      Simple Data Writer BeanShell/BSF Listener Mailer Visualizer Monitor Results Summary Report The following Listeners no longer need to keep copies of every single sample.e.sampler label responseCode .g.4 CSV Log format The CSV log format depends on which data items are selected in the configuration. for example: log_file='jmeter_'yyyyMMddHHmmss'.g.1 support variables in the log file name.time to first response . and use the CSV format. Less memory is now needed.if any bytes .number of active threads in this thread group allThreads .tmp' . This can be used to generate a unique name for each test run.total number of active threads in all groups URL Filename . Most of the listeners currently keep a copy of every sample they display.if Save Response to File was used latency .number of bytes in the sample grpThreads . Instead.3. Only the specified data items are recorded in the file.

lang. th { font-size: 95%.org/asf. Content-Type: text/css </responseHeader> <requestHeader class="java.lang..lang.apache.gif" rc="200" rm="OK" tn="Listen 1-1" dt="bin" de="ISO-8859-1" by="5866"> <responseHeader class="java.String">HTTP/1.lang.. 07 Apr 2006 00:50:14 GMT .. unless multiple samples are aggregated) ErrorCount .. Helvetica.1) is as follows (line breaks will be different): <?xml version="1. Geneva. } .String"></cookies> <method class="java.1 200 OK Date: Fri.lang. sans-serif..number of milliseconds of 'Idle' time (normally 0) Variables.lang. Content-Type: image/gif </responseHeader> <requestHeader class="java.lang.org/images/asf_logo_wide.apache.HTTP Sample. with nested samples <httpSample t="1392" lt="351" ts="1144371014619" s="true" lb="HTTP Request" rc="200" rm="OK" tn="Listen 1-1" dt="text" de="iso-8859-1" by="12407"> <httpSample t="170" lt="170" ts="1144371015471" s="true" lb="http://www.apache.String">GET</method> <queryString class="java.gif</responseData> <responseFile class="java.String"></queryString> <url>http://www.String">http://www. 07 Apr 2006 00:50:14 GMT .lang. background-color: white.      encoding SampleCount .5 XML Log format 2. color: black.org/style/style.number of samples (1.1 200 OK Date: Fri.number of errors (0 or 1.String">Mixed1. unless multiple samples are aggregated) Hostname where the sample was generated IdleTime .String">HTTP/1. if specified 14.lang.String">MyHeader: MyValue</requestHeader> <responseData class="java. td.apache.lang.css</url> </httpSample> <httpSample t="200" lt="180" ts="1144371015641" s="true" lb="http://www.org/style/style..1 The format of the updated XML (2.String">body. </responseData> <cookies class="java.String">MyHeader: MyValue</requestHeader> <responseData class="java.0" encoding="UTF-8"?> <testResults version="1. font-family: Arial.2"> -.css" rc="200" rm="OK" tn="Listen 1-1" dt="text" de="ISO-8859-1" by="1002"> <responseHeader class="java.html</responseFile> .

String">GET</method> <queryString class="java.String"></responseHeader> <requestHeader class="java.String"></cookies> <method class="java. &lt. &lt..lang.lang..String">MyHeader: MyValue</requestHeader> <responseData class="java.1.lang.org/asf.gif</url> </httpSample> <responseHeader class="java.lang.lang.nonHTTPP Sample <sample t="0" lt="0" ts="1144372616082" s="true" lb="Example Sampler" rc="200" rm="OK" tn="Listen 1-1" dt="text" de="ISO-8859-1" by="10"> <responseHeader class="java.org/</url> </httpSample> -. Format 2.2 and 2.2 The format of the JTL files is identical for 2.lang.2 only affects JMX files.String">ssssss</samplerData> </sample> </testResults> Note that the sample node name may be either "sample" or "httpSample".String"></queryString> <url>http://www.body&gt.String">Mixed2. &lt.1 200 OK Date: Fri.html&gt.head&gt. Content-Type: text/html. 14.lang./html&gt.lang. charset=ISO-8859-1 </responseHeader> <requestHeader class="java.lang. &lt.String"> ./body&gt.7 Sample Attributes The sample attributes have the following meaning: Attribute Content .lang.lang. </responseData> <cookies class="java.... .String"></queryString> <url>http://www.String">Listen 1-1</responseData> <responseFile class="java.apache.6 XML Log format 2..apache.lang./head&gt.<cookies class="java.lang.String">HTTP/1. ..String">GET</method> <queryString class="java. 14. &lt.unknown</responseFile> <samplerData class="java. &lt.lang.. 07 Apr 2006 00:50:13 GMT .String"></cookies> <method class="java.String"></requestHeader> <responseData class="java.

but read it back expecting to find "rc". 1970 UTC) varname Value of the named variable (versions of JMeter after 2. unless multiple samples are aggregated) Elapsed time (milliseconds) Thread Name timeStamp (milliseconds since midnight Jan 1.3.by de dt ec hn it lb lt na ng rc rm s sc t tn ts Bytes Data encoding Data type Error count (0 or 1. unless multiple samples are aggregated) Hostname where the sample was generated Idle Time = time not spent sampling (milliseconds) (generally 0) Label Latency = time to initial response (milliseconds) .3.1 allow additional variables to be saved with the test plan.1 of JMeter saved the Response Code as "rs".1 and 2.not all samplers support this Number of active threads for all thread groups Number of active threads in this group Response Code (e. OK) Success flag (true/false) Sample count (1. 200) Response Message (e. the variables are saved as additional attributes. This has been corrected so that it is always saved as "rc". See Sample variables (above) for more . either "rc" or "rs" can be read.1) Versions 2. Currently. The testplan variable name is used as the attribute name.1.g. Versions of JMeter after 2.g.

a spreadsheet or text editor.10 Saving Listener GUI data JMeter is capable of saving any listener as a PNG file. 14. you can use the File "Browse. The file name can then be included in the sample log output. Enter the desired name and save the listener. Another solution is to use the Post-Processor Save_Responses_to_a_file . However. If the previous behaviour is required." button to select a file. Click edit -> Save As Image.8 Saving response data As shown above. and use the OS Copy short-cut (normally Control+C).. A file dialog will appear. the header (if present) is used to determine which fields were saved.information. use the menu item Run/Clear (Ctrl+Shift+E) or Run/Clear All (Ctrl+E) before loading the file. just create a dummy testplan with the appropriate Listener in it. This generates a new file for each sample. this can make the file rather large. Results can be read from XML or CSV format files. and the text has to be encoded so that it is still valid XML. select the listener in the left panel.2 used to clear any current data before loading the new file. 14. The data will be retrieved from the file if necessary when the sample log file is reloaded. images cannot be included.9 Loading (reading) response data To view an existing results file. The data will be saved to the clipboard. thus allowing files to be merged. Also. In order to interpret a header-less CSV file correctly. This is no longer done. If necessary. Select the desired cells in the table.3.. e. the response data can be saved in the XML log file if required. and saves the file name with the sample. from where it can be pasted into another application. 14. To do so. The Listeners which generate output as tables can also be saved using Copy/Paste.g. When reading from CSV results files. the appropriate JMeter properties must be set. . Versions of JMeter up to 2.

performance-wise. remote mode does use more resources than running the same number of non-GUI tests independently.the client sends it to all the servers Note: The same test plan is run by all the servers. as can the client network connection. and collect all the data from them.Edit -> Save As Image 15.Figure 1 . If many server instances are used. By running JMeter remotely. you can replicate a test across many lowend computers and thus simulate a larger load on the server. Remote Testing In the event that your JMeter client machine is unable. the client JMeter can become overloaded. to simulate enough users to stress your server. This offers the following features:    Saving of test samples to the local machine Managment of multiple JMeterEngines from a single machine No need to copy the test plan to each server . remote JMeter engines from a single JMeter GUI client. . One instance of the JMeter GUI client can control any number of remote JMeter instances. each runs the full test plan. JMeter does not distribute the load between servers. an option exists to control multiple. However.

g. Alternatively use different content in any datafiles used by the test (e. the JMeter server application starts the RMI registry itself. note that these are not sent across by the client so make sure that these are available in the appropriate directory on each server. Step 2: Add the server IP to your client's Properties File Edit the properties file on the controlling JMeter machine . if each server must use unique ids.3. Step 0: Configure the nodes Make sure that all the nodes (client and servers) are running exactly the same version of JMeter.Note that while you can execute the JMeterEngine on your application server. connecting to a different remote server). By default. also use the same version of Java on all systems. To revert to the previous behaviour. These properties will be picked up when the server is started and may be used in the test plan to affect its behaviour (e. In /bin/jmeter. divide these between the data files) Step 1: Start the servers To run JMeter in remote node.properties. there is no need to start RMI registry separately. it will be used as the local port number for the server engine. If necessary you can define different values for properties by editting the user. Note that there can only be one JMeter server on each node unless different RMI ports are used. so versions of JMeter after 2.2 will check for the JMeter propertyserver. If this is non-zero.g.rmi. find the property named.create=false on the server host systems. This has the same effect as using -r and -Jremote_hosts={serverlist}.bat (windows) script. and add the value of your running JMeter server's IP address.3.g. This can cause problems for firewalls. RMI uses a dynamic port for the JMeter server engine. comma-delimited. Since JMeter 2. define the JMeter property server.rmi. E. If the test uses any data files. Using different versions of Java may work . The recommended approach is to have one or more machines on the same Ethernet segment as your application server that you configure to run the JMeter Engine. jmeter - .1.localport .but is best avoided. start the JMeter server component on all machines you wish to run on by running the JMETER_HOME/bin/jmeter-server (unix) orJMETER_HOME/bin/jmeter-server. you need to be mindful of the fact that this will be adding processing overhead on the application server and thus your testing results will be somewhat tainted. Multiple such servers can be added.properties or system. "remote_hosts".properties files on each server. As far as possible. Note that you can use the -R command line option instead to specify the remote host(s) to use. This will minimize the impact of the network on the test results without impacting the performance of the application serer itself.

start the client with the script "bin/jmeter.1. For UNIX.127.1 Doing it Manually In some cases. The first example will start whatever servers are defined in the JMeter property remote_hosts.0..host2 If you define the JMeter property server. For MS-Windows.exitaftertest=true. Other flags that may be useful: -Gproperty=value . You will notice that the Run menu contains two new sub-menus: "Remote Start" and "Remote Stop" (see figure 1). See also the -X flag (described below) Step 3a: Start the JMeter Client from a GUI client Now you are ready to start the controlling JMeter client.Rhost1. Use the remote start and stop instead of the normal JMeter start and stop menu items.Run Menu Step 3b: Start the JMeter from a non-GUI Client As an alternative. then the server will exit after it runs a single test.Exit remote servers at the end of the test. The command to do this is: jmeter -n -t script. Figure 1 .jmx -r or jmeter -n -t script.bat". you can start the remote server(s) from a non-GUI (command-line) client.jmx -R server1.0.define a property in all the servers (may appear more than once) -Z . the second example will define remote_hosts from the list of servers and then run the remote servers. The command-line client will exit when all the remote servers have stopped. the jmeter-server script may not work for you (if you are using an OS platform . use the script "bin/jmeter".. These menus contain the client that you set in the properties file.server2. 15.

you will need to make sure that they are set up to allow the connections through. 15. By default the application listens to port 1099.not anticipated by the JMeter developers).e. default 1099. use monitoring software to show what traffic is being generated.loader.rmi. Step 1b: Start the JMeter Server Once the RMI Registry application is running.create=false on the server host systems and follow the instructions below. however the options can still be passed in from the JMeter command line.jar JMETER_HOME/lib/logkit-1. Since JMeter 2. The following tips were contributed by Sergey Ten. Here is how to start the JMeter servers (step 1 above) with a more manual process: Step 1a: Start the RMI Registry Since JMeter 2. For example: "jmeter -s Dsun. these tips may help.3. make sure that the following jars are in your system claspath:    JMETER_HOME/lib/ext/ApacheJMeter_core.1. If there are any firewalls or other network filters between JMeter client and server. "rmiregistry") that comes with the JDK and is located in the "bin" directory. start the JMeter Server. Alternatively the properties can . If necessary. JMeter/RMI also requires a reverse connection in order to return sample results from the server to the client. so this section does not apply in the normal case. The default installation may enable the firewall. define the JMeter property server.rmi.2 Tips JMeter/RMI requires a connection from the client to the server.2. JMeter uses Remote Method Invocation (RMI) as the remote communication mechanism. To revert to the previous behaviour. In that case. If you're running Suse Linux. This will use a high-numbered port. the RMI registry is started by the server.jar The rmiregistry application needs access to certain JMeter classes.jar JMETER_HOME/lib/jorphan. Use the "-s" option with the jmeter startup script ("jmeter -s"). the RMI registry is started by the JMeter server. you need to run the RMI Registry application (which is named.3. Before running rmiregistry. remote testing will not work properly. turn on debugging by passing the following options.1. omit the -J prefixes). This will use the port you chose. Run rmiregistry with no parameters. Steps 2 and 3 remain the same. Therefore.logLevel=verbose" (i. If you see connections refused.

2 from etc/hosts.3 Using a different port By default. 15. JMeter uses the standard RMI port 1099.B.rmi.properties file.0. use upper case for the environment variable] In both cases. It is possible to change this. update the remote_hosts property to include the new remote host:port settings Since Jmeter 2. On Windows (in a DOS box) C:\JMETER> SET SERVER_PORT=1664 C:\JMETER> JMETER-SERVER [other options] On Unix: $ SERVER_PORT=1664 jmeter-server [other options] [N. start rmiregistry using the new port number On the server. For example. What happens is jmeter-server can't connect to rmiregistry if 127.1.1 and 127. having defined the "server_port" property.security.2 loopback is not available. start JMeter with the property server_port defined On the client.0.be defined in the system.4 Using sample batching Listeners in the test plan send their results back to the client JMeter which writes the results to .policy=`dirname $0`/[policy_file]" `dirname $0`/jmeter $HOST -s "$@" Also create a policy file and add [computer_name][computer_domain] line to /etc/hosts.log file (rmiregistry does not create a log file).server. assume you want to use port 1664 (perhaps 1099 is already used). The solution to the problem is to remove the loopbacks 127. and then starts JMeter in server mode.0. For this to work successfully.0. Replace  `dirname $0`/jmeter -s "$@" With    HOST="-Djava. the jmeter-server scripts provide support for changing the port.hostname=[computer_name][computer_domain] -Djava. the script starts rmiregistry on the specified port.0.1. 15. Use the following settings to fix the problem.0. all the following need to agree:    On the server. The chosen port will be logged in the server jmeter.

the more each thread has to wait to get access to the CPU. o Batch .number of milliseconds to wait (default 60 seconds) 16.send samples as soon as they are generated o Hold . This may use a lot of memory on the server.default is Standard o Standard . samples are sent back as they are generated.remove responseData from succesful samples StrippedBatch . It will also depend on how fast your server is (a faster server gives makes JMeter work harder since it returns request quicker). The more work JMeter does.send a summary sample when either the count or time exceeds a threshold. This must implement the interface SampleSender and have a constructor which takes a single parameter of type RemoteSampleListener. and send as batches Custom implementation : set the mode parameter to your custom sample sender class name. 16. o o o Stripped . The more JMeter works. If you need large-scale load testing.hold samples in an array until the end of a run. the more inflated the timing information gets.remove responseData from succesful samples. The following properties apply to the Batch and Statistical modes:   num_sample_threshold . consider running multiple non-GUI JMeter instances on multiple machines. Best Practices 16. This can place a large load on the network and the JMeter client.the specified files By default.1 Limit the Number of Threads Your hardware's capabilities will limit the number of threads you can effectively run with JMeter.sample sending mode . the less accurate its timing information will be.  mode . The samples are summarised by thread group name and sample label.send saved samples when either the count or time exceeds a threshold o Statistical . There are some JMeter properties that can be set to alter this behaviour. The following fields are accumulated:  elapsed time  latency  bytes  sample count  error count Other fields that vary between samples are lost.2 Where to Put the Cookie Manager .number of samples in a batch (default 100) time_threshold .

If JMeter does not record any samples. The Proxy Server expects to find a ThreadGroup element with a Recording Controller under it where it will record HTTP Requests to. For instance. The error "unknown_ca" probably means that you are trying to record HTTPS. try using the local hostname or IP instead. Alternatively. use JMeter to record your actions to define your test cases. These will just clutter your test plan.gif" as an "Exclude Pattern". then the browser cannot be using the proxy.0.jsp. Depending on your application.4 Using the Proxy Server Refer to HTTP Proxy Server for details on setting up the proxy server. go through the steps of a Test Case. Once you have finished a definite series of steps. you can have JMeter automatically replace values in you recorded samples.example. For instance. and anyplace that value is found in your recorded samples will be replaced with "${server}". Most likely. One of the most useful features of the Proxy Server is that you can abstract out certain common elements from the recorded samples. there's no point in recording image requests (JMeter can be instructed to download all images on a page . wipe clean and start a new test case. javascript files.com". and the browser has not accepted the JMeter Proxy server certificate.*\.php. 16. if you are testing an app on server "xxx. Some browsers ignore proxy settings for localhost or 127. . 16. These you should "include" by entering ". then you can define a variable called "server" with the value of "xxx. check that the brower really is using the proxy. This conveniently packages all your samples under one controller.asp. you can quickly record a large number of test case "rough drafts".3 Where to Put the Authorization Manager See Building an Advanced Web Test for information. If the browser works OK even if JMeter is not running. and then erase and start fresh. Please note that matching is case-sensitive.com". . save the entire test case in an appropriately named file. there is an extension all your files share. Now. Test out your settings to verify you are recording what you want. You may also have to exclude stylesheets. . By doing this. Then. If you have no pre-defined test cases. this may or may not be a better way to go.jsp" as an "Include Pattern". and other included files.see HTTP Request ).example. which can be given a name that describes the test case.*\.0. By defining some user-defined variablesat the Test Plan level or in User Defined Variables elements. such as . you can exclude images by entering ". .See Building a Web Test for information.1. The most important thing to do is filter out all requests you aren't interested in.html or the like.

16. by a firewall. Anyone who can connect to the port can issue any BeanShell commands. which is accessible by telnet or http.7 BeanShell server The BeanShell interpreter has a very useful feature .16. 16. you might want to test a sequence that requires a unique login for each user. Do not enable the server unless the ports are protected against access. For example:    Create a text file containing the user names and passwords. Rather than using lots of similar samplers. [The Include Controller does not help here.create the test data in a file that can be read with CSV Dataset. Name the variables USER and PASS. Replace the login name with ${USER} and the password with ${PASS} on the appropriate samplers The CSV Data Set element will read a new line for each thread.5 User variables Some test plans need to use different values for different users/threads. separated by commas. There is no security. as it adds all the test elements in the file to the test plan. Or perhaps use the Access Log Sampler.6 Reducing resource requirements Some suggestions on reducing resource usage. These can provide unrestricted access to the JMeter application and the host. This avoids wasting resources at run-time. and use variables (CSV Data Set) to vary the sample. For example.] Don't use functional mode Use CSV output rather than XML Only save the data that you need Use as few Assertions as possible If your test needs large amounts of data .        Use non-GUI mode: jmeter -n -t test. use the same sampler in a loop.it can act as a server.jtl Use as few Listeners as possible. .g.jmx -l test. if using the -l flag as above they can all be deleted or disabled. e.particularly if it needs to be randomised . Add a CSV DataSet configuration element to the test plan. This is easy to achieve with the facilities provided by JMeter. Put this in the same directory as your test plan.

// Final value secs=Integer. and will listen on ports 9000 and 9001. say). and you want to vary the throughput at various times during the test.jar localhost 9000 throughput. Port 9001 will be used for telnet access.port=9000 beanshell. This is what you should see in the JMeter console: Startup script running Startup script completed Httpd started on port: 9000 Sessiond started on port: 9001 As a practical example.g. the server will be started. The following BeanShell commands could be used to change the test: printprop("throughput").bsh In the above example. ${__P(throughput)}.bsh. The test-plan includes a Constant Throughput Timer which is defined in terms of a property. // Wait between changes while(curr <= end){ setprop("throughput". // Increment end=Integer. and sent to the server using bshclient..toString()). The script can be stored in a file (throughput. The startup file defines methods for setting and printing JMeter and system properties.jar. curr=Integer.If you do wish to use the server. define the following in jmeter.bsh 70 5 100 60 16.curr. // Start value inc=Integer. Port 9000 will be used for http access.properties: beanshell.. The startup.decode(args[0]).8 BeanShell scripting 16. e. and can be used to define various functions and set up variables.1 Overview .sleep(secs*1000).decode(args[2]).file=. For example: java -jar .server./extras/startup. curr += inc.bsh file will be processed by the server./lib/bshclient. // Needs to be a string here Thread. } printprop("throughput").server.decode(args[1]).8.decode(args[3]). assume you have a long-running JMeter test running in non-GUI mode.

bshrc files contain sample definitions of getprop() and setprop() methods. "value").shared.2 Sharing Variables Variables can be defined in startup (initialisation) scripts.jar bsh."").shared" shared namespace.jar[.shared.Each BeanShell test element has its own copy of the interpreter (for each thread).get("HOST"). unless the reset option is used.setProperty("name". For example: if (bsh. JMeterUtils. The sample . The get() and put() methods only support variables with String values. If the test element is repeatedly called. If you need to share variables between threads.8. JMeter variables are local to a thread. but can be used by all test elements (not just Beanshell). ^Z or ^D) 16. if this is the case try using the reset option. } bsh."Successful"). bsh% exit(). so create it: myObj=new AnyObject().\ Scripts can also access JMeter variables using the get() and put() methods of the "vars" variable. These will be retained across invocations of the test element. You can test BeanShell scripts outside JMeter by using the command-line interpreter: $ java -cp bsh-xxx. it can be created in the startup file defined by the . Rather than creating the object in the test element.jmeter.other jars as needed] bsh. vars.Interpreter before each call" option is selected. e.bsh"). // or use EOF key (e. String value=JMeterUtils. Another possible method of sharing variables is to use the "bsh. for example: vars.JMeterUtils. Some long-running tests may cause the interpreter to use lots of memory.Interperter bsh% source("file.g.g. but there are also getObject() and putObject() methods which can be used for arbitrary objects.myObj. then JMeter properties can be used: import org. within a loop.process(). .util.getPropDefault("name".apache.myObj == void){ // not yet defined.Interperter file.put("MSG". then the interpreter is retained between invocations unless the "Reset bsh.bsh [parameters] or $ java -cp bsh-xxx.

There are a number of questions to be asked first. The script variable can then be used to create the function call. and test it by running the test. A number of tools will prove useful. and then use those variables in the test elements. The "loops" property can then be defined on the JMeter command-line: jmeter . or changing a hostname.9 Developing script functions in BeanShell. The appropriate property file can be passed in to JMeter using the -q command-line option.. The function call can then be coded as ${__BeanShell(${RANDOM_NAME})} . Code the script in the sampler script pane. This quickly becomes tedious if you want to run lots of tests in non-GUI mode. for exampleLOOPS=${__P(loops.init. One way to do this is to define a set of variables on the Test Plan. To run the test with 20 loops. If there are a lot of properties that need to be changed together. For example. it can be stored as a variable on the Test Plan. You will need some hardware to run the benchmarks/load-tests from. For example. just change the value of the LOOPS variable on the Test Plan. There is no need to escape any commas in the script. 17. This is only processed once. One solution to this is to define the Test Plan variable in terms of a property. and additionally a number of resources that will be needed. 17. It's quite hard to write and test scripts as functions. And finally. defaulting to 10 if the property is not found..10 Parameterising tests Often it is useful to be able to re-run the same test with different settings. .1 Questions to ask . Javascript or Jexl etc. However.10))} . changing the number of threads or loops.JMeter property "beanshell. If there are any errors. This uses the value of the property "loops". JMeter has the BSF (and BeanShell) samplers which can be used instead. these will show up in the Tree View.. For example. Help! My boss wants me to load test our web app! This is a fairly open-ended proposition. suppose a BeanShell script is stored in the variable RANDOM_NAME. why is Java a good choice to implement a loadtesting/Benchmarking product. -Jloops=12 . and refer to that in the Thread Group as ${LOOPS}. one could define the variable LOOPS=10. Once the script is working properly. Also the result of running the script will show up as the response. There are a number of products to consider.file".. Create a simple Test Plan containing the BSF Sampler and Tree View Listener. then one way to achieve this is to use a set of property files. 16. because the function call is parsed before the variable's value is interpolated. 16.

2. bearing in mind that this may very well crash one or more of our servers ? Does our application have state ? If so. As well. and you probably anticipate more users than that). 17.e. As you already have your work cut out for you. how does our application manage it (cookies. It is not uncommon to discover problems with the application during this process.can we benchmark our application?) benchmark (the average number of users) load-test (the maximum number of users) test destructively (what is our hard limit?) The test process may progress from black-box testing to white-box testing (the difference is that the first requires no knowledge of the application [it is treated as a "black box"] while the second requires some knowledge of the application). the first thing your clients will do is hire a graduate student to verify them. Knowing who can set one up for you (if you feel that this is necessary) will be very useful. it is worth knowing who the following people are. Bear in mind that if you cannot locate these resources. If the application doesn't scale as expected. 17. who can add additional hardware ? 17. off-hours or week-ends).3 What platform should I use to run the benchmarks/load-tests ? This should be a widely-used piece of hardware. or some other method) ? What is the testing intended to achieve? 17. with a standard (i.e. You might as well make it as easy for this person as you possibly can.What is our anticipated average number of users (normal load) ? What is our anticipated peak number of users ? When is a good time to load-test our application (i. a private testing network (which will therefore have very low network latency) would be a very nice thing. Windows XP Professional should be a minimum (the others do not multi-thread past 50-60 connections.2 Resources The following resources will prove very helpful. so that you can ask them for help if you need it.2. you will become these resources. Remember. if you publish your results.1 Network Who knows our network topology ? If you run into any firewall or proxy issues. sessionrewriting. vanilla) software installation. For Windows. .2 Application Who knows how our application functions ? The normal sequence is     test (low-volume . so be prepared to defend your work. this will become very important.

If you can justify it. 17. For non-Windows platforms.3 traceroute If you cannot "ping" your target site. 17. and Solaris Intel. investigate "ulimit -n unlimited" with a view to including it in your user account startup scripts (.1 ping This can be used to establish whether or not you can reach your target site.5 What other products are there ? There are a number of commercial products. etc) is probably the best choice. there are commercial linuxes. and reading the appropriate documentation (manpages. or you are on a limited budget. or you can use CSV output and import the data into a spreadsheet. It is definitely worthwhile to become familiar with them. Generally.1 Apache 'ab' tool You should definitely start with this one. this may be used to determine the problem (possibly a firewall or a proxy). It can also be used to estimate the overall network latency (running locally should give the lowest possible network latency . These can be used to determine the unique address (dotted quad) of your target site.remember that your users will be running over a possibly busy internet). 17. the fewer hops the better. If you have a little more money.4.4. So it's worth using the best hardware and software that you have available. Batch (non-GUI) mode can reduce the network traffic compared with using a remote display or client-server mode. As you progress to larger-scale benchmarks/load-tests. as it may very well do the job if your requirements are not particularly complicated. 17.bashrc or .5. which generally have fairly hefty pricetags. a commercial Unix (Solaris. these are probably the way to go. and any supplied documentation). Options can be specified so that 'ping' provides the same type of route reporting as 'traceroute'. and can be .4 Tools The following tools will all prove useful. It handles HTTP 'get' requests very well. This can be useful if you have a powerful server that supports Java but perhaps does not have a fast graphics implementation. The batch log file can then be loaded into JMeter on a workstation for analysis. Remember to include the hardware/software configuration in your published benchmarks. 17. If you can justify it. however. Don't forget JMeter batch mode.Good free platforms include the linuxes. This should include trying them out. you may wish to avoid the overhead of DNS lookups when performing benchmarking/load-testing. the BSDs.cshrc scripts for the testing account). 17. you should probably start by trying the Apache ab tool. the following are worth a look.4. this platform will become the limiting factor. application --help messages. or where you need to login remotely. If. these products do not do exactly what you want.2 nslookup/dig While the user will normally use a human-readable internet address. info-files. In fact.

This product is free to evolve along with your requirements.as well as RMI. of course. and offers good (if basic) performance reporting. C. It has an excellent user interface but it may not do exactly what you want. 17. it performs very well. If you find that someone has already written something that seems useful. . 17. FTP.5. then this solution offers an open-source community to provide them (of course. Perl might be a very good choice except that the Benchmark package seems to give fairly fuzzy results. simulating multiple users with Perl is a tricky proposition (multiple connections can be simulated by forking many processes from a shell script.made to handle HTTP 'post' requests with a little effort. if you are reading this . 17. and state management code that you will need to benchmark your application. threading. is a very good choice (check out the Apache ab tool). However.5. Also. Java is aware of HTTP. It is intended to be used instead of a web browser (therefore no GUI) in conjunction with JUnit . But be prepared to write all of the custom networking. they will be processes).6 Why Java ? Why not Perl or C ? Well. If this is the case. the Perl community is very large. but these will not be threads. IIOP. It is a library (and therefore of more interest to developers) that can be used to perform HTTP tests/benchmarks. Written in 'C'. and state management code that you will need to benchmark your application. Java gives you (for free) the custom networking. In addition Java gives you automatic garbage-collection. And once Microsoft moves to a CLR (common language run-time) a Windows Java solution will not be any slower than any other type of solution on the Windows platform. this could be a very good solution. and byte-code level security. 17. you are probably already committed to this one). and URL-rewriting).3 Microsoft WAS This is definitely worth a look.5. and JDBC (not to mention cookies. URL-encoding. and HTTPS .4 JMeter If you have non-standard requirements. threading.2 HttpUnit This is worth a look. be aware that the functionality of this product is not likely to change.

Sign up to vote on this title
UsefulNot useful