Solved
Forum Discussion
7 Replies
Sort By
- jsheph01Contributor
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.
Class RestResponseMessageExchange
messageExchange.getTimestamp() messageExchange.getTimeTaken()
- nmraoChampion Level 3Please note that the above script (messageExchange) works in only Script Assertion.
- LucNOccasional Contributor
It's not clear to me because I get the following result with getTimestamp : 1553695803464 How is it a date ?
- jsheph01Contributor
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() );
- LucianCommunity Hero
I wrote about something similar at https://community.smartbear.com/t5/SoapUI-Pro/Sharing-is-caring-groovy-script-to-log-the-test-execution/m-p/168155#M38052
Can you see if this helps you?
Related Content
- 6 years agopankajmalinda
- 7 years agoKate