How to get current time in Jmeter?
In this article we are going to see functions of jmeter used for getting the current time when jmeter test is running.
Form jmeter function, we can this to get current time
${__time(HMS,shantonuTime)}
It has two parameter . first one is the format and second one is the variable name where the time will be stored. So, either we can get the data and we can also store data with defined variable. Both are optional. This function supports following format
YMD = yyyyMMdd
HMS = HHmmss
YMDHMS = yyyyMMdd-HHmmss
USER1 = whatever is in the Jmeter property time.USER1
USER2 = whatever is in the Jmeter property time.USER2
And, I use shantonuTime as variable name.
Note : This function returns current time in millisecond. If we use formation, then it converts to corespondent simple date format.
Thanks..:)
Form jmeter function, we can this to get current time
${__time(HMS,shantonuTime)}
It has two parameter . first one is the format and second one is the variable name where the time will be stored. So, either we can get the data and we can also store data with defined variable. Both are optional. This function supports following format
YMD = yyyyMMdd
HMS = HHmmss
YMDHMS = yyyyMMdd-HHmmss
USER1 = whatever is in the Jmeter property time.USER1
USER2 = whatever is in the Jmeter property time.USER2
And, I use shantonuTime as variable name.
Note : This function returns current time in millisecond. If we use formation, then it converts to corespondent simple date format.
Thanks..:)