samedi 27 avril 2019

Conditional Goto based on Groovy Result response

first of all, I'm not sure if this is possible but I want to make a groovy script to run conditionally to one or another step based on the groovy script result:

The options I want to have is 3 :

Active Inactive Stop

I have a groovy script step to define a UI window to prompt like this:

def ui = com.eviware.soapui.support.UISupport;
def path = ui.prompt("Active Inactive or Stop","Title","");
def regResult = path

So based on what I type inside the popup window do the following:

If Active / Go to testRunner.gotoStepByName("InjectActive")
If Inactive / Go to testRunner.gotoStepByName("InjectInactive")
If Stop / Go to testRunner.gotoStepByName("Final Results")

Image of current Script

Any Ideas on how can I do this?

Thanks in advance

Aucun commentaire:

Enregistrer un commentaire