0
votes

I want to save Jmeter aggregate report to project's target folder with timestamp,so that everytime I run the tests I get the new unique report, irrespective of OS.

I tried by providing this path /target/jmeter/results/aggReport.csv but it saved it in C:/target/jmeter/results/aggReport.csv Also there was no time stamp.

E.g. 100320182130aggReport.csv which is mmddyyyyhhmmaggReport.csv

This question is in continuation of soemthing I wanted to achieve here and suggested by Dmitri Jmeter: Test plan has two thread groups but it generated only 1 jtl report

I am using Maven, Java 8, Windows 7

Update:

I tried: enter image description here

1

1 Answers

0
votes
  1. In case of JMeter test execution via Maven JMeter's working directory (or Java user.dir property) points to target/jmeter/bin folder so you need to construct the desired path relative to it
  2. Your path starts with / which means it is absolute and points to root folder of the file system
  3. You need to include __time() function into the resulting filename if you want the result to be prepended by the timestamp

Assuming all above your listener "Filename" field should look like:

../results/${__time(MMddyyyyhhmm,)}aggReport.csv

Check out Five Ways To Launch a JMeter Test without Using the JMeter GUI article for more information on various ways of kicking off a JMeter test including using Maven plugin.