I'm attempting to build a search query in a BeanShell Preprocessor. I get a
search term from a CVS Dataset Config and store in the variable queryTerm.
Then in the preprocessor I use the following code to build the query and
store in a user defined variable:

String _query = "%5Bfullname%5D%20contains%20" + ${queryTerm} + "%5F";
vars.put("staffQuery", _query);

Here's the error from the log when I run this:

2008/07/30 08:41:00 ERROR - jmeter.util.BeanShellInterpreter: Error invoking
bsh method: eval        Sourced file: inline evaluation of: ``String _query =
"%5Bfullname%5D%20contains%20" + ${queryTerm} + "%5E"; ;'' : Typed variable
declaration : Attempt to access property on undefined variable or class name

I've also tried vars.get("${queryTerm}") and vars.get("queryTerm")  but it
just returns a null value.

How do I access the query term in the preprocessor?

Thanks,
Ron
-- 
View this message in context: 
http://www.nabble.com/Scritping-a-BeanShell-PreProcessor-tp18724200p18724200.html
Sent from the JMeter - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to