Author: sebb
Date: Tue Oct  7 12:28:39 2008
New Revision: 702596

URL: http://svn.apache.org/viewvc?rev=702596&view=rev
Log:
Doc updates

Modified:
    jakarta/jmeter/trunk/xdocs/usermanual/best-practices.xml
    jakarta/jmeter/trunk/xdocs/usermanual/get-started.xml
    jakarta/jmeter/trunk/xdocs/usermanual/index.xml

Modified: jakarta/jmeter/trunk/xdocs/usermanual/best-practices.xml
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/xdocs/usermanual/best-practices.xml?rev=702596&r1=702595&r2=702596&view=diff
==============================================================================
--- jakarta/jmeter/trunk/xdocs/usermanual/best-practices.xml (original)
+++ jakarta/jmeter/trunk/xdocs/usermanual/best-practices.xml Tue Oct  7 
12:28:39 2008
@@ -255,5 +255,50 @@
 </p>
 </subsection>
 </section>
+
+<section name="&sect-num;.9 Developing script functions in BeanShell, 
Javascript or Jexl etc." anchor="developing_scripts">
+<p>
+It's quite hard to write and test scripts as functions.
+However, JMeter has the BSF (and BeanShell) samplers which can be used 
instead.  
+</p>
+<p>
+Create a simple Test Plan containing the BSF Sampler and Tree View Listener.
+Code the script in the sampler script pane, and test it by running the test.
+If there are any errors, these will show up in the Tree View.
+Also the result of running the script will show up as the response.
+</p>
+<p>
+Once the script is working properly, it can be stored as a variable on the 
Test Plan.
+The script variable can then be used to create the function call.
+For example, suppose a BeanShell script is stored in the variable RANDOM_NAME.
+The function call can then be coded as 
<code>${__BeanShell(${RANDOM_NAME})}</code>.
+There is no need to escape any commas in the script, 
+because the function call is parsed before the variable's value is 
interpolated.
+</p>
+</section>
+
+<section name="&sect-num;.10 Parameterising tests" 
anchor="parameterising_tests">
+<p>
+Often it is useful to be able to re-run the same test with different settings.
+For example, changing the number of threads or loops, or changing a hostname.
+</p>
+<p>
+One way to do this is to define a set of variables on the Test Plan, and then 
use those variables in the test elements.
+For example, one could define the variable LOOPS=10, and refer to that in the 
Thread Group as ${LOOPS}. 
+To run the test with 20 loops, just change the value of the LOOPS variable on 
the Test Plan.
+</p>
+<p>
+This quickly becomes tedious if you want to run lots of tests in non-GUI mode.
+One solution to this is to define the Test Plan variable in terms of a 
property,
+for example <code>LOOPS=${__P(loops,10))}</code>.
+This uses the value of the property "loops", defaulting to 10 if the property 
is not found.
+The "loops" property can then be defined on the JMeter command-line:
+<code>jmeter ... -Jloops=12 ...</code>.
+If there are a lot of properties that need to be changed together, 
+then one way to achieve this is to use a set of property files.
+The appropriate property file can be passed in to JMeter using the -q 
command-line option.
+</p>
+</section>
+
 </body>
 </document>

Modified: jakarta/jmeter/trunk/xdocs/usermanual/get-started.xml
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/xdocs/usermanual/get-started.xml?rev=702596&r1=702595&r2=702596&view=diff
==============================================================================
--- jakarta/jmeter/trunk/xdocs/usermanual/get-started.xml (original)
+++ jakarta/jmeter/trunk/xdocs/usermanual/get-started.xml Tue Oct  7 12:28:39 
2008
@@ -151,7 +151,7 @@
  you need to download the beanshell jar from <a 
href="http://www.beanshell.org/";>http://www.beanshell.org/</a> and copy the jar 
file to the <b>jmeter/lib directory</b>, where JMeter will automatically pick 
it up.</p>
 </subsection>
 
-<subsection name="&sect-num;.2.7 Libraries for ActiveMQ 3.0" 
anchor="libraries_activemq">
+<subsection name="&sect-num;.2.8 Libraries for ActiveMQ 3.0" 
anchor="libraries_activemq">
 <p>See <a 
href="http://activemq.apache.org/initial-configuration.html";>http://activemq.apache.org/initial-configuration.html</a>
 for details.
 </p>

Modified: jakarta/jmeter/trunk/xdocs/usermanual/index.xml
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/xdocs/usermanual/index.xml?rev=702596&r1=702595&r2=702596&view=diff
==============================================================================
--- jakarta/jmeter/trunk/xdocs/usermanual/index.xml (original)
+++ jakarta/jmeter/trunk/xdocs/usermanual/index.xml Tue Oct  7 12:28:39 2008
@@ -75,6 +75,8 @@
                <li><a href="get-started.html#opt_ssl">2.2.4 SSL 
Encryption</a></li>
                <li><a href="get-started.html#opt_jdbc">2.2.5 JDBC 
Driver</a></li>
                <li><a href="get-started.html#opt_soap">2.2.6 Apache 
SOAP</a></li>
+        <li><a href="get-started.html#opt_beanshell">2.2.7 BeanShell</a></li>
+        <li><a href="get-started.html#libraries_activemq">2.2.8 Libraries for 
ActiveMQ 3.0</a></li>
         </ul>
         <li><a href="get-started.html#install">2.3 Installation</a></li>
         <ul>
@@ -89,6 +91,7 @@
                <li><a href="get-started.html#server">2.4.4 Distributed 
Mode</a></li>
                <li><a href="get-started.html#override">2.4.5 Overriding 
Properties Via The Command Line</a></li>
                <li><a href="get-started.html#logging">2.4.6 Logging and Error 
Messages</a></li>
+               <li><a href="get-started.html#options">2.4.7 Full list of 
command-line options</a></li>
         </ul>
         <li><a href="get-started.html#configuring_jmeter">2.5 Configuring 
JMeter</a></li>
   </ul>
@@ -97,8 +100,9 @@
         <li><a href="build-test-plan.html#add_remove">3.1 Adding and Removing 
Elements</a></li>
         <li><a href="build-test-plan.html#load_save">3.2 Loading and Saving 
Elements</a></li>
         <li><a href="build-test-plan.html#config_element">3.3 Configuring Tree 
Elements</a></li>
-        <li><a href="build-test-plan.html#run">3.4 Running a Test Plan</a></li>
-        <li><a href="build-test-plan.html#scoping_rules">3.5 Scoping 
Rules</a></li>
+     <li><a href="build-test-plan.html#save">3.4 Saving the Test Plan</a></li>
+        <li><a href="build-test-plan.html#run">3.5 Running a Test Plan</a></li>
+        <li><a href="build-test-plan.html#error_reporting">3.6 Error 
reporting</a></li>
   </ul>
   <li><a name="test_plan"/><a href="test_plan.html">4. Elements of a Test 
Plan</a></li>
   <ul>
@@ -114,6 +118,9 @@
         <li><a href="test_plan.html#config_elements">4.6 Configuration 
Elements</a></li>
         <li><a href="test_plan.html#preprocessors">4.7 Pre-Processor 
Elements</a></li>
         <li><a href="test_plan.html#postprocessors">4.8 Post-Processor 
Elements</a></li>
+        <li><a href="test_plan.html#executionorder">4.9 Execution 
order</a></li>
+        <li><a href="test_plan.html#scoping_rules">4.10 Scoping Rules</a></li>
+        <li><a href="test_plan.html#properties">4.11 Properties and 
Variables</a></li>
        </ul>
  <li><a name="build-web-test-plan"/><a href="build-web-test-plan.html">5. 
Building a Web Test Plan</a></li>
         <ul>
@@ -172,6 +179,9 @@
         <li><a href="best-practices.html#user_variables">16.5 User 
variables</a></li>
         <li><a href="best-practices.html#lean_mean">16.6 Reducing resource 
requirements</a></li>
         <li><a href="best-practices.html#beanshell_server">16.7 BeanShell 
server</a></li>
+        <li><a href="best-practices.html#bsh_scripting">16.8 BeanShell 
scripting</a></li>
+        <li><a href="best-practices.html#developing_scripts">16.9 Developing 
script functions in BeanShell, Javascript or Jexl etc.</a></li>
+        <li><a href="best-practices.html#parameterising_tests">16.10 
Parameterising tests</a></li>
   </ul>
  <li><a name="boss"/><a href="boss.html">17. Help! My boss wants me to load 
test our web app!</a></li>
 



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to