Forum Discussion

tonaortega's avatar
tonaortega
Occasional Contributor
7 years ago

How to get the time taken from a VIRT Response

 

Hi Community!

 

I've been working building services for Performance Test purposes and I got asked if I could track down the response time that takes the Virt to reply back to an incoming request. I've found an instruction that gets me MockResponse Time Taken. I'm not sure if this would be accurate, if I trigger a request from SoapUI, the actual response time is different as on timeTaken result. Here's the instruction:

 

log.info "Time Taken:" +mockResponse.getMockResult().timeTaken

 

Result:

2017-05-10 18:07:10,862 INFO  [log] Time Taken:35

 

SoapUI log: 

response time: 89ms (7003 bytes)

 

My guess is SoapUI log is taking response time from messages exchange (request&response), if this is the case what would timeTaken is measuring? 

 

I placed the instruction on Response Script. 

 

I'll appreciate your thoughts.

 

-Tona Ortega.

 

3 Replies