Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change the Results file name during runtime in JMeter?

Tags:

jmeter

I have a sampler inside my test plan. I also have a Simple Data Writer to save requests and responses.

I have entered "Results.xml" to filename field in Simple Data Writer. When I run the test plan, a text file gets generated in the designated path.

Is it possible to change the filename to "Threadgroupname_SamplerName_Results.xml" at runtime?

For example, I have renamed my Thread group to "Search" and the sampler to "CurrencyConverter". Is it possible to save the result in format "Search_CurrencyConverter_Results.xml" during runtime?

like image 292
prashanth Avatar asked Oct 24 '12 09:10

prashanth


1 Answers

You can use variable placeholders and the __time function in the filename input field to have it dynamically set/changed at runtime. Something like this:

${results.dir}/myresultfile_${__time(YMDHMS)}.xml
like image 84
Fábio Uechi Avatar answered Oct 31 '22 20:10

Fábio Uechi