Reputation: 1268
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?
Upvotes: 0
Views: 638
Reputation: 58772
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.
Upvotes: 1