How to get the start time of a request and of the response in groovy script ?
Hello eveyrone !
I have been searching a lot about that and didn't find an answer. I would like to know how in groovy script, I can have the time of whenthe request was send and the time of when the response was send ?
Thanx in advance for your help !
Solved! Go to Solution.
There is a way to get the time the request was sent and how long it took to get a respose. You can add those two together to get the response time.
I wrote about something similar at https://community.smartbear.com/t5/SoapUI-Pro/Sharing-is-caring-groovy-script-to-log-the-test-execut...
Can you see if this helps you?
It's not clear to me because I get the following result with getTimestamp : 1553695803464 How is it a date ?
Sorry, guess I should have mentioned that timstamp is in unix time. Add this to convert it from unix time.
Date date = new Date(messageExchange.getTimestamp() );
Thanx It works 😄 And thx eveyrone for your help !