You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jmeter-dev@jakarta.apache.org by se...@apache.org on 2009/05/10 00:57:48 UTC
svn commit: r773282 [8/16] - in /jakarta/jmeter/trunk/docs: ./ localising/
usermanual/
Modified: jakarta/jmeter/trunk/docs/usermanual/build-monitor-test-plan.html
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/docs/usermanual/build-monitor-test-plan.html?rev=773282&r1=773281&r2=773282&view=diff
==============================================================================
--- jakarta/jmeter/trunk/docs/usermanual/build-monitor-test-plan.html (original)
+++ jakarta/jmeter/trunk/docs/usermanual/build-monitor-test-plan.html Sat May 9 22:57:45 2009
@@ -18,28 +18,28 @@
<!-- Content Stylesheet for Site -->
-
+
<!-- start the processing -->
- <!-- ====================================================================== -->
- <!-- Main Page Section -->
- <!-- ====================================================================== -->
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
-
-
-
- <title>JMeter - User's Manual: Building a Monitor Test Plan</title>
- </head>
-
- <body bgcolor="#ffffff" text="#000000" link="#525D76">
- <table border="0" cellspacing="0">
- <!-- TOP IMAGE -->
- <tr>
- <td>
+<!-- ====================================================================== -->
+<!-- Main Page Section -->
+<!-- ====================================================================== -->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
+
+
+
+<title>JMeter - User's Manual: Building a Monitor Test Plan</title>
+</head>
+
+<body bgcolor="#ffffff" text="#000000" link="#525D76">
+<table border="0" cellspacing="0">
+<!-- TOP IMAGE -->
+<tr>
+<td>
<!-- Need to specify height otherwise iframe seems to grab extra -->
<iframe src="http://www.apache.org/ads/halfbanner.html" height="102"
- style="border-width:0; float: left" frameborder="0" scrolling="no"></iframe>
+style="border-width:0; float: left" frameborder="0" scrolling="no"></iframe>
</td>
<td align="left">
<a href="http://jakarta.apache.org"><img width="505" height="48" src="../images/jakarta-logo.gif" alt="Jakarta" title="Jakarta" border="0"/></a>
@@ -47,104 +47,103 @@
<td align="right">
<a href="http://jakarta.apache.org/jmeter/"><img width="221" height="102" src="../images/logo.jpg" alt="JMeter" title="JMeter" border="0"/></a>
</td>
- </tr>
- </table>
- <table border="0" width="100%" cellspacing="4">
- <tr><td colspan="2">
- <hr noshade size="1"/>
- </td></tr>
-
- <tr>
- <!-- LEFT SIDE NAVIGATION -->
- <td width="20%" valign="top" nowrap="true">
- <p><strong>About</strong></p>
- <ul>
- <li> <a href="../index.html">Overview</a>
-</li>
- <li> <a href="../changes.html">Changes</a>
-</li>
- <li> <a href="../known_bugs.html">Known Bugs</a>
-</li>
- <li> <a href="../license.html">License</a>
-</li>
- <li> <a href="http://wiki.apache.org/jakarta-jmeter/JMeterCommitters">Contributors</a>
-</li>
- </ul>
- <p><strong>Download</strong></p>
- <ul>
- <li> <a href="http://jakarta.apache.org/site/downloads/downloads_jmeter.cgi">Download Releases</a>
-</li>
- <li> <a href="../nightly.html">Developer (Nightly) Builds</a>
-</li>
- </ul>
- <p><strong>Documentation</strong></p>
- <ul>
- <li> <a href="../usermanual/index.html">User Manual</a>
-</li>
- <li> <a href="../api/index.html">Javadocs</a>
-</li>
- <li> <a href="../localising/index.html">Localisation (Translator's Guide)</a>
-</li>
- <li> <a href="../building.html">Building JMeter and Add-Ons</a>
-</li>
- <li> <a href="http://wiki.apache.org/jakarta-jmeter">JMeter Wiki</a>
-</li>
- <li> <a href="http://wiki.apache.org/jakarta-jmeter/JMeterFAQ">FAQ (Wiki)</a>
-</li>
- </ul>
- <p><strong>Tutorials (PDF format)</strong></p>
- <ul>
- <li> <a href="../usermanual/jmeter_distributed_testing_step_by_step.pdf">Distributed Testing</a>
-</li>
- <li> <a href="../usermanual/jmeter_proxy_step_by_step.pdf">Recording Tests</a>
-</li>
- <li> <a href="../usermanual/junitsampler_tutorial.pdf">JUnit Sampler</a>
-</li>
- <li> <a href="../usermanual/jmeter_accesslog_sampler_step_by_step.pdf">Access Log Sampler</a>
-</li>
- <li> <a href="../extending/jmeter_tutorial.pdf">Extending JMeter</a>
-</li>
- </ul>
- <p><strong>Community</strong></p>
- <ul>
- <li> <a href="http://jakarta.apache.org/site/getinvolved.html">Get Involved</a>
-</li>
- <li> <a href="http://jakarta.apache.org/site/mail.html">Mailing Lists</a>
-</li>
- <li> <a href="http://jakarta.apache.org/site/cvsindex.html">SVN Repositories</a>
-</li>
- </ul>
- </td>
- <td width="80%" align="left" valign="top">
- <table>
- <tr>
- <td bgcolor="#525D76">
- <div align="right"><a href="index.html"><font size=-1 color="#ffffff" face="arial,helvetica,sanserif">Index</font></a></div>
- </td>
- <td bgcolor="#525D76">
- <div align="right"><a href="listeners.html"><font size=-1 color="#ffffff" face="arial,helvetica,sanserif">Next</font></a></div>
- </td>
- <td bgcolor="#525D76">
- <div align="right"><a href="build-jms-topic-test-plan.html"><font size=-1 color="#ffffff" face="arial,helvetica,sanserif">Prev</font></a></div>
- </td>
- </tr>
- </table>
- <br>
- <table border="0" cellspacing="0" cellpadding="2" width="100%">
- <tr><td bgcolor="#525D76">
- <font color="#ffffff" face="arial,helvetica,sanserif">
- <a name="building"><strong>13. Building a Monitor Test Plan</strong></a>
- </font>
- </td></tr>
- <tr><td>
- <blockquote>
- <p >
- In this section, you will learn how to create a
-
- <a href="build-test-plan.html">
- Test Plan
- </a>
- to monitor webservers. Monitors
+</tr>
+</table>
+<table border="0" width="100%" cellspacing="4">
+<tr><td colspan="2">
+<hr noshade size="1"/>
+</td></tr>
+<tr>
+<!-- LEFT SIDE NAVIGATION -->
+<td width="20%" valign="top" nowrap="true">
+<p><strong>About</strong></p>
+<ul>
+<li><a href="../index.html">Overview</a>
+</li>
+<li><a href="../changes.html">Changes</a>
+</li>
+<li><a href="../known_bugs.html">Known Bugs</a>
+</li>
+<li><a href="../license.html">License</a>
+</li>
+<li><a href="http://wiki.apache.org/jakarta-jmeter/JMeterCommitters">Contributors</a>
+</li>
+</ul>
+<p><strong>Download</strong></p>
+<ul>
+<li><a href="http://jakarta.apache.org/site/downloads/downloads_jmeter.cgi">Download Releases</a>
+</li>
+<li><a href="../nightly.html">Developer (Nightly) Builds</a>
+</li>
+</ul>
+<p><strong>Documentation</strong></p>
+<ul>
+<li><a href="../usermanual/index.html">User Manual</a>
+</li>
+<li><a href="../api/index.html">Javadocs</a>
+</li>
+<li><a href="../localising/index.html">Localisation (Translator's Guide)</a>
+</li>
+<li><a href="../building.html">Building JMeter and Add-Ons</a>
+</li>
+<li><a href="http://wiki.apache.org/jakarta-jmeter">JMeter Wiki</a>
+</li>
+<li><a href="http://wiki.apache.org/jakarta-jmeter/JMeterFAQ">FAQ (Wiki)</a>
+</li>
+</ul>
+<p><strong>Tutorials (PDF format)</strong></p>
+<ul>
+<li><a href="../usermanual/jmeter_distributed_testing_step_by_step.pdf">Distributed Testing</a>
+</li>
+<li><a href="../usermanual/jmeter_proxy_step_by_step.pdf">Recording Tests</a>
+</li>
+<li><a href="../usermanual/junitsampler_tutorial.pdf">JUnit Sampler</a>
+</li>
+<li><a href="../usermanual/jmeter_accesslog_sampler_step_by_step.pdf">Access Log Sampler</a>
+</li>
+<li><a href="../extending/jmeter_tutorial.pdf">Extending JMeter</a>
+</li>
+</ul>
+<p><strong>Community</strong></p>
+<ul>
+<li><a href="http://jakarta.apache.org/site/getinvolved.html">Get Involved</a>
+</li>
+<li><a href="http://jakarta.apache.org/site/mail.html">Mailing Lists</a>
+</li>
+<li><a href="http://jakarta.apache.org/site/cvsindex.html">SVN Repositories</a>
+</li>
+</ul>
+</td>
+<td width="80%" align="left" valign="top">
+<table>
+<tr>
+<td bgcolor="#525D76">
+<div align="right"><a href="index.html"><font size=-1 color="#ffffff" face="arial,helvetica,sanserif">Index</font></a></div>
+</td>
+<td bgcolor="#525D76">
+<div align="right"><a href="listeners.html"><font size=-1 color="#ffffff" face="arial,helvetica,sanserif">Next</font></a></div>
+</td>
+<td bgcolor="#525D76">
+<div align="right"><a href="build-jms-topic-test-plan.html"><font size=-1 color="#ffffff" face="arial,helvetica,sanserif">Prev</font></a></div>
+</td>
+</tr>
+</table>
+<br>
+<table border="0" cellspacing="0" cellpadding="2" width="100%">
+<tr><td bgcolor="#525D76">
+<font color="#ffffff" face="arial,helvetica,sanserif">
+<a name="building"><strong>13. Building a Monitor Test Plan</strong></a>
+</font>
+</td></tr>
+<tr><td>
+<blockquote>
+<p>
+In this section, you will learn how to create a
+
+<a href="build-test-plan.html">
+Test Plan
+</a>
+ to monitor webservers. Monitors
are useful for a stress testing and system management. Used with stress
testing, the monitor provides additional information about server performance.
It also makes it easier to see the relationship between server performance
@@ -153,288 +152,299 @@
The monitor was designed to work with the status servlet in Tomcat 5. In
theory, any servlet container that supports JMX (Java Management Extension)
can port the status servlet to provide the same information.
- </p>
- <p >
- For those who want to use the monitor with other servlet or EJB containers,
+</p>
+<p>
+For those who want to use the monitor with other servlet or EJB containers,
Tomcat's status servlet should work with other containers for the memory
statistics without any modifications. To get thread information, you will
need to change the MBeanServer lookup to retrieve the correct MBeans.
- </p>
- </blockquote>
- </p>
- </td></tr>
- <tr><td><br></td></tr>
- </table>
- <table border="0" cellspacing="0" cellpadding="2" width="100%">
- <tr><td bgcolor="#525D76">
- <font color="#ffffff" face="arial,helvetica,sanserif">
- <a name="adding_server"><strong>13.1 Adding A Server</strong></a>
- </font>
- </td></tr>
- <tr><td>
- <blockquote>
- <p >
- The first step is to add a
- <a href="test_plan.html#thread_group">
- Thread Group
- </a>
-
+</p>
+</blockquote>
+</p>
+</td></tr>
+<tr><td><br></td></tr>
+</table>
+<table border="0" cellspacing="0" cellpadding="2" width="100%">
+<tr><td bgcolor="#525D76">
+<font color="#ffffff" face="arial,helvetica,sanserif">
+<a name="adding_server"><strong>13.1 Adding A Server</strong></a>
+</font>
+</td></tr>
+<tr><td>
+<blockquote>
+<p>
+The first step is to add a
+<a href="test_plan.html#thread_group">
+Thread Group
+</a>
+
element. The Thread Group tells JMeter the number of threads you want. Always use
1, since we are using JMeter as a monitor. This is very important for those not
familiar with server monitors. As a general rule, using multiple threads for a
single server is bad and can create significant stress.
- </p>
- <p >
- Go ahead and add the ThreadGroup element by first selecting the Test Plan,
+</p>
+<p>
+Go ahead and add the ThreadGroup element by first selecting the Test Plan,
clicking your right mouse button to get the Add menu, and then select
Add --> ThreadGroup.
- </p>
- <p >
- You should now see the Thread Group element under Test Plan. If you do not
+</p>
+<p>
+You should now see the Thread Group element under Test Plan. If you do not
see the element, "expand" the Test Plan tree by clicking on the Test Plan element.
- </p>
- <p><table border="0" cellspacing="0" cellpadding="0"><tr><td><img src="../images/screenshots/webtest/threadgroup.png"><br>
- <font size="-1">
-Figure 10.1. Thread Group with Default Values
- </font></td></tr></table></p>
- <p >
- Change the loop count to forever (or some large number) so that enough samples are generated.
- </p>
- </blockquote>
- </p>
- </td></tr>
- <tr><td><br></td></tr>
- </table>
- <table border="0" cellspacing="0" cellpadding="2" width="100%">
- <tr><td bgcolor="#525D76">
- <font color="#ffffff" face="arial,helvetica,sanserif">
- <a name="adding_auth"><strong>13.2 HTTP Auth Manager</strong></a>
- </font>
- </td></tr>
- <tr><td>
- <blockquote>
- <p >
- Add the
- <a href="../usermanual/component_reference.html#HTTP_Authorization_Manager">HTTP Authorization Manager</a>
- to the Thread Group element
+</p>
+<p><table border="0" cellspacing="0" cellpadding="0"><tr><td><img src="../images/screenshots/webtest/threadgroup.png"><br>
+<font size="-1">
+Figure 13.1. Thread Group with Default Values
+</font></td></tr></table></p>
+<p>
+Change the loop count to forever (or some large number) so that enough samples are generated.
+</p>
+</blockquote>
+</p>
+</td></tr>
+<tr><td><br></td></tr>
+</table>
+<table border="0" cellspacing="0" cellpadding="2" width="100%">
+<tr><td bgcolor="#525D76">
+<font color="#ffffff" face="arial,helvetica,sanserif">
+<a name="adding_auth"><strong>13.2 HTTP Auth Manager</strong></a>
+</font>
+</td></tr>
+<tr><td>
+<blockquote>
+<p>
+Add the
+<a href="../usermanual/component_reference.html#HTTP_Authorization_Manager">HTTP Authorization Manager</a>
+ to the Thread Group element
(Add --> Config element --> HTTP Authorization Manager). Enter the username
and password for your webserver. Important note: the monitor only works with
Tomcat5 build 5.0.19 and newer. For instructions on how to setup Tomcat, please
refer to tomcat 5 documentation.
- </p>
- <ol >
-
-
- <li >
- leave the base URL blank
- </li>
-
-
- <li >
- enter the username
- </li>
-
-
- <li >
- enter the password
- </li>
-
-
- </ol>
- </blockquote>
- </p>
- </td></tr>
- <tr><td><br></td></tr>
- </table>
- <table border="0" cellspacing="0" cellpadding="2" width="100%">
- <tr><td bgcolor="#525D76">
- <font color="#ffffff" face="arial,helvetica,sanserif">
- <a name="adding_request"><strong>13.3 Adding HTTP Request</strong></a>
- </font>
- </td></tr>
- <tr><td>
- <blockquote>
- <p >
- Add the
- <a href="../usermanual/component_reference.html#HTTP_Request">HTTP Request</a>
- to the Thread Group element
+</p>
+<ol>
+
+
+<li>
+ leave the base URL blank
+</li>
+
+
+<li>
+ enter the username
+</li>
+
+
+<li>
+ enter the password
+</li>
+
+
+</ol>
+</blockquote>
+</p>
+</td></tr>
+<tr><td><br></td></tr>
+</table>
+<table border="0" cellspacing="0" cellpadding="2" width="100%">
+<tr><td bgcolor="#525D76">
+<font color="#ffffff" face="arial,helvetica,sanserif">
+<a name="adding_request"><strong>13.3 Adding HTTP Request</strong></a>
+</font>
+</td></tr>
+<tr><td>
+<blockquote>
+<p>
+Add the
+<a href="../usermanual/component_reference.html#HTTP_Request">HTTP Request</a>
+ to the Thread Group element
(Add --> Sampler --> HTTP Request). Then, select the HTTP Request element
in the tree and edit the following properties):
- <ol >
-
+<ol>
+
+
+<li>
+Change the Name field to "Server Status".
+</li>
+
+
+<li>
+Enter the IP address or Hostname
+</li>
+
- <li >
- Change the Name field to "Server Status".
- </li>
-
-
- <li >
- Enter the IP address or Hostname
- </li>
-
-
- <li >
- Enter the port number
- </li>
-
-
- <li >
- Set the Path field to "/manager/status" if you're using Tomcat.
- </li>
-
+<li>
+Enter the port number
+</li>
+
+
+<li>
+Set the Path field to "/manager/status" if you're using Tomcat.
+</li>
- <li >
- Add a request parameter named "XML" in uppercase. Give it a value of
+
+<li>
+Add a request parameter named "XML" in uppercase. Give it a value of
"true" in lowercase.
- </li>
-
+</li>
+
+
+<li>
+Check "Use as Monitor" at the bottom of the sampler
+</li>
+
+
+</ol>
+
- <li >
- Check "Use as Monitor" at the bottom of the sampler
- </li>
-
-
- </ol>
-
-
- </p>
- </blockquote>
- </p>
- </td></tr>
- <tr><td><br></td></tr>
- </table>
- <table border="0" cellspacing="0" cellpadding="2" width="100%">
- <tr><td bgcolor="#525D76">
- <font color="#ffffff" face="arial,helvetica,sanserif">
- <a name="adding_timer"><strong>13.4 Adding Constant Timer</strong></a>
- </font>
- </td></tr>
- <tr><td>
- <blockquote>
- <p >
- Add a timer to this thread group (Add --> Timer --> Constant Timer).
+</p>
+</blockquote>
+</p>
+</td></tr>
+<tr><td><br></td></tr>
+</table>
+<table border="0" cellspacing="0" cellpadding="2" width="100%">
+<tr><td bgcolor="#525D76">
+<font color="#ffffff" face="arial,helvetica,sanserif">
+<a name="adding_timer"><strong>13.4 Adding Constant Timer</strong></a>
+</font>
+</td></tr>
+<tr><td>
+<blockquote>
+<p>
+Add a timer to this thread group (Add --> Timer --> Constant Timer).
Enter 5000 milliseconds in the "Thread Delay" box. In general, using intervals shorter
than 5 seconds will add stress to your server. Find out what is an acceptable interval
before you deploy the monitor in your production environment.
- </p>
- </blockquote>
- </p>
- </td></tr>
- <tr><td><br></td></tr>
- </table>
- <table border="0" cellspacing="0" cellpadding="2" width="100%">
- <tr><td bgcolor="#525D76">
- <font color="#ffffff" face="arial,helvetica,sanserif">
- <a name="adding_listener"><strong>13.5 Adding a Listener to Store the Results</strong></a>
- </font>
- </td></tr>
- <tr><td>
- <blockquote>
- <p >
- If you want to save the raw results from the server, add a simple data
+</p>
+</blockquote>
+</p>
+</td></tr>
+<tr><td><br></td></tr>
+</table>
+<table border="0" cellspacing="0" cellpadding="2" width="100%">
+<tr><td bgcolor="#525D76">
+<font color="#ffffff" face="arial,helvetica,sanserif">
+<a name="adding_listener"><strong>13.5 Adding a Listener to Store the Results</strong></a>
+</font>
+</td></tr>
+<tr><td>
+<blockquote>
+<p>
+If you want to save the raw results from the server, add a simple data
- <a href="component_reference.html#listeners">
- Listener
- </a>
- . If you want to save the
+<a href="component_reference.html#listeners">
+Listener
+</a>
+. If you want to save the
calculated statistics, enter a filename in the listener. If you want to save both
the raw data and statistics, make sure you use different filenames.
- </p>
- <p >
- Select the thread group element and add a
- <a href="../usermanual/component_reference.html#Simple_Data_Writer">Simple Data Writer</a>
- listener
+</p>
+<p>
+Select the thread group element and add a
+<a href="../usermanual/component_reference.html#Simple_Data_Writer">Simple Data Writer</a>
+ listener
(Add --> Listener --> Simple Data Writer). Next, you need to specify a directory
and filename of the output file. You can either type it into the filename field, or
select the Browse button and browse to a directory and then enter a filename.
- </p>
- </blockquote>
- </p>
- </td></tr>
- <tr><td><br></td></tr>
- </table>
- <table border="0" cellspacing="0" cellpadding="2" width="100%">
- <tr><td bgcolor="#525D76">
- <font color="#ffffff" face="arial,helvetica,sanserif">
- <a name="add_monitor_listener"><strong>13.6 Adding Monitor Results</strong></a>
- </font>
- </td></tr>
- <tr><td>
- <blockquote>
- <p >
- Add the
- <a href="component_reference.html#listeners">
- Listener
- </a>
- by selecting the
-test plan element (Add --> Listener -- > Monitor Results). There are two tabs in
+</p>
+</blockquote>
+</p>
+</td></tr>
+<tr><td><br></td></tr>
+</table>
+<table border="0" cellspacing="0" cellpadding="2" width="100%">
+<tr><td bgcolor="#525D76">
+<font color="#ffffff" face="arial,helvetica,sanserif">
+<a name="add_monitor_listener"><strong>13.6 Adding Monitor Results</strong></a>
+</font>
+</td></tr>
+<tr><td>
+<blockquote>
+<p>
+Add the
+<a href="component_reference.html#listeners">
+Listener
+</a>
+ by selecting the
+test plan element (Add --> Listener -- > Monitor Results).
+
+<br>
+</br>
+
+By default, the Listener will select the results from the first connector in the sample response.
+The Connector prefix field can be used to select a different connector.
+If specified, the Listener will choose the first connector which matches the prefix.
+If no match is found, then the first connector is selected.
+
+</p>
+<p>
+There are two tabs in
the monitor results listener. The first is the "Health", which displays the status of
the last sample the monitor received. The second tab is "Performance", which shows a
historical view of the server's performance.
- </p>
- <p><table border="0" cellspacing="0" cellpadding="0"><tr><td><img src="../images/screenshots/monitor_health.png"><br>
- <font size="-1"> </font></td></tr></table></p>
- <p >
- A quick note about how health is calculated. Typically, a server will crash if
+</p>
+<p><table border="0" cellspacing="0" cellpadding="0"><tr><td><img src="../images/screenshots/monitor_health.png"><br>
+<font size="-1"></font></td></tr></table></p>
+<p>
+A quick note about how health is calculated. Typically, a server will crash if
it runs out of memory, or reached the maximum number of threads. In the case of
Tomcat 5, once the threads are maxed out, requests are placed in a queue until a
thread is available. The relative importance of threads vary between containers, so
the current implementation uses 50/50 to be conservative. A container that is more
efficient with thread management might not see any performance degradation, but
the used memory definitely will show an impact.
- </p>
- <p><table border="0" cellspacing="0" cellpadding="0"><tr><td><img src="../images/screenshots/monitor_screencap.png"><br>
- <font size="-1"> </font></td></tr></table></p>
- <p >
- The performance graph shows for different lines. The free memory line shows how
+</p>
+<p><table border="0" cellspacing="0" cellpadding="0"><tr><td><img src="../images/screenshots/monitor_screencap.png"><br>
+<font size="-1"></font></td></tr></table></p>
+<p>
+The performance graph shows for different lines. The free memory line shows how
much free memory is left in the current allocated block. Tomcat 5 returns the maximum
memory, but it is not graphed. In a well tuned environment, the server should never
reach the maximum memory.
- </p>
- <p >
- Note the graph has captions on both sides of the graph. On the left is percent and
+</p>
+<p>
+Note the graph has captions on both sides of the graph. On the left is percent and
the right is dead/healthy. If the memory line spikes up and down rapidly, it could
indicate memory thrashing. In those situations, it is a good idea to profile the
application with Borland OptimizeIt or JProbe. What you want to see is a regular
pattern for load, memory and threads. Any erratic behavior usually indicates poor
performance or a bug of some sort.
- </p>
- </blockquote>
- </p>
- </td></tr>
- <tr><td><br></td></tr>
- </table>
- <table>
- <tr>
- <td bgcolor="#525D76">
- <div align="right"><a href="index.html"><font size=-1 color="#ffffff" face="arial,helvetica,sanserif">Index</font></a></div>
- </td>
- <td bgcolor="#525D76">
- <div align="right"><a href="listeners.html"><font size=-1 color="#ffffff" face="arial,helvetica,sanserif">Next</font></a></div>
- </td>
- <td bgcolor="#525D76">
- <div align="right"><a href="build-jms-topic-test-plan.html"><font size=-1 color="#ffffff" face="arial,helvetica,sanserif">Prev</font></a></div>
- </td>
- </tr>
- </table>
- <br>
- </td>
- </tr>
-
- <tr><td colspan="2">
- <hr noshade size="1"/>
- </td></tr>
- <tr><td colspan="2">
- <div align="center"><font color="#525D76" size="-1"><em>
- Copyright © 1999-2008, Apache Software Foundation
- </em></font></div>
- </td></tr>
- </table>
- </body>
- </html>
+</p>
+</blockquote>
+</p>
+</td></tr>
+<tr><td><br></td></tr>
+</table>
+<table>
+<tr>
+<td bgcolor="#525D76">
+<div align="right"><a href="index.html"><font size=-1 color="#ffffff" face="arial,helvetica,sanserif">Index</font></a></div>
+</td>
+<td bgcolor="#525D76">
+<div align="right"><a href="listeners.html"><font size=-1 color="#ffffff" face="arial,helvetica,sanserif">Next</font></a></div>
+</td>
+<td bgcolor="#525D76">
+<div align="right"><a href="build-jms-topic-test-plan.html"><font size=-1 color="#ffffff" face="arial,helvetica,sanserif">Prev</font></a></div>
+</td>
+</tr>
+</table>
+<br>
+</td>
+</tr>
+<tr><td colspan="2">
+<hr noshade size="1"/>
+</td></tr>
+<tr><td colspan="2">
+<div align="center"><font color="#525D76" size="-1"><em>
+Copyright © 1999-2009, Apache Software Foundation
+</em></font></div>
+</td></tr>
+</table>
+</body>
+</html>
<!-- end the processing -->
Modified: jakarta/jmeter/trunk/docs/usermanual/build-test-plan.html
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/docs/usermanual/build-test-plan.html?rev=773282&r1=773281&r2=773282&view=diff
==============================================================================
--- jakarta/jmeter/trunk/docs/usermanual/build-test-plan.html (original)
+++ jakarta/jmeter/trunk/docs/usermanual/build-test-plan.html Sat May 9 22:57:45 2009
@@ -18,28 +18,28 @@
<!-- Content Stylesheet for Site -->
-
+
<!-- start the processing -->
- <!-- ====================================================================== -->
- <!-- Main Page Section -->
- <!-- ====================================================================== -->
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
-
-
-
- <title>JMeter - User's Manual: Building a Test Plan</title>
- </head>
-
- <body bgcolor="#ffffff" text="#000000" link="#525D76">
- <table border="0" cellspacing="0">
- <!-- TOP IMAGE -->
- <tr>
- <td>
+<!-- ====================================================================== -->
+<!-- Main Page Section -->
+<!-- ====================================================================== -->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
+
+
+
+<title>JMeter - User's Manual: Building a Test Plan</title>
+</head>
+
+<body bgcolor="#ffffff" text="#000000" link="#525D76">
+<table border="0" cellspacing="0">
+<!-- TOP IMAGE -->
+<tr>
+<td>
<!-- Need to specify height otherwise iframe seems to grab extra -->
<iframe src="http://www.apache.org/ads/halfbanner.html" height="102"
- style="border-width:0; float: left" frameborder="0" scrolling="no"></iframe>
+style="border-width:0; float: left" frameborder="0" scrolling="no"></iframe>
</td>
<td align="left">
<a href="http://jakarta.apache.org"><img width="505" height="48" src="../images/jakarta-logo.gif" alt="Jakarta" title="Jakarta" border="0"/></a>
@@ -47,370 +47,379 @@
<td align="right">
<a href="http://jakarta.apache.org/jmeter/"><img width="221" height="102" src="../images/logo.jpg" alt="JMeter" title="JMeter" border="0"/></a>
</td>
- </tr>
- </table>
- <table border="0" width="100%" cellspacing="4">
- <tr><td colspan="2">
- <hr noshade size="1"/>
- </td></tr>
-
- <tr>
- <!-- LEFT SIDE NAVIGATION -->
- <td width="20%" valign="top" nowrap="true">
- <p><strong>About</strong></p>
- <ul>
- <li> <a href="../index.html">Overview</a>
-</li>
- <li> <a href="../changes.html">Changes</a>
-</li>
- <li> <a href="../known_bugs.html">Known Bugs</a>
-</li>
- <li> <a href="../license.html">License</a>
-</li>
- <li> <a href="http://wiki.apache.org/jakarta-jmeter/JMeterCommitters">Contributors</a>
-</li>
- </ul>
- <p><strong>Download</strong></p>
- <ul>
- <li> <a href="http://jakarta.apache.org/site/downloads/downloads_jmeter.cgi">Download Releases</a>
-</li>
- <li> <a href="../nightly.html">Developer (Nightly) Builds</a>
-</li>
- </ul>
- <p><strong>Documentation</strong></p>
- <ul>
- <li> <a href="../usermanual/index.html">User Manual</a>
-</li>
- <li> <a href="../api/index.html">Javadocs</a>
-</li>
- <li> <a href="../localising/index.html">Localisation (Translator's Guide)</a>
-</li>
- <li> <a href="../building.html">Building JMeter and Add-Ons</a>
-</li>
- <li> <a href="http://wiki.apache.org/jakarta-jmeter">JMeter Wiki</a>
-</li>
- <li> <a href="http://wiki.apache.org/jakarta-jmeter/JMeterFAQ">FAQ (Wiki)</a>
-</li>
- </ul>
- <p><strong>Tutorials (PDF format)</strong></p>
- <ul>
- <li> <a href="../usermanual/jmeter_distributed_testing_step_by_step.pdf">Distributed Testing</a>
-</li>
- <li> <a href="../usermanual/jmeter_proxy_step_by_step.pdf">Recording Tests</a>
-</li>
- <li> <a href="../usermanual/junitsampler_tutorial.pdf">JUnit Sampler</a>
-</li>
- <li> <a href="../usermanual/jmeter_accesslog_sampler_step_by_step.pdf">Access Log Sampler</a>
-</li>
- <li> <a href="../extending/jmeter_tutorial.pdf">Extending JMeter</a>
-</li>
- </ul>
- <p><strong>Community</strong></p>
- <ul>
- <li> <a href="http://jakarta.apache.org/site/getinvolved.html">Get Involved</a>
-</li>
- <li> <a href="http://jakarta.apache.org/site/mail.html">Mailing Lists</a>
-</li>
- <li> <a href="http://jakarta.apache.org/site/cvsindex.html">SVN Repositories</a>
-</li>
- </ul>
- </td>
- <td width="80%" align="left" valign="top">
- <table>
- <tr>
- <td bgcolor="#525D76">
- <div align="right"><a href="index.html"><font size=-1 color="#ffffff" face="arial,helvetica,sanserif">Index</font></a></div>
- </td>
- <td bgcolor="#525D76">
- <div align="right"><a href="test_plan.html"><font size=-1 color="#ffffff" face="arial,helvetica,sanserif">Next</font></a></div>
- </td>
- <td bgcolor="#525D76">
- <div align="right"><a href="get-started.html"><font size=-1 color="#ffffff" face="arial,helvetica,sanserif">Prev</font></a></div>
- </td>
- </tr>
- </table>
- <br>
- <table border="0" cellspacing="0" cellpadding="2" width="100%">
- <tr><td bgcolor="#525D76">
- <font color="#ffffff" face="arial,helvetica,sanserif">
- <a name="$section.getAttributeValue("anchor")"><strong>3. Building a Test Plan</strong></a>
- </font>
- </td></tr>
- <tr><td>
- <blockquote>
- <p >
- A test plan describes a series of steps JMeter will execute when run. A complete
+</tr>
+</table>
+<table border="0" width="100%" cellspacing="4">
+<tr><td colspan="2">
+<hr noshade size="1"/>
+</td></tr>
+<tr>
+<!-- LEFT SIDE NAVIGATION -->
+<td width="20%" valign="top" nowrap="true">
+<p><strong>About</strong></p>
+<ul>
+<li><a href="../index.html">Overview</a>
+</li>
+<li><a href="../changes.html">Changes</a>
+</li>
+<li><a href="../known_bugs.html">Known Bugs</a>
+</li>
+<li><a href="../license.html">License</a>
+</li>
+<li><a href="http://wiki.apache.org/jakarta-jmeter/JMeterCommitters">Contributors</a>
+</li>
+</ul>
+<p><strong>Download</strong></p>
+<ul>
+<li><a href="http://jakarta.apache.org/site/downloads/downloads_jmeter.cgi">Download Releases</a>
+</li>
+<li><a href="../nightly.html">Developer (Nightly) Builds</a>
+</li>
+</ul>
+<p><strong>Documentation</strong></p>
+<ul>
+<li><a href="../usermanual/index.html">User Manual</a>
+</li>
+<li><a href="../api/index.html">Javadocs</a>
+</li>
+<li><a href="../localising/index.html">Localisation (Translator's Guide)</a>
+</li>
+<li><a href="../building.html">Building JMeter and Add-Ons</a>
+</li>
+<li><a href="http://wiki.apache.org/jakarta-jmeter">JMeter Wiki</a>
+</li>
+<li><a href="http://wiki.apache.org/jakarta-jmeter/JMeterFAQ">FAQ (Wiki)</a>
+</li>
+</ul>
+<p><strong>Tutorials (PDF format)</strong></p>
+<ul>
+<li><a href="../usermanual/jmeter_distributed_testing_step_by_step.pdf">Distributed Testing</a>
+</li>
+<li><a href="../usermanual/jmeter_proxy_step_by_step.pdf">Recording Tests</a>
+</li>
+<li><a href="../usermanual/junitsampler_tutorial.pdf">JUnit Sampler</a>
+</li>
+<li><a href="../usermanual/jmeter_accesslog_sampler_step_by_step.pdf">Access Log Sampler</a>
+</li>
+<li><a href="../extending/jmeter_tutorial.pdf">Extending JMeter</a>
+</li>
+</ul>
+<p><strong>Community</strong></p>
+<ul>
+<li><a href="http://jakarta.apache.org/site/getinvolved.html">Get Involved</a>
+</li>
+<li><a href="http://jakarta.apache.org/site/mail.html">Mailing Lists</a>
+</li>
+<li><a href="http://jakarta.apache.org/site/cvsindex.html">SVN Repositories</a>
+</li>
+</ul>
+</td>
+<td width="80%" align="left" valign="top">
+<table>
+<tr>
+<td bgcolor="#525D76">
+<div align="right"><a href="index.html"><font size=-1 color="#ffffff" face="arial,helvetica,sanserif">Index</font></a></div>
+</td>
+<td bgcolor="#525D76">
+<div align="right"><a href="test_plan.html"><font size=-1 color="#ffffff" face="arial,helvetica,sanserif">Next</font></a></div>
+</td>
+<td bgcolor="#525D76">
+<div align="right"><a href="get-started.html"><font size=-1 color="#ffffff" face="arial,helvetica,sanserif">Prev</font></a></div>
+</td>
+</tr>
+</table>
+<br>
+<table border="0" cellspacing="0" cellpadding="2" width="100%">
+<tr><td bgcolor="#525D76">
+<font color="#ffffff" face="arial,helvetica,sanserif">
+<a name="$section.getAttributeValue("anchor")"><strong>3. Building a Test Plan</strong></a>
+</font>
+</td></tr>
+<tr><td>
+<blockquote>
+<p>
+A test plan describes a series of steps JMeter will execute when run. A complete
test plan will consist of one or more Thread Groups, logic conrollers, sample generating
controllers, listeners, timers, assertions, and configuration elements.
- </p>
- <table border="0" cellspacing="0" cellpadding="2" width="100%">
- <tr><td bgcolor="#828DA6">
- <font color="#ffffff" face="arial,helvetica,sanserif">
- <a name="add_remove"><strong>3.1 Adding and Removing Elements</strong></a>
- </font>
- </td></tr>
- <tr><td>
- <blockquote>
- <p >
- Adding
- <a href="test_plan.html">
- elements to a test plan
- </a>
- can be done by right-clicking on an element in the
+</p>
+<table border="0" cellspacing="0" cellpadding="2" width="100%">
+<tr><td bgcolor="#828DA6">
+<font color="#ffffff" face="arial,helvetica,sanserif">
+<a name="add_remove"><strong>3.1 Adding and Removing Elements</strong></a>
+</font>
+</td></tr>
+<tr><td>
+<blockquote>
+<p>
+Adding
+<a href="test_plan.html">
+elements to a test plan
+</a>
+ can be done by right-clicking on an element in the
tree, and choosing a new element from the "add" list. Alternatively, elements can
be loaded from file and added by choosing the "open" option.
- </p>
- <p >
- To remove an element, make sure the element is selected, right-click on the element,
+</p>
+<p>
+To remove an element, make sure the element is selected, right-click on the element,
and choose the "remove" option.
- </p>
- </blockquote>
- </td></tr>
- <tr><td><br></td></tr>
- </table>
- <table border="0" cellspacing="0" cellpadding="2" width="100%">
- <tr><td bgcolor="#828DA6">
- <font color="#ffffff" face="arial,helvetica,sanserif">
- <a name="load_save"><strong>3.2 Loading and Saving Elements</strong></a>
- </font>
- </td></tr>
- <tr><td>
- <blockquote>
- <p >
- To load an element from file, right click on the existing tree element to which
+</p>
+</blockquote>
+</td></tr>
+<tr><td><br></td></tr>
+</table>
+<table border="0" cellspacing="0" cellpadding="2" width="100%">
+<tr><td bgcolor="#828DA6">
+<font color="#ffffff" face="arial,helvetica,sanserif">
+<a name="load_save"><strong>3.2 Loading and Saving Elements</strong></a>
+</font>
+</td></tr>
+<tr><td>
+<blockquote>
+<p>
+To load an element from file, right click on the existing tree element to which
you want to add the loaded element, and select the "open" option. Choose the file where
your elements are saved. JMeter will load the elements into the tree.
- </p>
- <p >
- To save tree elements, right click on an element and choose the "save" option.
+</p>
+<p>
+To save tree elements, right click on an element and choose the "save" option.
JMeter will save the element selected, plus all child elements beneath it. In this way,
you can save test tree fragments, individual elements, or the entire test plan.
- </p>
- <p><table border="1" bgcolor="#bbbb00" width="50%" cellspacing="0" cellpadding="2">
- <tr><td> The workbench is not automatically saved with the test plan, but it can be saved separately as above.
- </td></tr>
- </table></p>
- </blockquote>
- </td></tr>
- <tr><td><br></td></tr>
- </table>
- <table border="0" cellspacing="0" cellpadding="2" width="100%">
- <tr><td bgcolor="#828DA6">
- <font color="#ffffff" face="arial,helvetica,sanserif">
- <a name="config_element"><strong>3.3 Configuring Tree Elements</strong></a>
- </font>
- </td></tr>
- <tr><td>
- <blockquote>
- <p >
- Any element in the test tree will present controls in JMeter's right-hand frame. These
+</p>
+<p>
+<table border="1" bgcolor="#bbbb00" width="50%" cellspacing="0" cellpadding="2">
+<tr><td>The workbench is not automatically saved with the test plan, but it can be saved separately as above.
+</td></tr>
+</table>
+</p>
+</blockquote>
+</td></tr>
+<tr><td><br></td></tr>
+</table>
+<table border="0" cellspacing="0" cellpadding="2" width="100%">
+<tr><td bgcolor="#828DA6">
+<font color="#ffffff" face="arial,helvetica,sanserif">
+<a name="config_element"><strong>3.3 Configuring Tree Elements</strong></a>
+</font>
+</td></tr>
+<tr><td>
+<blockquote>
+<p>
+Any element in the test tree will present controls in JMeter's right-hand frame. These
controls allow you to configure the behavior of that particular test element. What can be
configured for an element depends on what type of element it is.
- </p>
- <p><table border="1" bgcolor="#bbbb00" width="50%" cellspacing="0" cellpadding="2">
- <tr><td> The Test Tree itself can be manipulated by dragging and dropping components around the test tree.
- </td></tr>
- </table></p>
- </blockquote>
- </td></tr>
- <tr><td><br></td></tr>
- </table>
- <table border="0" cellspacing="0" cellpadding="2" width="100%">
- <tr><td bgcolor="#828DA6">
- <font color="#ffffff" face="arial,helvetica,sanserif">
- <a name="saving"><strong>3.4 Saving the Test Plan</strong></a>
- </font>
- </td></tr>
- <tr><td>
- <blockquote>
- <p >
- Although it is not required, we recommend that you save the Test Plan to a
+</p>
+<p>
+<table border="1" bgcolor="#bbbb00" width="50%" cellspacing="0" cellpadding="2">
+<tr><td>The Test Tree itself can be manipulated by dragging and dropping components around the test tree.
+</td></tr>
+</table>
+</p>
+</blockquote>
+</td></tr>
+<tr><td><br></td></tr>
+</table>
+<table border="0" cellspacing="0" cellpadding="2" width="100%">
+<tr><td bgcolor="#828DA6">
+<font color="#ffffff" face="arial,helvetica,sanserif">
+<a name="saving"><strong>3.4 Saving the Test Plan</strong></a>
+</font>
+</td></tr>
+<tr><td>
+<blockquote>
+<p>
+Although it is not required, we recommend that you save the Test Plan to a
file before running it. To save the Test Plan, select Save Test Plan from the
File menu (with the latest release, it is no longer necessary to select the
Test Plan element first).
- </p>
- <p><table border="1" bgcolor="#bbbb00" width="50%" cellspacing="0" cellpadding="2">
- <tr><td> JMeter allows you to save the entire Test Plan tree or
+</p>
+<p>
+<table border="1" bgcolor="#bbbb00" width="50%" cellspacing="0" cellpadding="2">
+<tr><td>JMeter allows you to save the entire Test Plan tree or
only a portion of it. To save only the elements located in a particular "branch"
of the Test Plan tree, select the Test Plan element in the tree from which to start
the "branch", and then click your right mouse button to access the Save As menu item.
Alternatively, select the appropriate Test Plan element and then select Save As from
the Edit menu.
- </td></tr>
- </table></p>
- </blockquote>
- </td></tr>
- <tr><td><br></td></tr>
- </table>
- <table border="0" cellspacing="0" cellpadding="2" width="100%">
- <tr><td bgcolor="#828DA6">
- <font color="#ffffff" face="arial,helvetica,sanserif">
- <a name="run"><strong>3.5 Running a Test Plan</strong></a>
- </font>
- </td></tr>
- <tr><td>
- <blockquote>
- <p >
- To run your test plan, choose "start" from the "run" menu item. To stop your test
-plan, choose "stop" from the same menu.
+</td></tr>
+</table>
+</p>
+</blockquote>
+</td></tr>
+<tr><td><br></td></tr>
+</table>
+<table border="0" cellspacing="0" cellpadding="2" width="100%">
+<tr><td bgcolor="#828DA6">
+<font color="#ffffff" face="arial,helvetica,sanserif">
+<a name="run"><strong>3.5 Running a Test Plan</strong></a>
+</font>
+</td></tr>
+<tr><td>
+<blockquote>
+<p>
+To run your test plan, choose "Start" (Control + r) from the "Run" menu item.
When JMeter is running, it shows a small green box at the right hand end of the section just under the menu bar.
-You can also check the "run" menu.
-If "start" is disabled, and "stop" is enabled,
+You can also check the "Run" menu.
+If "Start" is disabled, and "Stop" is enabled,
then JMeter is running your test plan (or, at least, it thinks it is).
- </p>
- <p >
-
-There are two types of stop command:
-
- <ul >
-
-
- <li >
- Stop (Control + '.') - stops the threads immediately
- </li>
-
-
- <li >
- Shutdown (Control + ',')- requests the threads to stop at the end of any current work
- </li>
-
-
- </ul>
-
-
- </p>
- </blockquote>
- </td></tr>
- <tr><td><br></td></tr>
- </table>
- <table border="0" cellspacing="0" cellpadding="2" width="100%">
- <tr><td bgcolor="#828DA6">
- <font color="#ffffff" face="arial,helvetica,sanserif">
- <a name="scoping_rules"><strong>3.6 Scoping Rules</strong></a>
- </font>
- </td></tr>
- <tr><td>
- <blockquote>
- <p >
-
-The JMeter test tree contains elements that are both hierarchical and ordered. Some elements in the test trees are strictly hierarchical (Listeners, Config Elements, Post-Procesors, Pre-Processors, Assertions, Timers), and some are primarily ordered (controllers, samplers). When you create your test plan, you will create an ordered list of sample request (via Samplers) that represent a set of steps to be executed. These requests are often organized within controllers that are also ordered. Given the following test tree:
- </p>
- <p><table border="0" cellspacing="0" cellpadding="0"><tr><td><img src="../images/screenshots/scoping1.png"><br>
- <font size="-1"> Example test tree
- </font></td></tr></table></p>
- <p >
- The order of requests will be, One, Two, Three, Four.
- </p>
- <p >
- Some controllers affect the order of their subelements, and you can read about these specific controllers in
- <a href="component_reference.html">
- the component reference
- </a>
- .
- </p>
- <p >
- Other elements are hierarchical. An Assertion, for instance, is hierarchical in the test tree.
-If its parent is a request, then it is applied to that request. If its
-parent is a Controller, then it affects all requests that are descendants of
-that Controller. In the following test tree:
- </p>
- <p><table border="0" cellspacing="0" cellpadding="0"><tr><td><img src="../images/screenshots/scoping2.png"><br>
- <font size="-1"> Hierarchy example
- </font></td></tr></table></p>
- <p >
- Assertion #1 is applied only to Request One, while Assertion #2 is applied to Requests Two and Three.
- </p>
- <p >
- Another example, this time using Timers:
- </p>
- <p><table border="0" cellspacing="0" cellpadding="0"><tr><td><img src="../images/screenshots/scoping3.png"><br>
- <font size="-1"> complex example
- </font></td></tr></table></p>
- <p >
- In this example, the requests are named to reflect the order in which they will be executed. Timer #1 will apply to Requests Two, Three, and Four (notice how order is irrelevant for hierarchical elements). Assertion #1 will apply only to Request Three. Timer #2 will affect all the requests.
- </p>
- <p >
- Hopefully these examples make it clear how configuration (hierarchical) elements are applied. If you imagine each Request being passed up the tree branches, to its parent, then to its parent's parent, etc, and each time collecting all the configuration elements of that parent, then you will see how it works.
- </p>
- <b >
-
-The Configuration elements Header Manager, Cookie Manager and Authorization manager are
-treated differently from the Configuration Default elements.
-The settings from the Configuration Default elements are merged into a set of values that the Sampler has access to.
-However, the settings from the Managers are not merged.
-If more than one Manager is in the scope of a Sampler,
-only one Manager is used, but there is currently no way to specify
- <b >
- which
- </b>
- is used.
-
- </b>
- </blockquote>
- </td></tr>
- <tr><td><br></td></tr>
- </table>
- <table border="0" cellspacing="0" cellpadding="2" width="100%">
- <tr><td bgcolor="#828DA6">
- <font color="#ffffff" face="arial,helvetica,sanserif">
- <a name="error_reporting"><strong>3.7 Error reporting</strong></a>
- </font>
- </td></tr>
- <tr><td>
- <blockquote>
- <p >
-
+</p>
+<p>
+
+The numbers to the left of the green box are the number of active threads / total number of threads.
+
+</p>
+</blockquote>
+</td></tr>
+<tr><td><br></td></tr>
+</table>
+<table border="0" cellspacing="0" cellpadding="2" width="100%">
+<tr><td bgcolor="#828DA6">
+<font color="#ffffff" face="arial,helvetica,sanserif">
+<a name="stop"><strong>3.6 Stopping a Test</strong></a>
+</font>
+</td></tr>
+<tr><td>
+<blockquote>
+<p>
+
+There are two types of stop command available from the menu:
+
+<ul>
+
+
+<li>
+Stop (Control + '.') - stops the threads immediately if possible.
+In Versions of JMeter after 2.3.2, many samplers are now Interruptible which means that active samples can be terminated early.
+The stop command will check that all threads have stopped within the default timeout, which is 5000 ms = 5 seconds.
+[This can be changed using the JMeter property
+<code>
+jmeterengine.threadstop.wait
+</code>
+]
+If the threads have not stopped, then a message is displayed.
+The Stop command can be retried, but if it fails, then it is necessary to exit JMeter to clean up.
+
+</li>
+
+
+<li>
+Shutdown (Control + ',')- requests the threads to stop at the end of any current work.
+Will not interrupt any active samples.
+The modal shutdown dialog box will remain active until all threads have stopped.
+</li>
+
+
+</ul>
+
+Versions of JMeter after 2.3.2 allow a Stop to be initiated if Shutdown is taking too long.
+Close the Shutdown dialog box and select Run/Stop, or just press Control + '.'.
+
+</p>
+<p>
+
+When running JMeter in non-GUI mode, there is no Menu, and JMeter does not react to keystrokes such as Control + '.'.
+So in versions after 2.3.2, JMeter non-GUI mode will listen for commands on a specific port
+(default 4445, see the JMeter property
+<code>
+jmeterengine.nongui.port
+</code>
+).
+The commands currently supported are:
+
+<ul>
+
+
+<li>
+Shutdown - graceful shutdown
+</li>
+
+
+<li>
+StopTestNow - immediate shutdown
+</li>
+
+
+</ul>
+
+These commands can be sent by using the
+<code>
+shutdown[.cmd|.sh]
+</code>
+ or
+<code>
+stoptest[.cmd|.sh]
+</code>
+ script
+respectively. The scripts are to be found in the JMeter
+<code>
+bin
+</code>
+ directory.
+
+</p>
+</blockquote>
+</td></tr>
+<tr><td><br></td></tr>
+</table>
+<table border="0" cellspacing="0" cellpadding="2" width="100%">
+<tr><td bgcolor="#828DA6">
+<font color="#ffffff" face="arial,helvetica,sanserif">
+<a name="error_reporting"><strong>3.7 Error reporting</strong></a>
+</font>
+</td></tr>
+<tr><td>
+<blockquote>
+<p>
+
JMeter reports warnings and errors to the jmeter.log file, as well as some information on the test run itself.
Just occasionally there may be some errors that JMeter is unable to trap and log; these will appear on the command console.
If a test is not behaving as you expect, please check the log file in case any errors have been reported (e.g. perhaps a syntax error in a function call).
- </p>
- <p >
-
+</p>
+<p>
+
Sampling errors (e.g. HTTP 404 - file not found) are not normally reported in the log file.
Instead these are stored as attributes of the sample result.
The status of a sample result can be seen in the various different Listeners.
- </p>
- </blockquote>
- </td></tr>
- <tr><td><br></td></tr>
- </table>
- </blockquote>
- </p>
- </td></tr>
- <tr><td><br></td></tr>
- </table>
- <table>
- <tr>
- <td bgcolor="#525D76">
- <div align="right"><a href="index.html"><font size=-1 color="#ffffff" face="arial,helvetica,sanserif">Index</font></a></div>
- </td>
- <td bgcolor="#525D76">
- <div align="right"><a href="test_plan.html"><font size=-1 color="#ffffff" face="arial,helvetica,sanserif">Next</font></a></div>
- </td>
- <td bgcolor="#525D76">
- <div align="right"><a href="get-started.html"><font size=-1 color="#ffffff" face="arial,helvetica,sanserif">Prev</font></a></div>
- </td>
- </tr>
- </table>
- <br>
- </td>
- </tr>
-
- <tr><td colspan="2">
- <hr noshade size="1"/>
- </td></tr>
- <tr><td colspan="2">
- <div align="center"><font color="#525D76" size="-1"><em>
- Copyright © 1999-2008, Apache Software Foundation
- </em></font></div>
- </td></tr>
- </table>
- </body>
- </html>
+</p>
+</blockquote>
+</td></tr>
+<tr><td><br></td></tr>
+</table>
+</blockquote>
+</p>
+</td></tr>
+<tr><td><br></td></tr>
+</table>
+<table>
+<tr>
+<td bgcolor="#525D76">
+<div align="right"><a href="index.html"><font size=-1 color="#ffffff" face="arial,helvetica,sanserif">Index</font></a></div>
+</td>
+<td bgcolor="#525D76">
+<div align="right"><a href="test_plan.html"><font size=-1 color="#ffffff" face="arial,helvetica,sanserif">Next</font></a></div>
+</td>
+<td bgcolor="#525D76">
+<div align="right"><a href="get-started.html"><font size=-1 color="#ffffff" face="arial,helvetica,sanserif">Prev</font></a></div>
+</td>
+</tr>
+</table>
+<br>
+</td>
+</tr>
+<tr><td colspan="2">
+<hr noshade size="1"/>
+</td></tr>
+<tr><td colspan="2">
+<div align="center"><font color="#525D76" size="-1"><em>
+Copyright © 1999-2009, Apache Software Foundation
+</em></font></div>
+</td></tr>
+</table>
+</body>
+</html>
<!-- end the processing -->
Modified: jakarta/jmeter/trunk/docs/usermanual/build-web-test-plan.html
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/docs/usermanual/build-web-test-plan.html?rev=773282&r1=773281&r2=773282&view=diff
==============================================================================
--- jakarta/jmeter/trunk/docs/usermanual/build-web-test-plan.html (original)
+++ jakarta/jmeter/trunk/docs/usermanual/build-web-test-plan.html Sat May 9 22:57:45 2009
@@ -18,28 +18,28 @@
<!-- Content Stylesheet for Site -->
-
+
<!-- start the processing -->
- <!-- ====================================================================== -->
- <!-- Main Page Section -->
- <!-- ====================================================================== -->
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
-
-
-
- <title>JMeter - User's Manual: Building a Web Test Plan</title>
- </head>
-
- <body bgcolor="#ffffff" text="#000000" link="#525D76">
- <table border="0" cellspacing="0">
- <!-- TOP IMAGE -->
- <tr>
- <td>
+<!-- ====================================================================== -->
+<!-- Main Page Section -->
+<!-- ====================================================================== -->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
+
+
+
+<title>JMeter - User's Manual: Building a Web Test Plan</title>
+</head>
+
+<body bgcolor="#ffffff" text="#000000" link="#525D76">
+<table border="0" cellspacing="0">
+<!-- TOP IMAGE -->
+<tr>
+<td>
<!-- Need to specify height otherwise iframe seems to grab extra -->
<iframe src="http://www.apache.org/ads/halfbanner.html" height="102"
- style="border-width:0; float: left" frameborder="0" scrolling="no"></iframe>
+style="border-width:0; float: left" frameborder="0" scrolling="no"></iframe>
</td>
<td align="left">
<a href="http://jakarta.apache.org"><img width="505" height="48" src="../images/jakarta-logo.gif" alt="Jakarta" title="Jakarta" border="0"/></a>
@@ -47,496 +47,500 @@
<td align="right">
<a href="http://jakarta.apache.org/jmeter/"><img width="221" height="102" src="../images/logo.jpg" alt="JMeter" title="JMeter" border="0"/></a>
</td>
- </tr>
- </table>
- <table border="0" width="100%" cellspacing="4">
- <tr><td colspan="2">
- <hr noshade size="1"/>
- </td></tr>
-
- <tr>
- <!-- LEFT SIDE NAVIGATION -->
- <td width="20%" valign="top" nowrap="true">
- <p><strong>About</strong></p>
- <ul>
- <li> <a href="../index.html">Overview</a>
-</li>
- <li> <a href="../changes.html">Changes</a>
-</li>
- <li> <a href="../known_bugs.html">Known Bugs</a>
-</li>
- <li> <a href="../license.html">License</a>
-</li>
- <li> <a href="http://wiki.apache.org/jakarta-jmeter/JMeterCommitters">Contributors</a>
-</li>
- </ul>
- <p><strong>Download</strong></p>
- <ul>
- <li> <a href="http://jakarta.apache.org/site/downloads/downloads_jmeter.cgi">Download Releases</a>
-</li>
- <li> <a href="../nightly.html">Developer (Nightly) Builds</a>
-</li>
- </ul>
- <p><strong>Documentation</strong></p>
- <ul>
- <li> <a href="../usermanual/index.html">User Manual</a>
-</li>
- <li> <a href="../api/index.html">Javadocs</a>
-</li>
- <li> <a href="../localising/index.html">Localisation (Translator's Guide)</a>
-</li>
- <li> <a href="../building.html">Building JMeter and Add-Ons</a>
-</li>
- <li> <a href="http://wiki.apache.org/jakarta-jmeter">JMeter Wiki</a>
-</li>
- <li> <a href="http://wiki.apache.org/jakarta-jmeter/JMeterFAQ">FAQ (Wiki)</a>
-</li>
- </ul>
- <p><strong>Tutorials (PDF format)</strong></p>
- <ul>
- <li> <a href="../usermanual/jmeter_distributed_testing_step_by_step.pdf">Distributed Testing</a>
-</li>
- <li> <a href="../usermanual/jmeter_proxy_step_by_step.pdf">Recording Tests</a>
-</li>
- <li> <a href="../usermanual/junitsampler_tutorial.pdf">JUnit Sampler</a>
-</li>
- <li> <a href="../usermanual/jmeter_accesslog_sampler_step_by_step.pdf">Access Log Sampler</a>
-</li>
- <li> <a href="../extending/jmeter_tutorial.pdf">Extending JMeter</a>
-</li>
- </ul>
- <p><strong>Community</strong></p>
- <ul>
- <li> <a href="http://jakarta.apache.org/site/getinvolved.html">Get Involved</a>
-</li>
- <li> <a href="http://jakarta.apache.org/site/mail.html">Mailing Lists</a>
-</li>
- <li> <a href="http://jakarta.apache.org/site/cvsindex.html">SVN Repositories</a>
-</li>
- </ul>
- </td>
- <td width="80%" align="left" valign="top">
- <table>
- <tr>
- <td bgcolor="#525D76">
- <div align="right"><a href="index.html"><font size=-1 color="#ffffff" face="arial,helvetica,sanserif">Index</font></a></div>
- </td>
- <td bgcolor="#525D76">
- <div align="right"><a href="build-adv-web-test-plan.html"><font size=-1 color="#ffffff" face="arial,helvetica,sanserif">Next</font></a></div>
- </td>
- <td bgcolor="#525D76">
- <div align="right"><a href="test_plan.html"><font size=-1 color="#ffffff" face="arial,helvetica,sanserif">Prev</font></a></div>
- </td>
- </tr>
- </table>
- <br>
- <table border="0" cellspacing="0" cellpadding="2" width="100%">
- <tr><td bgcolor="#525D76">
- <font color="#ffffff" face="arial,helvetica,sanserif">
- <a name="building"><strong>5. Building a Web Test Plan</strong></a>
- </font>
- </td></tr>
- <tr><td>
- <blockquote>
- <p >
- In this section, you will learn how to create a basic
-
- <a href="build-test-plan.html">
- Test Plan
- </a>
- to test a Web site. You will
+</tr>
+</table>
+<table border="0" width="100%" cellspacing="4">
+<tr><td colspan="2">
+<hr noshade size="1"/>
+</td></tr>
+<tr>
+<!-- LEFT SIDE NAVIGATION -->
+<td width="20%" valign="top" nowrap="true">
+<p><strong>About</strong></p>
+<ul>
+<li><a href="../index.html">Overview</a>
+</li>
+<li><a href="../changes.html">Changes</a>
+</li>
+<li><a href="../known_bugs.html">Known Bugs</a>
+</li>
+<li><a href="../license.html">License</a>
+</li>
+<li><a href="http://wiki.apache.org/jakarta-jmeter/JMeterCommitters">Contributors</a>
+</li>
+</ul>
+<p><strong>Download</strong></p>
+<ul>
+<li><a href="http://jakarta.apache.org/site/downloads/downloads_jmeter.cgi">Download Releases</a>
+</li>
+<li><a href="../nightly.html">Developer (Nightly) Builds</a>
+</li>
+</ul>
+<p><strong>Documentation</strong></p>
+<ul>
+<li><a href="../usermanual/index.html">User Manual</a>
+</li>
+<li><a href="../api/index.html">Javadocs</a>
+</li>
+<li><a href="../localising/index.html">Localisation (Translator's Guide)</a>
+</li>
+<li><a href="../building.html">Building JMeter and Add-Ons</a>
+</li>
+<li><a href="http://wiki.apache.org/jakarta-jmeter">JMeter Wiki</a>
+</li>
+<li><a href="http://wiki.apache.org/jakarta-jmeter/JMeterFAQ">FAQ (Wiki)</a>
+</li>
+</ul>
+<p><strong>Tutorials (PDF format)</strong></p>
+<ul>
+<li><a href="../usermanual/jmeter_distributed_testing_step_by_step.pdf">Distributed Testing</a>
+</li>
+<li><a href="../usermanual/jmeter_proxy_step_by_step.pdf">Recording Tests</a>
+</li>
+<li><a href="../usermanual/junitsampler_tutorial.pdf">JUnit Sampler</a>
+</li>
+<li><a href="../usermanual/jmeter_accesslog_sampler_step_by_step.pdf">Access Log Sampler</a>
+</li>
+<li><a href="../extending/jmeter_tutorial.pdf">Extending JMeter</a>
+</li>
+</ul>
+<p><strong>Community</strong></p>
+<ul>
+<li><a href="http://jakarta.apache.org/site/getinvolved.html">Get Involved</a>
+</li>
+<li><a href="http://jakarta.apache.org/site/mail.html">Mailing Lists</a>
+</li>
+<li><a href="http://jakarta.apache.org/site/cvsindex.html">SVN Repositories</a>
+</li>
+</ul>
+</td>
+<td width="80%" align="left" valign="top">
+<table>
+<tr>
+<td bgcolor="#525D76">
+<div align="right"><a href="index.html"><font size=-1 color="#ffffff" face="arial,helvetica,sanserif">Index</font></a></div>
+</td>
+<td bgcolor="#525D76">
+<div align="right"><a href="build-adv-web-test-plan.html"><font size=-1 color="#ffffff" face="arial,helvetica,sanserif">Next</font></a></div>
+</td>
+<td bgcolor="#525D76">
+<div align="right"><a href="test_plan.html"><font size=-1 color="#ffffff" face="arial,helvetica,sanserif">Prev</font></a></div>
+</td>
+</tr>
+</table>
+<br>
+<table border="0" cellspacing="0" cellpadding="2" width="100%">
+<tr><td bgcolor="#525D76">
+<font color="#ffffff" face="arial,helvetica,sanserif">
+<a name="building"><strong>5. Building a Web Test Plan</strong></a>
+</font>
+</td></tr>
+<tr><td>
+<blockquote>
+<p>
+In this section, you will learn how to create a basic
+
+<a href="build-test-plan.html">
+Test Plan
+</a>
+ to test a Web site. You will
create five users that send requests to two pages on the Jakarta Web site.
Also, you will tell the users to run their tests twice. So, the total number of
requests is (5 users) x (2 requests) x (repeat 2 times) = 20 HTTP requests. To
construct the Test Plan, you will use the following elements:
- <a href="test_plan.html#thread_group">
- Thread Group
- </a>
- ,
-
- <a href="../usermanual/component_reference.html#HTTP_Request">HTTP Request</a>
- ,
-
- <a href="../usermanual/component_reference.html#HTTP_Request_Defaults">HTTP Request Defaults</a>
- , and
-
- <a href="../usermanual/component_reference.html#Graph_Results">Graph Results</a>
- .
- </p>
- <p >
- For a more advanced Test Plan, see
-
- <a href="build-adv-web-test-plan.html">
- Building an Advanced Web Test Plan
- </a>
- .
- </p>
- </blockquote>
- </p>
- </td></tr>
- <tr><td><br></td></tr>
- </table>
- <table border="0" cellspacing="0" cellpadding="2" width="100%">
- <tr><td bgcolor="#525D76">
- <font color="#ffffff" face="arial,helvetica,sanserif">
- <a name="adding_users"><strong>5.1 Adding Users</strong></a>
- </font>
- </td></tr>
- <tr><td>
- <blockquote>
- <p >
- The first step you want to do with every JMeter Test Plan is to add a
-
- <a href="test_plan.html#thread_group">
- Thread Group
- </a>
- element. The Thread Group tells
+<a href="test_plan.html#thread_group">
+Thread Group
+</a>
+,
+
+<a href="../usermanual/component_reference.html#HTTP_Request">HTTP Request</a>
+,
+
+<a href="../usermanual/component_reference.html#HTTP_Request_Defaults">HTTP Request Defaults</a>
+, and
+
+<a href="../usermanual/component_reference.html#Graph_Results">Graph Results</a>
+.
+</p>
+<p>
+For a more advanced Test Plan, see
+
+<a href="build-adv-web-test-plan.html">
+Building an Advanced Web Test Plan
+</a>
+.
+</p>
+</blockquote>
+</p>
+</td></tr>
+<tr><td><br></td></tr>
+</table>
+<table border="0" cellspacing="0" cellpadding="2" width="100%">
+<tr><td bgcolor="#525D76">
+<font color="#ffffff" face="arial,helvetica,sanserif">
+<a name="adding_users"><strong>5.1 Adding Users</strong></a>
+</font>
+</td></tr>
+<tr><td>
+<blockquote>
+<p>
+The first step you want to do with every JMeter Test Plan is to add a
+
+<a href="test_plan.html#thread_group">
+Thread Group
+</a>
+ element. The Thread Group tells
JMeter the number of users you want to simulate, how often the users should send
requests, and the how many requests they should send.
- </p>
- <p >
- Go ahead and add the ThreadGroup element by first selecting the Test Plan,
+</p>
+<p>
+Go ahead and add the ThreadGroup element by first selecting the Test Plan,
clicking your right mouse button to get the Add menu, and then select
Add --> ThreadGroup.
- </p>
- <p >
- You should now see the Thread Group element under Test Plan. If you do not
+</p>
+<p>
+You should now see the Thread Group element under Test Plan. If you do not
see the element, then "expand" the Test Plan tree by clicking on the
Test Plan element.
- </p>
- <p >
- Next, you need to modify the default properties. Select the Thread Group element
+</p>
+<p>
+Next, you need to modify the default properties. Select the Thread Group element
in the tree, if you have not already selected it. You should now see the Thread
Group Control Panel in the right section of the JMeter window (see Figure 5.1
below)
- </p>
- <p><table border="0" cellspacing="0" cellpadding="0"><tr><td><img src="../images/screenshots/webtest/threadgroup.png"><br>
- <font size="-1">
+</p>
+<p><table border="0" cellspacing="0" cellpadding="0"><tr><td><img src="../images/screenshots/webtest/threadgroup.png"><br>
+<font size="-1">
Figure 5.1. Thread Group with Default Values
- </font></td></tr></table></p>
- <p >
- Start by providing a more descriptive name for our Thread Group. In the name
+</font></td></tr></table></p>
+<p>
+Start by providing a more descriptive name for our Thread Group. In the name
field, enter Jakarta Users.
- </p>
- <p >
- Next, increase the number of users (called threads) to 5.
- </p>
- <p >
- In the next field, the Ramp-Up Period, leave the the default value of 0
+</p>
+<p>
+Next, increase the number of users (called threads) to 5.
+</p>
+<p>
+In the next field, the Ramp-Up Period, leave the the default value of 0
seconds. This property tells JMeter how long to delay between starting each
user. For example, if you enter a Ramp-Up Period of 5 seconds, JMeter will
finish starting all of your users by the end of the 5 seconds. So, if we have
5 users and a 5 second Ramp-Up Period, then the delay between starting users
would be 1 second (5 users / 5 seconds = 1 user per second). If you set the
value to 0, then JMeter will immediately start all of your users.
- </p>
- <p >
- Finally enter a value of 2 in
+</p>
+<p>
+Finally enter a value of 2 in
the Loop Count field. This property tells JMeter how many times to repeat your
test. If you enter a loop count value of 1, then JMeter will run your test only
once. To have JMeter repeatedly run your Test Plan, select the Forever
checkbox.
- </p>
- <p><table border="1" bgcolor="#bbbb00" width="50%" cellspacing="0" cellpadding="2">
- <tr><td> In most applications, you have to manually accept
+</p>
+<p>
+<table border="1" bgcolor="#bbbb00" width="50%" cellspacing="0" cellpadding="2">
+<tr><td>In most applications, you have to manually accept
changes you make in a Control Panel. However, in JMeter, the Control Panel
automatically accepts your changes as you make them. If you change the
name of an element, the tree will be updated with the new text after you
leave the Control Panel (for example, when selecting another tree element).
- </td></tr>
- </table></p>
- <p >
- See Figure 5.2 for the completed Jakarta Users Thread Group.
- </p>
- <p><table border="0" cellspacing="0" cellpadding="0"><tr><td><img src="../images/screenshots/webtest/threadgroup2.png"><br>
- <font size="-1">
+</td></tr>
+</table>
+</p>
+<p>
+See Figure 5.2 for the completed Jakarta Users Thread Group.
+</p>
+<p><table border="0" cellspacing="0" cellpadding="0"><tr><td><img src="../images/screenshots/webtest/threadgroup2.png"><br>
+<font size="-1">
Figure 5.2. Jakarta Users Thread Group
- </font></td></tr></table></p>
- </blockquote>
- </p>
- </td></tr>
- <tr><td><br></td></tr>
- </table>
- <table border="0" cellspacing="0" cellpadding="2" width="100%">
- <tr><td bgcolor="#525D76">
- <font color="#ffffff" face="arial,helvetica,sanserif">
- <a name="adding_defaults"><strong>5.2 Adding Default HTTP Request Properties</strong></a>
- </font>
- </td></tr>
- <tr><td>
- <blockquote>
- <p >
- Now that we have defined our users, it is time to define the tasks that they
+</font></td></tr></table></p>
+</blockquote>
+</p>
+</td></tr>
+<tr><td><br></td></tr>
+</table>
+<table border="0" cellspacing="0" cellpadding="2" width="100%">
+<tr><td bgcolor="#525D76">
+<font color="#ffffff" face="arial,helvetica,sanserif">
+<a name="adding_defaults"><strong>5.2 Adding Default HTTP Request Properties</strong></a>
+</font>
+</td></tr>
+<tr><td>
+<blockquote>
+<p>
+Now that we have defined our users, it is time to define the tasks that they
will be performing. In this section, you will specify the default settings
for your HTTP requests. And then, in section 5.3, you will add HTTP Request
elements which use some of the default settings you specified here.
- </p>
- <p >
- Begin by selecting the Jakarta Users (Thread Group) element. Click your right mouse button
+</p>
+<p>
+Begin by selecting the Jakarta Users (Thread Group) element. Click your right mouse button
to get the Add menu, and then select Add --> Config Element --> HTTP Request
Defaults. Then, select this new element to view its Control Panel (see Figure 5.3).
- </p>
- <p><table border="0" cellspacing="0" cellpadding="0"><tr><td><img src="../images/screenshots/webtest/http-defaults1.png"><br>
- <font size="-1">
+</p>
+<p><table border="0" cellspacing="0" cellpadding="0"><tr><td><img src="../images/screenshots/webtest/http-defaults1.png"><br>
+<font size="-1">
Figure 5.3. HTTP Request Defaults
- </font></td></tr></table></p>
- <p >
-
+</font></td></tr></table></p>
+<p>
+
Like most JMeter elements, the
- <a href="../usermanual/component_reference.html#HTTP_Request_Defaults">HTTP Request Defaults</a>
- Control
+<a href="../usermanual/component_reference.html#HTTP_Request_Defaults">HTTP Request Defaults</a>
+ Control
Panel has a name field that you can modify. In this example, leave this field with
the default value.
- </p>
- <p >
- Skip to the next field, which is the Web Server's Server Name/IP. For the
+</p>
+<p>
+Skip to the next field, which is the Web Server's Server Name/IP. For the
Test Plan that you are building, all HTTP requests will be sent to the same
Web server, jakarta.apache.org. Enter this domain name into the field.
This is the only field that we will specify a default, so leave the remaining
fields with their default values.
- </p>
- <p><table border="1" bgcolor="#bbbb00" width="50%" cellspacing="0" cellpadding="2">
- <tr><td> The HTTP Request Defaults element does not tell JMeter
+</p>
+<p>
+<table border="1" bgcolor="#bbbb00" width="50%" cellspacing="0" cellpadding="2">
+<tr><td>The HTTP Request Defaults element does not tell JMeter
to send an HTTP request. It simply defines the default values that the
HTTP Request elements use.
- </td></tr>
- </table></p>
- <p >
- See Figure 5.4 for the completed HTTP Request Defaults element
- </p>
- <p><table border="0" cellspacing="0" cellpadding="0"><tr><td><img src="../images/screenshots/webtest/http-defaults2.png"><br>
- <font size="-1">
+</td></tr>
+</table>
+</p>
+<p>
+See Figure 5.4 for the completed HTTP Request Defaults element
+</p>
+<p><table border="0" cellspacing="0" cellpadding="0"><tr><td><img src="../images/screenshots/webtest/http-defaults2.png"><br>
+<font size="-1">
Figure 5.4. HTTP Defaults for our Test Plan
- </font></td></tr></table></p>
- </blockquote>
- </p>
- </td></tr>
- <tr><td><br></td></tr>
- </table>
- <table border="0" cellspacing="0" cellpadding="2" width="100%">
- <tr><td bgcolor="#525D76">
- <font color="#ffffff" face="arial,helvetica,sanserif">
- <a name="adding_cookie_support"><strong>5.3 Adding Cookie Support</strong></a>
- </font>
- </td></tr>
- <tr><td>
- <blockquote>
- <p >
- Nearly all web testing should use cookie support, unless your application
+</font></td></tr></table></p>
+</blockquote>
+</p>
+</td></tr>
+<tr><td><br></td></tr>
+</table>
+<table border="0" cellspacing="0" cellpadding="2" width="100%">
+<tr><td bgcolor="#525D76">
+<font color="#ffffff" face="arial,helvetica,sanserif">
+<a name="adding_cookie_support"><strong>5.3 Adding Cookie Support</strong></a>
+</font>
+</td></tr>
+<tr><td>
+<blockquote>
+<p>
+Nearly all web testing should use cookie support, unless your application
specifically doesn't use cookies. To add cookie support, simply add an
- <a href="../usermanual/component_reference.html#HTTP_Cookie_Manager">HTTP Cookie Manager</a>
- to each
- <a href="test_plan.html#thread_group">
- Thread
+<a href="../usermanual/component_reference.html#HTTP_Cookie_Manager">HTTP Cookie Manager</a>
+ to each
+<a href="test_plan.html#thread_group">
+Thread
Group
- </a>
- in your test plan. This will ensure that each thread gets its own
+</a>
+ in your test plan. This will ensure that each thread gets its own
cookies, but shared across all
- <a href="../usermanual/component_reference.html#HTTP_Request">HTTP Request</a>
- objects.
- </p>
- <p >
- To add the
- <a href="../usermanual/component_reference.html#HTTP_Cookie_Manager">HTTP Cookie Manager</a>
- , simply select the
-
- <a href="test_plan.html#thread_group">
- Thread Group
- </a>
- , and choose Add -->
+<a href="../usermanual/component_reference.html#HTTP_Request">HTTP Request</a>
+ objects.
+</p>
+<p>
+To add the
+<a href="../usermanual/component_reference.html#HTTP_Cookie_Manager">HTTP Cookie Manager</a>
+, simply select the
+
+<a href="test_plan.html#thread_group">
+Thread Group
+</a>
+, and choose Add -->
Config Element --> HTTP
Cookie Manager, either from the Edit Menu, or from the right-click pop-up menu.
- </p>
- </blockquote>
- </p>
- </td></tr>
- <tr><td><br></td></tr>
- </table>
- <table border="0" cellspacing="0" cellpadding="2" width="100%">
- <tr><td bgcolor="#525D76">
- <font color="#ffffff" face="arial,helvetica,sanserif">
- <a name="adding_requests"><strong>5.4 Adding HTTP Requests</strong></a>
- </font>
- </td></tr>
- <tr><td>
- <blockquote>
- <p >
- In our Test Plan, we need to make two HTTP requests. The first one is for the
+</p>
+</blockquote>
+</p>
+</td></tr>
+<tr><td><br></td></tr>
+</table>
+<table border="0" cellspacing="0" cellpadding="2" width="100%">
+<tr><td bgcolor="#525D76">
+<font color="#ffffff" face="arial,helvetica,sanserif">
+<a name="adding_requests"><strong>5.4 Adding HTTP Requests</strong></a>
+</font>
+</td></tr>
+<tr><td>
+<blockquote>
+<p>
+In our Test Plan, we need to make two HTTP requests. The first one is for the
Jakarta home page (http://jakarta.apache.org/), and the second one is for the
Project Guidelines page (http://jakarta.apache.org/site/guidelines.html).
- </p>
- <p><table border="1" bgcolor="#bbbb00" width="50%" cellspacing="0" cellpadding="2">
- <tr><td> JMeter sends requests in the order that they appear in the tree.
- </td></tr>
- </table></p>
- <p >
- Start by adding the first
- <a href="../usermanual/component_reference.html#HTTP_Request">HTTP Request</a>
-
+</p>
+<p>
+<table border="1" bgcolor="#bbbb00" width="50%" cellspacing="0" cellpadding="2">
+<tr><td>JMeter sends requests in the order that they appear in the tree.
+</td></tr>
+</table>
+</p>
+<p>
+Start by adding the first
+<a href="../usermanual/component_reference.html#HTTP_Request">HTTP Request</a>
+
to the Jakarta Users element (Add --> Sampler --> HTTP Request).
Then, select the HTTP Request element in the tree and edit the following properties
(see Figure 5.5):
- <ol >
-
+<ol>
+
- <li >
- Change the Name field to "Home Page".
- </li>
-
+<li>
+Change the Name field to "Home Page".
+</li>
- <li >
- Set the Path field to "/". Remember that you do not have to set the Server
+
+<li>
+Set the Path field to "/". Remember that you do not have to set the Server
Name field because you already specified this value in the HTTP Request Defaults
element.
- </li>
-
+</li>
+
- </ol>
-
+</ol>
- </p>
- <p><table border="0" cellspacing="0" cellpadding="0"><tr><td><img src="../images/screenshots/webtest/http-request1.png"><br>
- <font size="-1">
+
+</p>
+<p><table border="0" cellspacing="0" cellpadding="0"><tr><td><img src="../images/screenshots/webtest/http-request1.png"><br>
+<font size="-1">
Figure 5.5. HTTP Request for Jakarta Home Page
- </font></td></tr></table></p>
- <p >
- Next, add the second HTTP Request and edit the following properties (see
+</font></td></tr></table></p>
+<p>
+Next, add the second HTTP Request and edit the following properties (see
Figure 5.6:
- <ol >
-
+<ol>
+
+
+<li>
+Change the Name field to "Project Guidelines".
+</li>
+
+
+<li>
+Set the Path field to "/site/guidelines.html".
+</li>
+
+
+</ol>
+
- <li >
- Change the Name field to "Project Guidelines".
- </li>
-
-
- <li >
- Set the Path field to "/site/guidelines.html".
- </li>
-
-
- </ol>
-
-
- </p>
- <p><table border="0" cellspacing="0" cellpadding="0"><tr><td><img src="../images/screenshots/webtest/http-request2.png"><br>
- <font size="-1">
+</p>
+<p><table border="0" cellspacing="0" cellpadding="0"><tr><td><img src="../images/screenshots/webtest/http-request2.png"><br>
+<font size="-1">
Figure 5.6. HTTP Request for Jakarta Project Guidelines Page
- </font></td></tr></table></p>
- </blockquote>
- </p>
- </td></tr>
- <tr><td><br></td></tr>
- </table>
- <table border="0" cellspacing="0" cellpadding="2" width="100%">
- <tr><td bgcolor="#525D76">
- <font color="#ffffff" face="arial,helvetica,sanserif">
- <a name="adding_listener"><strong>5.5 Adding a Listener to View Store the Test Results</strong></a>
- </font>
- </td></tr>
- <tr><td>
- <blockquote>
- <p >
- The final element you need to add to your Test Plan is a
+</font></td></tr></table></p>
+</blockquote>
+</p>
+</td></tr>
+<tr><td><br></td></tr>
+</table>
+<table border="0" cellspacing="0" cellpadding="2" width="100%">
+<tr><td bgcolor="#525D76">
+<font color="#ffffff" face="arial,helvetica,sanserif">
+<a name="adding_listener"><strong>5.5 Adding a Listener to View Store the Test Results</strong></a>
+</font>
+</td></tr>
+<tr><td>
+<blockquote>
+<p>
+The final element you need to add to your Test Plan is a
- <a href="component_reference.html#listeners">
- Listener
- </a>
- . This element is
+<a href="component_reference.html#listeners">
+Listener
+</a>
+. 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.
- </p>
- <p >
- Select the Jakarta Users element and add a
- <a href="../usermanual/component_reference.html#Graph_Results">Graph Results</a>
- listener (Add --> Listener
+</p>
+<p>
+Select the Jakarta Users element and add a
+<a href="../usermanual/component_reference.html#Graph_Results">Graph Results</a>
+ listener (Add --> Listener
--> Graph Results). Next, you need to specify a directory and filename of the
output file. You can either type it into the filename field, or select the
Browse button and browse to a directory and then enter a filename.
- </p>
- <p><table border="0" cellspacing="0" cellpadding="0"><tr><td><img src="../images/screenshots/graph_results.png"><br>
- <font size="-1">
+</p>
+<p><table border="0" cellspacing="0" cellpadding="0"><tr><td><img src="../images/screenshots/graph_results.png"><br>
+<font size="-1">
Figure 5.7. Graph Results Listener
- </font></td></tr></table></p>
- </blockquote>
- </p>
- </td></tr>
- <tr><td><br></td></tr>
- </table>
- <table border="0" cellspacing="0" cellpadding="2" width="100%">
- <tr><td bgcolor="#525D76">
- <font color="#ffffff" face="arial,helvetica,sanserif">
- <a name="logging_in"><strong>5.6 Logging in to a web-site</strong></a>
- </font>
- </td></tr>
- <tr><td>
- <blockquote>
- <p >
-
+</font></td></tr></table></p>
+</blockquote>
+</p>
+</td></tr>
+<tr><td><br></td></tr>
+</table>
+<table border="0" cellspacing="0" cellpadding="2" width="100%">
+<tr><td bgcolor="#525D76">
+<font color="#ffffff" face="arial,helvetica,sanserif">
+<a name="logging_in"><strong>5.6 Logging in to a web-site</strong></a>
+</font>
+</td></tr>
+<tr><td>
+<blockquote>
+<p>
+
It's not the case here, but some web-sites require you to login before permitting you to perform certain actions.
In a web-browser, the login will be shown as a form for the user name and password,
and a button to submit the form.
The button generates a POST request, passing the values of the form items as parameters.
- </p>
- <p >
-
+</p>
+<p>
+
To do this in JMeter, add an HTTP Request, and set the method to POST.
You'll need to know the names of the fields used by the form, and the target page.
These can be found out by inspecting the code of the login page.
[If this is difficult to do, you can use the
- <a href="component_reference.html#HTTP_Proxy_Server">
- JMeter Proxy Recorder
- </a>
- to record the login sequence.]
+<a href="component_reference.html#HTTP_Proxy_Server">
+JMeter Proxy Recorder
+</a>
+ to record the login sequence.]
Set the path to the target of the submit button.
Click the Add button twice and enter the username and password details.
Sometimes the login form contains additional hidden fields.
These will need to be added as well.
- </p>
- <p><table border="0" cellspacing="0" cellpadding="0"><tr><td><img src="../images/screenshots/http_login.png"><br>
- <font size="-1">
+</p>
+<p><table border="0" cellspacing="0" cellpadding="0"><tr><td><img src="../images/screenshots/http_login.png"><br>
+<font size="-1">
Figure 5.8. Sample HTTP login request
- </font></td></tr></table></p>
- </blockquote>
- </p>
- </td></tr>
- <tr><td><br></td></tr>
- </table>
- <table>
- <tr>
- <td bgcolor="#525D76">
- <div align="right"><a href="index.html"><font size=-1 color="#ffffff" face="arial,helvetica,sanserif">Index</font></a></div>
- </td>
- <td bgcolor="#525D76">
- <div align="right"><a href="build-adv-web-test-plan.html"><font size=-1 color="#ffffff" face="arial,helvetica,sanserif">Next</font></a></div>
- </td>
- <td bgcolor="#525D76">
- <div align="right"><a href="test_plan.html"><font size=-1 color="#ffffff" face="arial,helvetica,sanserif">Prev</font></a></div>
- </td>
- </tr>
- </table>
- <br>
- </td>
- </tr>
-
- <tr><td colspan="2">
- <hr noshade size="1"/>
- </td></tr>
- <tr><td colspan="2">
- <div align="center"><font color="#525D76" size="-1"><em>
- Copyright © 1999-2008, Apache Software Foundation
- </em></font></div>
- </td></tr>
- </table>
- </body>
- </html>
+</font></td></tr></table></p>
+</blockquote>
+</p>
+</td></tr>
+<tr><td><br></td></tr>
+</table>
+<table>
+<tr>
+<td bgcolor="#525D76">
+<div align="right"><a href="index.html"><font size=-1 color="#ffffff" face="arial,helvetica,sanserif">Index</font></a></div>
+</td>
+<td bgcolor="#525D76">
+<div align="right"><a href="build-adv-web-test-plan.html"><font size=-1 color="#ffffff" face="arial,helvetica,sanserif">Next</font></a></div>
+</td>
+<td bgcolor="#525D76">
+<div align="right"><a href="test_plan.html"><font size=-1 color="#ffffff" face="arial,helvetica,sanserif">Prev</font></a></div>
+</td>
+</tr>
+</table>
+<br>
+</td>
+</tr>
+<tr><td colspan="2">
+<hr noshade size="1"/>
+</td></tr>
+<tr><td colspan="2">
+<div align="center"><font color="#525D76" size="-1"><em>
+Copyright © 1999-2009, Apache Software Foundation
+</em></font></div>
+</td></tr>
+</table>
+</body>
+</html>
<!-- end the processing -->
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org