transfer parameter to groovyscript...
The following teststeps are executed
REST - post step
ID - transferstep
get request (take ID from step above)
ID - transferstep
HTTP - get step (take ID from step above)
the get will initiate a process and it will take a while...
so that the process wont fail we have adapted it to
REST - post step
ID - transferstep
get request (take ID from step above)
delay(500)
ID - transferstep
HTTP - get step (take ID from step above)
But the problem is. On different systems it will take a different amount of time...
so we try to execute a groovyscript instead the last two ones....
This is one of my first try of groovy scripting,...
import com.eviware.soapui.model.testsuite.TestRunner.Status
// import com.eviware.soapui.model.testsuite.TestStepResult
import com.eviware.soapui.model.testsuite.TestStepResult.TestStepStatus
def maxretry = 3
def mydelay = 2000
def mystatus = 0
def j = 0
log.info ("define variable maxretry: " + maxretry + " n")
log.info ("define variable mydelay: " + mydelay + " ms")
mystatus = testRunner.runTestStepByName("verify").getStatus()
while(mystatus != TestStepStatus.OK && j < maxretry) {
sleep(mydelay)
j = j + 1
log.info ("working a while... and wait another " + mydelay + " ms iteration("+j+")")
log.info ("check status now: " + mystatus)
log.info ("counter "+ j)
mystatus = testRunner.runTestStepByName("verify").getStatus()
}
Steporder is currently the lines below
REST - post step
ID - transferstep
get request (take ID from step above)
ID - transferstep
groovyscript
HTTP - get step (take ID from step above) (DEACTIVATED)
Can anybody give me a hint to solve this problem....