Reputation: 97
I want to write a results CSV file in JMeter which contains a variable in path of the file I write.
E.g.
C:\\Users\\User1\\test-results\\${output}.csv
But I only seem to be able to use predefined variables like ${__time(ddMMyyHHmmss)}
Is there a way to use user defined variables in the path? I have successfully done this to find input files by defining the variable in the test plan node as a User Defined Variable.
Upvotes: 1
Views: 3931
Reputation: 6884
In JMeter 3.1(?) (or Windows?) a double slash is required in the path.
I have used the following successfully:
c:\\jmeter\\results\\${testId}\MyReport.csv
c:\\jmeter\\results\\${testId}\MyReport.csv
c:\\jmeter\\results\\${__time(yyyyMMddHHmm)}\MyReport.csv
c:\\jmeter\\results\\${__time(yyyyMMddHHmm)}.csv
${testId}
is a User Defined Variable configured in the Test Plan and set to ${__time(yyyyMMddHHmm)}
Upvotes: 0
Reputation: 3817
I managed to use user defined variable in the path of result file using JMeter 2.9. REPORT is a user defined variable with value REPORT. It gives me file named REPORT.csv
Upvotes: 1