Skip to content

__StringToFile

JMeter __StringToFile function reference: syntax, parameters, and practical examples for parameterizing test plans with dynamic values.

Difficulty
intermediate
Guide type
reference
Estimated read time
1 min read
Last verified version
Verified JMeter 5.6

Also documented in context in the full Functions and Variables reference.

The __StringToFile function can be used to write a string to a file. Each time it is called it writes a string to file appending or overwriting.

The default return value from the function is the empty string

NameRequiredDescription
Path to fileYesPath to the file name.(The path is absolute)
String to writeYesThe string to write to the file. If you need to insert a line break in your content, use \n in your string.
Append to file?NoThe way to write the string, true means append, false means overwrite. If not specified, the default append is true.
File encoding if not UTF-8NoThe encoding to be used to write to the file. If not specified, the default encoding is UTF-8.
On this page