conditional goto with groovy does not work properly
Hello,
I'm trying to do conditional workflow with groovy steps as I need to trigger on property value. Here is my testcase:
initial property value: fail_count = 0
- soap - Authenticate
- groovy - recover session id
- first branch : if fail_count == 0 testRunner.gotoStep(SetBlock)
if fail_count == 2 : increase fail_count and testRunner.gotoStep(GetPendingRequest) // do not do SetBlock twice
- soap - SetBlock (asynchronous call)
- soap - GetPendingRequest - checks if result is 'success'
- second branch : if pending : loop on GetPendingRequest - increase fail_count
if fail_count = 2 : testRunner.runTestStepByName("Disconnect")
testRunner.gotoStep(Authenticate) in order to authenticate, recover session_id, etc.
if fail_count > 2 : do nothing, carry on looping to await for 'success' status
- Disconnect
I clearly see when Disconnect is called, but it seems that it does not go back to the first step for re-authentifying.
Does the gotoStep function really branches onto the specified step or is there another way to proceed ?
thank you