Ask a Question

How to get the time taken from a VIRT Response

tonaortega
Occasional Contributor

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 3
nmrao
Community Hero

The one in the SoapUI log, should be the time take for round trip.


Regards,
Rao.
tonaortega
Occasional Contributor

Hello @nmrao,

 

Is there any way I can get this value and add it into a property?

 

-Tona O.

cancel
Showing results for 
Search instead for 
Did you mean: