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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to