JMeter __FileToString function reference: syntax, parameters, and practical examples for parameterizing test plans with dynamic values.
Also documented in context in the full Functions and Variables reference.
The FileToString function can be used to read an entire file. Each time it is called it reads the entire file.
If an error occurs opening or reading the file, then the function returns the string โ**ERR**โ
| Name | Required | Description |
|---|---|---|
| File Name | Yes | Path to the file name. (The path can be relative to the JMeter launch directory) |
| File encoding if not the platform default | No | The encoding to be used to read the file. If not specified, the platform default is used. |
| Variable Name | No | A reference name - refName - for reusing the value created by this function. Stored values are of the form \${refName}. |
The file name, encoding and reference name parameters are resolved every time the function is executed.