Unanswered question

How to capture Page response time in a variable?

I have to send page response time as input for next request. example starttime before step starts then end time after step end then i have to pass this start and endtime in next step request. I am able to capture with getting currentdate and storing into temp var then after complition of the step again getting current date as "EndTime" and storing into another endtime variable. then further sending as request parameter.

But Problem starts here ...Neoload result actually displaying less time than what i am capturing using currentdate, that because its including think time, which is more that what actualy page took for respond,

is there any way to get Actual Response time into variable which is showing under details tab when one virtual user is running. i am attaching screenshot for more detail.

in first screenshot is what i am getting , second screenshot will explain what i want to get

Rashmi A.
Rashmi A.

Rashmi A.

Level
0
65 / 100
points

Answers

This page response time including think time is only specific to the check virtual user. It's just an information but it's not the page response time that you will get while running your test. NeoLoad does not include think time in the page response.

So if you run a test you should get more or less the same time duration between the page response time and your JS calculation time.

If you would like to see in the check virtual user the same response time you can put 0 as think time in that page. Again it does not impact the execution as it's only an information.

 

Rashmi A.
Rashmi A.

Rashmi A.

Level
0
65 / 100
points

But my next request is dependent on some parameter which i will get in 1st response. thats why i need to give think time otherwise it will give assertion error .
Note : i am running as normal test not as virtual user with one iteration one user

Hi Rashmi / Nouredine

May I know how can i save the duration and the size in to a variable ?
are they automatically saved in any context variable ?
Can I retrieve them using javascript and display it in logs or something ?

edit: I was able to add a variable extraction to fetch the response size as that is present in the response header ...so it is getting saved to variable i used
but yet to know how to get the response time and save it in a variable for my later use...

Thanks & Warm Regards
Musaffir

Markus G.
Markus G.

Markus G.

Level
0
17 / 100
points

Pretty old question. And never really answered. especially Musaffir's question. I have the same question now and would be interested in an answer. There is a validation on each request, success if shorter than xxx would even be helpful if a Javascript action could be executed in case of a failure of that verification, which has access to the state of variables in the VariableManager in the same iteration