1.BeanShell sampler中使用
在BeanShell sampler输入import org.apache.jmeter.services.FileServer;FileServer.getFileServer().getBaseDir();
运行时输出当前脚本所在的目录:F:\workspace\udf

2.作为变量使用
在用户自定义变量中定义变量udf_url,值为${__BeanShell(import org.apache.jmeter.services.FileServer;FileServer.getFileServer().getBaseDir();)}

JMETER中获取脚本运行目录
最新推荐文章于 2024-11-02 15:02:52 发布
337

被折叠的 条评论
为什么被折叠?



