Contributions
Re: Scripting goto next step
Thank you for your feedback. However, are you aware of a solution for the following? Is there a way I can calculate the index of the step I am currently on to skip over the next step? Something like the following? if(condition){ stepNum = context.getCurrentStep().index //--unsure how to do this stepNum = stepNum+2 testRunner.gotoStep(stepNum) }647Views0likes1CommentRe: Scripting goto next step
I am using a Groovy script to check for a condition (if local) and skipping the next step if it is true. I am currently skipping it by name but I would prefer just to use the (calculated) step index in case the step name changes or the other non-skipped steps change order. In general, I want to avoid referencing steps by name in case of name changes. Is there a way I can calculate the index of the step I am currently on to skip over the next step? Something like the following? if(condition){ stepNum = context.getCurrentStep().index //--unsure how to do this stepNum = stepNum+2 testRunner.gotoStep(stepNum) }680Views0likes3CommentsScripting goto next step
I am using SoapUI 5.7. In my test steps, I use a groovy script to conditionally jump past a step as it will fail if running the suite locally. I can skip to another step by name, but I am concerned if someone were to rename a step or rearrange them it would break things. As such, how can I just check what step index I am currently on and jump past the next step (current +2)? testrunner.gotoStepByName() testrunner.gotoStep() //--unable to get the index from the step class context.getCurrentStep()743Views1like5Comments