jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Carlyon <joecarl...@gmail.com>
Subject Text parsing error occurs when "${" is present and used with escaping slashes
Date Thu, 09 Oct 2014 21:05:30 GMT
In JMeter version 2.11 r1554548 I'm getting an error when parsing text that
contains an opening brace. Code is as follows:

foo = vars.get("ORIGIN");
//${TEST}
log.info(errorAssertion ="\\W\\w " + foo);

The error log shows this:
2014/10/09 15:55:38 ERROR - jmeter.util.BeanShellInterpreter: Error
invoking bsh method: eval Sourced file: inline evaluation of: ``foo =
vars.get("ORIGIN"); //${TEST} log.info(errorAssertion ="\W\w " + foo);''
Token Parsing Error: Lexical error at line 3, column 28.  Encountered: "W"
(87), after : "\"\\"
2014/10/09 15:55:38 WARN  - jmeter.protocol.java.sampler.BeanShellSampler:
org.apache.jorphan.util.JMeterException: Error invoking bsh method:
eval Sourced
file: inline evaluation of: ``foo = vars.get("ORIGIN"); //${TEST}
log.info(errorAssertion
="\W\w " + foo);'' Token Parsing Error: Lexical error at line 3, column
28.  Encountered: "W" (87), after : "\"\\"

This does *not* happen when line 2 is changed to look like the following:
//$}

Is this a known issue? I haven't had luck finding it with Google searches.

Thanks,

Joe

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message