0

How can I add the actual date to the file name of a JMeter csv result file while running the test in command line mode? E.g.

jmeter -n -t ~/tests/TP_Login_api.jmx -Jusers=12 -Jhost=devops1 -Juser_file=users_max.csv -Jaccount=max -l /results/results_TP_Login_api_${__time(yyyyMMdd-HHmmss)}.csv -e -o/results/report/TP_Login_api

Any ideas how dto achieve that?

JohnSmith
  • 978
  • 1
  • 6
  • 20

1 Answers1

1

In batch you need to work with batch syntax. For Bsh use:

 #!/bin/bash
 NOW=$(date +"%m-%d-%Y")
 jmeter -n -t ~/tests/TP_Login_api.jmx -Jusers=12 -Jhost=devops1 -Juser_file=users_max.csv -Jaccount=max -l /results/results_TP_Login_api_$NOW.csv -e -o/results/report/TP_Login_api

For windows see date.

user7294900
  • 52,490
  • 20
  • 92
  • 189