jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1412219 - /jmeter/trunk/xdocs/usermanual/component_reference.xml
Date Wed, 21 Nov 2012 18:14:08 GMT
Author: sebb
Date: Wed Nov 21 18:14:07 2012
New Revision: 1412219

URL: http://svn.apache.org/viewvc?rev=1412219&view=rev
Log:
Note how function/variable refs behave in scripting samplers

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=1412219&r1=1412218&r2=1412219&view=diff
==============================================================================
--- jmeter/trunk/xdocs/usermanual/component_reference.xml (original)
+++ jmeter/trunk/xdocs/usermanual/component_reference.xml Wed Nov 21 18:14:07 2012
@@ -1066,6 +1066,14 @@ This can be used to define common method
 There is a sample init file in the bin directory: BeanShellSampler.bshrc.
 </p><p>
 If a script file is supplied, that will be used, otherwise the script will be used.</p>
+<note>
+JMeter processes function and variable references before passing the script field to the
interpreter,
+so the references will only be resolved once.
+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");
+</note>
 		<p>Before invoking the script, some variables are set up in the BeanShell interpreter:
 			</p>
 				<p>The contents of the Parameters field is put into the variable "Parameters".
@@ -1155,6 +1163,14 @@ Beware however that misuse of any method
 </properties>
 <p>
 If a script file is supplied, that will be used, otherwise the script will be used.</p>
+<note>
+JMeter processes function and variable references before passing the script field to the
interpreter,
+so the references will only be resolved once.
+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");
+</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.
@@ -1218,6 +1234,14 @@ For details, see <complink name="BSF Sam
 Since JMeter 2.8, JSR223 Test Elements using Script file or Script text + cache key are now
Compiled if ScriptEngine supports this feature, this enables great performance enhancements.
 </note>
 </description>
+<note>
+JMeter processes function and variable references before passing the script field to the
interpreter,
+so the references will only be resolved once.
+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");
+</note>
 </component>
 
 <component name="TCP Sampler" index="&sect-num;.1.12"  width="743" height="357" screenshot="tcpsampler.png">



Mime
View raw message