jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fschumac...@apache.org
Subject svn commit: r1766185 - in /jmeter/trunk: bin/jmeter.properties bin/utility.groovy xdocs/usermanual/functions.xml
Date Sat, 22 Oct 2016 12:11:30 GMT
Author: fschumacher
Date: Sat Oct 22 12:11:30 2016
New Revision: 1766185

URL: http://svn.apache.org/viewvc?rev=1766185&view=rev
Log:
The groovy function is named __groovy. Add a note to add the utility-file
to the groovy property.
Add a bit of markup.

Modified:
    jmeter/trunk/bin/jmeter.properties
    jmeter/trunk/bin/utility.groovy
    jmeter/trunk/xdocs/usermanual/functions.xml

Modified: jmeter/trunk/bin/jmeter.properties
URL: http://svn.apache.org/viewvc/jmeter/trunk/bin/jmeter.properties?rev=1766185&r1=1766184&r2=1766185&view=diff
==============================================================================
--- jmeter/trunk/bin/jmeter.properties (original)
+++ jmeter/trunk/bin/jmeter.properties Sat Oct 22 12:11:30 2016
@@ -952,7 +952,7 @@ beanshell.server.file=../extras/startup.
 # Groovy function
 #---------------------------------------------------------------------------
 
-#Path to Groovy file containing utility functions to make available to __g function
+#Path to Groovy file containing utility functions to make available to __groovy function
 #groovy.utilities=
 
 # Example 
@@ -1285,4 +1285,4 @@ system.properties=system.properties
 jmeter.reportgenerator.apdex_satisfied_threshold=500
 
 # Change this parameter if you want to override the APDEX tolerance threshold.
-jmeter.reportgenerator.apdex_tolerated_threshold=1500
\ No newline at end of file
+jmeter.reportgenerator.apdex_tolerated_threshold=1500

Modified: jmeter/trunk/bin/utility.groovy
URL: http://svn.apache.org/viewvc/jmeter/trunk/bin/utility.groovy?rev=1766185&r1=1766184&r2=1766185&view=diff
==============================================================================
--- jmeter/trunk/bin/utility.groovy (original)
+++ jmeter/trunk/bin/utility.groovy Sat Oct 22 12:11:30 2016
@@ -15,6 +15,9 @@
  * limitations under the License.
  *
  */
-
-// Uncomment this function and use it with ${__g(factorial(10))}
-// def factorial(n) { n == 1 ? 1 : n * factorial(n - 1) }
\ No newline at end of file
+// Remember to add this file to the property "groovy.utilities" in
+// "bin/jmeter.properties", if you want to access it through
+// the __groovy function
+//
+// Uncomment this function and use it with ${__groovy(factorial(10))}
+// def factorial(n) { n == 1 ? 1 : n * factorial(n - 1) }

Modified: jmeter/trunk/xdocs/usermanual/functions.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/usermanual/functions.xml?rev=1766185&r1=1766184&r2=1766185&view=diff
==============================================================================
--- jmeter/trunk/xdocs/usermanual/functions.xml (original)
+++ jmeter/trunk/xdocs/usermanual/functions.xml Sat Oct 22 12:11:30 2016
@@ -913,15 +913,16 @@ Remember to include any necessary quotes
 <component index="&sect-num;.5.13" name="__groovy">
 <description>
     <p>
-    The g function evaluates <a href="http://groovy-lang.org/" >Apache Groovy</a>
scripts passed to it, and returns the result.
+    The <code>__groovy</code> function evaluates <a href="http://groovy-lang.org/"
>Apache Groovy</a> scripts passed to it, and returns the result.
 </p>
 <p>
 If the property "<code>groovy.utilities</code>" is defined, it will be loaded
by the ScriptEngine. 
 This can be used to define common methods and variables. There is a
-sample init file in the bin directory: <code>utility.groovy</code>.
+sample init file in the <code>bin</code> directory: <code>utility.groovy</code>.
 </p>
 <p>
 The following variables are set before the script is executed:
+</p>
 <ul>
 <li><code>log</code> - the <a href="http://excalibur.apache.org/apidocs/org/apache/log/Logger.html">Logger</a>
for the groovy function (*)</li>
 <li><code>ctx</code> - <a href="../api/org/apache/jmeter/threads/JMeterContext.html">JMeterContext</a>
object</li>
@@ -932,6 +933,7 @@ The following variables are set before t
 <li><code>prev</code> - the previous <a href="../api/org/apache/jmeter/samplers/SampleResult.html">SampleResult</a>,
if any</li>
 <li><code>OUT</code> - System.out</li>
 </ul>
+<p>
 (*) means that this is set before the init file, if any, is processed. 
 Other variables vary from invocation to invocation.
 </p>



Mime
View raw message