0

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

paul
  • 4,333
  • 16
  • 71
  • 144

1 Answers1

0
  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.

Dmitri T
  • 159,985
  • 5
  • 83
  • 133
  • It didnt work. Updated the question with screenshot. – paul Oct 03 '18 at 06:33
  • *Try running on [JMeter 1.0.2](https://archive.apache.org/dist/jakarta/jmeter/old/release/v1.0/), maybe it will help*. According to JMeter Best Practices you should be using [the latest JMeter version](https://jmeter.apache.org/usermanual/best-practices.html#use_latest_version) which is [JMeter 5.0](https://www.blazemeter.com/blog/what-is-new-jmeter-5) as of now, in your case you should be using the latest version of [JMeter Maven Plugin](https://github.com/jmeter-maven-plugin/jmeter-maven-plugin) which is **2.7.0**. Your "doesn't work" statement is not informative without log files – Dmitri T Oct 03 '18 at 06:46
  • I have tried with `Jmeter 5.0` and `Jmeter Maven Plugin 2.7.0`. I am able to get reports with timestamp but this time instead of generating `.jtl` it gave me a combined `.csv` results file. So I have three files 1 combine report (in place of jtl) and two agg reports for each thread. – paul Oct 03 '18 at 07:26