Author: sebb
Date: Fri Apr 17 20:45:46 2009
New Revision: 766150
URL: http://svn.apache.org/viewvc?rev=766150&view=rev
Log:
More docs and examples
Modified:
jakarta/jmeter/trunk/bin/BeanShellFunction.bshrc
Modified: jakarta/jmeter/trunk/bin/BeanShellFunction.bshrc
URL:
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/bin/BeanShellFunction.bshrc?rev=766150&r1=766149&r2=766150&view=diff
==============================================================================
--- jakarta/jmeter/trunk/bin/BeanShellFunction.bshrc (original)
+++ jakarta/jmeter/trunk/bin/BeanShellFunction.bshrc Fri Apr 17 20:45:46 2009
@@ -18,6 +18,9 @@
*
*/
+// N.B. to enable this file to be used, define the JMeter property:
+// beanshell.function.init=BeanShellFunction.bshrc
+
//print("Initialisation started");
import org.apache.jmeter.util.JMeterUtils;
@@ -46,8 +49,16 @@
}
// Fix ampersands in a string
+// e.g. fixAmps("Something containing & ...")
+// or fixAmps(vars.get("VARNAME")) - useful if VARNAME may contain "
String fixAmps(s) {
return s.replaceAll("&","&");
}
+// Fix ampersands in a variable
+// e.g. fixAmps("VARNAME")
+String fixAmpsInVar(String varname) {
+ return fixAmps(vars.get(varname));
+}
+
//print("Initialisation complete");
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]