Loop a request till a certain response?
I have written a LR test to submit a document creation request to my web application.
After this request I make another request to know the status of my previous request.
The application returns the status in form of percentage along with other info.
I want to make LR loop this 2nd request till the response status is 100%.
I am going for while loop with web_reg_save_param_regexp, but it will generate lots of Output ans Result data.
I was wondering if there is an efficient way of doing it? Kindly share.
What do your foundation skills in C programming suggest is the path in this case? You have a loop that you want to repeat until a condition has been met or do something while another condition is true or false. What can you visualize as a path.
Note: this is a common condition for report generators which fall into a request loop where a request is sent every ~n~ second from the client to the server to check the status to see if the report has been completed.
As for your statement "it will generate lots of Output ans Result data" are you concerned about this data being generated during your debugging or are you leaving logging enabled while you are running your actual tests?
Originally Posted by syedalikazmi
Might be worth researching the lr_set_debug_message statement also for controlling the log output from your while loop (which incidentally would seem to be the best way to handle this type of situation).