jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fschumac...@apache.org
Subject svn commit: r1678589 - /jmeter/trunk/xdocs/usermanual/component_reference.xml
Date Sun, 10 May 2015 17:53:05 GMT
Author: fschumacher
Date: Sun May 10 17:53:05 2015
New Revision: 1678589

URL: http://svn.apache.org/r1678589
Log:
Code markup. Mainly code-tags

Modified:
    jmeter/trunk/xdocs/usermanual/component_reference.xml

Modified: jmeter/trunk/xdocs/usermanual/component_reference.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/usermanual/component_reference.xml?rev=1678589&r1=1678588&r2=1678589&view=diff
==============================================================================
--- jmeter/trunk/xdocs/usermanual/component_reference.xml (original)
+++ jmeter/trunk/xdocs/usermanual/component_reference.xml Sun May 10 17:53:05 2015
@@ -1227,7 +1227,7 @@ Beware however that misuse of any method
     <description><p>This sampler allows you to write a sampler using a BSF scripting
language.<br></br>
         See the <a href="http://commons.apache.org/bsf/index.html">Apache Bean Scripting
Framework</a>
         website for details of the languages supported.
-        You may need to download the appropriate jars for the language; they should be put
in the JMeter <b>lib</b> directory.
+        You may need to download the appropriate jars for the language; they should be put
in the JMeter <code>lib</code> directory.
         </p>
         <note>
         The BSF API has been largely superseded by JSR-223, which is included in Java 6 onwards.
@@ -1245,11 +1245,12 @@ Beware however that misuse of any method
 <properties>
     <property name="Name" required="No">Descriptive name for this sampler that is shown
in the tree.</property>
     <property name="Scripting Language" required="Yes">Name of the BSF scripting language
to be used.
-    N.B. Not all the languages in the drop-down list are supported by default.
-    The following are supported: jexl, javascript, xslt.
-    Others may be available if the appropriate jar is installed in the JMeter lib directory.
+      <note>N.B. Not all the languages in the drop-down list are supported by default.
+        The following are supported: jexl, javascript, xslt.
+        Others may be available if the appropriate jar is installed in the JMeter lib directory.
+      </note>
     </property>
-    <property name="Script File" required="No">Name of a file to be used as a BSF script,
if a relative file path is used, then it will be relative to directory referenced by "user.dir"
System property</property>
+    <property name="Script File" required="No">Name of a file to be used as a BSF script,
if a relative file path is used, then it will be relative to directory referenced by "<code>user.dir</code>"
System property</property>
     <property name="Parameters" required="No">List of parameters to be passed to the
script file or the script.</property>
     <property name="Script" required="Yes (unless script file is provided)">Script
to be passed to BSF language</property>
 </properties>
@@ -1261,45 +1262,51 @@ so the references will only be resolved
 Variable and function references in script files will be passed
 verbatim to the interpreter, which is likely to cause a syntax error.
 In order to use runtime variables, please use the appropriate props methods,
-e.g. props.get("START.HMS"); props.put("PROP1","1234");
+e.g.<code>props.get("START.HMS"); props.put("PROP1","1234");</code> 
 </note>
 <p>
 Before invoking the script, some variables are set up.
 Note that these are BSF variables - i.e. they can be used directly in the script.
 </p>
 <ul>
-<li>log - the Logger</li>
-<li>Label - the Sampler label</li>
-<li>FileName - the file name, if any</li>
-<li>Parameters - text from the Parameters field</li>
-<li>args - the parameters, split as described above</li>
-<li>SampleResult - pointer to the current <a href="../api/org/apache/jmeter/samplers/SampleResult.html">SampleResult</a></li>
-<li>sampler - pointer to current Sampler</li>
-<li>ctx - <a href="../api/org/apache/jmeter/threads/JMeterContext.html">JMeterContext</a></li>
-<li>vars - <a href="../api/org/apache/jmeter/threads/JMeterVariables.html">JMeterVariables</a>
 - e.g. vars.get("VAR1"); vars.put("VAR2","value"); vars.remove("VAR3"); vars.putObject("OBJ1",new
Object());</li>
-<li>props - JMeterProperties  (class java.util.Properties) - e.g. props.get("START.HMS");
props.put("PROP1","1234");</li>
-<li>OUT - System.out - e.g. OUT.println("message")</li>
+<li><code>log</code> - the Logger</li>
+<li><code>Label</code> - the Sampler label</li>
+<li><code>FileName</code> - the file name, if any</li>
+<li><code>Parameters</code> - text from the Parameters field</li>
+<li><code>args</code> - the parameters, split as described above</li>
+<li><code>SampleResult</code> - pointer to the current <a href="../api/org/apache/jmeter/samplers/SampleResult.html">SampleResult</a></li>
+<li><code>sampler</code> - pointer to current Sampler</li>
+<li><code>ctx</code> - <a href="../api/org/apache/jmeter/threads/JMeterContext.html">JMeterContext</a></li>
+<li><code>vars</code> - <a href="../api/org/apache/jmeter/threads/JMeterVariables.html">JMeterVariables</a>
 - e.g. 
+  <source>vars.get("VAR1");
+vars.put("VAR2","value");
+vars.remove("VAR3");
+vars.putObject("OBJ1",new Object());</source></li>
+<li><code>props</code> - JMeterProperties  (class <code>java.util.Properties</code>)
- e.g. 
+  <source>props.get("START.HMS");
+props.put("PROP1","1234");</source></li>
+<li><code>OUT</code> - System.out - e.g. <code>OUT.println("message")</code></li>
 </ul>
 <p>
 The <a href="../api/org/apache/jmeter/samplers/SampleResult.html">SampleResult</a>
ResponseData is set from the return value of the script.
-If the script returns null, it can set the response directly, by using the method 
-SampleResult.setResponseData(data), where data is either a String or a byte array.
-The data type defaults to "text", but can be set to binary by using the method
-SampleResult.setDataType(SampleResult.BINARY).
+If the script returns <code>null</code>, it can set the response directly, by
using the method 
+<code>SampleResult.setResponseData(data)</code>, where data is either a String
or a byte array.
+The data type defaults to "<code>text</code>", but can be set to binary by using
the method
+<code>SampleResult.setDataType(SampleResult.BINARY)</code>.
 </p>
 <p>
 The SampleResult variable gives the script full access to all the fields and
 methods in the SampleResult. For example, the script has access to the methods
-setStopThread(boolean) and setStopTest(boolean).
+<code>setStopThread(boolean)</code> and <code>setStopTest(boolean)</code>.
 </p>
 <p>
-Unlike the BeanShell Sampler, the BSF Sampler does not set the ResponseCode, ResponseMessage
and sample status via script variables.
+Unlike the BeanShell Sampler, the BSF Sampler does not set the <code>ResponseCode</code>,
<code>ResponseMessage</code> and sample status via script variables.
 Currently the only way to changes these is via the <a href="../api/org/apache/jmeter/samplers/SampleResult.html">SampleResult</a>
methods:
 </p>
 <ul>
-<li>SampleResult.setSuccessful(true/false)</li>
-<li>SampleResult.setResponseCode("code")</li>
-<li>SampleResult.setResponseMessage("message")</li>
+<li><code>SampleResult.setSuccessful(true/false)</code></li>
+<li><code>SampleResult.setResponseCode("code")</code></li>
+<li><code>SampleResult.setResponseMessage("message")</code></li>
 </ul>
 </component>
 



Mime
View raw message