Forum Discussion

skelander's avatar
skelander
Occasional Contributor
6 years ago

Waiting for a REST resource

Hello!

 

I wonder if there is a way to wait for a REST resource to be created? What I'd like to do is this (kinda):

 

1. Load data into the datebase

2. Have SoapUI wait for a REST resource to be created

 

I guess I could put a Delay step in there, but that's not a good solution. Also, using Conditional Gotos is messy.

 

Cheers,

Rikard

2 Replies

  • groovyguy's avatar
    groovyguy
    Champion Level 1

    Short of using a delay step, I am not sure how else you would achieve this. Maybe a groovy step that can query to see if your REST resource is created that can make sure you aren't delaying too long. Other than going down that route, which may be more complex, I think a delay step would be the easiest answer. 

    What reason, if I may ask, is there to NOT use a delay step?

    • skelander's avatar
      skelander
      Occasional Contributor

      Thanks for the reply!

       

      I've been thinking the same way. We're looking into creating a groovy-script in the same way you propose.

       

      The reason we try to avoid using a Delay is that we are not sure how fast the resource is created. I guess we could set the Delay to 30 sec, but that will slow our test down.

       

      Cheers,

      Rikard