cancel
Showing results for 
Search instead for 
Did you mean: 

keep processing Get request untill condition is met

Highlighted
Super Contributor

keep processing Get request untill condition is met

Hi,

I have following question;

I need to send a Get request untill the response has value "status = concept".

 

How can I achieve this? Is property wait usefull function for this?

 

Thanks,
Mathijs

 

 

8 REPLIES 8
Highlighted
Community Hero

Re: keep processing Get request untill condition is met

Check if you can use "Conditional Goto" test step.

Target step should be your GET request step until status is not concept.


Regards,
Rao.
Highlighted
Super Contributor

Re: keep processing Get request untill condition is met

OK, I'll check and let you know the result!

Highlighted
Community Hero

Re: keep processing Get request untill condition is met

@mgroen2,

Step sequence:

1. GET REST request step
2. Conditional Goto


Regards,
Rao.
Highlighted
Super Contributor

Re: keep processing Get request untill condition is met

Hi @nmrao ,

 

I am struggling with the Conditional Goto...

I have 1 question:

 

Is this useable to repeat (with a delay) if the response code = 404? (can I use xpath evaluation for that?)

 

Highlighted
Community Hero

Re: keep processing Get request untill condition is met

I think it should be possible and yes delay would be better not to strain the server.

Xpath works for SOAP, but not sure for Json.

By the way, there is another possibility to achieve it using groovy script (no rest step). Please see below thread for reference (my last reply)
https://community.smartbear.com/t5/SoapUI-Pro/A-bit-more-groovy-help-Populating-a-REST-URI-with-Prop...


Regards,
Rao.
Highlighted
Super Contributor

Re: keep processing Get request untill condition is met

Well.. I have been working on it this morning.

Got it working but come into another thing:

The target in the Conditional is a delay, and this works, but how do I prevent that the delay test step is not executed ? On what place in the "test tree" does it need to be placed?

 

Hope it's clear what I mean.. I can't think of a situation where the "vertraging" is not executed when not necessary...

Highlighted
Community Hero

Re: keep processing Get request untill condition is met

If condition is false it should goto delay and execute the Rest call after the deiay. Otherwise, conditional goto should be to the next test step or end it (whatever appropriate)

Since delay is the first step in the sequence, you mean to say it is waiting unnecessarily? Hmm. can be done something.


Regards,
Rao.
Highlighted
Super Contributor

Re: keep processing Get request untill condition is met

Hi,

I gave it some re-thoughts... All I need is a "while do construction"; re-execute the REST call as long as response code = 404 (or after a specific time).

 

Do you have any idea on how to implement this?

 

Thanks,
Mathijs

 

New Here?
Join us and watch the welcome video:
Announcements
TechCorner Leaderboard
Compete with community members in the TechCorner Challenge and get into the Leaderboard!

Rank Participant Points Earned
1 msiadak 12
2 nmrao 8
3 HimanshuTayal 3
Top Kudoed Authors