You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by "glinius@live.com" <gl...@live.com> on 2018/07/02 05:22:24 UTC

Re: JSR223 PreProcessor - Issue

Don't inline  JMeter Functions and/or Variables
<https://jmeter.apache.org/usermanual/functions.html>   into Groovy code. 

As per  JSR223 Sampler documentation
<http://jmeter.apache.org/usermanual/component_reference.html#JSR223_Sampler>  


> When using this feature, ensure your script code does not use JMeter
> variables directly in script code as caching would only cache first
> replacement. Instead use script parameters

 

If you're looking for a "pure"  Groovy
<https://www.blazemeter.com/blog/groovy-new-black>   equivalent of your code
it would be something like:


> vars.put('MESSAGE', new File('C:\\Users\\xyz\\Desktop\\Test.txt').text)





--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org