Hi,
this would do it:
import org.apache.jmeter.util.JMeterUtils;
String fileContents = new File('./nameOfFileToRead.txt').getText('UTF-8');
vars.put("your_fileContentsVariableName",fileContents);
println(fileContents);
Use a JSR223 Sampler with the language set to groovey
This script assumes the 'nameOfFileToRead.txt' is in your jmeter bin folder
ZK
--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]