You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by ag...@apache.org on 2017/03/08 21:30:23 UTC
svn commit: r1786081 - in /jmeter/trunk/xdocs: images/screenshots/
images/screenshots/http-config/ usermanual/
Author: agomes
Date: Wed Mar 8 21:30:23 2017
New Revision: 1786081
URL: http://svn.apache.org/viewvc?rev=1786081&view=rev
Log:
Modify jmeter proxy step by step documentation to be aware of all the news fetaures. This closes #279
Added:
jmeter/trunk/xdocs/images/screenshots/Proxy_Run.png (with props)
jmeter/trunk/xdocs/images/screenshots/Search-Correlation.png (with props)
jmeter/trunk/xdocs/images/screenshots/Select-Recording-Template.png (with props)
jmeter/trunk/xdocs/images/screenshots/Select-Templates-Icon.png (with props)
jmeter/trunk/xdocs/images/screenshots/Test_Generated.png (with props)
jmeter/trunk/xdocs/images/screenshots/Validate-Test-Plan.png (with props)
jmeter/trunk/xdocs/images/screenshots/http-config/http-request-defaults.png (with props)
Modified:
jmeter/trunk/xdocs/usermanual/jmeter_proxy_step_by_step.xml
Added: jmeter/trunk/xdocs/images/screenshots/Proxy_Run.png
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/images/screenshots/Proxy_Run.png?rev=1786081&view=auto
==============================================================================
Binary file - no diff available.
Propchange: jmeter/trunk/xdocs/images/screenshots/Proxy_Run.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: jmeter/trunk/xdocs/images/screenshots/Search-Correlation.png
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/images/screenshots/Search-Correlation.png?rev=1786081&view=auto
==============================================================================
Binary file - no diff available.
Propchange: jmeter/trunk/xdocs/images/screenshots/Search-Correlation.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: jmeter/trunk/xdocs/images/screenshots/Select-Recording-Template.png
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/images/screenshots/Select-Recording-Template.png?rev=1786081&view=auto
==============================================================================
Binary file - no diff available.
Propchange: jmeter/trunk/xdocs/images/screenshots/Select-Recording-Template.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: jmeter/trunk/xdocs/images/screenshots/Select-Templates-Icon.png
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/images/screenshots/Select-Templates-Icon.png?rev=1786081&view=auto
==============================================================================
Binary file - no diff available.
Propchange: jmeter/trunk/xdocs/images/screenshots/Select-Templates-Icon.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: jmeter/trunk/xdocs/images/screenshots/Test_Generated.png
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/images/screenshots/Test_Generated.png?rev=1786081&view=auto
==============================================================================
Binary file - no diff available.
Propchange: jmeter/trunk/xdocs/images/screenshots/Test_Generated.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: jmeter/trunk/xdocs/images/screenshots/Validate-Test-Plan.png
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/images/screenshots/Validate-Test-Plan.png?rev=1786081&view=auto
==============================================================================
Binary file - no diff available.
Propchange: jmeter/trunk/xdocs/images/screenshots/Validate-Test-Plan.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: jmeter/trunk/xdocs/images/screenshots/http-config/http-request-defaults.png
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/images/screenshots/http-config/http-request-defaults.png?rev=1786081&view=auto
==============================================================================
Binary file - no diff available.
Propchange: jmeter/trunk/xdocs/images/screenshots/http-config/http-request-defaults.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Modified: jmeter/trunk/xdocs/usermanual/jmeter_proxy_step_by_step.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/usermanual/jmeter_proxy_step_by_step.xml?rev=1786081&r1=1786080&r2=1786081&view=diff
==============================================================================
--- jmeter/trunk/xdocs/usermanual/jmeter_proxy_step_by_step.xml (original)
+++ jmeter/trunk/xdocs/usermanual/jmeter_proxy_step_by_step.xml Wed Mar 8 21:30:23 2017
@@ -51,61 +51,21 @@ configuration is correct, read <a href="
<ol>
<li>Go to <code>JMETER_HOME/bin</code> and start JMeter with <code>jmeterw.cmd</code> on Windows
and <code>jmeter</code> on Linux/Unix</li>
- <li>Select <code>Test Plan</code> on the tree</li>
- <li>Right click on the <code>Test Plan</code> and add a new thread group:
- <menuchoice>
- <guimenuitem>Add</guimenuitem>
- <guimenuitem>Threads (Users)</guimenuitem>
- <guimenuitem>Thread Group</guimenuitem>
- </menuchoice>
- <figure width="676" height="233" image="add-threadgroup.png">Add Thread Group</figure>
- </li>
- <li>Select the Thread Group</li>
- <li>Right click
- <menuchoice>
- <guimenuitem>Add</guimenuitem>
- <guimenuitem>Config Element</guimenuitem>
- <guimenuitem>HTTP Request Defaults</guimenuitem>
- </menuchoice>
- <figure width="810" height="340" image="add-request-defaults.png">Add HTTP Request Defaults</figure>
- </li>
- <li>In new HTTP Request Defaults element:
+ <li>Select <code>Templates...</code> on the menu bar</li>
+ <figure image="Select-Templates-Icon.png"></figure>
+ <li>Select <code>Recording template</code> on the list</li>
+ <figure image="Select-Recording-Template.png"></figure>
+ <li>A complete <code>Test Plan</code> is generated</li>
+ <figure image="Test_Generated.png"></figure>
+ <li>In the <code>HTTP Request Defaults</code> element:
<dl>
<dt><code>Server name</code></dt><dd>enter <code>example.com</code></dd>
<dt><code>Path</code></dt><dd>leave blank</dd>
</dl>
- <figure width="879" height="469" image="http-config/http-request-defaults.png">HTTP Request Defaults dialog</figure>
- </li>
- <li>Right click on the <code>Thread Group</code> and add a recording controller:
- <menuchoice>
- <guimenuitem>Add</guimenuitem>
- <guimenuitem>Logic Controller</guimenuitem>
- <guimenuitem>Recording Controller</guimenuitem>
- </menuchoice>
- <figure width="766" height="332" image="add-recording-controller.png">Add Recording Controller</figure>
- </li>
- <li>Next, select <code>WorkBench</code></li>
- <li>Right click on <code>WorkBench</code> and add the recorder:
- <menuchoice>
- <guimenuitem>Add</guimenuitem>
- <guimenuitem>Non-Test Elements</guimenuitem>
- <guimenuitem>HTTP(S) Test Script Recorder</guimenuitem>
- </menuchoice>
- <figure width="738" height="222" image="add-script-recorder.png">Add HTTP(S) Test Script Recorder</figure>
- </li>
- <li>On <code>HTTP(S) Test Script Recorder</code>, click the <code>Add</code> button in <code>URL Patterns to Include</code>.
- This will create a blank entry; enter <code>.*\.html</code>.
- <figure width="703" height="271" image="specify-url-pattern.png">Add URL pattern</figure>
- </li>
- <li>Right click on <code>HTTP(S) Test Script Recorder</code> and add a listener:
- <menuchoice>
- <guimenuitem>Add</guimenuitem>
- <guimenuitem>Listener</guimenuitem>
- <guimenuitem>View Results Tree</guimenuitem>
- </menuchoice>
- <figure width="782" height="605" image="add-results-tree.png">Add a View Results Tree</figure>
+ <figure image="http-config/http-request-defaults.png"></figure>
</li>
- <li>Return to <code>HTTP(S) Test Script Recorder</code>, and click the <code>Start</code> button at the bottom.</li>
+ <li>Return to <code>HTTP(S) Test Script Recorder</code>, and click the <code>Start</code> button at the top.</li>
+ <figure image="Proxy_Run.png"></figure>
</ol>
<p>
@@ -136,7 +96,7 @@ to view some pages on the JMeter website
<guimenuitem>Preferences</guimenuitem>
</menuchoice> or type <code>about:preferences#advanced</code>
as URL). This should bring up the options.
- <figure width="914" height="566" image="firefox-network-settings.png">Firefox Advanced Settings</figure>
+ <figure width="914" height="566" image="firefox-network-settings.png"></figure>
</li>
<li>Select the <code>Advanced</code> tab, and <code>Network</code> tab</li>
<li>Click <code>Settings</code> button near the top.</li>
@@ -146,7 +106,7 @@ to view some pages on the JMeter website
<dt><code>Address</code></dt><dd>enter <code>localhost</code> or the IP address of your system</dd>
<dt><code>Port</code></dt><dd>enter <code>8888</code>.</dd>
</dl>
- <figure width="532" height="240" image="firefox-configure-proxy.png">Firefox Proxy Settings</figure>
+ <figure width="532" height="240" image="firefox-configure-proxy.png"></figure>
</li>
<li>Check <code>Use this proxy server for all protocols</code></li>
<li>Click <code>OK</code> button. This should return you to the browser</li>
@@ -164,50 +124,89 @@ to view some pages on the JMeter website
</ol>
<p>
-Expand the Thread Group and there should be several samplers. At this point, the test plan can
+Expand the <code>Thread Group</code> and there should be several samplers. At this point, the test plan can
be saved as is.
<note>If you forget to add default HTTP Request settings, you will have to manually
delete the server name, and port.</note>
</p>
-<figure width="258" height="194" image="example-recording.png">Recording Example</figure>
+<figure width="258" height="194" image="example-recording.png"></figure>
<p>
In this sample, there aren't any default request parameters. If a particular request parameter
is required by all pages, the request defaults is where one would add the entries.
</p>
<ol>
- <li>Select <code>Thread Group</code></li>
- <li>Right click
- <menuchoice>
- <guimenuitem>Add</guimenuitem>
- <guimenuitem>Listener</guimenuitem>
- <guimenuitem>Summary Report</guimenuitem>
- </menuchoice> to add an summary listener.
- <figure width="775" height="446" image="add-summary-report.png">Add Summary Report</figure>
- </li>
- <li>The Summary Listener will show some basic statistics.</li>
<li>Select <code>Thread Group</code> and change a few defaults:
<dl>
<dt><code>Number of Threads</code></dt><dd>enter <code>5</code></dd>
<dt><code>Ramp-Up Period</code></dt><dd>do not change</dd>
<dt><code>Loop Count</code></dt><dd>enter <code>100</code></dd>
</dl>
- <figure width="357" height="288" image="example-thread-group.png">Configure Thread Group</figure>
+ <figure width="357" height="288" image="example-thread-group.png"></figure>
</li>
</ol>
</subsection>
-<subsection name="§-num;.5 Start the test" anchor="test-start">
+<subsection name="§-num;.5 Validate the script" anchor="validate-script">
+
+<p>
+Now we need to validate the script before to run our test plan. Save the test plan.
+</p>
+<p>
+Right click on the <code>Thread Group</code>
+ <menuchoice>
+ <guimenuitem>Validate</guimenuitem>
+ </menuchoice>
+ <figure image="Validate-Test-Plan.png"></figure>
+</p>
+<p>
+Check with <code>View Results Tree</code> element if all is ok.
+</p>
+</subsection>
+
+<subsection name="§-num;.6 Variabilize and Correlate the script" anchor="correlate-start">
+<p>
+In some scripts, we will need to:
+<ul>
+ <li>Variabilize some input (login, password, search words...)</li>
+ <li>Correlate some data (session variable...) between two requests</li>
+</ul>
+</p>
+<p>
+To variabilize, we can use:
+<ul>
+ <li><code>CSV Data Set Config</code> to get input data from csv file</li>
+ <li>JMeter functions like <code>__counter</code>, <code>__time</code>...</li>
+ <li>etc.</li>
+</ul>
+</p>
+<p>
+To correlate, we can get data from a request with <code>Post Processors</code> like <code>JSON Extractor</code>, <code>Regular Expression Extractor</code>... and inject it in another request.
+</p>
+<p>
+To find data to correlate, the easiest way to do it is to use the Search function in <code>View Results Tree</code>.
+<figure image="Search-Correlation.png"></figure>
+</p>
+</subsection>
+
+<subsection name="§-num;.7 Start the test" anchor="test-start">
<p>
-At this point, we are ready to run our test plan and see what happens. Save the test plan. When you're
+At this point, we are ready to run our test plan and see what happens. When you're
ready to run the test, there are two ways:
+<ol>
+ <li>With the gui, but it's not recommended to big load test.</li>
+ <li>With the command line.</li>
+</ol>
</p>
+
+<p>
+Solution 1, with the gui, but just during debug phase, use Non GUI for your load test.
+</p>
<p>
-Either use the menu and select
<menuchoice>
<guimenuitem>Run</guimenuitem>
<guimenuitem>Start</guimenuitem>
@@ -216,15 +215,22 @@ or use the keyboard and press <keycombo>
</p>
<p>
- Before you start the test, select <code>Summary Report</code>. As the test runs, the statistics will change
+ Before you start the test, add a <code>Summary Report</code> element and select it. As the test runs, the statistics will change
until the test is done. At the end of the test, the summary report should look like this.
- <figure width="984" height="220" image="example-summary-report.png">Example Summary Report</figure>
+ <figure width="984" height="220" image="example-summary-report.png"></figure>
</p>
<p>
While the test is running, in the upper right-hand corner, there should be a green circle. When the test is done, the circle should be grey.
- <figure width="132" height="39" image="example-running.png">Example Running</figure>
+ <figure width="132" height="39" image="example-running.png"></figure>
+</p>
+
+<p>
+Solution 2, in command line, use <code>jmeter -n -t [jmx file] -l [results file] -e -o [Path to output folder]</code>
+</p>
+<p>
+At the end of the test, an HTML report will be generated and available in [Path to output folder] used in command line.
</p>
</subsection>