Closed christiaanwvermaak closed 1 year ago
Thank you for submitting the feature request, @christiaanwvermaak. As discussed via WhatsApp, this shouldn't be too hard to implement. I think I'll add both an option to verify the response time (using NHamcrest matchers) and to extract it for use in a custom assertion (or logging, or whatever).
Added ability to extract the response time as a TimeSpan
in https://github.com/basdijkstra/rest-assured-net/commit/ad68705632c2cace69e4ddedfb7eb157e9abb9bb
Both features are available in 3.0.0-beta.2
, could you please test them and close this issue if all works as expected, @christiaanwvermaak ?
Both of the ways proposed to implement this is working correctly.
As part of SLA for responses, one should be able to specify the maximum amount of time, in milliseconds or seconds, for a response and then you should be able to validate if it is within the response time specified by the SLA. Alternatively, just provide a method to return just the response time so that one can do an assert in the code.