
Untitled
By: a guest on
Jul 4th, 2012 | syntax:
None | size: 0.77 KB | hits: 32 | expires: Never
In JMeter and BeanShell, how can I make a variable lowercase?
my_lowercase_variable
${__BeanShell('${my_variable}'.toLowerCase())} //fails
${__javaScript('${my_variable}'.toLowerCase())} //fails
Response code: 500
Response message: org.apache.jorphan.util.JMeterException: Error invoking bsh method: eval Sourced file: inline evaluation of: ``String blah = AAP; vars.put("blah", blah.toLowerCase()); //${blah} now availab . . . '' : Typed variable declaration : Void initializer
String blah = "${my_initial_reference}";
vars.put("blah", blah.toLowerCase()); //${blah} now available
Name: my_initial_reference
Value: ITS IN CAPS
String blah = "${my_initial_reference}"; //
vars.put("blah", blah.toLowerCase()); //${blah} = "its in caps" now available