Get response time excluding prepared time in rest assured

49 views Asked by At

this screenshot is from Postman tool while hovering over Time after get request, is there any way to get time which is highlighted in red (excluding prepare time) as Rest assured is giving the yellow highlighted time(including prepare time).Click here to view screenshot

i tried to use getTime() but that is not expected one which i need

1

There are 1 answers

1
sschandra On

Please post a sample snippet code how did u try.

Generally u can get the response time like below :

    Response response = RestAssured.get("url/endpoint");
    long responseTime = response.time();
    System.out.println("Response Time: " + responseTime + " milliseconds");

The above time will include below things:

Request Sending Time: The time taken to send the request to the server.

Server Processing Time: The time taken by the server to process the request.

Response Receiving Time: The time taken to receive the response from the server.