Author: sebb
Date: Wed Jan 7 16:34:52 2009
New Revision: 732569
URL: http://svn.apache.org/viewvc?rev=732569&view=rev
Log:
Fix variable name "theadName" => "threadName" in __jexl() and __javaScript()
functions
Add variable "log" to __jexl() and __javaScript()
Modified:
jakarta/jmeter/trunk/src/functions/org/apache/jmeter/functions/JavaScript.java
jakarta/jmeter/trunk/src/functions/org/apache/jmeter/functions/JexlFunction.java
jakarta/jmeter/trunk/xdocs/changes.xml
jakarta/jmeter/trunk/xdocs/usermanual/functions.xml
Modified:
jakarta/jmeter/trunk/src/functions/org/apache/jmeter/functions/JavaScript.java
URL:
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/functions/org/apache/jmeter/functions/JavaScript.java?rev=732569&r1=732568&r2=732569&view=diff
==============================================================================
---
jakarta/jmeter/trunk/src/functions/org/apache/jmeter/functions/JavaScript.java
(original)
+++
jakarta/jmeter/trunk/src/functions/org/apache/jmeter/functions/JavaScript.java
Wed Jan 7 16:34:52 2009
@@ -77,10 +77,12 @@
Scriptable scope = cx.initStandardObjects(null);
// Set up some objects for the script to play with
+ scope.put("log", scope, log); //$NON-NLS-1$
scope.put("ctx", scope, jmctx); //$NON-NLS-1$
scope.put("vars", scope, vars); //$NON-NLS-1$
scope.put("props", scope, JMeterUtils.getJMeterProperties());
//$NON-NLS-1$
- scope.put("theadName", scope, Thread.currentThread().getName());
//$NON-NLS-1$
+ // Previously mis-spelt as theadName
+ scope.put("threadName", scope, Thread.currentThread().getName());
//$NON-NLS-1$
scope.put("sampler", scope, currentSampler); //$NON-NLS-1$
scope.put("sampleResult", scope, previousResult); //$NON-NLS-1$
Modified:
jakarta/jmeter/trunk/src/functions/org/apache/jmeter/functions/JexlFunction.java
URL:
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/functions/org/apache/jmeter/functions/JexlFunction.java?rev=732569&r1=732568&r2=732569&view=diff
==============================================================================
---
jakarta/jmeter/trunk/src/functions/org/apache/jmeter/functions/JexlFunction.java
(original)
+++
jakarta/jmeter/trunk/src/functions/org/apache/jmeter/functions/JexlFunction.java
Wed Jan 7 16:34:52 2009
@@ -76,10 +76,12 @@
Script script = ScriptFactory.createScript(exp);
JexlContext jc = JexlHelper.createContext();
final Map jexlVars = jc.getVars();
+ jexlVars.put("log", log); //$NON-NLS-1$
jexlVars.put("ctx", jmctx); //$NON-NLS-1$
jexlVars.put("vars", vars); //$NON-NLS-1$
jexlVars.put("props", JMeterUtils.getJMeterProperties());
//$NON-NLS-1$
- jexlVars.put("theadName", Thread.currentThread().getName());
//$NON-NLS-1$
+ // Previously mis-spelt as theadName
+ jexlVars.put("threadName", Thread.currentThread().getName());
//$NON-NLS-1$
jexlVars.put("sampler", currentSampler); //$NON-NLS-1$ (may be
null)
jexlVars.put("sampleResult", previousResult); //$NON-NLS-1$ (may
be null)
jexlVars.put("OUT", System.out);//$NON-NLS-1$
Modified: jakarta/jmeter/trunk/xdocs/changes.xml
URL:
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/xdocs/changes.xml?rev=732569&r1=732568&r2=732569&view=diff
==============================================================================
--- jakarta/jmeter/trunk/xdocs/changes.xml (original)
+++ jakarta/jmeter/trunk/xdocs/changes.xml Wed Jan 7 16:34:52 2009
@@ -106,6 +106,10 @@
</p>
<p>
+The "threadName" variable in the _jexl() and __javaScript() functions was
previously misspelt as "theadName".
+</p>
+
+<p>
The following deprecated methods were removed from JOrphanUtils:
booleanToString(boolean) and valueOf(boolean).
Java 1.4+ has these methods in the Boolean class.
</p>
@@ -174,12 +178,14 @@
<li>Bug 46423 - I18N of Proxy Recorder</li>
<li>Better handling of Exceptions during test shutdown</li>
<li>Protect against possible NPE in RegexFunction if called during test
shutdown.</li>
+<li>Correct the variable name "theadName" to "threadName" in the __jexl() and
__javaScript() functions</li>
</ul>
<h3>Improvements</h3>
<ul>
<li>LDAP result data now formatted with line breaks</li>
-<li>Add OUT variable to jexl function</li>
+<li>Add OUT and log variables to __jexl() function</li>
+<li>Add log variable to the __javaScript() function</li>
<li>Save Responses to a file can save the generated filename(s) to
variables.</li>
<li>Add BSF Listener element</li>
<li>Bug 45200 - MailReaderSampler: store the whole MIME message in the
SamplerResult</li>
Modified: jakarta/jmeter/trunk/xdocs/usermanual/functions.xml
URL:
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/xdocs/usermanual/functions.xml?rev=732569&r1=732568&r2=732569&view=diff
==============================================================================
--- jakarta/jmeter/trunk/xdocs/usermanual/functions.xml (original)
+++ jakarta/jmeter/trunk/xdocs/usermanual/functions.xml Wed Jan 7 16:34:52 2009
@@ -475,9 +475,10 @@
The following variables are made available to the script:
</p>
<ul>
+<li>log - the logger for the function</li>
<li>ctx - JMeterContext object</li>
<li>vars - JMeterVariables object</li>
-<li>threadName - String</li>
+<li>threadName - String containing the current thread name (in 2.3.2 it was
misspelt as "theadName")</li>
<li>sampler - current Sampler object (if any)</li>
<li>sampleResult - previous SampleResult object (if any)</li>
<li>props - JMeter Properties object</li>
@@ -724,7 +725,7 @@
<li>ctx - the current JMeter context variable</li>
<li>vars - the current JMeter variables</li>
<li>props - JMeter Properties object</li>
-<li>threadName - the threadName</li>
+<li>threadName - the threadName (String)</li>
<li>Sampler the current Sampler, if any</li>
<li>SampleResult - the current SampleResult, if any</li>
</ul>
@@ -888,10 +889,11 @@
The following variables are made available to the script:
</p>
<ul>
+<li>log - the logger for the function</li>
<li>ctx - JMeterContext object</li>
<li>vars - JMeterVariables object</li>
<li>props - JMeter Properties object</li>
-<li>threadName - String</li>
+<li>threadName - String containing the current thread name (in 2.3.2 it was
misspelt as "theadName")</li>
<li>sampler - current Sampler object (if any)</li>
<li>sampleResult - previous SampleResult object (if any)</li>
<li>OUT - System.out - e.g. OUT.println("message")</li>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]