I need to have script relative file name (relative to test plan file) in BFS Prepocessor in JMeter. I need something like: “../scripts/commonscript.js” but this doesn’t work, I have to use the whole path and this is very bad for version control.
Is there some variable/property/function so I can use path relative to test plan file?
I need to have script relative file name (relative to test plan file) in
Share
Looking at BSFSampler code, FileName is relative to /bin.
So the way to to it :
Add a User Defined Variables called scriptDir
With value ${__P(scriptDir, dfltvalue)}
Use it in your path as ${scriptDir}/
Define this variable at startup using -JscriptDir=