Modified: jmeter/trunk/docs/usermanual/remote-test.html URL: http://svn.apache.org/viewvc/jmeter/trunk/docs/usermanual/remote-test.html?rev=1739469&r1=1739468&r2=1739469&view=diff ============================================================================== --- jmeter/trunk/docs/usermanual/remote-test.html (original) +++ jmeter/trunk/docs/usermanual/remote-test.html Sat Apr 16 14:36:00 2016 @@ -1,23 +1,12 @@ <!DOCTYPE html SYSTEM "about:legacy-compat"> <html lang="en"><head><META http-equiv="Content-Type" content="text/html; charset=iso-8859-15"><title>Apache JMeter - - User's Manual: Remote (Distributed) Testing</title><meta name="viewport" content="width=device-width, initial-scale=1"><link href="http://fonts.googleapis.com/css?family=Merriweather:400normal" rel="stylesheet" type="text/css"><link rel="stylesheet" type="text/css" href="../css/new-style.css"></head><body role="document"><a href="#content" class="hidden">Main content</a><div class="header"><!-- + User's Manual: Remote (Distributed) Testing</title><meta name="viewport" content="width=device-width, initial-scale=1"><link href="http://fonts.googleapis.com/css?family=Merriweather:400normal" rel="stylesheet" type="text/css"><link rel="stylesheet" type="text/css" href="../css/new-style.css"><link rel="apple-touch-icon-precomposed" href="../images/apple-touch-icon.png"><link rel="icon" href="../images/favicon.png"><meta name="msapplication-TileColor" content="#ffffff"><meta name="msapplication-TileImage" content="../images/mstile-144x144.png"><meta name="theme-color" content="#ffffff"></head><body role="document"><a href="#content" class="hidden">Main content</a><div class="header"><!-- APACHE LOGO - --><div><a href="http://www.apache.org"><img title="Apache Software Foundation" width="290" height="75" src="../images/asf-logo.png" alt="Logo ASF"></a></div><!-- + --><div><a href="http://www.apache.org"><img title="Apache Software Foundation" class="logo" src="../images/asf-logo.svg" alt="Logo ASF"></a></div><!-- PROJECT LOGO - --><div><a href="http://jmeter.apache.org/"><img src="../images/logo.jpg" alt="Apache JMeter"></a></div><div class="twitter"><div><a href="https://twitter.com/share" class="twitter-share-button" data-text="Powerful Load Testing with Apache #JMeter" data-via="ApacheJMeter" data-lang="en-gb" data-size="large">Tweet</a><script> - (function(d,s,id){ - var js, - fjs=d.getElementsByTagName(s)[0], - p=/^http:/.test(d.location)?'http':'https'; - if (!d.getElementById(id)) { - js=d.createElement(s); - js.id=id; - js.src=p+'://platform.twitter.com/widgets.js'; - fjs.parentNode.insertBefore(js,fjs); - } - })(document, 'script', 'twitter-wjs'); - </script></div><div><a href="https://twitter.com/ApacheJMeter" class="twitter-follow-button" data-show-count="false" data-lang="en-gb" data-size="large">Follow</a><script>(function(d,s,id){ + --><div><a href="http://jmeter.apache.org/"><img class="logo" src="../images/logo.svg" alt="Apache JMeter"></a></div><div class="banner"><iframe src="http://www.apache.org/ads/bannerbar.html" style="border-width:0;" frameborder="0" scrolling="no"></iframe><div class="clear"></div></div></div><div class="nav"><div class="social menu"><div><a href="https://twitter.com/share" class="twitter-share-button" data-text="Powerful Load Testing with Apache #JMeter" data-via="ApacheJMeter" data-lang="en-gb" data-size="large">Tweet</a><script> + (function(d,s,id){ var js, fjs=d.getElementsByTagName(s)[0], p=/^http:/.test(d.location)?'http':'https'; @@ -27,8 +16,19 @@ js.src=p+'://platform.twitter.com/widgets.js'; fjs.parentNode.insertBefore(js,fjs); } - })(document, 'script', 'twitter-wjs'); - </script></div></div><div class="banner"><iframe src="http://www.apache.org/ads/bannerbar.html" style="border-width:0;" frameborder="0" scrolling="no"></iframe><div class="clear"></div></div></div><div class="nav"><ul class="menu"><li><div class="menu-title">About</div><ul><li><a href="../index.html">Overview</a></li><li><a href="http://twitter.com/ApacheJMeter">JMeter on Twitter<img src="../images/twitter.png" alt="Icon for JMeter on Twitter"></a></li><li><a href="../issues.html">Issue Tracking</a></li><li><a href="http://projects.apache.org/feeds/rss/jmeter.xml">Subscribe to What's New</a></li><li><a href="http://www.apache.org/licenses/">License</a></li></ul></li></ul><ul class="menu"><li><div class="menu-title">Download</div><ul><li><a href="../download_jmeter.cgi">Download Releases</a></li><li><a href="../nightly.html">Developer (Nightly) Builds</a></li></ul></li></ul><ul class="menu"><li><div class="menu-title">Documentation</div><ul><li><a href="../changes.html" >Changes per version</a></li><li><a href="../usermanual/get-started.html">Get >Started</a></li><li><a href="../usermanual/index.html">User >Manual</a></li><li><a href="../usermanual/best-practices.html">Best >Practices</a></li><li><a >href="../usermanual/component_reference.html">Component >Reference</a></li><li><a href="../usermanual/functions.html">Functions >Reference</a></li><li><a href="../api/index.html">Javadocs</a></li><li><a >href="../building.html">Building JMeter and Add-Ons</a></li><li><a >href="http://wiki.apache.org/jmeter">JMeter Wiki</a></li><li><a >href="http://wiki.apache.org/jmeter/JMeterFAQ">FAQ >(Wiki)</a></li></ul></li></ul><ul class="menu"><li><div >class="menu-title">Tutorials (PDF format)</div><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="../us ermanual/jmeter_accesslog_sampler_step_by_step.pdf">Access Log Sampler</a></li><li><a href="../extending/jmeter_tutorial.pdf">Extending JMeter</a></li></ul></li></ul><ul class="menu"><li><div class="menu-title">Community</div><ul><li><a href="http://wiki.apache.org/jmeter/JMeterCommitters">Contributors</a></li><li><a href="../mail.html">Mailing Lists</a></li><li><a href="../svnindex.html">SVN Repositories</a></li></ul></li></ul><ul class="menu"><li><div class="menu-title">Foundation</div><ul><li><a href="http://www.apache.org/">ASF</a></li><li><a href="http://www.apache.org/foundation/getinvolved.html">Get Involved in the ASF</a></li><li><a href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li><li><a href="http://www.apache.org/foundation/thanks.html">Thanks</a></li></ul></li></ul></div><div class="main" id="content"><ul class="pagelinks"><li><a href="listeners.html">< Prev</a></li><li><a href="../index.html">Index</a></li><li><a href="best-practices.html"> Next ></a></li></ul><div class="section"><h1>15. Remote Testing</h1> + })(document, 'script', 'twitter-wjs'); + </script></div><div><a href="https://twitter.com/ApacheJMeter" class="twitter-follow-button" data-show-count="false" data-lang="en-gb" data-size="large">Follow</a><script>(function(d,s,id){ + var js, + fjs=d.getElementsByTagName(s)[0], + p=/^http:/.test(d.location)?'http':'https'; + if (!d.getElementById(id)) { + js=d.createElement(s); + js.id=id; + js.src=p+'://platform.twitter.com/widgets.js'; + fjs.parentNode.insertBefore(js,fjs); + } + })(document, 'script', 'twitter-wjs'); + </script></div><div><a href="https://github.com/apache/jmeter"><img alt="star this repo" src="http://githubbadges.com/star.svg?user=apache&repo=jmeter&style=default"></a></div><div><a href="https://github.com/apache/jmeter/fork"><img alt="fork this repo" src="http://githubbadges.com/fork.svg?user=apache&repo=jmeter&style=default"></a></div><div><a href="https://maven-badges.herokuapp.com/maven-central/org.apache.jmeter/ApacheJMeter"><img alt="Maven Central" src="https://maven-badges.herokuapp.com/maven-central/org.apache.jmeter/ApacheJMeter/badge.png"></a></div></div><ul class="menu"><li onClick="return true"><div class="menu-title">About</div><ul><li><a href="../index.html">Overview</a></li><li><a href="http://www.apache.org/licenses/">License</a></li></ul></li></ul><ul class="menu"><li onClick="return true"><div class="menu-title">Download</div><ul><li><a href="../download_jmeter.cgi">Download Releases</a></li><li><a href="../nightly.html">Developer (Nightly) Builds</a></li></ul></li></ul><ul class="menu"><li onClick="return true"><div class="menu-title">Documentation</div><ul><li><a href="../changes.html">Changes per version</a></li><li><a href="../usermanual/get-started.html">Get Started</a></li><li><a href="../usermanual/index.html">User Manual</a></li><li><a href="../usermanual/best-practices.html">Best Practices</a></li><li><a href="../usermanual/component_reference.html">Component Reference</a></li><li><a href="../usermanual/functions.html">Functions Reference</a></li><li><a href="../api/index.html">Javadocs</a></li><li><a href="../building.html">Building JMeter and Add-Ons</a></li><li><a href="http://wiki.apache.org/jmeter">JMeter Wiki</a></li><li><a href="http://wiki.apache.org/jmeter/JMeterFAQ">FAQ (Wiki)</a></li></ul></li></ul><ul class="menu"><li onClick="return true"><div class="menu-title">Tutorials (PDF format)</div><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></li></ul><ul class="menu"><li onClick="return true"><div >class="menu-title">Community</div><ul><li><a href="../issues.html">Issue >Tracking</a></li><li><a href="../mail.html">Mailing Lists</a></li><li><a >href="../svnindex.html">Source Repositories</a></li><li><a >href="../building.html">Building and Contributing</a></li><li><a >href="https://projects.apache.org/project.html?jmeter">Project info at >Apache</a></li><li><a >href="http://wiki.apache.org/jmeter/JMeterCommitters">Contributors</a></li></ul></li></ul><ul > class="menu"><li onClick="return true"><div >class="menu-title">Foundation</div><ul><li><a >href="http://www.apache.org/">ASF</a></li><li><a href= "http://www.apache.org/foundation/getinvolved.html">Get Involved in the ASF</a></li><li><a href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li><li><a href="http://www.apache.org/foundation/thanks.html">Thanks</a></li></ul></li></ul></div><div class="main" id="content"><ul class="pagelinks"><li><a href="listeners.html">< Prev</a></li><li><a href="../index.html">Index</a></li><li><a href="realtime-results.html">Next ></a></li></ul><div class="section"><h1>15. Remote Testing</h1> <p>In the event that your JMeter client machine is unable, performance-wise, to simulate enough users to stress your server or is limited at network level, an option exists to control multiple, remote JMeter @@ -39,7 +39,7 @@ all the data from them. This offers the <ul> <li>Saving of test samples to the local machine </li> -<li>Managment of multiple JMeterEngines from a single machine </li> +<li>Management of multiple JMeterEngines from a single machine </li> <li>No need to copy the test plan to each server - the client sends it to all the servers</li> </ul> </p> @@ -74,7 +74,7 @@ Make sure that all the nodes (client and <p> If the test uses any data files, <b>note that these are not sent across by the client so make sure that these are available in the appropriate directory on each server</b>. -If necessary you can define different values for properties by editing the user.properties or system.properties +If necessary you can define different values for properties by editing the <span class="code">user.properties</span> or <span class="code">system.properties</span> files on each server. These properties will be picked up when the server is started and may be used in the test plan to affect its behaviour (e.g. connecting to a different remote server). Alternatively use different content in any datafiles used by the test @@ -82,30 +82,32 @@ Alternatively use different content in a </p> <p><b>Step 1: Start the servers </b></p> -<p>To run JMeter in remote node, start the JMeter server component on all machines you wish to run on by running the <b>JMETER_HOME/bin/jmeter-server</b> (unix) or <b>JMETER_HOME/bin/jmeter-server.bat</b> (windows) script.</p> +<p>To run JMeter in remote node, start the JMeter server component on all machines you wish to run on by running +the <span class="code">JMETER_HOME/bin/jmeter-server</span> (unix) or <span class="code">JMETER_HOME/bin/jmeter-server.bat</span> (windows) script.</p> <p>Note that there can only be one JMeter server on each node unless different RMI ports are used.</p> <p>Since JMeter 2.3.1, the JMeter server application starts the RMI registry itself; there is no need to start RMI registry separately. -To revert to the previous behaviour, define the JMeter property server.rmi.create=false on the server host systems. +To revert to the previous behaviour, define the JMeter property <pre class="source">server.rmi.create=false</pre> on the server host systems. </p> <p> By default, RMI uses a dynamic port for the JMeter server engine. This can cause problems for firewalls, -so with versions of JMeter after 2.3.2 you can define the JMeter property <b>server.rmi.localport</b> +so with you can define the JMeter property <span class="code">server.rmi.localport</span> to control this port number. If this is non-zero, it will be used as the local port number for the server engine. </p> <p><b>Step 2: Add the server IP to your client's Properties File</b></p> -<p>Edit the properties file <i>on the controlling JMeter machine</i>. In /bin/jmeter.properties, find the property named, "remote_hosts", and +<p>Edit the properties file <i>on the controlling JMeter machine</i>. In <span class="code">JMETER_HOME/bin/jmeter.properties</span>, +find the property named, "<span class="code">remote_hosts</span>", and add the value of your running JMeter server's IP address. Multiple such servers can be added, comma-delimited.</p> -<p>Note that you can use the -R <a href="get-started.html#override">command line option</a> -instead to specify the remote host(s) to use. This has the same effect as using -r and -Jremote_hosts={serverlist}. - E.g. jmeter -Rhost1,127.0.0.1,host2</p> -<p>If you define the JMeter property server.exitaftertest=true, then the server will exit after it runs a single test. -See also the -X flag (described below) +<p>Note that you can use the <span class="code">-R</span> <a href="get-started.html#override">command line option</a> +instead to specify the remote host(s) to use. This has the same effect as using <span class="code">-r</span> and <span class="code">-Jremote_hosts={serverlist}</span>. + E.g. </p><pre class="source">jmeter -Rhost1,127.0.0.1,host2</pre> +<p>If you define the JMeter property <span class="code">server.exitaftertest=true</span>, then the server will exit after it runs a single test. +See also the <span class="code">-X</span> flag (described below) </p> <p><b>Step 3a: Start the JMeter Client from a GUI client to check configuration</b></p> -<p>Now you are ready to start the controlling JMeter client. For MS-Windows, start the client with the script "bin/jmeter.bat". For UNIX, -use the script "bin/jmeter". You will notice that the Run menu contains two new sub-menus: "Remote Start" and "Remote Stop" +<p>Now you are ready to start the controlling JMeter client. For MS-Windows, start the client with the script "<span class="code">bin/jmeter.bat</span>". For UNIX, +use the script "<span class="code">bin/jmeter</span>". You will notice that the Run menu contains two new sub-menus: "Remote Start" and "Remote Stop" (see figure 1). These menus contain the client that you set in the properties file. Use the remote start and stop instead of the normal JMeter start and stop menu items.</p> <figure><a href="../images/screenshots/remote/run-menu00.gif"><img src="../images/screenshots/remote/run-menu00.gif" width="232" height="156" alt="Figure 1 - Run Menu"></a><figcaption>Figure 1 - Run Menu</figcaption></figure> @@ -113,189 +115,200 @@ normal JMeter start and stop menu items. <p><b>Step 3b: Start the JMeter from a non-GUI Client</b></p> <p> GUI mode should only be used for debugging, as a better alternative, you should start the test on remote server(s) from a non-GUI (command-line) client. -The command to do this is: -<pre> +The command to do this is:</p> +<pre class="source"> jmeter -n -t script.jmx -r +</pre> or -jmeter -n -t script.jmx -R server1,server2... - -Other flags that may be useful: --Gproperty=value - define a property in all the servers (may appear more than once) --X - Exit remote servers at the end of the test. +<pre class="source"> +jmeter -n -t script.jmx -R server1,server2,… </pre> -The first example will start the test on whatever servers are defined in the JMeter property remote_hosts;<br> -The second example will define remote_hosts from the list of servers and then start the test on the remote servers. +Other flags that may be useful: +<dl> +<dt><span class="code">-Gproperty=value</span></dt><dd>define a property in all the servers (may appear more than once)</dd> +<dt><span class="code">-X</span></dt><dd>Exit remote servers at the end of the test.</dd> +</dl> +The first example will start the test on whatever servers are defined in the JMeter property <span class="code">remote_hosts</span>;<br> +The second example will define <span class="code">remote_hosts</span> from the list of servers and then start the test on the remote servers. <br> The command-line client will exit when all the remote servers have stopped. -</p> -<div class="subsection"><h2>15.1 Doing it Manually<a class="sectionlink" href="#detail_instructions" title="Link to here">¶</a></h2> -<p>In some cases, the jmeter-server script may not work for you (if you are using an OS platform not anticipated by the JMeter developers). Here is how to start the JMeter servers (step 1 above) with a more manual process:</p> +<div class="subsection"><h2 id="detail_instructions">15.1 Doing it Manually<a class="sectionlink" href="#detail_instructions" title="Link to here">¶</a></h2> +<p>In some cases, the jmeter-server script may not work for you (if you are using an OS platform not anticipated by the JMeter developers). +Here is how to start the JMeter servers (step 1 above) with a more manual process:</p> <p><b>Step 1a: Start the RMI Registry</b></p> <p> Since JMeter 2.3.1, the RMI registry is started by the JMeter server, so this section does not apply in the normal case. -To revert to the previous behaviour, define the JMeter property server.rmi.create=false on the server host systems +To revert to the previous behaviour, define the JMeter property <span class="code">server.rmi.create=false</span> on the server host systems and follow the instructions below. </p> <p>JMeter uses Remote Method Invocation (RMI) as the remote communication mechanism. Therefore, you need -to run the RMI Registry application (which is named, "rmiregistry") that comes with the JDK and is located in the "bin" -directory. Before running rmiregistry, make sure that the following jars are in your system claspath: +to run the RMI Registry application (which is named, "<span class="code">rmiregistry</span>") that comes with the JDK and is located in the "<span class="code">bin</span>" +directory. Before running <span class="code">rmiregistry</span>, make sure that the following jars are in your system classpath: <ul> - <li>JMETER_HOME/lib/ext/ApacheJMeter_core.jar</li> - <li>JMETER_HOME/lib/jorphan.jar</li> - <li>JMETER_HOME/lib/logkit-2.0.jar</li> + <li><span class="code">JMETER_HOME/lib/ext/ApacheJMeter_core.jar</span></li> + <li><span class="code">JMETER_HOME/lib/jorphan.jar</span></li> + <li><span class="code">JMETER_HOME/lib/logkit-2.0.jar</span></li> </ul> The -rmiregistry application needs access to certain JMeter classes. Run rmiregistry with no parameters. By default the -application listens to port 1099.</p> +rmiregistry application needs access to certain JMeter classes. Run <span class="code">rmiregistry</span> with no parameters. By default the +application listens to port <span class="code">1099</span>.</p> <p><b>Step 1b: Start the JMeter Server</b></p> -<p>Once the RMI Registry application is running, start the JMeter Server. -Use the "-s" option with the jmeter startup script ("jmeter -s").</p> +<p>Once the RMI Registry application is running, start the JMeter Server. +Use the "<span class="code">-s</span>" option with the jmeter startup script ("<span class="code">jmeter -s</span>").</p> <p>Steps 2 and 3 remain the same.</p> </div> -<div class="subsection"><h2>15.2 Tips<a class="sectionlink" href="#tips" title="Link to here">¶</a></h2> +<div class="subsection"><h2 id="tips">15.2 Tips<a class="sectionlink" href="#tips" title="Link to here">¶</a></h2> <p> -JMeter/RMI requires a connection from the client to the server. This will use the port you chose, default 1099.<br> +JMeter/RMI requires a connection from the client to the server. This will use the port you chose, default <span class="code">1099</span>.<br> JMeter/RMI also requires a reverse connection in order to return sample results from the server to the client.<br> This will use a high-numbered port. <br> -This port can be controlled by jmeter property called client.rmi.localport in jmeter.properties.<br> +This port can be controlled by jmeter property called <span class="code">client.rmi.localport</span> in <span class="code">jmeter.properties</span>.<br> If there are any firewalls or other network filters between JMeter client and server, you will need to make sure that they are set up to allow the connections through. If necessary, use monitoring software to show what traffic is being generated. </p> -<p>If you're running Suse Linux, these tips may help. The default installation may enable the firewall. In that case, remote testing will not work properly. The following tips were contributed by Sergey Ten.</p> +<p>If you're running Suse Linux, these tips may help. The default installation may enable the firewall. In that case, +remote testing will not work properly. The following tips were contributed by Sergey Ten.</p> <p>If you see connections refused, turn on debugging by passing the following options.</p> - rmiregistry -J-Dsun.rmi.log.debug=true - -J-Dsun.rmi.server.exceptionTrace=true - -J-Dsun.rmi.loader.logLevel=verbose - -J-Dsun.rmi.dgc.logLevel=verbose - -J-Dsun.rmi.transport.logLevel=verbose - -J-Dsun.rmi.transport.tcp.logLevel=verbose +<pre class="source"> +rmiregistry -J-Dsun.rmi.log.debug=true \ + -J-Dsun.rmi.server.exceptionTrace=true \ + -J-Dsun.rmi.loader.logLevel=verbose \ + -J-Dsun.rmi.dgc.logLevel=verbose \ + -J-Dsun.rmi.transport.logLevel=verbose \ + -J-Dsun.rmi.transport.tcp.logLevel=verbose \ +</pre> <p>Since JMeter 2.3.1, the RMI registry is started by the server; however the options can still be passed in from the JMeter command line. -For example: "jmeter -s -Dsun.rmi.loader.logLevel=verbose" (i.e. omit the -J prefixes). -Alternatively the properties can be defined in the system.properties file. +For example: "<span class="code">jmeter -s -Dsun.rmi.loader.logLevel=verbose</span>" (i.e. omit the <span class="code">-J</span> prefixes). +Alternatively the properties can be defined in the <span class="code">system.properties</span> file. </p> -<p>The solution to the problem is to remove the loopbacks 127.0.0.1 and 127.0.0.2 from etc/hosts. What happens is jmeter-server can't connect to rmiregistry if 127.0.0.2 loopback is not available. Use the following settings to fix the problem.</p> +<p>The solution to the problem is to remove the loopbacks <span class="code">127.0.0.1</span> and <span class="code">127.0.0.2</span> from <span class="code">/etc/hosts</span>. +What happens is <span class="code">jmeter-server</span> can't connect to rmiregistry if <span class="code">127.0.0.2</span> loopback is not available. +Use the following settings to fix the problem.</p> <p> Replace</p> -<ul> - <li> `dirname $0`/jmeter -s "$@"</li> -</ul> +<pre class="source">`dirname $0`/jmeter -s "$@"</pre> <p> With</p> -<ul> - <li> HOST="-Djava.rmi.server.hostname=[computer_name][computer_domain]</li> - <li> -Djava.security.policy=`dirname $0`/[policy_file]"</li> - <li> `dirname $0`/jmeter $HOST -s "$@"</li> -</ul> -<p>Also create a policy file and add [computer_name][computer_domain] line to /etc/hosts.</p> +<pre class="source"> +HOST="-Djava.rmi.server.hostname=[computer_name][computer_domain] \ + -Djava.security.policy=`dirname $0`/[policy_file]" \ +`dirname $0`/jmeter $HOST -s "$@" +</pre> +<p>Also create a policy file and add <span class="code">[computer_name][computer_domain]</span> line to <span class="code">/etc/hosts</span>.</p> <p>In order to better support SSH-tunneling of the RMI communication channels used in remote testing, since JMeter 2.6:</p> <ul> -<li>a new property "client.rmi.localport" can be set to control the RMI port used by the RemoteSampleListenerImpl</li> +<li>a new property "<span class="code">client.rmi.localport</span>" can be set to control the RMI port used by the RemoteSampleListenerImpl</li> <li>To support tunneling RMI traffic over an SSH tunnel as the remote endpoint using a port on the local machine, - loopback interface is now allowed to be used if it has been specified directly using the Java System Property "java.rmi.server.hostname" parameter.</li> + loopback interface is now allowed to be used if it has been specified directly using the Java System Property + "<span class="code">java.rmi.server.hostname</span>" parameter.</li> </ul> </div> -<div class="subsection"><h2>15.3 Using a different port<a class="sectionlink" href="#portchange" title="Link to here">¶</a></h2> -<p>By default, JMeter uses the standard RMI port 1099. It is possible to change this. For this to work successfully, all the following need to agree:</p> +<div class="subsection"><h2 id="portchange">15.3 Using a different port<a class="sectionlink" href="#portchange" title="Link to here">¶</a></h2> +<p>By default, JMeter uses the standard RMI port <span class="code">1099</span>. It is possible to change this. For this to work successfully, +all the following need to agree:</p> <ul> -<li>On the server, start rmiregistry using the new port number</li> -<li>On the server, start JMeter with the property server_port defined</li> -<li>On the client, update the remote_hosts property to include the new remote host:port settings</li> +<li>On the server, start <span class="code">rmiregistry</span> using the new port number</li> +<li>On the server, start JMeter with the property <span class="code">server_port</span> defined</li> +<li>On the client, update the <span class="code">remote_hosts</span> property to include the new remote <span class="code">host:port</span> settings</li> </ul> <p>Since Jmeter 2.1.1, the jmeter-server scripts provide support for changing the port. -For example, assume you want to use port 1664 (perhaps 1099 is already used).</p> -<pre> +For example, assume you want to use port <span class="code">1664</span> (perhaps <span class="code">1099</span> is already used).</p> On Windows (in a DOS box) +<pre class="source"> C:\JMETER> SET SERVER_PORT=1664 C:\JMETER> JMETER-SERVER [other options] - +</pre> On Unix: +<pre class="source"> $ SERVER_PORT=1664 jmeter-server [other options] -[N.B. use upper case for the environment variable] </pre> +[N.B. use upper case for the environment variable] <p> In both cases, the script starts rmiregistry on the specified port, -and then starts JMeter in server mode, having defined the "server_port" property. +and then starts JMeter in server mode, having defined the "<span class="code">server_port</span>" property. </p> <p> -The chosen port will be logged in the server jmeter.log file (rmiregistry does not create a log file). +The chosen port will be logged in the server <span class="code">jmeter.log</span> file (<span class="code">rmiregistry</span> does not create a log file). </p> </div> -<div class="subsection"><h2>15.4 Using a different sample sender<a class="sectionlink" href="#sendermode" title="Link to here">¶</a></h2> +<div class="subsection"><h2 id="sendermode">15.4 Using a different sample sender<a class="sectionlink" href="#sendermode" title="Link to here">¶</a></h2> <p> Listeners in the test plan send their results back to the client JMeter which writes the results to the specified files By default, samples are sent back synchronously as they are generated. This can affect the maximum throughput of the server test; the sample result has to be sent back before the thread can -continue. +continue. There are some JMeter properties that can be set to alter this behaviour. </p> -<ul> -<li>mode - sample sending mode - default is StrippedBatch since 2.9. This should be set on the client node.</li> - <ul> - <li>Standard - send samples synchronously as soon as they are generated</li> - <li>Hold - hold samples in an array until the end of a run. This may use a lot of memory on the server and is discouraged.</li> - <li>DiskStore - store samples in a disk file (under java.io.temp) until the end of a run. - The serialised data file is deleted on JVM exit. </li> - <li>StrippedDiskStore - remove responseData from succesful samples, and use DiskStore sender to send them.</li> - <li>Batch - send saved samples when either the count (num_sample_threshold) or time (time_threshold) exceeds a threshold, +<dl> +<dt><span class="code">mode</span></dt><dd>sample sending mode - default is <span class="code">StrippedBatch</span> since 2.9. This should be set on the client node. + <dl> + <dt><span class="code">Standard</span></dt><dd>send samples synchronously as soon as they are generated</dd> + <dt><span class="code">Hold</span></dt><dd>hold samples in an array until the end of a run. This may use a lot of memory on the server and is discouraged.</dd> + <dt><span class="code">DiskStore</span></dt><dd>store samples in a disk file (under <span class="code">java.io.temp</span>) until the end of a run. + The serialised data file is deleted on JVM exit.</dd> + <dt><span class="code">StrippedDiskStore</span></dt><dd>remove responseData from successful samples, and use DiskStore sender to send them.</dd> + <dt><span class="code">Batch</span></dt><dd>send saved samples when either the count (<span class="code">num_sample_threshold</span>) or time (<span class="code">time_threshold</span>) exceeds a threshold, at which point the samples are sent synchronously. The thresholds can be configured on the server using the following properties: - <ul> - <li>num_sample_threshold - number of samples to accumulate, default 100</li> - <li>time_threshold - time threshold, default 60000 ms = 60 seconds</li> - </ul> - </li> - See also the Asynch mode, described below. - <li>Statistical - send a summary sample when either the count or time exceeds a threshold. + <dl> + <dt><span class="code">num_sample_threshold</span></dt><dd>number of samples to accumulate, default <span class="code">100</span></dd> + <dt><span class="code">time_threshold</span></dt><dd>time threshold, default 60000 ms = 60 seconds</dd> + </dl> + + See also the Asynch mode, described below.</dd> + <dt><span class="code">Statistical</span></dt><dd>send a summary sample when either the count or time exceeds a threshold. The samples are summarised by thread group name and sample label. The following fields are accumulated: - <ul> - <li>elapsed time</li> - <li>latency</li> - <li>bytes</li> - <li>sample count</li> - <li>error count</li> - </ul> + <ul> + <li><span class="code">elapsed time</span></li> + <li><span class="code">latency</span></li> + <li><span class="code">bytes</span></li> + <li><span class="code">sample count</span></li> + <li><span class="code">error count</span></li> + </ul> Other fields that vary between samples are lost. - </li> - <li>Stripped - remove responseData from succesful samples</li> - <li>StrippedBatch - remove responseData from succesful samples, and use Batch sender to send them.</li> - <li>Asynch - samples are temporarily stored in a local queue. A separate worker thread sends the samples. + </dd> + <dt><span class="code">Stripped</span></dt><dd>remove responseData from successful samples</dd> + <dt><span class="code">StrippedBatch</span></dt><dd>remove responseData from successful samples, and use Batch sender to send them.</dd> + <dt><span class="code">Asynch</span></dt><dd>samples are temporarily stored in a local queue. A separate worker thread sends the samples. This allows the test thread to continue without waiting for the result to be sent back to the client. However, if samples are being created faster than they can be sent, the queue will eventually fill up, and the sampler thread will block until some samples can be drained from the queue. This mode is useful for smoothing out peaks in sample generation. The queue size can be adjusted by setting the JMeter property - <b><span class="code">asynch.batch.queue.size</span></b> (default 100) on the server node. - </li> - <li>StrippedAsynch - remove responseData from succesful samples, and use Async sender to send them.</li> - <li>Custom implementation : set the mode parameter to your custom sample sender class name. - This must implement the interface SampleSender and have a constructor which takes a single - parameter of type RemoteSampleListener. - </li> - </ul> -</ul> -<div class="clear"></div><div class="note">Stripped mode family strips responseData so this means that some Elements that rely on the previous responseData being available will not work.<br> + <span class="code">asynch.batch.queue.size</span> (default <span class="code">100</span>) on the server node. + </dd> + <dt><span class="code">StrippedAsynch</span></dt><dd>remove responseData from successful samples, and use Async sender to send them.</dd> + <dt><span class="code">Custom implementation</span></dt><dd>set the mode parameter to your custom sample sender class name. + This must implement the interface <span class="code">SampleSender</span> and have a constructor which takes a single + parameter of type <span class="code">RemoteSampleListener</span>. + </dd> + </dl> + </dd> +</dl> +<div class="clear"></div><div class="note"><span class="code">Stripped</span> mode family strips <span class="code">responseData</span> so this means that some Elements that rely +on the previous <span class="code">responseData</span> being available will not work.<br> This is not really a problem as there is always a more efficient way to implement this feature. </div><div class="clear"></div> -<p>The following properties apply to the Batch and Statistical modes:</p> - <ul> - <li>num_sample_threshold - number of samples in a batch (default 100)</li> - <li>time_threshold - number of milliseconds to wait (default 60 seconds)</li> - </ul> +<p>The following properties apply to the <span class="code">Batch</span> and <span class="code">Statistical</span> modes:</p> + <dl> + <dt><span class="code">num_sample_threshold</span></dt><dd>number of samples in a batch (default <span class="code">100</span>)</dd> + <dt><span class="code">time_threshold</span></dt><dd>number of milliseconds to wait (default 60 seconds)</dd> + </dl> </div> -<div class="subsection"><h2>15.5 Dealing with nodes that failed starting<a class="sectionlink" href="#retries" title="Link to here">¶</a></h2> +<div class="subsection"><h2 id="retries">15.5 Dealing with nodes that failed starting<a class="sectionlink" href="#retries" title="Link to here">¶</a></h2> <p> For large-scale tests there is a chance that some part of remote servers will be unavailable or down. For example, when you use automation script to allocate many cloud machines and use them as generators, - some of requested machines might fail booting because of cloud's issues. + some of requested machines might fail booting because of cloud's issues. Since JMeter 2.13 there are new properties to control this behaviour. </p> <p> @@ -304,17 +317,16 @@ This is not really a problem as there is By default it does only one attempt. To control retry delay, set the <span class="code">client.retries_delay</span> property to number of milliseconds to sleep between attempts. </p> - <p> Finally, you might still want to run the test with those generators that succeeded initialization and skipping failed nodes. To enable that, set the <span class="code">client.continue_on_fail=true</span> property. </p> </div> -</div><ul class="pagelinks"><li><a href="listeners.html">< Prev</a></li><li><a href="../index.html">Index</a></li><li><a href="best-practices.html">Next ></a></li></ul></div><div class="footer"><div class="copyright"> +</div><ul class="pagelinks"><li><a href="listeners.html">< Prev</a></li><li><a href="../index.html">Index</a></li><li><a href="realtime-results.html">Next ></a></li></ul></div><div class="footer"><div class="copyright"> Copyright © 1999 – - 2015 + 2016 , Apache Software Foundation </div><div class="trademarks">Apache, Apache JMeter, JMeter, the Apache feather, and the Apache JMeter logo are
Modified: jmeter/trunk/docs/usermanual/test_plan.html URL: http://svn.apache.org/viewvc/jmeter/trunk/docs/usermanual/test_plan.html?rev=1739469&r1=1739468&r2=1739469&view=diff ============================================================================== --- jmeter/trunk/docs/usermanual/test_plan.html (original) +++ jmeter/trunk/docs/usermanual/test_plan.html Sat Apr 16 14:36:00 2016 @@ -1,23 +1,12 @@ <!DOCTYPE html SYSTEM "about:legacy-compat"> <html lang="en"><head><META http-equiv="Content-Type" content="text/html; charset=iso-8859-15"><title>Apache JMeter - - User's Manual: Elements of a Test Plan</title><meta name="viewport" content="width=device-width, initial-scale=1"><link href="http://fonts.googleapis.com/css?family=Merriweather:400normal" rel="stylesheet" type="text/css"><link rel="stylesheet" type="text/css" href="../css/new-style.css"></head><body role="document"><a href="#content" class="hidden">Main content</a><div class="header"><!-- + User's Manual: Elements of a Test Plan</title><meta name="viewport" content="width=device-width, initial-scale=1"><link href="http://fonts.googleapis.com/css?family=Merriweather:400normal" rel="stylesheet" type="text/css"><link rel="stylesheet" type="text/css" href="../css/new-style.css"><link rel="apple-touch-icon-precomposed" href="../images/apple-touch-icon.png"><link rel="icon" href="../images/favicon.png"><meta name="msapplication-TileColor" content="#ffffff"><meta name="msapplication-TileImage" content="../images/mstile-144x144.png"><meta name="theme-color" content="#ffffff"></head><body role="document"><a href="#content" class="hidden">Main content</a><div class="header"><!-- APACHE LOGO - --><div><a href="http://www.apache.org"><img title="Apache Software Foundation" width="290" height="75" src="../images/asf-logo.png" alt="Logo ASF"></a></div><!-- + --><div><a href="http://www.apache.org"><img title="Apache Software Foundation" class="logo" src="../images/asf-logo.svg" alt="Logo ASF"></a></div><!-- PROJECT LOGO - --><div><a href="http://jmeter.apache.org/"><img src="../images/logo.jpg" alt="Apache JMeter"></a></div><div class="twitter"><div><a href="https://twitter.com/share" class="twitter-share-button" data-text="Powerful Load Testing with Apache #JMeter" data-via="ApacheJMeter" data-lang="en-gb" data-size="large">Tweet</a><script> - (function(d,s,id){ - var js, - fjs=d.getElementsByTagName(s)[0], - p=/^http:/.test(d.location)?'http':'https'; - if (!d.getElementById(id)) { - js=d.createElement(s); - js.id=id; - js.src=p+'://platform.twitter.com/widgets.js'; - fjs.parentNode.insertBefore(js,fjs); - } - })(document, 'script', 'twitter-wjs'); - </script></div><div><a href="https://twitter.com/ApacheJMeter" class="twitter-follow-button" data-show-count="false" data-lang="en-gb" data-size="large">Follow</a><script>(function(d,s,id){ + --><div><a href="http://jmeter.apache.org/"><img class="logo" src="../images/logo.svg" alt="Apache JMeter"></a></div><div class="banner"><iframe src="http://www.apache.org/ads/bannerbar.html" style="border-width:0;" frameborder="0" scrolling="no"></iframe><div class="clear"></div></div></div><div class="nav"><div class="social menu"><div><a href="https://twitter.com/share" class="twitter-share-button" data-text="Powerful Load Testing with Apache #JMeter" data-via="ApacheJMeter" data-lang="en-gb" data-size="large">Tweet</a><script> + (function(d,s,id){ var js, fjs=d.getElementsByTagName(s)[0], p=/^http:/.test(d.location)?'http':'https'; @@ -27,10 +16,21 @@ js.src=p+'://platform.twitter.com/widgets.js'; fjs.parentNode.insertBefore(js,fjs); } - })(document, 'script', 'twitter-wjs'); - </script></div></div><div class="banner"><iframe src="http://www.apache.org/ads/bannerbar.html" style="border-width:0;" frameborder="0" scrolling="no"></iframe><div class="clear"></div></div></div><div class="nav"><ul class="menu"><li><div class="menu-title">About</div><ul><li><a href="../index.html">Overview</a></li><li><a href="http://twitter.com/ApacheJMeter">JMeter on Twitter<img src="../images/twitter.png" alt="Icon for JMeter on Twitter"></a></li><li><a href="../issues.html">Issue Tracking</a></li><li><a href="http://projects.apache.org/feeds/rss/jmeter.xml">Subscribe to What's New</a></li><li><a href="http://www.apache.org/licenses/">License</a></li></ul></li></ul><ul class="menu"><li><div class="menu-title">Download</div><ul><li><a href="../download_jmeter.cgi">Download Releases</a></li><li><a href="../nightly.html">Developer (Nightly) Builds</a></li></ul></li></ul><ul class="menu"><li><div class="menu-title">Documentation</div><ul><li><a href="../changes.html" >Changes per version</a></li><li><a href="../usermanual/get-started.html">Get >Started</a></li><li><a href="../usermanual/index.html">User >Manual</a></li><li><a href="../usermanual/best-practices.html">Best >Practices</a></li><li><a >href="../usermanual/component_reference.html">Component >Reference</a></li><li><a href="../usermanual/functions.html">Functions >Reference</a></li><li><a href="../api/index.html">Javadocs</a></li><li><a >href="../building.html">Building JMeter and Add-Ons</a></li><li><a >href="http://wiki.apache.org/jmeter">JMeter Wiki</a></li><li><a >href="http://wiki.apache.org/jmeter/JMeterFAQ">FAQ >(Wiki)</a></li></ul></li></ul><ul class="menu"><li><div >class="menu-title">Tutorials (PDF format)</div><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="../us ermanual/jmeter_accesslog_sampler_step_by_step.pdf">Access Log Sampler</a></li><li><a href="../extending/jmeter_tutorial.pdf">Extending JMeter</a></li></ul></li></ul><ul class="menu"><li><div class="menu-title">Community</div><ul><li><a href="http://wiki.apache.org/jmeter/JMeterCommitters">Contributors</a></li><li><a href="../mail.html">Mailing Lists</a></li><li><a href="../svnindex.html">SVN Repositories</a></li></ul></li></ul><ul class="menu"><li><div class="menu-title">Foundation</div><ul><li><a href="http://www.apache.org/">ASF</a></li><li><a href="http://www.apache.org/foundation/getinvolved.html">Get Involved in the ASF</a></li><li><a href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li><li><a href="http://www.apache.org/foundation/thanks.html">Thanks</a></li></ul></li></ul></div><div class="main" id="content"><ul class="pagelinks"><li><a href="build-test-plan.html">< Prev</a></li><li><a href="../index.html">Index</a></li><li><a href="build-web-test- plan.html">Next ></a></li></ul><div class="section"><h1>4. Elements of a Test Plan</h1> + })(document, 'script', 'twitter-wjs'); + </script></div><div><a href="https://twitter.com/ApacheJMeter" class="twitter-follow-button" data-show-count="false" data-lang="en-gb" data-size="large">Follow</a><script>(function(d,s,id){ + var js, + fjs=d.getElementsByTagName(s)[0], + p=/^http:/.test(d.location)?'http':'https'; + if (!d.getElementById(id)) { + js=d.createElement(s); + js.id=id; + js.src=p+'://platform.twitter.com/widgets.js'; + fjs.parentNode.insertBefore(js,fjs); + } + })(document, 'script', 'twitter-wjs'); + </script></div><div><a href="https://github.com/apache/jmeter"><img alt="star this repo" src="http://githubbadges.com/star.svg?user=apache&repo=jmeter&style=default"></a></div><div><a href="https://github.com/apache/jmeter/fork"><img alt="fork this repo" src="http://githubbadges.com/fork.svg?user=apache&repo=jmeter&style=default"></a></div><div><a href="https://maven-badges.herokuapp.com/maven-central/org.apache.jmeter/ApacheJMeter"><img alt="Maven Central" src="https://maven-badges.herokuapp.com/maven-central/org.apache.jmeter/ApacheJMeter/badge.png"></a></div></div><ul class="menu"><li onClick="return true"><div class="menu-title">About</div><ul><li><a href="../index.html">Overview</a></li><li><a href="http://www.apache.org/licenses/">License</a></li></ul></li></ul><ul class="menu"><li onClick="return true"><div class="menu-title">Download</div><ul><li><a href="../download_jmeter.cgi">Download Releases</a></li><li><a href="../nightly.html">Developer (Nightly) Builds</a></li></ul></li></ul><ul class="menu"><li onClick="return true"><div class="menu-title">Documentation</div><ul><li><a href="../changes.html">Changes per version</a></li><li><a href="../usermanual/get-started.html">Get Started</a></li><li><a href="../usermanual/index.html">User Manual</a></li><li><a href="../usermanual/best-practices.html">Best Practices</a></li><li><a href="../usermanual/component_reference.html">Component Reference</a></li><li><a href="../usermanual/functions.html">Functions Reference</a></li><li><a href="../api/index.html">Javadocs</a></li><li><a href="../building.html">Building JMeter and Add-Ons</a></li><li><a href="http://wiki.apache.org/jmeter">JMeter Wiki</a></li><li><a href="http://wiki.apache.org/jmeter/JMeterFAQ">FAQ (Wiki)</a></li></ul></li></ul><ul class="menu"><li onClick="return true"><div class="menu-title">Tutorials (PDF format)</div><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></li></ul><ul class="menu"><li onClick="return true"><div >class="menu-title">Community</div><ul><li><a href="../issues.html">Issue >Tracking</a></li><li><a href="../mail.html">Mailing Lists</a></li><li><a >href="../svnindex.html">Source Repositories</a></li><li><a >href="../building.html">Building and Contributing</a></li><li><a >href="https://projects.apache.org/project.html?jmeter">Project info at >Apache</a></li><li><a >href="http://wiki.apache.org/jmeter/JMeterCommitters">Contributors</a></li></ul></li></ul><ul > class="menu"><li onClick="return true"><div >class="menu-title">Foundation</div><ul><li><a >href="http://www.apache.org/">ASF</a></li><li><a href= "http://www.apache.org/foundation/getinvolved.html">Get Involved in the ASF</a></li><li><a href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li><li><a href="http://www.apache.org/foundation/thanks.html">Thanks</a></li></ul></li></ul></div><div class="main" id="content"><ul class="pagelinks"><li><a href="build-test-plan.html">< Prev</a></li><li><a href="../index.html">Index</a></li><li><a href="build-web-test-plan.html">Next ></a></li></ul><div class="section"><h1>4. Elements of a Test Plan</h1> -<p>The Test Plan object has a checkbox called "Functional Testing". If selected, it +<p>The Test Plan object has a checkbox called "<span class="code">Functional Testing</span>". 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 @@ -38,9 +38,9 @@ is returning the expected results. The JMeter's performance will suffer. This option should be off if you are doing stress-testing (it is off by default). </p> <p>If you are not recording the data to file, this option makes no difference.</p> -<p>You can also use the Configuration button on a listener to decide what fields to save.</p> +<p>You can also use the <span class="code">Configuration</span> button on a listener to decide what fields to save.</p> -<div class="subsection"><h2>4.1 Thread Group<a class="sectionlink" href="#thread_group" title="Link to here">¶</a></h2> +<div class="subsection"><h2 id="thread_group">4.1 Thread Group<a class="sectionlink" href="#thread_group" title="Link to here">¶</a></h2> <p>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, @@ -73,17 +73,23 @@ Start with Ramp-up = number of threads a <p>By default, the thread group is configured to loop once through its elements.</p> -<p>Version 1.9 introduces a test run <b>scheduler</b>. - 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. +<p>Thread Group also provides a <b>scheduler</b>. + Click the checkbox at the bottom of the Thread Group panel to enable/disable extra fields + in which you can enter the duration of test, the startup delay, the start and end times of the run. + You can configure <span class="code">Duration (seconds)</span> and <span class="code">Startup Delay (seconds)</span> to control + the duration of each thread group and the after how much seconds it starts. + When the test is started, JMeter will wait <span class="code">Startup Delay (seconds)</span> before starting the Threads + of the Thread Group and run for the configured <span class="code">Duration (seconds)</span> time. + Note those 2 options override the <span class="code">Start time</span> and <span class="code">End time</span>. + + <p>Alternatively (although not recommended as not very flexible) you can use the two other fields <span class="code">Start time</span> and <span class="code">End time</span>. 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.</p> - <p>Alternatively, one can use the relative delay and duration fields. - Note that delay overrides start-time, and duration over-rides end-time.</p> + </p> </div> -<div class="subsection"><h2>4.2 Controllers<a class="sectionlink" href="#controllers" title="Link to here">¶</a></h2> +<div class="subsection"><h2 id="controllers">4.2 Controllers<a class="sectionlink" href="#controllers" title="Link to here">¶</a></h2> <p> JMeter has two types of Controllers: Samplers and Logical Controllers. @@ -104,7 +110,7 @@ For more information, see <a href="#logi </div> -<div class="subsection"><h2>4.2.1 Samplers<a class="sectionlink" href="#samplers" title="Link to here">¶</a></h2> +<div class="subsection"><h2 id="samplers">4.2.1 Samplers<a class="sectionlink" href="#samplers" title="Link to here">¶</a></h2> <p> Samplers tell JMeter to send requests to a server and wait for a response. @@ -115,12 +121,15 @@ Controllers can be used to modify the nu JMeter samplers include: <ul> <li>FTP Request</li> - <li>HTTP Request</li> + <li>HTTP Request (can be used for SOAP or REST Webservice also)</li> <li>JDBC Request</li> <li>Java object request</li> + <li>JMS request</li> + <li>JUnit Test request</li> <li>LDAP Request</li> - <li>SOAP/XML-RPC Request</li> - <li>WebService (SOAP) Request</li> + <li>Mail request</li> + <li>OS Process request</li> + <li>TCP request</li> </ul> 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. @@ -144,7 +153,7 @@ expressions.</p> <p><a href="component_reference.html#samplers">JMeter's built-in samplers</a></p> </div> -<div class="subsection"><h2>4.2.2 Logic Controllers<a class="sectionlink" href="#logic_controller" title="Link to here">¶</a></h2> +<div class="subsection"><h2 id="logic_controller">4.2.2 Logic Controllers<a class="sectionlink" href="#logic_controller" title="Link to here">¶</a></h2> <p>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 @@ -191,7 +200,7 @@ is just a simple request, not filtered t 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 <a href="../usermanual/component_reference.html#Interleave_Controller">Interleave Controller</a> 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 +ordering (i.e. 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.</p> @@ -224,16 +233,16 @@ will share the same cookies.</p> Logic Controllers</a>.</p> </div> -<div class="subsection"><h2>4.2.3 Test Fragments<a class="sectionlink" href="#test_fragments" title="Link to here">¶</a></h2> +<div class="subsection"><h2 id="test_fragments">4.2.3 Test Fragments<a class="sectionlink" href="#test_fragments" title="Link to here">¶</a></h2> <p>The Test Fragment element is a special type of <a href="#controllers">controller</a> that exists on the Test Plan tree at the same level as the Thread Group element. It is distinguished from a Thread Group in that it is not executed unless it is referenced by either a <a href="../usermanual/component_reference.html#Module_Controller">Module Controller</a> or an <a href="../usermanual/component_reference.html#Include_Controller">Include_Controller</a>. </p> -<p>This element is purely for code re-use within Test Plans and was introduced in Version 2.5</p> +<p>This element is purely for code re-use within Test Plans</p> </div> -<div class="subsection"><h2>4.3 Listeners<a class="sectionlink" href="#listeners" title="Link to here">¶</a></h2> +<div class="subsection"><h2 id="listeners">4.3 Listeners<a class="sectionlink" href="#listeners" title="Link to here">¶</a></h2> <p>Listeners provide access to the information JMeter gathers about the test cases while JMeter runs. The <a href="../usermanual/component_reference.html#Graph_Results">Graph Results</a> listener plots the response times on a graph. The "View Results Tree" Listener shows details of sampler requests and responses, and can display basic HTML and XML representations of the response. @@ -244,7 +253,7 @@ Other listeners provide summary or aggre Additionally, listeners can direct the data to a file for later use. Every listener in JMeter provides a field to indicate the file to store data to. There is also a Configuration button which can be used to choose which fields to save, and whether to use CSV or XML format. -<b>Note that all Listeners save the same data; the only difference is in the way the data is presented on the screen.</b> +<div class="clear"></div><div class="note">Note that all Listeners save the same data; the only difference is in the way the data is presented on the screen.</div><div class="clear"></div> </p> <p> @@ -256,7 +265,7 @@ They will collect data only from element that come with JMeter.</p> </div> -<div class="subsection"><h2>4.4 Timers<a class="sectionlink" href="#timers" title="Link to here">¶</a></h2> +<div class="subsection"><h2 id="timers">4.4 Timers<a class="sectionlink" href="#timers" title="Link to here">¶</a></h2> <p>By default, a JMeter thread sends requests without pausing between each request. We recommend that you specify a delay by adding one of the available timers to @@ -276,7 +285,7 @@ To provide a pause at a single place in </p> </div> -<div class="subsection"><h2>4.5 Assertions<a class="sectionlink" href="#assertions" title="Link to here">¶</a></h2> +<div class="subsection"><h2 id="assertions">4.5 Assertions<a class="sectionlink" href="#assertions" title="Link to here">¶</a></h2> <p>Assertions allow you to assert facts about responses received from the server being tested. Using an assertion, you can essentially "test" that your @@ -288,14 +297,14 @@ you can indicate that the response is to the whole response.</p> <p>You can add an assertion to any Sampler. For example, you can -add an assertion to a HTTP Request that checks for the text, "</HTML>". JMeter +add an assertion to a HTTP Request that checks for the text, "<span class="code"></HTML></span>". JMeter will then check that the text is present in the HTTP response. If JMeter cannot find the text, then it will mark this as a failed request.</p> -<p> +<div class="clear"></div><div class="note"> Note that assertions apply to all samplers which are in its <a href="#scoping_rules">scope</a>. To restrict the assertion to a single sampler, add the assertion as a child of the sampler. -</p> +</div><div class="clear"></div> <p>To view the assertion results, add an Assertion Listener to the Thread Group. Failed Assertions will also show up in the Tree View and Table Listeners, @@ -303,7 +312,7 @@ and will count towards the error %age fo </p> </div> -<div class="subsection"><h2>4.6 Configuration Elements<a class="sectionlink" href="#config_elements" title="Link to here">¶</a></h2> +<div class="subsection"><h2 id="config_elements">4.6 Configuration Elements<a class="sectionlink" href="#config_elements" title="Link to here">¶</a></h2> <p>A configuration element works closely with a Sampler. Although it does not send requests (except for <a href="../usermanual/component_reference.html#HTTP(S)_Test_Script_Recorder">HTTP(S) Test Script Recorder</a>), it can add to or modify requests.</p> @@ -327,29 +336,29 @@ For simplicity, it is suggested that the </div><div class="clear"></div> </div> -<div class="subsection"><h2>4.7 Pre-Processor Elements<a class="sectionlink" href="#preprocessors" title="Link to here">¶</a></h2> +<div class="subsection"><h2 id="preprocessors">4.7 Pre-Processor Elements<a class="sectionlink" href="#preprocessors" title="Link to here">¶</a></h2> <p>A Pre-Processor executes some action prior to a Sampler Request being made. If a Pre-Processor is attached to a Sampler element, then it will execute just prior to that sampler element running. A Pre-Processor is most often used to modify the settings of a Sample Request just before it runs, or to update variables that aren't extracted from response text. See the <a href="test_plan.html#scoping_rules"><b>scoping rules</b></a> for more details on when Pre-Processors are executed.</p> </div> -<div class="subsection"><h2>4.8 Post-Processor Elements<a class="sectionlink" href="#postprocessors" title="Link to here">¶</a></h2> +<div class="subsection"><h2 id="postprocessors">4.8 Post-Processor Elements<a class="sectionlink" href="#postprocessors" title="Link to here">¶</a></h2> <p>A Post-Processor executes some action after a Sampler Request has been made. If a Post-Processor is attached to a Sampler element, then it will execute just after that sampler element runs. A Post-Processor is most often used to process the response data, often to extract values from it. See the <a href="test_plan.html#scoping_rules"><b>scoping rules</b></a> for more details on when Post-Processors are executed.</p> </div> -<div class="subsection"><h2>4.9 Execution order<a class="sectionlink" href="#executionorder" title="Link to here">¶</a></h2> +<div class="subsection"><h2 id="executionorder">4.9 Execution order<a class="sectionlink" href="#executionorder" title="Link to here">¶</a></h2> <ol start="0"> <li>Configuration elements</li> <li>Pre-Processors</li> <li>Timers</li> <li>Sampler</li> -<li>Post-Processors (unless SampleResult is null)</li> -<li>Assertions (unless SampleResult is null)</li> -<li>Listeners (unless SampleResult is null)</li> +<li>Post-Processors (unless SampleResult is <span class="code">null</span>)</li> +<li>Assertions (unless SampleResult is <span class="code">null</span>)</li> +<li>Listeners (unless SampleResult is <span class="code">null</span>)</li> </ol> <div class="clear"></div><div class="note"> @@ -394,9 +403,9 @@ Assertion 1 </p> </div> -<div class="subsection"><h2>4.10 Scoping Rules<a class="sectionlink" href="#scoping_rules" title="Link to here">¶</a></h2> +<div class="subsection"><h2 id="scoping_rules">4.10 Scoping Rules<a class="sectionlink" href="#scoping_rules" title="Link to here">¶</a></h2> <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> +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-Processors, 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> <figure><a href="../images/screenshots/scoping1.png"><img src="../images/screenshots/scoping1.png" width="" height="" alt="Example test tree"></a><figcaption>Example test tree</figcaption></figure> <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> @@ -409,31 +418,31 @@ that Controller. In the following test <p>Another example, this time using Timers:</p> <figure><a href="../images/screenshots/scoping3.png"><img src="../images/screenshots/scoping3.png" width="" height="" alt="complex example"></a><figcaption>complex example</figcaption></figure> <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> +<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> +<div class="clear"></div><div class="note"> 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> +only one Manager is used, but there is currently no way to specify <em>which</em> is used. +</div><div class="clear"></div> </div> -<div class="subsection"><h2>4.11 Properties and Variables<a class="sectionlink" href="#properties" title="Link to here">¶</a></h2> +<div class="subsection"><h2 id="properties">4.11 Properties and Variables<a class="sectionlink" href="#properties" title="Link to here">¶</a></h2> <p> -JMeter <b>properties</b> are defined in jmeter.properties (see <a href="get-started.html#configuring_jmeter">Gettting Started - Configuring JMeter</a> for more details). +JMeter <em>properties</em> are defined in <span class="code">jmeter.properties</span> (see <a href="get-started.html#configuring_jmeter">Getting Started - Configuring JMeter</a> for more details). <br> Properties are global to jmeter, and are mostly used to define some of the defaults JMeter uses. -For example the property remote_hosts defines the servers that JMeter will try to run remotely. +For example the property <span class="code">remote_hosts</span> defines the servers that JMeter will try to run remotely. Properties can be referenced in test plans - see <a href="functions.html#__property">Functions - read a property</a> - but cannot be used for thread-specific values. </p> <p> -JMeter <b>variables</b> are local to each thread. The values may be the same for each thread, or they may be different. +JMeter <em>variables</em> are local to each thread. The values may be the same for each thread, or they may be different. <br> If a variable is updated by a thread, only the thread copy of the variable is changed. For example the <a href="../usermanual/component_reference.html#Regular_Expression_Extractor">Regular Expression Extractor</a> Post-Processor @@ -457,7 +466,7 @@ These are global to the test plan, so ca <div class="clear"></div><div class="note">Both variables and properties are case-sensitive.</div><div class="clear"></div> </div> -<div class="subsection"><h2>4.12 Using Variables to parameterise tests<a class="sectionlink" href="#using_variables" title="Link to here">¶</a></h2> +<div class="subsection"><h2 id="using_variables">4.12 Using Variables to parameterise tests<a class="sectionlink" href="#using_variables" title="Link to here">¶</a></h2> <p> Variables don't have to vary - they can be defined once, and if left alone, will not change value. So you can use them as short-hand for expressions that appear frequently in a test plan. @@ -468,7 +477,7 @@ For example, the name of a host, or the When deciding how to structure a Test Plan, make a note of which items are constant for the run, but which may change between runs. Decide on some variable names for these - -perhaps use a naming convention such as prefixing them with C_ or K_ or using uppercase only +perhaps use a naming convention such as prefixing them with <span class="code">C_</span> or <span class="code">K_</span> or using uppercase only to distinguish them from variables that need to change during the test. Also consider which items need to be local to a thread - for example counters or values extracted with the Regular Expression Post-Processor. @@ -481,8 +490,8 @@ HOST www.example.com THREADS 10 LOOPS 20 </pre> -You can refer to these in the test plan as ${HOST} ${THREADS} etc. -If you later want to change the host, just change the value of the HOST variable. +You can refer to these in the test plan as <span class="code">${HOST}</span> <span class="code">${THREADS}</span> etc. +If you later want to change the host, just change the value of the <span class="code">HOST</span> variable. This works fine for small numbers of tests, but becomes tedious when testing lots of different combinations. One solution is to use a property to define the value of the variables, for example: <pre> @@ -492,7 +501,7 @@ LOOPS ${__P(loops,20)} </pre> You can then change some or all of the values on the command-line as follows: <pre> -jmeter ... -Jhost=www3.example.org -Jloops=13 +jmeter … -Jhost=www3.example.org -Jloops=13 </pre> </p> </div> @@ -500,7 +509,7 @@ jmeter ... -Jhost=www3.example.org -Jloo </div><ul class="pagelinks"><li><a href="build-test-plan.html">< Prev</a></li><li><a href="../index.html">Index</a></li><li><a href="build-web-test-plan.html">Next ></a></li></ul></div><div class="footer"><div class="copyright"> Copyright © 1999 – - 2015 + 2016 , Apache Software Foundation </div><div class="trademarks">Apache, Apache JMeter, JMeter, the Apache feather, and the Apache JMeter logo are Modified: jmeter/trunk/src/core/org/apache/jmeter/util/JMeterVersion.java URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/util/JMeterVersion.java?rev=1739469&r1=1739468&r2=1739469&view=diff ============================================================================== --- jmeter/trunk/src/core/org/apache/jmeter/util/JMeterVersion.java (original) +++ jmeter/trunk/src/core/org/apache/jmeter/util/JMeterVersion.java Sat Apr 16 14:36:00 2016 @@ -49,7 +49,7 @@ public final class JMeterVersion { * This ensures that JMeterUtils always gets the correct * version, even if JMeterUtils is not re-compiled during the build. */ - private static final String VERSION = "3.0-SNAPSHOT"; + private static final String VERSION = "3.0"; private static final String IMPLEMENTATION; Modified: jmeter/trunk/xdocs/download_jmeter.xml URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/download_jmeter.xml?rev=1739469&r1=1739468&r2=1739469&view=diff ============================================================================== --- jmeter/trunk/xdocs/download_jmeter.xml (original) +++ jmeter/trunk/xdocs/download_jmeter.xml Sat Apr 16 14:36:00 2016 @@ -18,7 +18,7 @@ <!DOCTYPE document [ -<!ENTITY release '2.13'> +<!ENTITY release '3.0'> <!ENTITY hellip "…" > ]> Modified: jmeter/trunk/xdocs/overview.html URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/overview.html?rev=1739469&r1=1739468&r2=1739469&view=diff ============================================================================== --- jmeter/trunk/xdocs/overview.html (original) +++ jmeter/trunk/xdocs/overview.html Sat Apr 16 14:36:00 2016 @@ -18,7 +18,7 @@ <!-- This file is copied into the Javadoc overview --> <html> <body> -This is the documentation for Apache JMeter version 2.13 API. -@version 2.13 +This is the documentation for Apache JMeter version 3.0 API. +@version 3.0 </body> </html> \ No newline at end of file
