I have a Jmeter script with a variable define in test Plan
SCRIPT_DIR ${__groovy(import org.apache.jmeter.services.FileServer; FileServer.getFileServer().getBaseDir();)}${__groovy(File.separator,)}
INPUT_DIR ${SCRIPT_DIR}./../data
RESULT_DIR ${SCRIPT_DIR}./../resultat
RUN_ID ${__P(runID, ${__time(yyyy'-'MM'-'dd_HH'h'mm'm'ss's',)})}
RESULT_DIR is used to define the location of my Simple Data Write and my Summary Report
${RESULT_DIR}${SLASH}${RUN_ID}${SLASH}errors.xml
${RESULT_DIR}${SLASH}${RUN_ID}${SLASH}rapport_summary.csv
I want to execute my script in distributed mode with two instances, VM1 and VM2
On each VM, I have start my jmeter-server and they are OK
[user@vm1]$ ./script/lance_jmeter_with_config_mode_server.sh
Created remote object: UnicastServerRef2 [liveRef: [endpoint:[xxx.xxx.xxx.xxx:45595](local),objID:[2ff2de01:18e896a8f94:-7fff, 7070060110512970506]]]
Then I start my script in remote mode (-r) and it's ok
$JMETER_HOME/bin/jmeter.sh -r -n -t /home/user/script/myscript.jmx -G$/home/user/config/myconf.properties -j /home/user/resultat/jmeter.log
Starting the test on host xxx.xxx.xxx.xxx @ March 29, 2024 9:54:44 AM CET (1711702484330)
But on my directory, when Jmeter create the "resultat" folder, the variables are not translated. Folder is name "${SCRIPT_DIR}./../"
Is there any specific configuration for resolve this problem ?
As per User Defined Variables documentation:
So if you want to proceed with your current approach you need to:
SCRIPTin 1st User Defined VariablesINPUT_DIRandRESULT_DIRusing 2nd instance of the User Defined VariablesMore information: Using User Defined Variables