HunterATtown
11 years agoOccasional Contributor
Any alternate for sleep()?
Hi,
I have a test case with following steps(example):
Step1 : PUT request - to insert some record
Step2 : Wait for 2 minutes
Step3 : GET request - to verify the inserted record
Here as per the requirement, server returns the fresh record within 2 minutes(any time within 2 minutes).
So instead of waiting for 2 minutes each time, i want to run(automatically) the test step(Step3) repeatedly unless I get its status code as '200 OK'(fresh record returned) and that step should not run more than 2 minutes.
Can anybody help me with this?
Let me know if any other details require...
Thanks,
I have a test case with following steps(example):
Step1 : PUT request - to insert some record
Step2 : Wait for 2 minutes
Step3 : GET request - to verify the inserted record
Here as per the requirement, server returns the fresh record within 2 minutes(any time within 2 minutes).
So instead of waiting for 2 minutes each time, i want to run(automatically) the test step(Step3) repeatedly unless I get its status code as '200 OK'(fresh record returned) and that step should not run more than 2 minutes.
Can anybody help me with this?
Let me know if any other details require...
Thanks,