How to calculate or export the Total time :start - end of a Thread In JMeter
I'm having issue about calculate the Total time of a Thread in JMeter:
+ I have to run a scenario for: 100 times and I want to know the Start-End time of each time to measure the Deadline for my Project:
+ If the first run is : 5 minutes (from Start- to End) ,so 100 times will be: 100* 5 = 500 minutes.
+ All I want is: Can we export the: 5 minutes including in my Report File. Is it possible in JMeter? As I know, 5 minutes is only exists in Log File when the Jmeter is running and I can not export the Log File.
+ The reason is: I want to measure the Total time when I run the Scenario 100 times to report to my Leader.
Thanks everyone, hope you have a nice day
You can get this added to .jtl results file as follows:
- Add tearDown Thread Group to your Test Plan
- Add Beanshell Sampler to the tearDown Thread Group
- Put the following code into Beanshell Sampler's "Script" area
long start = Long.parseLong(vars.get("TESTSTART.MS"));
long end = System.currentTimeMillis();
long elapsed = (end - start) / 1000;
- Run JMeter in non-GUI mode as follows:
jmeter -Jsample_variables=elapsed -n -t /path/to/your/testplan.jmx -l /path/to/results.jtl
- The last column of "results.jtl" file will hold test duration in seconds