poloyy-archive
首页 / Jmeter 常用函数 / Jmeter 常用函数(28)- 详解 __FileToString

Jmeter 常用函数(28)- 详解 __FileToString

Jmeter 常用函数  ·  原文归档  ·  点击图片可放大

作用

读取整个文件

语法格式

${__FileToString(C:\Users\user\Desktop\test1.dat,,)}

参数讲解

字段 含义 是否必传
File Name 需要读取的文件名 yes
File encoding - 读取文件的字符集 - 不传则用系统默认字符集 no
Variable name 返回值引用名称 no

实际栗子

待读取文件的内容

线程组结构树

结果树

上一篇Jmeter 常用函数(27)- 详解 __env 下一篇Jmeter 常用函数(29)- 详解 __eval